JplDEUseForCentralBodyPositions Method |
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 JplDE405 jplde = new JplDE405(Path.Combine(dataPath, "plneph.405")); // 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();