Click or drag to resize

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
Assembly:  AGI.Foundation.Models (in AGI.Foundation.Models.dll) Version: 24.3.420.0 (24.3.420.0)
Syntax
public void UseForCentralBodyPositions(
	CentralBodiesFacet centralBodiesFacet
)

Parameters

centralBodiesFacet
Type: AGI.Foundation.CelestialCentralBodiesFacet
The central bodies to update to use this JPL DE data.
Exceptions
ExceptionCondition
ArgumentNullException Thrown when centralBodiesFacet is .
Remarks
To use JPL DE data for a single central body, use JplDECenterOfMassPoint. This method also calls SynchronizeOrigins on the bodies.
Examples

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:

C#
// 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();
See Also