Vulcan
Aerospace Engineering Utilities Built on Janus
Loading...
Searching...
No Matches
vulcan Namespace Reference

Namespaces

namespace  aero
namespace  exponential_atmosphere
namespace  ussa1976
namespace  constants
namespace  units
namespace  validation
namespace  dynamics
namespace  environment
namespace  estimation
namespace  geodetic
namespace  geometry
namespace  gravity
namespace  io
namespace  mass
namespace  orbital
namespace  propulsion
 Propulsion utilities for rocket, air-breathing, and electric systems.
namespace  rng
namespace  detail
namespace  allan
namespace  bias_instability
namespace  gaussian
namespace  markov
namespace  sensors
namespace  random_walk
namespace  time
namespace  tf
 Transfer function utilities for linear systems and nonlinear elements.
namespace  constant_wind
namespace  dryden
namespace  von_karman
namespace  wind_shear
namespace  wind

Classes

struct  EarthModel
struct  EarthRotationModel
struct  ConstantOmegaRotation
struct  GMSTRotation
class  FrameContext
struct  FrameID
 Universal frame identifier. More...
struct  FrameNode
 A node in the frame tree (setup-time structure only). More...
struct  CoordinateFrame
struct  FramePath
 Ordered path between frames from source to target. More...
class  FrameRegistry
 Setup-time frame tree registry with LCA path finding. More...
struct  LLA
struct  Spherical
class  NEDProvider
class  ENUProvider
class  GeocentricProvider
class  RailProvider
class  CDAProvider
class  ECEFProvider
 Provider for the ECEF(child) <-> ECI(parent) edge. More...
class  BodyProvider
 Body(child) <-> NED(parent) provider. More...
class  WindProvider
 Wind(child) <-> Body(parent) provider. More...
class  StabilityProvider
 Stability(child) <-> Body(parent) provider. More...
class  TransformChain
struct  TransformProvider
 Interface for a frame edge transform (child <-> parent). More...
class  CoordinateFrameProvider
 Wrap a CoordinateFrame as a provider where parent is ECEF. More...
class  DCMProvider
 Provider backed by a DCM that maps child -> parent. More...
class  QuaternionProvider
 Provider backed by a quaternion that rotates child -> parent. More...
class  Table1D
class  TableND
class  ScatteredTable1D
class  ScatteredTableND
class  VulcanError
 Base exception for all Vulcan errors. More...
class  IOError
 File/stream I/O errors. More...
class  SignalError
 Signal schema and frame errors. More...
class  AtmosphereError
 Atmospheric model errors (altitude out of range, etc.). More...
class  CoordinateError
 Coordinate system errors (invalid LLA, singularities). More...
class  GravityError
 Gravity model errors. More...
class  TimeError
 Time system errors (invalid date, epoch mismatch). More...
class  SensorError
 Sensor model errors (invalid noise parameters). More...
class  MathError
 Math/Rotation errors. More...
class  WindError
 Wind model errors. More...
class  ValidationError
 Validation errors (invalid input ranges, non-finite values). More...

Typedefs

template<typename Scalar>
using Matrix = janus::JanusMatrix<Scalar>
 Dynamic-size matrix template (use with Scalar = double or SymbolicScalar).
template<typename Scalar>
using Vector = janus::JanusVector<Scalar>
 Dynamic-size vector template.
using NumericScalar = janus::NumericScalar
using NumericMatrix = janus::NumericMatrix
using NumericVector = janus::NumericVector
using Vec2d = Vec2<double>
using Vec3d = Vec3<double>
using Vec4d = Vec4<double>
using Mat2d = Mat2<double>
using Mat3d = Mat3<double>
using Mat4d = Mat4<double>
using SymbolicScalar = janus::SymbolicScalar
using SymbolicMatrix
using SymbolicVector
using Vec2s = Vec2<SymbolicScalar>
using Vec3s = Vec3<SymbolicScalar>
using Vec4s = Vec4<SymbolicScalar>
using Mat2s = Mat2<SymbolicScalar>
using Mat3s = Mat3<SymbolicScalar>
using Mat4s = Mat4<SymbolicScalar>

Enumerations

enum class  BuiltinFrame : uint16_t {
  ECI = 0 , ECEF , NED , ENU ,
  Body , Wind , Stability , Geocentric ,
  Rail , CDA , _BuiltinCount
}
 Built-in frame identifiers. More...
enum class  EarthRotationFidelity { ConstantOmega , GMST , IAU2006 }
enum class  EulerSequence {
  XYZ , XZY , YXZ , YZX ,
  ZXY , ZYX , XYX , XZX ,
  YXY , YZY , ZXZ , ZYZ
}

Functions

