Planetary bodies instead of bare mu #21

Closed
opened 2026-09-30 12:48:49 -04:00 by connor · 2 comments
Owner

Dynamics should reference a body rather than a raw mu. A Body carries at least mu, a reference radius and its NAIF id, which is close to what ANISE's Frame already holds.

The default central body belongs to the propagation, not to the library, so that a propagation about the Moon is a matter of saying so rather than of working around an Earth assumption. Sets up n-body directly.

Wanted before #9, which otherwise needs Sun and Moon parameters threaded through by hand.

Dynamics should reference a body rather than a raw `mu`. A `Body` carries at least `mu`, a reference radius and its NAIF id, which is close to what ANISE's `Frame` already holds. The default central body belongs to the propagation, not to the library, so that a propagation about the Moon is a matter of saying so rather than of working around an Earth assumption. Sets up n-body directly. Wanted before #9, which otherwise needs Sun and Moon parameters threaded through by hand.
connor added this to the M1 milestone 2026-09-30 12:48:49 -04:00
connor added the size/M label 2026-09-30 12:48:49 -04:00
Author
Owner

See #26: if the frame on a Cartesian or element set carries mu, conversions stop needing a mu: f64 parameter. That argues for doing the body type as part of #26 rather than after it, since ANISE's optional mu_km3_s2 would otherwise make every conversion fallible.

See #26: if the frame on a Cartesian or element set carries `mu`, conversions stop needing a `mu: f64` parameter. That argues for doing the body type as part of #26 rather than after it, since ANISE's optional `mu_km3_s2` would otherwise make every conversion fallible.
Author
Owner

Done in b089b20, folded into #26 as planned.

Body carries mu, equatorial radius, flattening and NAIF id. Frame pairs one with an orientation and is what supplies mu to every conversion, so nothing takes a bare one. Dynamics::TwoBody names a Body, and Propagation holds the default frame rather than the library holding a default body.

Every field serializes, not just a name: a record saying "Earth" does not say which mu was used.

One thing worth carrying into #8: Body::EARTH.mu is EGM96's, and it has to agree with whatever gravity field is loaded, since the point-mass term and the harmonics are two halves of one expansion. A loaded field should override it.

Done in b089b20, folded into #26 as planned. `Body` carries `mu`, equatorial radius, flattening and NAIF id. `Frame` pairs one with an orientation and is what supplies `mu` to every conversion, so nothing takes a bare one. `Dynamics::TwoBody` names a `Body`, and `Propagation` holds the default frame rather than the library holding a default body. Every field serializes, not just a name: a record saying "Earth" does not say which `mu` was used. One thing worth carrying into #8: `Body::EARTH.mu` is EGM96's, and it has to agree with whatever gravity field is loaded, since the point-mass term and the harmonics are two halves of one expansion. A loaded field should override it.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: connor/astrokit#21