JplDEUseForCentralBodyPositions Method |
Uses this JPL DE data for the positions of the centers of mass of the central bodies in the specified CentralBodiesFacet instance. This also sets the positions of all the PlanetarySystemBarycenters.
In particular, the EarthMoonBarycenter is calculated using the EarthMoonMassRatio and the updated positions of EarthCentralBody and MoonCentralBody. The other planetary system barycenters are set to exactly the same positions as their respective planets because technically the JPL DE data provides the barycenter positions rather than the physical positions of those planets.
Namespace: AGI.Foundation.Celestial
Exception | Condition |
---|---|
ArgumentNullException | Thrown when centralBodiesFacet is . |
The following example shows how to load a JPL DE file and use its data for the positions of the centers of mass of the central bodies in a CentralBodiesFacet:
// Load a JplDE file using a string that represents the JplDE file JplDE440 jplde = new JplDE440(Path.Combine(dataPath, "plneph.440")); // Use the JplDE data in a CentralBodiesFacet CentralBodiesFacet centralBodies = CentralBodiesFacet.GetFromContext(); jplde.UseForCentralBodyPositions(centralBodies); // Optional - use the JplDE data for the Lunar fixed frame MoonCentralBody moon = centralBodies.Moon; moon.FixedFrame = jplde.GetMoonFixedFrame();