template<typename Scalar>
Vec3< Scalar > velocity_ecef_to_eci (const Vec3< Scalar > &v_ecef, const Vec3< Scalar > &r_ecef, const CoordinateFrame< Scalar > &eci, const EarthModel &m=EarthModel::WGS84())
template<typename Scalar>
Vec3< Scalar > velocity_eci_to_ecef (const Vec3< Scalar > &v_eci, const Vec3< Scalar > &r_ecef, const CoordinateFrame< Scalar > &eci, const EarthModel &m=EarthModel::WGS84())
template<typename Scalar>
Vec3< Scalar > coriolis_centrifugal (const Vec3< Scalar > &r_ecef, const Vec3< Scalar > &v_ecef, const EarthModel &m=EarthModel::WGS84())
template<typename Scalar>
Vec3< Scalar > coriolis_acceleration (const Vec3< Scalar > &v_ecef, const EarthModel &m=EarthModel::WGS84())
template<typename Scalar>
Vec3< Scalar > centrifugal_acceleration (const Vec3< Scalar > &r_ecef, const EarthModel &m=EarthModel::WGS84())
template<typename Scalar>
Vec3< Scalar > relative_position (const Vec3< Scalar > &r_target, const Vec3< Scalar > &r_observer)
template<typename Scalar>
Scalar range (const Vec3< Scalar > &r1, const Vec3< Scalar > &r2)
template<typename Scalar>
Scalar range_rate (const Vec3< Scalar > &r_target, const Vec3< Scalar > &v_target, const Vec3< Scalar > &r_observer, const Vec3< Scalar > &v_observer)
template<typename Scalar>
Vec3< Scalar > omega_ned_wrt_ecef (const Vec3< Scalar > &v_ned, Scalar lat, Scalar alt, const EarthModel &m=EarthModel::WGS84())
template<typename Scalar>
Vec3< Scalar > omega_ned_wrt_eci (const Vec3< Scalar > &v_ned, Scalar lat, Scalar alt, const EarthModel &m=EarthModel::WGS84())
template<typename Scalar>
CoordinateFrame< Scalar > local_ned (Scalar lon, Scalar lat_gd)
template<typename Scalar>
CoordinateFrame< Scalar > local_enu (Scalar lon, Scalar lat_gd)
template<typename Scalar>
CoordinateFrame< Scalar > local_geocentric (Scalar lon, Scalar lat_gc)
template<typename Scalar>
CoordinateFrame< Scalar > local_geocentric_at (const Vec3< Scalar > &r_ecef)
template<typename Scalar>
CoordinateFrame< Scalar > local_ned_at (const Vec3< Scalar > &r_ecef, const EarthModel &m=EarthModel::WGS84())
template<typename Scalar>
CoordinateFrame< Scalar > local_enu_at (const Vec3< Scalar > &r_ecef, const EarthModel &m=EarthModel::WGS84())
template<typename Scalar>
CoordinateFrame< Scalar > local_rail (const LLA< Scalar > &lla_origin, const Scalar &azimuth, const Scalar &elevation, const EarthModel &m=EarthModel::WGS84())
template<typename Scalar>
CoordinateFrame< Scalar > local_rail_at (const Vec3< Scalar > &r_ecef, const Scalar &azimuth, const Scalar &elevation, const EarthModel &m=EarthModel::WGS84())
template<typename Scalar>
CoordinateFrame< Scalar > local_cda (const LLA< Scalar > &lla_origin, const Scalar &bearing, const EarthModel &m=EarthModel::WGS84())
template<typename Scalar>
CoordinateFrame< Scalar > local_cda_at (const Vec3< Scalar > &r_ecef, const Scalar &bearing, const EarthModel &m=EarthModel::WGS84())
template<typename Scalar>
Vec3< Scalar > ecef_to_cda (const Vec3< Scalar > &r_ecef, const LLA< Scalar > &lla_ref, const Scalar &bearing, const EarthModel &m=EarthModel::WGS84())
template<typename Scalar>
Vec3< Scalar > cda_to_ecef (const Vec3< Scalar > &cda, const LLA< Scalar > &lla_ref, const Scalar &bearing, const EarthModel &m=EarthModel::WGS84())
template<typename Scalar>
Vec3< Scalar > transform_vector (const Vec3< Scalar > &v, const CoordinateFrame< Scalar > &from, const CoordinateFrame< Scalar > &to)
template<typename Scalar>
Vec3< Scalar > transform_position (const Vec3< Scalar > &pos, const CoordinateFrame< Scalar > &from, const CoordinateFrame< Scalar > &to)
template<typename Scalar>
Vec3< Scalar > transform (const Vec3< Scalar > &v, FrameID from, FrameID to, const FrameContext< Scalar > &ctx)
template<typename Scalar>
Vec3< Scalar > transform_position (const Vec3< Scalar > &pos, FrameID from, FrameID to, const FrameContext< Scalar > &ctx)
template<typename Scalar>
CoordinateFrame< Scalar > body_from_quaternion (const CoordinateFrame< Scalar > &ned, const janus::Quaternion< Scalar > &q_body_to_ned)
template<typename Scalar>
janus::Quaternion< Scalar > quaternion_from_body (const CoordinateFrame< Scalar > &body, const CoordinateFrame< Scalar > &ned)
template<typename Scalar>
CoordinateFrame< Scalar > body_from_euler (const CoordinateFrame< Scalar > &ned, Scalar yaw, Scalar pitch, Scalar roll)
template<typename Scalar>
Vec3< Scalar > euler_from_body (const CoordinateFrame< Scalar > &body, const CoordinateFrame< Scalar > &ned)
template<typename Scalar>
CoordinateFrame< Scalar > velocity_frame (const Vec3< Scalar > &velocity_ecef, const CoordinateFrame< Scalar > &ned)
template<typename Scalar>
Vec2< Scalar > flight_path_angles (const Vec3< Scalar > &velocity_ned)
template<typename Scalar>
Vec2< Scalar > flight_path_angles (const Vec3< Scalar > &velocity_ecef, const CoordinateFrame< Scalar > &ned)
template<typename Scalar>
Vec2< Scalar > aero_angles (const Vec3< Scalar > &velocity_ecef, const CoordinateFrame< Scalar > &body)
template<typename Scalar>
LLA< Scalar > ecef_to_lla (const Vec3< Scalar > &r, const EarthModel &m=EarthModel::WGS84())
template<typename Scalar>
Vec3< Scalar > lla_to_ecef (const LLA< Scalar > &lla, const EarthModel &m=EarthModel::WGS84())
template<typename Scalar>
Spherical< Scalar > ecef_to_spherical (const Vec3< Scalar > &r)
template<typename Scalar>
Vec3< Scalar > spherical_to_ecef (const Spherical< Scalar > &geo)
template<typename Scalar>
Scalar geodetic_to_geocentric_lat (Scalar lat_gd, const EarthModel &m=EarthModel::WGS84())
template<typename Scalar>
Scalar geocentric_to_geodetic_lat (Scalar lat_gc, const EarthModel &m=EarthModel::WGS84())
template<typename Scalar>
Scalar radius_of_curvature_N (Scalar lat, const EarthModel &m=EarthModel::WGS84())
template<typename Scalar>
Scalar radius_of_curvature_M (Scalar lat, const EarthModel &m=EarthModel::WGS84())
template<typename Scalar>
std::shared_ptr< ECEFProvider< Scalar > > make_ecef_provider (Scalar angle)
template<typename Scalar>
std::shared_ptr< ECEFProvider< Scalar > > make_ecef_provider (const EarthRotationModel &model, double t_seconds)
template<typename Scalar>
janus::Quaternion< Scalar > quaternion_from_axis_angle (const Vec3< Scalar > &axis, Scalar angle)
template<typename Scalar>
janus::Quaternion< Scalar > quaternion_from_rotation_vector (const Vec3< Scalar > &rot_vec)
template<typename Scalar>
Mat3< Scalar > dcm_from_axis_angle (const Vec3< Scalar > &axis, Scalar angle)
template<typename Scalar>
Mat3< Scalar > dcm_from_rotation_vector (const Vec3< Scalar > &rot_vec)
template<typename Scalar>
std::pair< Vec3< Scalar >, Scalar > axis_angle_from_quaternion (const janus::Quaternion< Scalar > &q)
template<typename Scalar>
Vec3< Scalar > rotation_vector_from_quaternion (const janus::Quaternion< Scalar > &q)
template<typename Scalar>
std::pair< Vec3< Scalar >, Scalar > axis_angle_from_dcm (const Mat3< Scalar > &R)
template<typename Scalar>
Vec3< Scalar > rotation_vector_from_dcm (const Mat3< Scalar > &R)
template<typename Scalar>
Mat3< Scalar > skew (const Vec3< Scalar > &v)
template<typename Scalar>
Vec3< Scalar > unskew (const Mat3< Scalar > &S)
template<typename Scalar>
Mat3< Scalar > compose_dcm (const Mat3< Scalar > &R1, const Mat3< Scalar > &R2)
template<typename Scalar>
Mat3< Scalar > relative_dcm (const Mat3< Scalar > &R_A, const Mat3< Scalar > &R_B)
template<typename Scalar>
Mat3< Scalar > dcm_from_small_angle (const Vec3< Scalar > &theta)
template<typename Scalar>
Vec3< Scalar > small_angle_from_dcm (const Mat3< Scalar > &R)
template<typename Derived>
auto is_valid_dcm (const Eigen::MatrixBase< Derived > &R, double tol=1e-9)
template<typename Scalar>
Mat3< Scalar > dcm_principal_axis (Scalar theta, int axis)
constexpr std::array< int, 3 > euler_axes (EulerSequence seq)
constexpr bool is_proper_euler (EulerSequence seq)
 Check if sequence is proper Euler (symmetric: first axis == third axis).
constexpr const char * euler_sequence_name (EulerSequence seq)
 Get sequence name as string (for debugging/logging).
template<typename Scalar>
Mat3< Scalar > dcm_from_euler (Scalar e1, Scalar e2, Scalar e3, EulerSequence seq)
template<typename Scalar>
janus::Quaternion< Scalar > quaternion_from_euler (Scalar e1, Scalar e2, Scalar e3, EulerSequence seq)
template<typename Scalar>
Vec3< Scalar > euler_from_dcm (const Mat3< Scalar > &R, EulerSequence seq)
template<typename Scalar>
Vec3< Scalar > euler_from_quaternion (const janus::Quaternion< Scalar > &q, EulerSequence seq)
template<typename Scalar>
janus::Quaternion< Scalar > slerp (const janus::Quaternion< Scalar > &q0, const janus::Quaternion< Scalar > &q1, Scalar t)
template<typename Scalar>
janus::Quaternion< Scalar > quat_exp (const Vec3< Scalar > &v)
template<typename Scalar>
Vec3< Scalar > quat_log (const janus::Quaternion< Scalar > &q)
template<typename Scalar>
janus::Quaternion< Scalar > squad_control_point (const janus::Quaternion< Scalar > &q_prev, const janus::Quaternion< Scalar > &q_curr, const janus::Quaternion< Scalar > &q_next)
template<typename Scalar>
janus::Quaternion< Scalar > squad (const janus::Quaternion< Scalar > &q0, const janus::Quaternion< Scalar > &q1, const janus::Quaternion< Scalar > &s0, const janus::Quaternion< Scalar > &s1, Scalar t)
template<typename Scalar>
Vec3< Scalar > omega_from_quaternion_rate (const janus::Quaternion< Scalar > &q, const janus::Quaternion< Scalar > &q_dot)
template<typename Scalar>
janus::Quaternion< Scalar > quaternion_rate_from_omega (const janus::Quaternion< Scalar > &q, const Vec3< Scalar > &omega_body)
template<typename Scalar>
Vec3< Scalar > omega_from_dcm_rate (const Mat3< Scalar > &R, const Mat3< Scalar > &R_dot)
template<typename Scalar>
Mat3< Scalar > dcm_rate_from_omega (const Mat3< Scalar > &R, const Vec3< Scalar > &omega_body)
template<typename Scalar>
janus::Quaternion< Scalar > compose_rotations (const janus::Quaternion< Scalar > &q1, const janus::Quaternion< Scalar > &q2)
template<typename Scalar>
janus::Quaternion< Scalar > relative_rotation (const janus::Quaternion< Scalar > &q_from, const janus::Quaternion< Scalar > &q_to)
template<typename Scalar>
Vec3< Scalar > rotation_error (const janus::Quaternion< Scalar > &q_actual, const janus::Quaternion< Scalar > &q_desired)
template<typename Scalar>
Vec2< Scalar > aero_angles (const Vec3< Scalar > &velocity_body)
 Compute aerodynamic angles from velocity in body frame.

