I have a database of craters on Mars in decimal latitude and longitude. The latitude ranges from about -90 to 90 and the longitude from -180 to 180 which feels right to me.

Is there a formula to calculate the distance between two points using this system on Mars?

I am using data from: Robbins Crater Database Explanation of the fields can be found at: A new global database of Mars impact craters ≥1 km

  • The formulas are skeevy, unless you are using GIS software, then it's simple. Without specifying which GIS software, this Question is somewhat open-ended.
    – Vince
    Commented Feb 4, 2021 at 21:49
  • What formulas have you found? Commented Feb 4, 2021 at 21:55
  • I'm not using GIS software. [andrew.hedges.name/experiments/haversine/] which is supposed to be the Haversine formula, but taking the square root of negative numbers didn't go so well. Also here: [support.sisense.com/hc/en-us/articles/… Commented Feb 4, 2021 at 22:04
  • 2
    Can you post an example calculation, with the input values, the steps you performed and the values you arrive at? You say that you get negative numbers inside the square root, but this normally shouldn't happen. Are you using the correct angular units (degrees/radians)? Ofter times, the functions take radians as input, so you may have to convert your latitudes and longitudes to radians.
    – FSimardGIS
    Commented Feb 4, 2021 at 23:56

2 Answers 2


Quick and dirty: Use the haversine script from https://andrew.hedges.name/experiments/haversine/ or https://www.movable-type.co.uk/scripts/latlong.html and multiply the calculated distance by 0.532, which is the size ratio Mars/Earth.

Elaborate: use Lambert's formula for long lines, with Martian ellipsoid values. https://en.wikipedia.org/wiki/Geographical_distance


I am studying Mars also. There is an open source that will make measuring craters easy. see https://jmars.asu.edu/
or use my JMARS directions site for more help: https://marsexplorer.wixsite.com/marsexplorer[![enter image description here]1]1

  • 2
    To be honest: your answer reads like a seo commercial. Please leave a disclaimer in case you are associated to it. Also please fix your image and add a short explanation on how to do it, link only answers are likely to be deleted.
    – MrXsquared
    Commented Jan 3, 2023 at 12:28
  • hm, not sure what is needed here. I made the website marsexplorer.wixsite.com/marsexplorer. My info is in the footer. The site is the directions. The other website is by the ASU and is the tool suggested for measuring Mars.
    – jkane
    Commented Jan 8, 2023 at 4:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.