shmodot/scripts/orbits/OrbitalElements.cs

46 lines
1.3 KiB
C#

public struct OrbitalElements
{
private Ellipse _ellipse;
/// <summary>
/// Semi-major axis in AU
/// </summary>
public double a => _ellipse.a;
/// <summary>
/// Eccentricity
/// </summary>
public double e => _ellipse.e;
/// <summary>
/// Inclination in degrees
/// </summary>
public double i { get; private set; }
/// <summary>
/// Argument of ascending node in degrees
/// </summary>
public double W { get; private set; }
/// <summary>
/// Argument of periapsis in degrees
/// </summary>
public double p { get; private set; }
/// <summary>
/// Mean anomaly at epoch
/// </summary>
public double M0 { get; private set; }
/// <summary>
///
/// </summary>
/// <param name="a">Semi-major axis in AU</param>
/// <param name="e">eccentricity</param>
/// <param name="i">Inclination in degrees</param>
/// <param name="W">Argument of ascending node in degrees</param>
/// <param name="p">Argument of periapsis in degrees</param>
/// <param name="M0">Mean anomaly at epoch</param>
public OrbitalElements(double a, double e, double i, double W, double p, double M0)
{
_ellipse = new Ellipse(a, e);
this.i = i;
this.W = W;
this.p = p;
this.M0 = M0;
}
}