public double SynodicPeriod(KSPOrbitModule.IOrbit other) { int sign = (Vector3d.Dot(OrbitNormal, other.OrbitNormal) > 0 ? 1 : -1); //detect relative retrograde motion return(Math.Abs(1.0 / (1.0 / Period - sign * 1.0 / other.Period))); //period after which the phase angle repeats }
public double TimeOfDescendingNode(KSPOrbitModule.IOrbit b, double ut) => TimeOfTrueAnomaly(DescendingNodeTrueAnomaly(b), ut);
public double DescendingNodeTrueAnomaly(KSPOrbitModule.IOrbit b) => DirectBindingMath.ClampRadians2Pi(AscendingNodeTrueAnomaly(b) + Math.PI);
public double AscendingNodeTrueAnomaly(KSPOrbitModule.IOrbit b) { Vector3d vectorToAn = Vector3d.Cross(OrbitNormal, b.OrbitNormal); return(TrueAnomalyFromVector(vectorToAn)); }