Function Repository Resource:

OrbitalProperties

Source Notebook

Obtain the parameters for orbital motion

Contributed by: Julián Laverde

ResourceFunction["OrbitalProperties"][e,M]

returns the results for orbital motion given eccentricity e and mean anomaly M.

ResourceFunction["OrbitalProperties"][e,M,"format"]

returns the results for orbital motion in the specific format.

Details and Options

ResourceFunction["OrbitalProperties"] returns the parameters of orbital motion from Kepler's equation for the given eccentricity e and mean anomaly M.
The eccentricity e can be a number that satisfies 0e<1, corresponding to an elliptic orbit.
The mean anomaly M can be a number or Quantity in any compatible angle unit.
"format" can be any of the following:
"Association"(default) return the results for orbital motion
"RelationPlot"plot of the relation between eccentric anomaly and true anomaly
ResourceFunction["OrbitalProperties"] can take the following options:
"AngleUnit""AngularDegrees"specify the angle unit used in the "Association" output form
"LengthUnit""Kilometers"specify the length unit used in the "Association" output form
"SemimajorAxis"Quantity[10000,"Kilometers"]specify the value of the semimajor axis used to compute to radial position
"AngleUnit" can be any compatible angle unit.
"LengthUnit" can be any compatible length unit.
"SemimajorAxis" can be numeric or a Quantity with any compatible length unit.
When given as a number, the units of "SemimajorAxis" are assumed to be "Kilometers".

Examples

Basic Examples (2) 

Results for orbital motion:

In[1]:=
ResourceFunction["OrbitalProperties"] [0.3, 30 Degree]
Out[1]=

Specify the output form as an Association:

In[2]:=
ResourceFunction["OrbitalProperties"] [0.7, 85 Degree, "Association"]
Out[2]=

Find the relation between eccentric anomaly and true anomaly:

In[3]:=
ResourceFunction["OrbitalProperties"] [0.8, (
 2 \[Pi])/3, "RelationPlot"]
Out[3]=

Options (3) 

AngleUnit (1) 

Use "AngleUnit" to specify the output angle unit in the Association form:

In[4]:=
ResourceFunction["OrbitalProperties"] [0.6, 85 Degree, "AngleUnit" -> "ArcMinutes"]
Out[4]=

LengthUnit (1) 

Use "LengthUnit" to specify the output length unit in the Association form:

In[5]:=
ResourceFunction["OrbitalProperties"] [0.6, Quantity[475, "ArcMinutes"], "Association", "LengthUnit" -> "Miles"]
Out[5]=

SemimajorAxis (1) 

Use "SemimajorAxis" to specify the value of the semimajor axis used to compute the radial position:

In[6]:=
ResourceFunction["OrbitalProperties"][0.8, 70 Degree, "Association", "LengthUnit" -> "AstronomicalUnits", "SemimajorAxis" -> PlanetData["Earth", "SemimajorAxis"]]
Out[6]=

Neat Examples (1) 

Visualize the progress of an orbiting body over 52 weeks:

In[7]:=
KeplerOrbit[ph_, eps_] := With[{ea = QuantityMagnitude@
      ResourceFunction["OrbitalProperties"] [eps, ph][
       "EccentricAnomaly"]}, {eps + Cos[ea], Sqrt[1 - eps^2] Sin[ea]}];

With[{n = 52, \[CurlyEpsilon] = Sqrt[1/2]},
 Graphics[
  {Table[{RandomChoice[ColorData[113, "ColorList"]], Polygon[Prepend[
       KeplerOrbit[#, \[CurlyEpsilon]] & /@ Range[w, w + 2 \[Pi]/n, 2 \[Pi]/(7 n)], {0, 0}]]}, {w, \[Pi]/
      n, \[Pi] (2 - 1/n), 2 \[Pi]/n}]}]]
Out[7]=

Publisher

WolframSpecialProjects

Version History

  • 2.1.0 – 19 July 2021
  • 2.0.0 – 22 January 2021
  • 1.0.0 – 23 November 2020

Related Resources

License Information