lattice_sdk/api/types/
pose.rs

1pub use crate::prelude::*;
2
3#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
4pub struct Pose {
5    /// Geospatial location defined by this Pose.
6    #[serde(skip_serializing_if = "Option::is_none")]
7    pub pos: Option<Lla>,
8    /// The quaternion to transform a point in the Pose frame to the ENU frame. The Pose frame could be Body, Turret,
9    /// etc and is determined by the context in which this Pose is used.
10    /// The normal convention for defining orientation is to list the frames of transformation, for example
11    /// att_gimbal_to_enu is the quaternion which transforms a point in the gimbal frame to the body frame, but
12    /// in this case we truncate to att_enu because the Pose frame isn't defined. A potentially better name for this
13    /// field would have been att_pose_to_enu.
14    ///
15    /// Implementations of this quaternion should left multiply this quaternion to transform a point from the Pose frame
16    /// to the enu frame.
17    ///
18    /// Point<Pose\> posePt{1,0,0};
19    /// Rotation<Enu, Pose\> attPoseToEnu{};
20    /// Point<Enu\> = attPoseToEnu*posePt;
21    ///
22    /// This transformed point represents some vector in ENU space that is aligned with the x axis of the attPoseToEnu
23    /// matrix.
24    ///
25    /// An alternative matrix expression is as follows:
26    /// ptEnu = M x ptPose
27    #[serde(rename = "attEnu")]
28    #[serde(skip_serializing_if = "Option::is_none")]
29    pub att_enu: Option<Quaternion>,
30}