Agent skill
satellitetoolbox-gravity
SatelliteToolboxGravityModels.jl for spherical harmonic gravity field computation. Use when loading gravity models (EGM96, EGM2008), computing gravitational acceleration or potential, or working with ICGEM gravity field files.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/satellitetoolbox-gravity-hammerhead-space-agenticcodingrules
SKILL.md
SatelliteToolboxGravityModels.jl
Spherical harmonic gravity field modeling. Repo: JuliaSpace/SatelliteToolboxGravityModels.jl
Loading a Model
using SatelliteToolboxGravityModels
# Load from ICGEM file (downloads and caches automatically)
model = GravityModels.load(IcgemFile, fetch_icgem_file(:EGM96))
model = GravityModels.load(IcgemFile, fetch_icgem_file(:EGM2008))
Computing Accelerations
All positions must be in ITRF (body-fixed frame) in meters.
# Gravitational acceleration (mass-attraction only) -> SVector{3} [m/s²]
a = GravityModels.gravitational_acceleration(model, r_itrf; max_degree=70, max_order=70)
# Gravity acceleration (includes centrifugal) -> SVector{3} [m/s²]
g = GravityModels.gravity_acceleration(model, r_itrf; max_degree=70)
# Gravitational potential -> scalar [J/kg]
U = GravityModels.gravitational_potential(model, r_itrf; max_degree=70)
# Field derivative in spherical coords -> (dU/dr, dU/dϕ, dU/dλ)
fd = GravityModels.gravitational_field_derivative(model, r_itrf; max_degree=70)
Pre-allocated Legendre Buffers (for hot-path performance)
P = LowerTriangularStorage{RowMajor, Float64}(max_degree + 1)
dP = LowerTriangularStorage{RowMajor, Float64}(max_degree + 1)
a = GravityModels.gravitational_acceleration(model, r; max_degree=70, P=P, dP=dP)
Model Queries
GravityModels.gravity_constant(model) # μ [m³/s²]
GravityModels.radius(model) # Reference radius [m]
GravityModels.maximum_degree(model) # Max available degree
GravityModels.coefficients(model, n, m) # (Clm, Slm) at degree n, order m
GravityModels.coefficient_norm(model) # :full, :schmidt, or :unnormalized
Key Conventions
- Positions in ITRF, meters. Returns in m/s².
max_degreeandmax_orderkeywords truncate the expansion- Time-varying coefficients supported (pass
timeargument as seconds since J2000 orDateTime) - AD support via ForwardDiff/Zygote package extension
- Uses
LowerTriangularStorage{RowMajor}from SatelliteToolboxBase for efficient coefficient storage
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?