This guide covers Vulcan's frame-tree API for extensible coordinate transforms:
- FrameRegistry stores frame topology.
- TransformProvider defines child/parent math per edge.
- FrameContext<Scalar> ties topology and providers together.
Quick Start
Vec3<double> v_body;
v_body << 100.0, 0.0, 0.0;
Definition FrameContext.hpp:21
void set_ned(Scalar lon, Scalar lat)
Definition FrameContext.hpp:53
void set_body_euler(Scalar yaw, Scalar pitch, Scalar roll)
Definition FrameContext.hpp:88
void set_ecef(Scalar rotation_angle)
Definition FrameContext.hpp:36
Vec3< Scalar > transform(const Vec3< Scalar > &v, FrameID from, FrameID to) const
Definition FrameContext.hpp:175
constexpr double deg2rad
Degrees to radians conversion factor.
Definition Constants.hpp:156
Definition Aerodynamics.hpp:11
constexpr FrameID FRAME_ECI
Definition FrameID.hpp:49
constexpr FrameID FRAME_BODY
Definition FrameID.hpp:53
constexpr FrameID FRAME_NED
Definition FrameID.hpp:51
static constexpr ConstantOmegaRotation from_wgs84(double theta0=0.0)
Create rotation model using WGS84 angular velocity.
Definition EarthModel.hpp:118
Built-In Hierarchy
Default tree (FrameRegistry::default_aerospace()):
- ECI (root)
- ECEF child of ECI
- NED, ENU, Geocentric, Rail, CDA children of ECEF
- Body child of NED
- Wind, Stability children of Body
Custom Frames
auto sensor_q =
"Sensor",
Vec3<double> v_sensor;
v_sensor << 1.0, 0.0, 0.0;
FrameID add_frame(const std::string &name, FrameID parent, std::shared_ptr< TransformProvider< Scalar > > provider)
Definition FrameContext.hpp:159
Provider backed by a quaternion that rotates child -> parent.
Definition TransformProvider.hpp:92
Symbolic Usage
FrameContext is templated and works with SymbolicScalar:
auto gmst = sym("gmst");
auto lon = sym("lon");
auto lat = sym("lat");
auto yaw = sym("yaw");
auto pitch = sym("pitch");
auto roll = sym("roll");
Backward Compatibility
Existing APIs remain unchanged:
- CoordinateFrame<Scalar>
- transform_vector(...)
- body_from_euler(...)
- lla_to_ecef(...) / ecef_to_lla(...)
Use FrameContext when you need automatic multi-hop traversal or custom frame registration.