#frame #coordinate #3d #transform #object #space #rotation

ecoord

Library for transforming between 3D coordinate frames

3 releases

0.0.1-alpha.4 Aug 5, 2024
0.0.1-alpha.3 Jul 9, 2024
0.0.1-alpha.2 Jul 8, 2024

#241 in Science

Download history 9/week @ 2024-07-27 194/week @ 2024-08-03 57/week @ 2024-08-10 53/week @ 2024-08-17 53/week @ 2024-08-24 109/week @ 2024-08-31 31/week @ 2024-09-07 84/week @ 2024-09-14 97/week @ 2024-09-21 51/week @ 2024-09-28 12/week @ 2024-10-05 44/week @ 2024-10-12 40/week @ 2024-10-19 44/week @ 2024-10-26 54/week @ 2024-11-02 12/week @ 2024-11-09

150 downloads per month
Used in 29 crates (17 directly)

MIT/Apache

75KB
1.5K SLoC

ecoord

Library for transforming between 3D coordinate frames.

The library is at an early stage of development.

Contributing

The library is developed at the TUM Chair of Geoinformatics and contributions are highly welcome.


lib.rs:

A library for transforming between 3D coordinate frames.

The position of an object in 3D space can be described geometrically using an inertial frame of reference. If the transform (translation and rotation) between two reference frames is known, the object's position can be determined for each frame.

As some objects, like pedestrians or UAVs, move in space, a reference frame can be time-dependent. Each transform object has a timestamp defined in seconds and nanoseconds, whereby different interpolation strategies, such as step-wise or linear, can be applied.

The transforms from a frame to another are assigned to channels, which enables the activation and deactivation of selected channels. If multiple channels describe the same transform from a frame to another frame, the channel with the highest prioritization number is used. If multiple channels have the same prioritization number, the alphabetically sorted last channel name is used.

Overview

Data Structure

For de/serializing JSON is used in three forms:

  • ecoord.json: readable JSON
  • file_name.ecoord.json prefixing with a file name
  • file_name.ecoord.json.zst: compressed JSON using the ZStandard compression algorithm

Document Structure:

  • document
    • transforms
      • channel_id: [String]
      • frame_id: [String]
      • child_frame_id: [String]
      • timestamp:
        • sec: [i32]
        • nanosec: [u32]
      • duration: [Option] durations must lead to overlaps (no undefined times)
        • sec: [i32]
        • nanosec: [u32]
      • translation
        • x: [f64]
        • y: [f64]
        • z: [f64]
      • rotation: in Quaternion
        • x: [f64]
        • y: [f64]
        • z: [f64]
        • w: [f64]
    • channel_info: additional information on channels
      • ìd: [String]
      • priority: [Option]<[i32]>
        • default: 0
        • if multiple channels hold transforms for the same frame to child frame, the one with the higher priority is selected
    • frame_info: additional information on frames
      • id: [String]
        • unique identifier
      • crs_epsg: [Option]<[i32]>
    • transform_info
      • frame_id: [String]
      • child_frame_id: [String]
      • interpolation_method: [Option]<[String]>
        • step (default): piecewise constant interpolation
        • linear: linear interpolation

Dependencies

~9MB
~172K SLoC