private ScalarValue TrueAnomalyAtEqDN(Orbitable obt) { Vector3d vectorToAN = Vector3d.Cross(obt.Orbit.referenceBody.transform.up, SwappedOrbitNormal(obt.Orbit)); double ta = TrueAnomalyFromVector(obt.Orbit, vectorToAN); return(ClampAngle360(ta + 180)); }
private ScalarValue RelativeInclination(Orbitable obt, Orbitable tgt) { if (ReferenceEquals(tgt, null)) { throw new ArgumentNullException(); } return(FinePrint.Utilities.OrbitUtilities.GetRelativeInclination(obt.Orbit, tgt.Orbit)); }
public override void OnInspectorGUI() { Orbitable t = target as Orbitable; //Draw if has not been done yet if (t.trajectory == null) { t.UpdateTrajectory(); t.MoveToStart(); } EditorGUI.BeginChangeCheck(); base.OnInspectorGUI(); if (EditorGUI.EndChangeCheck()) { t.UpdateTrajectory(); t.MoveToStart(); } }
public OrbitInfo(Orbitable orb, SharedObjects sharedObj) { orbit = orb.Orbit; shared = sharedObj; name = orb.GetName(); }
// ------------------------------------------------------------------------------- public void FollowLinkedOrbitable(Orbitable linkedOrbitable) { var linkedToCenter = (mCenterOfTheUniverse - linkedOrbitable.transform.position).normalized; transform.position = mCenterOfTheUniverse + (linkedToCenter * OrbitDistance); }
public override void AddCelestialObject(Orbitable child) { _parent.AddCelestialObject(child); }
private ScalarValue TrueAnomalyAtDN(Orbitable obt, Orbitable tgt) { return(ClampAngle180(FinePrint.Utilities.OrbitUtilities.AngleOfDescendingNode(obt.Orbit, tgt.Orbit))); }
private ScalarValue TrueAnomalyAtEqAN(Orbitable obt) { Vector3d vectorToAN = Vector3d.Cross(obt.Orbit.referenceBody.transform.up, SwappedOrbitNormal(obt.Orbit)); return(TrueAnomalyFromVector(obt.Orbit, vectorToAN)); }
private ScalarValue EccentricAnomalyAtUT(Orbitable obt, ScalarValue ut) { return(RadToDeg(obt.Orbit.EccentricAnomalyAtUT(ut))); }
private ScalarValue UTAtTrueAnomaly(Orbitable obt, ScalarValue trueAnomaly) { return(obt.Orbit.GetUTforTrueAnomaly(DegToRad(trueAnomaly), 0)); }
private ScalarValue TrueAnomalyAtUT(Orbitable obt, ScalarValue ut) { return(RadToDeg(obt.Orbit.TrueAnomalyAtUT(ut))); }
private ScalarValue TrueAnomalyAtRadius(Orbitable obt, ScalarValue radius) { return(RadToDeg(obt.Orbit.TrueAnomalyAtRadius(radius))); }
private ScalarValue RadiusAtTrueAnomaly(Orbitable obt, ScalarValue trueAnomaly) { return(obt.Orbit.RadiusAtTrueAnomaly(DegToRad(trueAnomaly))); }
private ScalarValue MeanAnomalyAtUT(Orbitable obt, ScalarValue ut) { var percent = obt.Orbit.getObtAtUT(ut) / shared.Vessel.orbit.period; return(RadToDeg(percent * (2 * Math.PI))); }