Variables

constexpr FrameID FRAME_ECI = BuiltinFrame::ECI
constexpr FrameID FRAME_ECEF = BuiltinFrame::ECEF
constexpr FrameID FRAME_NED = BuiltinFrame::NED
constexpr FrameID FRAME_ENU = BuiltinFrame::ENU
constexpr FrameID FRAME_BODY = BuiltinFrame::Body
constexpr FrameID FRAME_WIND = BuiltinFrame::Wind
constexpr FrameID FRAME_STABILITY = BuiltinFrame::Stability
constexpr FrameID FRAME_GEOCENTRIC = BuiltinFrame::Geocentric
constexpr FrameID FRAME_RAIL = BuiltinFrame::Rail
constexpr FrameID FRAME_CDA = BuiltinFrame::CDA
constexpr int MAX_FRAME_DEPTH = 32
 Maximum supported frame tree depth.

Typedef Documentation

◆ Mat2d

using vulcan::Mat2d = Mat2<double>

◆ Mat2s

◆ Mat3d

using vulcan::Mat3d = Mat3<double>

◆ Mat3s

◆ Mat4d

using vulcan::Mat4d = Mat4<double>

◆ Mat4s

◆ Matrix

template<typename Scalar>
using vulcan::Matrix = janus::JanusMatrix<Scalar>

Dynamic-size matrix template (use with Scalar = double or SymbolicScalar).

◆ NumericMatrix

using vulcan::NumericMatrix = janus::NumericMatrix

◆ NumericScalar

using vulcan::NumericScalar = janus::NumericScalar

◆ NumericVector

using vulcan::NumericVector = janus::NumericVector

◆ SymbolicMatrix

Initial value:
janus::SymbolicMatrix

◆ SymbolicScalar

using vulcan::SymbolicScalar = janus::SymbolicScalar

◆ SymbolicVector

Initial value:
janus::SymbolicVector

◆ Vec2d

using vulcan::Vec2d = Vec2<double>

◆ Vec2s

◆ Vec3d

using vulcan::Vec3d = Vec3<double>

◆ Vec3s

◆ Vec4d

using vulcan::Vec4d = Vec4<double>

◆ Vec4s

◆ Vector

template<typename Scalar>
using vulcan::Vector = janus::JanusVector<Scalar>

Dynamic-size vector template.

Enumeration Type Documentation

◆ BuiltinFrame

enum class vulcan::BuiltinFrame : uint16_t
strong

Built-in frame identifiers.

Enumerator
ECI 
ECEF 
NED 
ENU 
Body 
Wind 
Stability 
Geocentric 
Rail 
CDA 
_BuiltinCount 

◆ EarthRotationFidelity

enum class vulcan::EarthRotationFidelity
strong
Enumerator
ConstantOmega 
GMST 
IAU2006 

◆ EulerSequence

enum class vulcan::EulerSequence
strong

All 12 Euler angle sequences

Naming convention: Axis labels in rotation order (intrinsic rotations)

  • First letter: first rotation axis
  • Second letter: second rotation axis (about rotated frame)
  • Third letter: third rotation axis (about twice-rotated frame)

For example, ZYX means:

  1. Rotate about Z (yaw)
  2. Rotate about new Y (pitch)
  3. Rotate about new X (roll)

Tait-Bryan sequences use 3 distinct axes. Proper Euler sequences reuse the first axis as the third.

Enumerator
XYZ 

Roll-Pitch-Yaw (robotics convention).

XZY 
YXZ 
YZX 
ZXY 
ZYX 

Yaw-Pitch-Roll (aerospace standard).

XYX 
XZX 
YXY 
YZY 
ZXZ 

Classical mechanics (precession-nutation-spin).

ZYZ 

Function Documentation

◆ aero_angles() [1/2]

template<typename Scalar>
Vec2< Scalar > vulcan::aero::aero_angles ( const Vec3< Scalar > & velocity_body)

Compute aerodynamic angles from velocity in body frame.

These are the fundamental aerodynamic angles used for force calculations:

  • Alpha (angle of attack): rotation about body Y-axis
  • Beta (sideslip angle): rotation about body Z-axis

Sign conventions:

  • Alpha positive: nose up relative to velocity
  • Beta positive: wind from right (velocity has positive Y component)
Template Parameters
ScalarScalar type (double or casadi::MX)
Parameters
velocity_bodyVelocity vector in body frame [m/s]
Returns
[alpha, beta] aerodynamic angles [rad]

◆ aero_angles() [2/2]

template<typename Scalar>
Vec2< Scalar > vulcan::aero_angles ( const Vec3< Scalar > & velocity_ecef,
const CoordinateFrame< Scalar > & body )

Compute aerodynamic angles from ECEF velocity and body frame

Template Parameters
ScalarScalar type
Parameters
velocity_ecefVelocity vector in ECEF [m/s]
bodyBody-fixed frame
Returns
[alpha, beta] aerodynamic angles [rad]

◆ axis_angle_from_dcm()

template<typename Scalar>
std::pair< Vec3< Scalar >, Scalar > vulcan::axis_angle_from_dcm ( const Mat3< Scalar > & R)

Extract axis and angle from DCM

Uses the trace relation: trace(R) = 1 + 2*cos(θ) And the anti-symmetric part for axis: k = unskew(R - R^T) / (2*sin(θ))

Template Parameters
ScalarScalar type (double or SymbolicScalar)
Parameters
R3x3 rotation matrix
Returns
Pair of (axis, angle) where axis is unit vector

◆ axis_angle_from_quaternion()

template<typename Scalar>
std::pair< Vec3< Scalar >, Scalar > vulcan::axis_angle_from_quaternion ( const janus::Quaternion< Scalar > & q)

Extract axis and angle from quaternion

Template Parameters
ScalarScalar type (double or SymbolicScalar)
Parameters
qUnit quaternion
Returns
Pair of (axis, angle) where axis is unit vector

◆ body_from_euler()

template<typename Scalar>
CoordinateFrame< Scalar > vulcan::body_from_euler ( const CoordinateFrame< Scalar > & ned,
Scalar yaw,
Scalar pitch,
Scalar roll )

Create body-fixed frame from Euler angles relative to NED

