Vulcan
Aerospace Engineering Utilities Built on Janus
Loading...
Searching...
No Matches
Vulcan ๐Ÿ”ฅ

Aerospace Engineering Utilities Built on Janus

Documentation CI Format codecov

Vulcan is an aerospace engineering utilities library that provides model-agnostic simulation utilities for coordinate systems, atmospheric models, gravity models, and more. Built on the Janus math library, Vulcan utilities work seamlessly in both numeric and symbolic computational modes.

Features

  • ๐ŸŒ Coordinate Systems: ECI, ECEF, NED, Body frames; geodetic utilities
  • ๐ŸŒค๏ธ Atmospheric Models: US Standard Atmosphere 1976, exponential models
  • ๐ŸŒ‘ Gravity Models: Point mass, J2/J4 perturbations, spherical harmonics
  • ๐Ÿ›ฐ๏ธ Orbital Mechanics: Keplerian elements, state vector propagation, anomaly conversions
  • ๐Ÿ“ Geometry: Primitives (Sphere, Cylinder, Cone, Box) with symbolic support
  • ๐Ÿ“ก Sensors: IMU noise models (Random Walk, Bias Instability), Gaussian noise, Markov processes
  • ๐ŸŽฒ RNG: Reproducible random number generation with stream splitting
  • ๐Ÿ’พ Data I/O: HDF5 reading/writing, telemetry schemas, CSV export
  • ๐Ÿ’จ Wind Models: Constant wind, wind shear (linear/power-law/log), Dryden & von Kรกrmรกn turbulence
  • โœˆ๏ธ Aerodynamics: Dynamic pressure, Mach, Reynolds number, angle of attack/sideslip
  • ๐ŸŽฎ Transfer Functions: Transfer functions (1st/2nd order), discretization, PID control
  • ๐Ÿ“‰ Estimation: Kalman Filter, EKF, UKF, estimation utilities
  • ๐Ÿš€ Propulsion: Rocket, Electric, Air-breathing, Altitude-compensated thrust
  • ๐ŸŽฏ Dynamics: 6DOF rigid body, 5DOF guided, 3DOF point mass, 1/2DOF oscillators, fuel slosh, rail launch
  • โš–๏ธ Mass Properties: Aggregation, parallel axis theorem, shape primitives, validation
  • โฑ๏ธ Time Systems: UTC, TAI, GPS, TT, TDB; Julian date conversions; leap seconds
  • ๐Ÿ”„ Rotations: Quaternions, DCMs, all 12 Euler sequences, axis-angle, SLERP
  • ๐ŸŒŒ Environment: Space environment constants, solar flux (placeholder)
  • ๐Ÿ“Š Units & Constants: SI/imperial conversions, WGS84, Earth parameters

Note: Vulcan uses SI units throughout (meters, kilograms, seconds, radians) unless explicitly stated otherwise.

Quick Start

Prerequisites

  • Nix package manager (recommended)
  • Or: CMake 3.20+, Clang/GCC with C++20, Eigen3, CasADi, Janus

Building

# Enter dev environment
nix develop
# Build
./scripts/build.sh
# Run tests
./scripts/test.sh
# Run examples
./scripts/run_examples.sh

Example Usage

// 1. Pure Physics Model (State-Free)
template <typename Scalar>
Scalar flight_loads(Scalar alt, Scalar vel) {
// Composition: Atmosphere + Aerodynamics modules
Scalar rho = vulcan::ussa1976::density(alt);
}
int main() {
// 2. Numeric Mode (Simulation)
double q = flight_loads(10000.0, 500.0);
// 3. Symbolic Mode (Optimization)
auto h = janus::sym("h");
auto v = janus::sym("v");
auto q_sym = flight_loads(h, v);
// Automatic differentiation
auto dq_dh = janus::jacobian(q_sym, h);
}
Scalar dynamic_pressure(const Scalar &density, const Scalar &velocity)
Dynamic pressure.
Definition Aerodynamics.hpp:28
Scalar density(const Scalar &altitude)
US Standard Atmosphere 1976 - Density (table-based).
Definition USSA1976.hpp:224

Directory Structure

