Kerbal Engineer Redux

Kerbal Engineer Redux

2M Downloads

AltitudeTerrain.cs - AGL?

yalov opened this issue · 1 comments

commented

you have this calculation

if (FlightGlobals.ActiveVessel.terrainAltitude > 0.0
                || FlightGlobals.ActiveVessel.situation == Vessel.Situations.SPLASHED)
                return FlightGlobals.ship_altitude - FlightGlobals.ActiveVessel.terrainAltitude;
            else
                return FlightGlobals.ship_altitude;

so where I can find a not splashed place with terrainAltitude < 0 ?
if the place is exist, why in a flight above the place, it shows ASL, and not AGL?

commented

ok, I get it — it is about distance to sea level when flying above water.

Is there surface (not underwater) with negative altitude?

Also the code doesn't resolve the case when you are landed to the bottom of the sea, it shows Below Sea Level, not Above Ground Level.