Rotation sequence: Yaw (Z) -> Pitch (Y') -> Roll (X'') This is the standard aerospace Tait-Bryan rotation sequence.

Internally uses quaternions to avoid gimbal lock issues during composition.

Template Parameters
ScalarScalar type (double for numeric, SymbolicScalar for symbolic)
Parameters
nedReference NED frame (origin for body frame)
yawHeading angle from North, positive clockwise [rad]
pitchPitch angle, positive nose up [rad]
rollRoll angle, positive right wing down [rad]
Returns
Body-fixed frame expressed in ECEF

◆ body_from_quaternion()

template<typename Scalar>
CoordinateFrame< Scalar > vulcan::body_from_quaternion ( const CoordinateFrame< Scalar > & ned,
const janus::Quaternion< Scalar > & q_body_to_ned )

Create body-fixed frame from quaternion relative to NED

Template Parameters
ScalarScalar type (double for numeric, SymbolicScalar for symbolic)
Parameters
nedReference NED frame (origin for body frame)
q_body_nedQuaternion rotating from NED to body frame
Returns
Body-fixed frame expressed in ECEF

◆ cda_to_ecef()

template<typename Scalar>
Vec3< Scalar > vulcan::cda_to_ecef ( const Vec3< Scalar > & cda,
const LLA< Scalar > & lla_ref,
const Scalar & bearing,
const EarthModel & m = EarthModel::WGS84() )

Convert CDA coordinates to ECEF position

Converts cross-range, down-range, and altitude back to ECEF.

Template Parameters
ScalarScalar type (double for numeric, SymbolicScalar for symbolic)
Parameters
cdaCDA coordinates (down-range, cross-range, altitude) [m]
lla_refReference point (origin of CDA frame)
bearingDown-range bearing [rad]
mEarth model (default: WGS84)
Returns
Position in ECEF [m]

◆ centrifugal_acceleration()

template<typename Scalar>
Vec3< Scalar > vulcan::centrifugal_acceleration ( const Vec3< Scalar > & r_ecef,
const EarthModel & m = EarthModel::WGS84() )

Compute only centrifugal acceleration

Template Parameters
ScalarScalar type
Parameters
r_ecefPosition in ECEF [m]
mEarth model
Returns
Centrifugal acceleration in ECEF [m/s^2]

◆ compose_dcm()

template<typename Scalar>
Mat3< Scalar > vulcan::compose_dcm ( const Mat3< Scalar > & R1,
const Mat3< Scalar > & R2 )

Compose two DCMs: R_combined = R2 * R1

Applies R1 first, then R2: v_final = R2 * (R1 * v_initial) = (R2 * R1) * v_initial

Template Parameters
ScalarScalar type (double or SymbolicScalar)
Parameters
R1First rotation (applied first)
R2Second rotation (applied second)
Returns
Combined rotation matrix

◆ compose_rotations()

template<typename Scalar>
janus::Quaternion< Scalar > vulcan::compose_rotations ( const janus::Quaternion< Scalar > & q1,
const janus::Quaternion< Scalar > & q2 )

Compose quaternion rotations: result = q2 * q1

Applies q1 first, then q2: v_final = q2.rotate(q1.rotate(v_initial)) = (q2 * q1).rotate(v_initial)

Template Parameters
ScalarScalar type (double or SymbolicScalar)
Parameters
q1First rotation (applied first)
q2Second rotation (applied second)
Returns
Composed rotation quaternion

◆ coriolis_acceleration()

template<typename Scalar>
Vec3< Scalar > vulcan::coriolis_acceleration ( const Vec3< Scalar > & v_ecef,
const EarthModel & m = EarthModel::WGS84() )

Compute only Coriolis acceleration

Template Parameters
ScalarScalar type
Parameters
v_ecefVelocity in ECEF [m/s]
mEarth model
Returns
Coriolis acceleration in ECEF [m/s^2]

◆ coriolis_centrifugal()

template<typename Scalar>
Vec3< Scalar > vulcan::coriolis_centrifugal ( const Vec3< Scalar > & r_ecef,
const Vec3< Scalar > & v_ecef,
const EarthModel & m = EarthModel::WGS84() )

Compute fictitious accelerations for ECEF equations of motion

When working in ECEF (rotating frame), the equations of motion include fictitious forces. The acceleration transformation is:

a_ecef = a_inertial - 2(omega x v_ecef) - omega x (omega x r_ecef)

This function returns the fictitious acceleration term: a_fictitious = -2(omega x v_ecef) - omega x (omega x r_ecef)

which contains:

  • Coriolis acceleration: -2(omega x v_ecef)
  • Centrifugal acceleration: -omega x (omega x r_ecef)

To use in ECEF EOMs: a_ecef = a_gravity + a_drag + ... + coriolis_centrifugal(r, v)

Template Parameters
ScalarScalar type
Parameters
r_ecefPosition in ECEF [m]
v_ecefVelocity in ECEF [m/s]
mEarth model
Returns
Fictitious acceleration in ECEF [m/s^2]

◆ dcm_from_axis_angle()

template<typename Scalar>
Mat3< Scalar > vulcan::dcm_from_axis_angle ( const Vec3< Scalar > & axis,
Scalar angle )

Create DCM from axis-angle using Rodrigues' rotation formula

R = I + sin(θ)[k]× + (1 - cos(θ))[k]ײ

where k is the unit rotation axis and θ is the angle.

Template Parameters
ScalarScalar type (double or SymbolicScalar)
Parameters
axisRotation axis (will be normalized)
angleRotation angle [rad]
Returns
3x3 rotation matrix

◆ dcm_from_euler()

template<typename Scalar>
Mat3< Scalar > vulcan::dcm_from_euler ( Scalar e1,
Scalar e2,
Scalar e3,
EulerSequence seq )

Create DCM from Euler angles with specified sequence

The DCM transforms vectors from the rotated frame to the reference frame: v_ref = DCM * v_rotated

Template Parameters
ScalarScalar type (double or SymbolicScalar)
Parameters
e1First rotation angle [rad]
e2Second rotation angle [rad]
e3Third rotation angle [rad]
seqEuler sequence
Returns
3x3 rotation matrix (DCM)

◆ dcm_from_rotation_vector()

template<typename Scalar>
Mat3< Scalar > vulcan::dcm_from_rotation_vector ( const Vec3< Scalar > & rot_vec)

Create DCM from rotation vector (axis × angle)

Template Parameters
ScalarScalar type (double or SymbolicScalar)
Parameters
rot_vecRotation vector [rad]
Returns
3x3 rotation matrix

◆ dcm_from_small_angle()

template<typename Scalar>
Mat3< Scalar > vulcan::dcm_from_small_angle ( const Vec3< Scalar > & theta)

Create DCM from small-angle vector using first-order approximation

For small rotation angles θ = [θx, θy, θz], the DCM is approximately: R ≈ I + [θ]×

This is valid when ||θ|| << 1 rad (typically < 0.1 rad for ~1% error).

Template Parameters
ScalarScalar type (double or SymbolicScalar)
Parameters
thetaSmall rotation angles [rad]
Returns
Approximate DCM (not exactly orthonormal)

◆ dcm_principal_axis()

template<typename Scalar>
Mat3< Scalar > vulcan::dcm_principal_axis ( Scalar theta,
int axis )

Create DCM for rotation about a principal axis (re-export from Janus)

Template Parameters
ScalarScalar type
Parameters
thetaRotation angle [rad]
axisAxis index: 0=X, 1=Y, 2=Z
Returns
3x3 rotation matrix

◆ dcm_rate_from_omega()

template<typename Scalar>
Mat3< Scalar > vulcan::dcm_rate_from_omega ( const Mat3< Scalar > & R,
const Vec3< Scalar > & omega_body )

Compute DCM rate from angular velocity

Given DCM R and body-frame angular velocity omega: R_dot = R * [omega]×

Template Parameters
ScalarScalar type (double or SymbolicScalar)
Parameters
RCurrent rotation matrix
omega_bodyAngular velocity in body frame [rad/s]
Returns
Time derivative of rotation matrix

◆ ecef_to_cda()

template<typename Scalar>
Vec3< Scalar > vulcan::ecef_to_cda ( const Vec3< Scalar > & r_ecef,
const LLA< Scalar > & lla_ref,
const Scalar & bearing,
const EarthModel & m = EarthModel::WGS84() )

Convert ECEF position to CDA coordinates relative to reference

Computes the cross-range, down-range, and altitude of an ECEF point relative to a reference point with a given bearing direction.

Template Parameters
ScalarScalar type (double for numeric, SymbolicScalar for symbolic)
Parameters
r_ecefPosition to convert (ECEF) [m]
lla_refReference point (origin of CDA frame)
bearingDown-range bearing [rad]
mEarth model (default: WGS84)
Returns
Vec3 with (down-range, cross-range, altitude) [m]

◆ ecef_to_lla()

template<typename Scalar>
LLA< Scalar > vulcan::ecef_to_lla ( const Vec3< Scalar > & r,
const EarthModel & m = EarthModel::WGS84() )

Convert ECEF position to geodetic LLA using Vermeille (2004) algorithm

This is a closed-form, non-iterative algorithm that handles all edge cases including poles, equator, and points at/near Earth's center. The algorithm is fully symbolic-compatible with no conditional branches on Scalar values.

Reference: Vermeille, H. (2004). "Computing geodetic coordinates from geocentric coordinates." Journal of Geodesy, 78, 94-95.

Accuracy: Sub-millimeter for all altitudes from -20km to geostationary orbit

Parameters
rPosition in ECEF [m]
mEarth model (default: WGS84)
Returns
LLA structure with (lon, lat, alt)

◆ ecef_to_spherical()

template<typename Scalar>
Spherical< Scalar > vulcan::ecef_to_spherical ( const Vec3< Scalar > & r)

Convert ECEF position to geocentric spherical coordinates

Geocentric latitude differs from geodetic latitude for non-spherical Earth models. This conversion is exact and non-iterative.

Parameters
rPosition in ECEF [m]
Returns
Spherical coordinates (lon, lat_gc, radius)

◆ euler_axes()

std::array< int, 3 > vulcan::euler_axes ( EulerSequence seq)
constexpr

Get axis indices for a sequence [0=X, 1=Y, 2=Z]

Parameters
seqEuler sequence
Returns
Array of 3 axis indices

◆ euler_from_body()

template<typename Scalar>
Vec3< Scalar > vulcan::euler_from_body ( const CoordinateFrame< Scalar > & body,
const CoordinateFrame< Scalar > & ned )

Extract Euler angles from body frame relative to NED

Returns [yaw, pitch, roll] in the Yaw-Pitch-Roll (Z-Y'-X'') sequence.

Uses the unified rotations library for DCM-to-Euler conversion with proper gimbal lock handling. This is compatible with symbolic mode.

Template Parameters
ScalarScalar type (double for numeric, SymbolicScalar for symbolic)
Parameters
bodyBody-fixed frame
nedReference NED frame
Returns
[yaw, pitch, roll] angles [rad]

◆ euler_from_dcm()

template<typename Scalar>
Vec3< Scalar > vulcan::euler_from_dcm ( const Mat3< Scalar > & R,
EulerSequence seq )

Extract Euler angles from DCM for specified sequence

Handles gimbal lock for all sequences via janus::where for symbolic compatibility. At singularities, the third angle is set to zero.

Template Parameters
ScalarScalar type (double or SymbolicScalar)
Parameters
R3x3 rotation matrix (DCM)
seqEuler sequence
Returns
[e1, e2, e3] angles [rad]

◆ euler_from_quaternion()

template<typename Scalar>
Vec3< Scalar > vulcan::euler_from_quaternion ( const janus::Quaternion< Scalar > & q,
EulerSequence seq )

Extract Euler angles from quaternion for specified sequence

Template Parameters
ScalarScalar type (double or SymbolicScalar)
Parameters
qUnit quaternion
seqEuler sequence
Returns
[e1, e2, e3] angles [rad]

◆ euler_sequence_name()

const char * vulcan::euler_sequence_name ( EulerSequence seq)
constexpr

Get sequence name as string (for debugging/logging).

◆ flight_path_angles() [1/2]

template<typename Scalar>
Vec2< Scalar > vulcan::flight_path_angles ( const Vec3< Scalar > & velocity_ecef,
const CoordinateFrame< Scalar > & ned )

Compute flight path angles from ECEF velocity and position

Template Parameters
ScalarScalar type
Parameters
velocity_ecefVelocity vector in ECEF [m/s]
nedNED frame at current position
Returns
[gamma, psi] flight path angles [rad]

◆ flight_path_angles() [2/2]

template<typename Scalar>
Vec2< Scalar > vulcan::flight_path_angles ( const Vec3< Scalar > & velocity_ned)

Compute flight path angles from velocity in NED frame

Template Parameters
ScalarScalar type
Parameters
velocity_nedVelocity vector in NED [m/s]
Returns
[gamma, psi] where: gamma = flight path angle (vertical), positive up [rad] psi = heading angle from North, positive clockwise [rad]

◆ geocentric_to_geodetic_lat()

template<typename Scalar>
Scalar vulcan::geocentric_to_geodetic_lat ( Scalar lat_gc,
const EarthModel & m = EarthModel::WGS84() )

Convert geocentric latitude to geodetic latitude

Parameters
lat_gcGeocentric latitude [rad]
mEarth model (default: WGS84)
Returns
Geodetic latitude [rad]

◆ geodetic_to_geocentric_lat()

template<typename Scalar>
Scalar vulcan::geodetic_to_geocentric_lat ( Scalar lat_gd,
const EarthModel & m = EarthModel::WGS84() )

Convert geodetic latitude to geocentric latitude

For an ellipsoidal Earth, the geocentric latitude is always smaller in magnitude than the geodetic latitude (except at equator and poles).

Parameters
lat_gdGeodetic latitude [rad]
mEarth model (default: WGS84)
Returns
Geocentric latitude [rad]

◆ is_proper_euler()

bool vulcan::is_proper_euler ( EulerSequence seq)
constexpr

Check if sequence is proper Euler (symmetric: first axis == third axis).

◆ is_valid_dcm()

template<typename Derived>
auto vulcan::is_valid_dcm ( const Eigen::MatrixBase< Derived > & R,
double tol = 1e-9 )

Check if matrix is a valid rotation matrix (re-export from Janus)

Verifies:

  • Determinant ≈ +1
  • R^T * R ≈ I (orthonormality)
Template Parameters
DerivedEigen matrix type
Parameters
RInput matrix
tolTolerance for numerical checks
Returns
True if valid rotation matrix

◆ lla_to_ecef()

template<typename Scalar>
Vec3< Scalar > vulcan::lla_to_ecef ( const LLA< Scalar > & lla,
const EarthModel & m = EarthModel::WGS84() )

Convert geodetic LLA to ECEF position (closed-form)

This is the standard geodetic to ECEF conversion formula.

Parameters
llaGeodetic coordinates (lon, lat, alt)
mEarth model (default: WGS84)
Returns
Position in ECEF [m]

◆ local_cda()

template<typename Scalar>
CoordinateFrame< Scalar > vulcan::local_cda ( const LLA< Scalar > & lla_origin,
const Scalar & bearing,
const EarthModel & m = EarthModel::WGS84() )

Create CDA frame at a given position with specified bearing

The CDA frame is a trajectory-relative local tangent plane:

  • X-axis (D): Down-range, along great-circle bearing
  • Y-axis (C): Cross-range, perpendicular to down-range (right-hand)
  • Z-axis (A): Altitude, up from ellipsoid surface

This is commonly used for impact prediction and range safety. The frame is constructed by rotating the local ENU frame about the Up axis by (90° - bearing) to align X with the bearing direction.

Template Parameters
ScalarScalar type (double for numeric, SymbolicScalar for symbolic)
Parameters
lla_originOrigin position
bearingDown-range bearing [rad], clockwise from North
mEarth model (default: WGS84)
Returns
CDA frame expressed in ECEF

◆ local_cda_at()

template<typename Scalar>
CoordinateFrame< Scalar > vulcan::local_cda_at ( const Vec3< Scalar > & r_ecef,
const Scalar & bearing,
const EarthModel & m = EarthModel::WGS84() )

Create CDA frame at a given ECEF position with bearing

Convenience overload that takes ECEF position.

Template Parameters
ScalarScalar type (double for numeric, SymbolicScalar for symbolic)
Parameters
r_ecefPosition in ECEF [m]
bearingDown-range bearing [rad], clockwise from North
mEarth model (default: WGS84)
Returns
CDA frame expressed in ECEF

◆ local_enu()

template<typename Scalar>
CoordinateFrame< Scalar > vulcan::local_enu ( Scalar lon,
Scalar lat_gd )

Create Local Geodetic Horizon frame (ENU — East, North, Up)

The ENU frame is common in surveying and geodesy:

  • X-axis: Points East (tangent to parallel of latitude)
  • Y-axis: Points North (tangent to meridian, toward North Pole)
  • Z-axis: Points Up (ellipsoid normal)

This is a convenience wrapper around CoordinateFrame::enu().

Template Parameters
ScalarScalar type (double for numeric, SymbolicScalar for symbolic)
Parameters
lonLongitude [rad]
lat_gdGeodetic latitude [rad]
Returns
ENU frame expressed in ECEF

◆ local_enu_at()

template<typename Scalar>
CoordinateFrame< Scalar > vulcan::local_enu_at ( const Vec3< Scalar > & r_ecef,
const EarthModel & m = EarthModel::WGS84() )

Create Local Geodetic Horizon frame (ENU) at a given ECEF position

Computes the geodetic latitude and longitude from the position using the WGS84 ellipsoid and returns the ENU frame.

Template Parameters
ScalarScalar type (double for numeric, SymbolicScalar for symbolic)
Parameters
r_ecefPosition in ECEF [m]
mEarth model (default: WGS84)
Returns
ENU frame expressed in ECEF

◆ local_geocentric()

template<typename Scalar>
CoordinateFrame< Scalar > vulcan::local_geocentric ( Scalar lon,
Scalar lat_gc )

Create Local Geocentric Horizon frame

Similar to NED but uses geocentric latitude instead of geodetic. The "down" direction points toward Earth's center rather than perpendicular to the ellipsoid surface.

For a spherical Earth, geocentric and geodetic frames are identical. For an oblate Earth, the difference is most pronounced at mid-latitudes (up to ~12 arcminutes for WGS84).

  • X-axis: Points North (in the meridian plane, perpendicular to radius)
  • Y-axis: Points East (tangent to parallel of latitude)
  • Z-axis: Points toward Earth center (radially inward)
Template Parameters
ScalarScalar type (double for numeric, SymbolicScalar for symbolic)
Parameters
lonLongitude [rad]
lat_gcGeocentric latitude [rad]
Returns
Geocentric horizon frame expressed in ECEF

◆ local_geocentric_at()

template<typename Scalar>
CoordinateFrame< Scalar > vulcan::local_geocentric_at ( const Vec3< Scalar > & r_ecef)

Create Local Geocentric Horizon frame at a given ECEF position

Computes the geocentric latitude and longitude from the position and returns the corresponding geocentric horizon frame.

Template Parameters
ScalarScalar type (double for numeric, SymbolicScalar for symbolic)
Parameters
r_ecefPosition in ECEF [m]
Returns
Geocentric horizon frame expressed in ECEF

◆ local_ned()

template<typename Scalar>
CoordinateFrame< Scalar > vulcan::local_ned ( Scalar lon,
Scalar lat_gd )

Create Local Geodetic Horizon frame (NED — North, East, Down)

The NED frame is the standard aerospace local horizon frame:

  • X-axis: Points North (tangent to meridian, toward North Pole)
  • Y-axis: Points East (tangent to parallel of latitude)
  • Z-axis: Points Down (opposite to ellipsoid normal)

This is a convenience wrapper around CoordinateFrame::ned().

Template Parameters
ScalarScalar type (double for numeric, SymbolicScalar for symbolic)
Parameters
lonLongitude [rad]
lat_gdGeodetic latitude [rad]
Returns
NED frame expressed in ECEF

◆ local_ned_at()

template<typename Scalar>
CoordinateFrame< Scalar > vulcan::local_ned_at ( const Vec3< Scalar > & r_ecef,
const EarthModel & m = EarthModel::WGS84() )

Create Local Geodetic Horizon frame (NED) at a given ECEF position

Computes the geodetic latitude and longitude from the position using the WGS84 ellipsoid and returns the NED frame.

Template Parameters
ScalarScalar type (double for numeric, SymbolicScalar for symbolic)
Parameters
r_ecefPosition in ECEF [m]
mEarth model (default: WGS84)
Returns
NED frame expressed in ECEF

◆ local_rail()

template<typename Scalar>
CoordinateFrame< Scalar > vulcan::local_rail ( const LLA< Scalar > & lla_origin,
const Scalar & azimuth,
const Scalar & elevation,
const EarthModel & m = EarthModel::WGS84() )

Create Rail Launch frame at a given position

Rail-aligned coordinate frame for launch dynamics:

  • X-axis: Along rail (uprange direction, toward launch)
  • Y-axis: Horizontal, perpendicular to rail (right when facing uprange)
  • Z-axis: Completes right-hand system (normal to launch plane)

Constructed by rotating local NED frame:

  1. Yaw by azimuth (rotation about NED Down axis)
  2. Pitch by elevation (rotation about the new East axis)
Template Parameters
ScalarScalar type (double for numeric, SymbolicScalar for symbolic)
Parameters
lla_originLaunch site geodetic position
azimuthLaunch azimuth from North [rad], clockwise
elevationRail elevation angle from horizontal [rad]
mEarth model (default: WGS84)
Returns
Rail frame expressed in ECEF

◆ local_rail_at()

template<typename Scalar>
CoordinateFrame< Scalar > vulcan::local_rail_at ( const Vec3< Scalar > & r_ecef,
const Scalar & azimuth,
const Scalar & elevation,
const EarthModel & m = EarthModel::WGS84() )

Create Rail Launch frame at a given ECEF position

Convenience overload that computes LLA from ECEF position.

Template Parameters
ScalarScalar type (double for numeric, SymbolicScalar for symbolic)
Parameters
r_ecefPosition in ECEF [m]
azimuthLaunch azimuth from North [rad]
elevationRail elevation angle from horizontal [rad]
mEarth model (default: WGS84)
Returns
Rail frame expressed in ECEF

◆ make_ecef_provider() [1/2]

template<typename Scalar>
std::shared_ptr< ECEFProvider< Scalar > > vulcan::make_ecef_provider ( const EarthRotationModel & model,
double t_seconds )
inlinenodiscard

◆ make_ecef_provider() [2/2]

template<typename Scalar>
std::shared_ptr< ECEFProvider< Scalar > > vulcan::make_ecef_provider ( Scalar angle)
inlinenodiscard

◆ omega_from_dcm_rate()

template<typename Scalar>
Vec3< Scalar > vulcan::omega_from_dcm_rate ( const Mat3< Scalar > & R,
const Mat3< Scalar > & R_dot )

Compute angular velocity from DCM rate

Given DCM R and its time derivative R_dot: [omega]× = R^T * R_dot omega = unskew(R^T * R_dot)

The result is the angular velocity in the body frame.

Template Parameters
ScalarScalar type (double or SymbolicScalar)
Parameters
RCurrent rotation matrix
R_dotTime derivative of rotation matrix
Returns
Angular velocity vector in body frame [rad/s]

◆ omega_from_quaternion_rate()

template<typename Scalar>
Vec3< Scalar > vulcan::omega_from_quaternion_rate ( const janus::Quaternion< Scalar > & q,
const janus::Quaternion< Scalar > & q_dot )

Compute angular velocity from quaternion and its time derivative

Given quaternion q and its time derivative q_dot, computes: omega_body = 2 * q.conjugate() * q_dot

The result is the angular velocity in the local (body) frame.

Template Parameters
ScalarScalar type (double or SymbolicScalar)
Parameters
qCurrent orientation quaternion
q_dotTime derivative of quaternion
Returns
Angular velocity vector in body frame [rad/s]

◆ omega_ned_wrt_ecef()

template<typename Scalar>
Vec3< Scalar > vulcan::omega_ned_wrt_ecef ( const Vec3< Scalar > & v_ned,
Scalar lat,
Scalar alt,
const EarthModel & m = EarthModel::WGS84() )

Angular velocity of NED frame in ECEF (for propagating attitude)

As a vehicle moves over Earth's surface, the local NED frame rotates relative to ECEF. This function computes the angular velocity of NED wrt ECEF, expressed in NED coordinates.

omega_ned = [-v_n/R_n, v_e/R_e, v_e*tan(lat)/R_e]

where R_n = radius of curvature in meridian R_e = radius of curvature in prime vertical

Template Parameters
ScalarScalar type
Parameters
v_nedVelocity in NED [m/s]
latGeodetic latitude [rad]
altAltitude above ellipsoid [m]
mEarth model
Returns
Angular velocity of NED frame wrt ECEF, expressed in NED [rad/s]

◆ omega_ned_wrt_eci()

template<typename Scalar>
Vec3< Scalar > vulcan::omega_ned_wrt_eci ( const Vec3< Scalar > & v_ned,
Scalar lat,
Scalar alt,
const EarthModel & m = EarthModel::WGS84() )

Angular velocity of NED frame wrt ECI (includes Earth rotation)

omega_ned_eci = omega_ned_ecef + omega_earth

where omega_earth is Earth's rotation expressed in NED.

Template Parameters
ScalarScalar type
Parameters
v_nedVelocity in NED [m/s]
latGeodetic latitude [rad]
altAltitude above ellipsoid [m]
mEarth model
Returns
Angular velocity of NED frame wrt ECI, expressed in NED [rad/s]

◆ quat_exp()

template<typename Scalar>
janus::Quaternion< Scalar > vulcan::quat_exp ( const Vec3< Scalar > & v)

Quaternion exponential: exp(v) where v is a pure quaternion (0, v_xyz)

exp((0, v)) = (cos(||v||), sin(||v||) * v / ||v||)

Template Parameters
ScalarScalar type (double or SymbolicScalar)
Parameters
vPure quaternion vector part (rotation vector / 2)
Returns
Unit quaternion

◆ quat_log()

template<typename Scalar>
Vec3< Scalar > vulcan::quat_log ( const janus::Quaternion< Scalar > & q)

Quaternion logarithm: log(q) returns pure quaternion (0, v_xyz)

For unit quaternion q = (w, x, y, z): log(q) = (0, acos(w) * [x,y,z] / ||[x,y,z]||)

Template Parameters
ScalarScalar type (double or SymbolicScalar)
Parameters
qUnit quaternion
Returns
Pure quaternion vector part (rotation vector / 2)

◆ quaternion_from_axis_angle()

template<typename Scalar>
janus::Quaternion< Scalar > vulcan::quaternion_from_axis_angle ( const Vec3< Scalar > & axis,
Scalar angle )

Create quaternion from axis-angle representation

Template Parameters
ScalarScalar type (double or SymbolicScalar)
Parameters
axisRotation axis (should be unit length, will be normalized)
angleRotation angle [rad]
Returns
Unit quaternion

◆ quaternion_from_body()

template<typename Scalar>
janus::Quaternion< Scalar > vulcan::quaternion_from_body ( const CoordinateFrame< Scalar > & body,
const CoordinateFrame< Scalar > & ned )

Extract quaternion representing body orientation relative to NED

Template Parameters
ScalarScalar type
Parameters
bodyBody-fixed frame
nedReference NED frame
Returns
Quaternion rotating from body to NED (v_ned = q.rotate(v_body))

◆ quaternion_from_euler()

template<typename Scalar>
janus::Quaternion< Scalar > vulcan::quaternion_from_euler ( Scalar e1,
Scalar e2,
Scalar e3,
EulerSequence seq )

Create quaternion from Euler angles with specified sequence

Template Parameters
ScalarScalar type (double or SymbolicScalar)
Parameters
e1First rotation angle [rad]
e2Second rotation angle [rad]
e3Third rotation angle [rad]
seqEuler sequence
Returns
Unit quaternion representing the rotation

◆ quaternion_from_rotation_vector()

template<typename Scalar>
janus::Quaternion< Scalar > vulcan::quaternion_from_rotation_vector ( const Vec3< Scalar > & rot_vec)

Create quaternion from rotation vector (axis × angle)

Template Parameters
ScalarScalar type (double or SymbolicScalar)
Parameters
rot_vecRotation vector [rad]
Returns
Unit quaternion

◆ quaternion_rate_from_omega()

template<typename Scalar>
janus::Quaternion< Scalar > vulcan::quaternion_rate_from_omega ( const janus::Quaternion< Scalar > & q,
const Vec3< Scalar > & omega_body )

Compute quaternion rate from angular velocity

Given quaternion q and angular velocity omega (in body frame), computes: q_dot = 0.5 * q * omega_quat

where omega_quat = (0, omega_x, omega_y, omega_z)

Template Parameters
ScalarScalar type (double or SymbolicScalar)
Parameters
qCurrent orientation quaternion
omega_bodyAngular velocity in body frame [rad/s]
Returns
Time derivative of quaternion

◆ radius_of_curvature_M()

template<typename Scalar>
Scalar vulcan::radius_of_curvature_M ( Scalar lat,
const EarthModel & m = EarthModel::WGS84() )

Compute the radius of curvature in the meridian (M)

This is the radius of curvature of the meridian ellipse at the given latitude.

Parameters
latGeodetic latitude [rad]
mEarth model (default: WGS84)
Returns
Radius of curvature M [m]

◆ radius_of_curvature_N()

template<typename Scalar>
Scalar vulcan::radius_of_curvature_N ( Scalar lat,
const EarthModel & m = EarthModel::WGS84() )

Compute the radius of curvature in the prime vertical (N)

This is the distance from the surface to the Z-axis along the ellipsoid normal.

Parameters
latGeodetic latitude [rad]
mEarth model (default: WGS84)
Returns
Radius of curvature N [m]

◆ range()

template<typename Scalar>
Scalar vulcan::range ( const Vec3< Scalar > & r1,
const Vec3< Scalar > & r2 )

Compute range (distance) between two positions

Template Parameters
ScalarScalar type
Parameters
r1First position [m]
r2Second position [m]
Returns
Distance [m]

◆ range_rate()

template<typename Scalar>
Scalar vulcan::range_rate ( const Vec3< Scalar > & r_target,
const Vec3< Scalar > & v_target,
const Vec3< Scalar > & r_observer,
const Vec3< Scalar > & v_observer )

Compute range rate (velocity along line-of-sight)

Template Parameters
ScalarScalar type
Parameters
r_targetTarget position [m]
v_targetTarget velocity [m/s]
r_observerObserver position [m]
v_observerObserver velocity [m/s]
Returns
Range rate (positive = increasing range) [m/s]

◆ relative_dcm()

template<typename Scalar>
Mat3< Scalar > vulcan::relative_dcm ( const Mat3< Scalar > & R_A,
const Mat3< Scalar > & R_B )

Compute relative rotation DCM from frame A to frame B

R_rel transforms vectors from frame A to frame B: v_B = R_rel * v_A

Given R_A (transforms from A to reference) and R_B (transforms from B to reference): R_rel = R_B^T * R_A

Template Parameters
ScalarScalar type (double or SymbolicScalar)
Parameters
R_ADCM transforming from frame A to reference
R_BDCM transforming from frame B to reference
Returns
DCM transforming from frame A to frame B

◆ relative_position()

template<typename Scalar>
Vec3< Scalar > vulcan::relative_position ( const Vec3< Scalar > & r_target,
const Vec3< Scalar > & r_observer )

Compute relative position from observer to target

Template Parameters
ScalarScalar type
Parameters
r_targetTarget position in frame [m]
r_observerObserver position in frame [m]
Returns
Relative position (target - observer) [m]

◆ relative_rotation()

template<typename Scalar>
janus::Quaternion< Scalar > vulcan::relative_rotation ( const janus::Quaternion< Scalar > & q_from,
const janus::Quaternion< Scalar > & q_to )

Compute relative rotation from frame A to frame B

Given quaternions representing rotations from a common reference frame, computes the rotation needed to go from orientation A to orientation B: q_rel = q_to * q_from.conjugate()

Template Parameters
ScalarScalar type (double or SymbolicScalar)
Parameters
q_fromSource orientation quaternion
q_toTarget orientation quaternion
Returns
Relative rotation from q_from to q_to

◆ rotation_error()

template<typename Scalar>
Vec3< Scalar > vulcan::rotation_error ( const janus::Quaternion< Scalar > & q_actual,
const janus::Quaternion< Scalar > & q_desired )

Compute rotation error as a rotation vector

Returns the rotation vector (axis × angle) representing the rotation from q_actual to q_desired. Useful for attitude control: error = rotation_error(q_actual, q_desired) torque = K * error (for P-control)

Template Parameters
ScalarScalar type (double or SymbolicScalar)
Parameters
q_actualCurrent orientation
q_desiredDesired orientation
Returns
Rotation vector representing error [rad]

◆ rotation_vector_from_dcm()

template<typename Scalar>
Vec3< Scalar > vulcan::rotation_vector_from_dcm ( const Mat3< Scalar > & R)

Extract rotation vector from DCM

Template Parameters
ScalarScalar type (double or SymbolicScalar)
Parameters
R3x3 rotation matrix
Returns
Rotation vector (axis × angle) [rad]

◆ rotation_vector_from_quaternion()

template<typename Scalar>
Vec3< Scalar > vulcan::rotation_vector_from_quaternion ( const janus::Quaternion< Scalar > & q)

Extract rotation vector from quaternion

Template Parameters
ScalarScalar type (double or SymbolicScalar)
Parameters
qUnit quaternion
Returns
Rotation vector (axis × angle) [rad]

◆ skew()

template<typename Scalar>
Mat3< Scalar > vulcan::skew ( const Vec3< Scalar > & v)

Create skew-symmetric matrix from vector

The skew-symmetric matrix [v]× satisfies: [v]× * u = v × u

For v = [x, y, z]: [ 0 -z y ] [v]× = [ z 0 -x ] [ -y x 0 ]

Template Parameters
ScalarScalar type (double or SymbolicScalar)
Parameters
v3D vector
Returns
3x3 skew-symmetric matrix

◆ slerp()

template<typename Scalar>
janus::Quaternion< Scalar > vulcan::slerp ( const janus::Quaternion< Scalar > & q0,
const janus::Quaternion< Scalar > & q1,
Scalar t )

Spherical linear interpolation between quaternions (re-export from Janus)

Computes smooth interpolation between two rotations. Handles shortest path automatically.

Template Parameters
ScalarScalar type (double or SymbolicScalar)
Parameters
q0Start quaternion (t=0)
q1End quaternion (t=1)
tInterpolation parameter [0, 1]
Returns
Interpolated quaternion

◆ small_angle_from_dcm()

template<typename Scalar>
Vec3< Scalar > vulcan::small_angle_from_dcm ( const Mat3< Scalar > & R)

Extract small-angle vector from near-identity DCM

For DCM R ≈ I + [θ]×: θ ≈ unskew(R - I) = unskew(R - R^T) / 2

More robustly: θ = [R[2,1] - R[1,2], R[0,2] - R[2,0], R[1,0] - R[0,1]] / 2

Template Parameters
ScalarScalar type (double or SymbolicScalar)
Parameters
RNear-identity rotation matrix
Returns
Small rotation angles [rad]

◆ spherical_to_ecef()

template<typename Scalar>
Vec3< Scalar > vulcan::spherical_to_ecef ( const Spherical< Scalar > & geo)

Convert geocentric spherical coordinates to ECEF position

This is the standard spherical to Cartesian conversion.

Parameters
geoGeocentric spherical coordinates (lon, lat_gc, radius)
Returns
Position in ECEF [m]

◆ squad()

template<typename Scalar>
janus::Quaternion< Scalar > vulcan::squad ( const janus::Quaternion< Scalar > & q0,
const janus::Quaternion< Scalar > & q1,
const janus::Quaternion< Scalar > & s0,
const janus::Quaternion< Scalar > & s1,
Scalar t )

Squad (Spherical Quadrangle) interpolation for smooth quaternion curves

Provides C1 continuous interpolation between quaternion waypoints. Uses control points computed by squad_control_point.

squad(q_i, q_{i+1}, s_i, s_{i+1}, t) = slerp(slerp(q_i, q_{i+1}, t), slerp(s_i, s_{i+1}, t), 2t(1-t))

Template Parameters
ScalarScalar type (double or SymbolicScalar)
Parameters
q0Start quaternion
q1End quaternion
s0Start control point (from squad_control_point)
s1End control point (from squad_control_point)
tInterpolation parameter [0, 1]
Returns
Interpolated quaternion with C1 continuity

◆ squad_control_point()

template<typename Scalar>
janus::Quaternion< Scalar > vulcan::squad_control_point ( const janus::Quaternion< Scalar > & q_prev,
const janus::Quaternion< Scalar > & q_curr,
const janus::Quaternion< Scalar > & q_next )

Compute Squad control point for smooth interpolation through waypoints

Given quaternions q_{i-1}, q_i, q_{i+1}, computes the control point s_i that produces C1 continuity in orientation.

s_i = q_i * exp(-0.25 * (log(q_i^(-1) * q_{i+1}) + log(q_i^(-1) * q_{i-1})))

Template Parameters
ScalarScalar type (double or SymbolicScalar)
Parameters
q_prevPrevious quaternion (q_{i-1})
q_currCurrent quaternion (q_i)
q_nextNext quaternion (q_{i+1})
Returns
Control point s_i

◆ transform()

template<typename Scalar>
Vec3< Scalar > vulcan::transform ( const Vec3< Scalar > & v,
FrameID from,
FrameID to,
const FrameContext< Scalar > & ctx )
inlinenodiscard

◆ transform_position() [1/2]

template<typename Scalar>
Vec3< Scalar > vulcan::transform_position ( const Vec3< Scalar > & pos,
const CoordinateFrame< Scalar > & from,
const CoordinateFrame< Scalar > & to )

Transform position between any two frames (via ECEF hub)

Accounts for origin offsets between frames.

Parameters
posPosition in source frame
fromSource frame
toDestination frame
Returns
Position in destination frame

◆ transform_position() [2/2]

template<typename Scalar>
Vec3< Scalar > vulcan::transform_position ( const Vec3< Scalar > & pos,
FrameID from,
FrameID to,
const FrameContext< Scalar > & ctx )
inlinenodiscard

◆ transform_vector()

template<typename Scalar>
Vec3< Scalar > vulcan::transform_vector ( const Vec3< Scalar > & v,
const CoordinateFrame< Scalar > & from,
const CoordinateFrame< Scalar > & to )

Transform vector between any two frames (via ECEF hub)

Parameters
vVector in source frame
fromSource frame
toDestination frame
Returns
Vector in destination frame

◆ unskew()

template<typename Scalar>
Vec3< Scalar > vulcan::unskew ( const Mat3< Scalar > & S)

Extract vector from skew-symmetric matrix

Given [v]×, returns v = [S[2,1], S[0,2], S[1,0]]

Template Parameters
ScalarScalar type (double or SymbolicScalar)
Parameters
S3x3 skew-symmetric matrix
Returns
3D vector

◆ velocity_ecef_to_eci()

template<typename Scalar>
Vec3< Scalar > vulcan::velocity_ecef_to_eci ( const Vec3< Scalar > & v_ecef,
const Vec3< Scalar > & r_ecef,
const CoordinateFrame< Scalar > & eci,
const EarthModel & m = EarthModel::WGS84() )

Transform velocity from ECEF to ECI

The velocity transformation from ECEF to ECI accounts for Earth's rotation: v_eci = v_ecef + omega x r_ecef

where omega is Earth's angular velocity vector [0, 0, omega].

Template Parameters
ScalarScalar type (double for numeric, SymbolicScalar for symbolic)
Parameters
v_ecefVelocity in ECEF [m/s]
r_ecefPosition in ECEF [m]
eciECI frame at current epoch
mEarth model (for angular velocity)
Returns
Velocity in ECI [m/s]

◆ velocity_eci_to_ecef()

template<typename Scalar>
Vec3< Scalar > vulcan::velocity_eci_to_ecef ( const Vec3< Scalar > & v_eci,
const Vec3< Scalar > & r_ecef,
const CoordinateFrame< Scalar > & eci,
const EarthModel & m = EarthModel::WGS84() )

Transform velocity from ECI to ECEF

The inverse of velocity_ecef_to_eci: v_ecef = v_eci - omega x r_ecef

Template Parameters
ScalarScalar type
Parameters
v_eciVelocity in ECI [m/s]
r_ecefPosition in ECEF [m]
eciECI frame at current epoch
mEarth model
Returns
Velocity in ECEF [m/s]

◆ velocity_frame()

template<typename Scalar>
CoordinateFrame< Scalar > vulcan::velocity_frame ( const Vec3< Scalar > & velocity_ecef,
const CoordinateFrame< Scalar > & ned )

Create velocity frame (wind axes) from Earth-relative velocity

The velocity frame has:

  • X-axis: Aligned with velocity vector (forward)
  • Y-axis: Perpendicular to velocity, in local horizontal plane (right)
  • Z-axis: Completes right-handed system

This is commonly used for aerodynamic analysis.

Template Parameters
ScalarScalar type
Parameters
velocity_ecefVelocity vector in ECEF [m/s]
nedReference NED frame at current position
Returns
Velocity frame expressed in ECEF

Variable Documentation

◆ FRAME_BODY

FrameID vulcan::FRAME_BODY = BuiltinFrame::Body
inlineconstexpr

◆ FRAME_CDA

FrameID vulcan::FRAME_CDA = BuiltinFrame::CDA
inlineconstexpr

◆ FRAME_ECEF

FrameID vulcan::FRAME_ECEF = BuiltinFrame::ECEF
inlineconstexpr

◆ FRAME_ECI

FrameID vulcan::FRAME_ECI = BuiltinFrame::ECI
inlineconstexpr

◆ FRAME_ENU

FrameID vulcan::FRAME_ENU = BuiltinFrame::ENU
inlineconstexpr

◆ FRAME_GEOCENTRIC

FrameID vulcan::FRAME_GEOCENTRIC = BuiltinFrame::Geocentric
inlineconstexpr

◆ FRAME_NED

FrameID vulcan::FRAME_NED = BuiltinFrame::NED
inlineconstexpr

◆ FRAME_RAIL

FrameID vulcan::FRAME_RAIL = BuiltinFrame::Rail
inlineconstexpr

◆ FRAME_STABILITY

FrameID vulcan::FRAME_STABILITY = BuiltinFrame::Stability
inlineconstexpr

◆ FRAME_WIND

FrameID vulcan::FRAME_WIND = BuiltinFrame::Wind
inlineconstexpr

◆ MAX_FRAME_DEPTH

int vulcan::MAX_FRAME_DEPTH = 32
inlineconstexpr

Maximum supported frame tree depth.