vulcan/
โ”œโ”€โ”€ docs/
โ”‚ โ”œโ”€โ”€ implementation_plans/ # Design documents
โ”‚ โ””โ”€โ”€ user_guides/ # Module documentation
โ”œโ”€โ”€ examples/
โ”‚ โ”œโ”€โ”€ aerodynamics/ # Aero calculations demo
โ”‚ โ”œโ”€โ”€ atmosphere/ # Atmospheric model usage
โ”‚ โ”œโ”€โ”€ coordinates/ # Coordinate frame transformations
โ”‚ โ”œโ”€โ”€ dynamics/ # Dynamics demo
โ”‚ โ”œโ”€โ”€ environment/ # Space environment
โ”‚ โ”œโ”€โ”€ geodetic/ # Geodetic conversions
โ”‚ โ”œโ”€โ”€ geometry/ # Geometric primitives
โ”‚ โ”œโ”€โ”€ gravity/ # Gravity models demo
โ”‚ โ”œโ”€โ”€ intro/ # Getting started
โ”‚ โ”œโ”€โ”€ io/ # HDF5 and telemetry I/O
โ”‚ โ”œโ”€โ”€ mass/ # Mass properties, aggregation, inertia
โ”‚ โ”œโ”€โ”€ orbital/ # Orbital mechanics & optimization
โ”‚ โ”œโ”€โ”€ propulsion/ # Propulsion models demo
โ”‚ โ”œโ”€โ”€ rotations/ # Rotation and attitude examples
โ”‚ โ”œโ”€โ”€ sensors/ # Sensor noise simulation
โ”‚ โ”œโ”€โ”€ time/ # Time systems and Julian dates
โ”‚ โ”œโ”€โ”€ transfer_functions/ # Transfer functions demo
โ”‚ โ””โ”€โ”€ wind/ # Wind model optimization
โ”œโ”€โ”€ include/vulcan/
โ”‚ โ”œโ”€โ”€ aerodynamics/ # Dynamic pressure, Mach, Reynolds, AoA
โ”‚ โ”œโ”€โ”€ atmosphere/ # US76, Exponential atmosphere
โ”‚ โ”œโ”€โ”€ coordinates/ # ECEF, LLA, NED, body frames
โ”‚ โ”œโ”€โ”€ core/ # Types, constants, interpolation
โ”‚ โ”œโ”€โ”€ environment/ # Space environment utilities
โ”‚ โ”œโ”€โ”€ estimation/ # Kalman filters (Linear, EKF, UKF)
โ”‚ โ”œโ”€โ”€ geodetic/ # Geodesic utils
โ”‚ โ”œโ”€โ”€ geometry/ # Geometric primitives
โ”‚ โ”œโ”€โ”€ gravity/ # Point mass, J2/J4, spherical harmonics
โ”‚ โ”œโ”€โ”€ io/ # HDF5, CSV, Signal, Telemetry
โ”‚ โ”œโ”€โ”€ dynamics/ # 6DOF, point mass, guided, oscillators, slosh
โ”‚ โ”œโ”€โ”€ mass/ # Mass properties, aggregation, inertia
โ”‚ โ”œโ”€โ”€ orbital/ # Keplerian, anomaly, ephemeris
โ”‚ โ”œโ”€โ”€ propulsion/ # Rocket, electric, air-breathing
โ”‚ โ”œโ”€โ”€ rng/ # Random number generation
โ”‚ โ”œโ”€โ”€ rotations/ # Quaternions, Euler, DCM, axis-angle
โ”‚ โ”œโ”€โ”€ sensors/ # Noise models (Allan variance, etc.)
โ”‚ โ”œโ”€โ”€ time/ # GPS, UTC, TAI, TT, TDB, Julian dates
โ”‚ โ”œโ”€โ”€ transfer_functions/ # Dynamics, discretization, PID
โ”‚ โ”œโ”€โ”€ wind/ # Shear profiles, Dryden, von Kรกrmรกn
โ”‚ โ””โ”€โ”€ vulcan.hpp # Main umbrella header
โ”œโ”€โ”€ scripts/ # Build, test, and dev utilities
โ”œโ”€โ”€ tests/ # GoogleTest suite mirroring include/
โ””โ”€โ”€ reference/ # Reference data and lookups

The Janus Paradigm

Vulcan follows Janus's dual-backend design. All models are templated on a Scalar type:

Mode Scalar Type Purpose
Numeric double Fast simulation, real-time control
Symbolic casadi::MX Graph generation, optimization

Critical Rules

// โœ… Use janus:: namespace for math
auto result = janus::sin(theta) * janus::pow(r, 2);
// โœ… Use janus::where() for branching
Scalar cd = janus::where(mach > 1.0, 0.5, 0.02);
// โŒ NEVER use std:: math or if/else on Scalars

Architecture: State-Free

Vulcan is explicitly STATE FREE.

It does not manage simulation lifecycles or hidden history. It is a library of pure physics models and utilities.

  • No Hidden State: Classes do not store simulation time t or history. You pass the current state in, and get the result out.
  • Functional Algorithms: Integrators and time utilities exist, but they are pure functions (e.g., rk4_step(model, x, dt)), not stateful engines.
  • Just Physics: Header-only libraries defining the equations of motion and constitutive laws.

This design is critical for symbolic optimization, where the entire simulation must be unrolled into a single computational graph without side effects.

License

MIT License - See [LICENSE](LICENSE) for details.