// public float speed { // get { // return Mathf.Sqrt(); // } // } public static Orbit FromAsterankData(AsterankUtil.Data data) { Orbit orbit = new Orbit(); orbit.SetFromAsterankData(data); return(orbit); }
public static OrbitalPlane FromAsterankData(AsterankUtil.Data data) { OrbitalPlane plane = Allocate(); plane.SetFromAsterankData(data); plane.UpdateDisplay(); return(plane); }
public void SetFromAsterankData(AsterankUtil.Data data) { semimajorAxis = data.a; eccentricity = data.e; inclination = data.i; periapsisArgument = data.w; nodeLongitude = data.om; meanMotion = data.n; periapsisPassage = data.tp; gravitationalParameter = ((double)data.GM) / (AU3); // units are important }
public static Body FromAsterankData(AsterankUtil.Data data) { Body body = Allocate("body [" + data.full_name + "]"); body.orbit.SetFromAsterankData(data); body.orbit.CalculateAnomalies(); body.plane.name = "orbit [" + data.full_name + "]"; body.plane.orbit = body.orbit; body.plane.UpdateDisplay(); body.UpdatePosition(); return(body); }
public void SetFromAsterankData(AsterankUtil.Data data) { name = "orbital plane [" + data.full_name + "]"; orbit.SetFromAsterankData(data); }