예제 #1
0
    /// <summary>
    /// Validation:
    /// - confirmed velocity in SI units matches expected orbital velocity of ISS
    /// - checked that SI acceleration = -g at terminal velocity (9.73 m/s^2 at 28 km)
    /// </summary>

    // Use this for initialization
    void Start()
    {
        if (inertialMassKg == 0)
        {
            Debug.LogError("Mass is zero. Drag calculation will fail.");
        }
        if (spaceship == null)
        {
            spaceship = GetComponent <NBody>();
        }

        geDistanceToKm = 1;
        v_ship         = new double[] { 0, 0, 0 };
        v_earth        = new double[] { 0, 0, 0 };

        velocityScaleInternalToSI = GravityScaler.VelocityScaletoSIUnits() / GravityScaler.GetVelocityScale();
        accelSItoGE = GravityScaler.AccelSItoGEUnits() / GravityScaler.AccelerationScaleInternalToGEUnits();

        LoadDensityProfile();

        liveState = GravityEngine.Instance().GetWorldState();
    }
예제 #2
0
 void Start()
 {
     worldState  = GravityEngine.Instance().GetWorldState();
     accelGEtoSI = GravityScaler.AccelerationScaleInternalToGEUnits() / GravityScaler.AccelSItoGEUnits();
 }