/// <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(); }
void Start() { worldState = GravityEngine.Instance().GetWorldState(); accelGEtoSI = GravityScaler.AccelerationScaleInternalToGEUnits() / GravityScaler.AccelSItoGEUnits(); }