Пример #1
0
    // public float speed {
    //  get {
    //      return Mathf.Sqrt();
    //  }
    // }

    public static Orbit FromAsterankData(AsterankUtil.Data data)
    {
        Orbit orbit = new Orbit();

        orbit.SetFromAsterankData(data);
        return(orbit);
    }
Пример #2
0
    public static OrbitalPlane FromAsterankData(AsterankUtil.Data data)
    {
        OrbitalPlane plane = Allocate();

        plane.SetFromAsterankData(data);
        plane.UpdateDisplay();
        return(plane);
    }
Пример #3
0
 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
 }
Пример #4
0
    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);
    }
Пример #5
0
 public void SetFromAsterankData(AsterankUtil.Data data)
 {
     name = "orbital plane [" + data.full_name + "]";
     orbit.SetFromAsterankData(data);
 }