Jump to content

How to determine average equatorial surface elevation on planets/moons?


Recommended Posts

I'm interested in working out the average elevation above sea level for the equators of the airless bodies (ideally both mean and median). I can do this by putting a satellite in an equatorial orbit and using kerbnet, but then I have to manually log an altitude every 3.5s for like 40 minutes per body. I'm hoping there's a somewhat less labor-intensive approach. Is there are kOS script or a website that has already logged them?

Link to comment
Share on other sites

On 10/9/2019 at 3:42 PM, Armisael said:

I'm interested in working out the average elevation above sea level for the equators of the airless bodies (ideally both mean and median). I can do this by putting a satellite in an equatorial orbit and using kerbnet, but then I have to manually log an altitude every 3.5s for like 40 minutes per body. I'm hoping there's a somewhat less labor-intensive approach. Is there are kOS script or a website that has already logged them?

In kOS, this code would store a list of altitudes around the equator:

local the_body is Mun. // or set to some other body to measure.
local alt_list is list().
local startlong is 0.
local stoplong is 360.
local steplong is 0.5. // samples 0.5 longitude degreees apart. Set smaller for more fine-grain measure.
for long in range(startlong, stoplong, steplong)
{
  // latitude = 0 to hardcode equator, longitude varies through the loop:
  alt_list:add( the_body:geopositionlatlng(0, long):terrainheight ).
}

// Now alt_list is a list of terrain heights around the equator.
// Do whatever statistical work on that list that you like in the lines below...
// for example - to get the mean:
local sum is 0.
for long in alt_list
  set sum to sum + long.
local mean is sum / alt_list:length.

Warning: the above code is not tested.  I typed it in without trying to run it.  It may have errors.

Edited by Steven Mading
There was syntax error because of a space between colon (":") and "terrainheight".
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...