• Welcome to the new COTI server. We've moved the Citizens to a new server. Please let us know in the COTI Website issue forum if you find any problems.

Celestial Mechanics: online calculator?

I'd like to make physics calcs so that I can answer some questions about orbiting bodies.

Given the mass (and size) of the main body, the mass (and size) of the smaller, secondary body and the distance between the two, what would the orbital period be? For example, at what speeds do Saturn's or Jupiter's satellites orbit their respective parent planet?

Is there a relatively neat equation that explains this phenomenon, without taxing my remaining braincells?

(I am a professional Linguist, and thus the hard sciences of Astrophysics, Astronomy, etc. are outside of my word-based wheelhouse, so apologies for my awkward way of putting things.)
 
See the wikipedia article on Orbital Period.
Indeed, it's pretty simple to calculate.

The velocity is essentially fixed based on the mass of the primary body and the distance. The mass of the satellite doesn't really play into it, certainly not enough to matter.

So, the good news is the only "real" data you need is the mass of the primary (like Jupiter), and then you can pick any orbit you like.

Here's a quick calculator. Plonk it into an HTML file (like "orbit_calc.html") and open it in your browser.

The values for Jupiter and Io are Jupiters Mass = 1.8982e27 and Io's orbit is 422,000km. You'll see the result is 17ishkm/s. It also adds the orbital period.

And I can't take all the credit, ChatGPT spit out the script, and I cajoled it to make it actually correct.

Code:
<!DOCTYPE html>
<html>
<head>
  <title>Orbital Velocity and Period Calculator</title>
  <script>
    function calculateValues() {
      var primaryMass = document.getElementById("primaryMass").value;
      var orbitalDistance = document.getElementById("orbitalDistance").value * 1000; // Convert km to m
      
      // Calculating orbital velocity using the formula: v = sqrt(G * M / r)
      var gravitationalConstant = 6.67430e-11; // Gravitational constant (m^3/kg/s^2)
      var orbitalVelocity = Math.sqrt((gravitationalConstant * primaryMass) / orbitalDistance);
      
      // Calculating orbital period using the formula: T = 2π * sqrt(r^3 / (G * M))
      var orbitalPeriod = 2 * Math.PI * Math.sqrt(Math.pow(orbitalDistance, 3) / (gravitationalConstant * primaryMass));
      
      // Displaying the calculated values
      document.getElementById("velocityResult").innerHTML = "Orbital Velocity: " + orbitalVelocity.toFixed(2) + " m/s";
      document.getElementById("periodResult").innerHTML = "Orbital Period: " + orbitalPeriod.toFixed(2) + " seconds";
    }
  </script>
</head>
<body>
  <h1>Orbital Velocity and Period Calculator</h1>
  
  <form>
    <label for="primaryMass">Primary Mass (kg):</label>
    <input type="number" id="primaryMass" name="primaryMass" required><br><br>
    
    <label for="orbitalDistance">Orbital Distance (km):</label>
    <input type="number" id="orbitalDistance" name="orbitalDistance" required><br><br>
    
    <button type="button" onclick="calculateValues()">Calculate</button>
  </form>
  
  <div id="velocityResult"></div>
  <div id="periodResult"></div>
</body>
</html>
 
Kepler's 3rd law is definitely what you want. For one body much larger than the other, you can pretty much ignore the small body's mass. I've put up an orbital calculator at https://www.clusterrpg.org/clusterhome/details/orbitcalc.html where you can calculate the period of an orbit based on a planet's gravity (substitute for mass) and the distance from it. You also have to subtract out the planet's radius to get the altitude from the surface. I was particularly interested in geosynchronous orbits, so that is a different button on the same page and uses the planet's rotational 'day'. I find the calculations interesting, as ships orbit faster at lower altitudes than at more distant ones. It's also kinda tough to communicate with a ship on the far side of the world without a planetary relay network.
 
Back
Top