Class Cart6

Inheritance Relationships

Base Type

Class Documentation

class Cart6 : public lupnt::State

Public Functions

inline Cart6(const State &x)

Reinterpret a generic State as a Cart6 (Cartesian position+velocity), checking its size and type tag.

Used wherever dynamics/conversion code receives a State and needs to access it as r()/v() (e.g. force-model accelerations, frame conversions via ConvertState).

Parameters:

x – 6-element state of type Cart6::TYPE.

inline Cart6(const Vec3 &r, const Vec3 &v, const Frame frame = Frame::MOON_CI)

Construct a Cart6 from separate position and velocity vectors.

Parameters:
  • r – Position [m] in frame.

  • v – Velocity [m/s] in frame.

  • frame – Reference frame (default MOON_CI).

inline Cart6(const Vec6 &x = Vec6::Zero(), const Frame frame = Frame::MOON_CI)

Construct a Cart6 from a stacked 6-element [position; velocity] vector.

Parameters:
  • x – [r_x, r_y, r_z, v_x, v_y, v_z] in [m, m, m, m/s, m/s, m/s].

  • frame – Reference frame (default MOON_CI).

inline Eigen::Ref<Vec3> r()

Mutable view of the position sub-vector.

Returns:

Position [m] in this state’s frame.

inline Eigen::Ref<Vec3> v()

Mutable view of the velocity sub-vector.

Returns:

Velocity [m/s] in this state’s frame.

inline Vec3 r() const

Position sub-vector.

Returns:

Position [m] in this state’s frame.

inline Vec3 v() const

Velocity sub-vector.

Returns:

Velocity [m/s] in this state’s frame.

Public Static Attributes

static StateType TYPE = "Cart6"