//Returns whether o has an ascending node with the equator. This can be false //if o is hyperbolic and the would-be ascending node is within the opening //angle of the hyperbola. public static bool AscendingNodeEquatorialExists(this Orbit o) { return Math.Abs(MuUtils.ClampDegrees180(o.AscendingNodeEquatorialTrueAnomaly())) <= o.MaximumTrueAnomaly(); }
//Returns the next time at which the orbiting object will cross the equator //moving northward, if o is east-moving, or southward, if o is west-moving. //For elliptical orbits this is a time between UT and UT + o.period. //For hyperbolic orbits this can by any time, including a time in the past if the //ascending node is in the past. //NOTE: this function will throw an ArgumentException if o is a hyperbolic orbit and the //"ascending node" occurs at a true anomaly that o does not actually ever attain. public static double TimeOfAscendingNodeEquatorial(this Orbit o, double UT) { return o.TimeOfTrueAnomaly(o.AscendingNodeEquatorialTrueAnomaly(), UT); }
//Gives the true anomaly at which o crosses the equator going southwards, if o is east-moving, //or northwards, if o is west-moving. //The returned value is always between 0 and 360. public static double DescendingNodeEquatorialTrueAnomaly(this Orbit o) { return MuUtils.ClampDegrees360(o.AscendingNodeEquatorialTrueAnomaly() + 180); }