Jump to content

Suggested Fix to Radar Altimeter


Recommended Posts

I’ve discovered a flaw in KSP that requires a fix.  I hesitate to call it a bug because I think it is working as designed, but the design needs to change.

When a world is created using VertexHeightMap, it is possible to define a negative offset to lower a portion of the terrain below the datum.  This is done typically when a body has oceans.  When oceans are present, the datum becomes sea level and all land at negative elevations is under water.

However, it is also possible to define a negative offset when there are no oceans.  A mod developer might choose to do this if he wants to place the datum at an elevation that is somewhere between the body’s minimum and maximum elevations.  This is the method typically used in real life, where a body’s datum is placed somewhere close to the mean surface elevation.

This creates a problem in KSP, however.  The normal altimeter reads altitude in relation to the datum, as it should.  When above the datum it reads positive (black numbers), and when below the datum it reads negative (red numbers).  When we switch to IVA view, however, the radar altimeter is supposed to read height above the ground.  The radar altimeter does so when the ground elevation is positive, but when the ground elevation is negative, the altimeter reads the height above the datum.  The altimeter behaves as if it is coded to interpret any ground below the datum to be under water, therefore it reads altitude above an imagined “sea level”.

This should be changed.  The radar altimeter should perform a check to see if oceans are present or not.  If oceans are present, then the altimeter’s current mode of operation is correct.  However, if there are no oceans, then the radar altimeter should read the height above the ground below it, even if that ground lies at a negative elevation.

Link to comment
Share on other sites

@Thomas P. and @Sigma88, you guys are the main Kopernicus developers.  What do you think?  Is this altimeter issue something that can fixed in Kopernicus?

@cybutek, I've also observed that the "Altitude (Terrain)" readout in Kerbal Engineer Redux does the same thing as the stock radar altimeter.  What's your opinion on this issue?

Link to comment
Share on other sites

Well, there is something like a heightOverTerrain readout in the Vessel API IIRC. I can check if I can exchange this value and the one from the altimeter.

But in theory, planet makers could just add a VertexHeight Offset that bumps the whole surface of the planet to > 0

Link to comment
Share on other sites

1 hour ago, Thomas P. said:

But in theory, planet makers could just add a VertexHeight Offset that bumps the whole surface of the planet to > 0

True, but I don't want to have to do that.  I want the option to place the datum at a median elevation.

What I've done in the past, and what I suspect most developers do, is set the lowest point on the planet equal to an elevation of 0 (or at least close to it).  What I don't like about this is going to the Tracking Station and seeing the planet's atmospheric pressure and temperature given for "sea level", i.e. the datum.  What we are really seeing is the pressure and temperature for the lowest point on the planet, which is not at all representative of the conditions across the vast majority of the planet's surface.  There may be no more than one tiny spot on the entire planet (or maybe no spot if the whole surface is >0) where those conditions actually exist.

I would prefer to set the datum at an elevation were roughly half the surface area is below, and half is above.  That way the "sea level" atmospheric conditions actually represents median conditions on the surface, with some areas greater and some less.  That just makes more sense to me, plus it's the way it is in real life.
 

Edited by OhioBob
Link to comment
Share on other sites

On 2/12/2017 at 10:12 PM, OhioBob said:

I would prefer to set the datum at an elevation were roughly half the surface area is below, and half is above. ... plus it's the way it is in real life.

Well Bob, you never fail to blow my gourd. :D Surveyors (me) and dry-land mapmakers avoid negative coordinates/elevations like the plague. This is because it's too easy to make a blunder and accidentally drop the sign--Particularly if you're making time-critical calculations. So, I've just been down the rabbit hole of Martian geodesy to figure out some details on that choice.

https://en.wikipedia.org/wiki/Geography_of_Mars#Zero_elevation "The equipotential surface (gravitational plus rotational) whose average value at the equator is equal to the mean radius of the planet. "

Section 1.3 - Reference Surface: http://www.isprs.org/proceedings/XXXIV/part4/pdfpapers/521.pdf This paper primarily discusses the horizontal, but it's super interesting.

Just to clarify some stuff for folks who are interested:

Geoids vs ellipsoids, etc: http://www.esri.com/news/arcuser/0703/geoid1of3.html

An Ellipsoid is an simplified model of gravitational equipotential energy. It's defined by a semi-major and a semi-minor axis. The one used on Earth (WGS 84) is approximately at sea level, but sea level varies quite a bit because of gravitational anomalies. Ellipsoids are used to simplify coordinate transformations between different systems.

A Geoid is a very lumpy model and is: "The equipotential surface of the Earth's gravity field which best fits, in a least squares sense, global mean sea level." The WGS 84 ellipsoid differs from the geoid in any location by up to +/- 100m. Where I live, the difference is ~ -31.5m.

 

 

Bob, you're a jerk. You made me study! :D

 

 

Link to comment
Share on other sites

30 minutes ago, joshudson said:

Would you like to try the mohole?

The mohole starts several kilometers above datum and I don't think it goes negative at all, but I could be wrong.

Just out of curiosity, what does the IVA radar altimeter show when you're below datum?

Link to comment
Share on other sites

15 hours ago, natsirt721 said:

Just out of curiosity, what does the IVA radar altimeter show when you're below datum?

As I recall, the dial hand just keeps rotating past zero.  Of course the gauge doesn't show negative numbers, so it was either pointing to nothing, or it was reading nonsense.
 

Edited by OhioBob
Link to comment
Share on other sites

  • 3 months later...
On ‎2‎/‎13‎/‎2017 at 0:24 AM, Thomas P. said:

Well, there is something like a heightOverTerrain readout in the Vessel API IIRC. I can check if I can exchange this value and the one from the altimeter.

@Thomas P., did you ever get a chance to investigate this issue?

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...