HAMMERHEAD-Space Astrodynamics Ecosystem
Package Dependency Graph
QLaw.jl ──> AstroPropagators.jl ──> AstroForceModels.jl ──> AstroCoords.jl
├─> SatelliteToolbox ecosystem
SimsFlanagan.jl ──> Lambert.jl ──> AstroCoords.jl
AstroMeasurements.jl ──> AstroCoords.jl
Shared Conventions
| Convention | Standard |
|---|---|
| Julia versions | 1.10, 1.11 |
| Formatter | JuliaFormatter BlueStyle (style = "blue") |
| Static arrays | StaticArrays / StaticArraysCore everywhere |
| AD support | ForwardDiff, Enzyme, Mooncake, Zygote, PolyesterForwardDiff |
| Allocation testing | AllocCheck.jl on all hot-path functions |
| Type stability | JET.jl on all packages |
| Package quality | Aqua.jl on all packages |
| Struct constructors | @with_kw from Parameters.jl |
| SciML interface | solve(Problem, Algorithm) pattern from SciMLBase |
| Default branch | master (not main) |
Core Design Principles
- AD-first: All code must be differentiable. Use
promote_type, avoid mutation, useSVectorreturns. - Zero allocations: Hot-path functions (
acceleration,EOM) must pass@check_allocs. - Type stability: All exported functions must pass JET analysis.
- SciML composability: Follow Problem/Solution/Algorithm pattern.
- Multiple dispatch: Use type dispatch over if/else branching.
Standard State Representation
- Position/velocity:
[rx, ry, rz, vx, vy, vz]km, km/s in J2000 ECI - Parameters:
ComponentVector(; JD=epoch_jd, μ=gravitational_param) - Time: elapsed seconds since epoch; Julian Date =
p.JD + t / 86400.0
New Package Checklist
When creating a new package in this ecosystem:
- Add
.JuliaFormatter.tomlwithstyle = "blue" - Add
typos.tomlfor spell checking - Set up Aqua.jl, JET.jl, AllocCheck tests
- Use
StaticArraysCore(not fullStaticArrays) for minimal deps - Support Julia 1.10+ in compat
- Follow
AbstractXbase type pattern - Document with
# Arguments,# Returns,# Referencessections - Add AD differentiability tests against FiniteDiff