Collection of formulas and equations

General physics and astronomy discussions not directly related to Celestia
Avatar
Topic author
EarthMoon
Posts: 200
Joined: 02.07.2022
With us: 2 years 4 months
Location: Germany

Collection of formulas and equations

Post #1by EarthMoon » 20.10.2023, 13:50

I have reconfigured the equation to calculate orbital periods (which are provided below in case someone else needs them too) and thought about a collection of formulas and equations about astronomy by providing common text representations (or Python assuming a user did from math import *, so instead of writing math.sqrt(x) write sqrt(x)) of the formulas/equations and (optionally) normal renderings (like below). It would also be good to provide reconfigured formulas for all variables.

An example (which directly counts to the collection):

Calculate the orbital period (in years), mass of central object (suns) or semi-major axis (AU) from the other two values:

Code: Select all

p = sqrt(a**3 / m)
a = cbrt(sqrt(p) * m)
m = a**3 / p**2

p is the orbital period in (Earth) years
a is the semi-major axis in AU
m is the central body's mass in sun masses

How the formulas look like in normal notation:
form_orbit.png
form_orbit.png (8.92 KiB) Viewed 7953 times
Crew: "We are orbiting a black hole."
Control Center: "Do not fly too close to the black hole!"
Crew: "OH OOPS..."

Celestia versions:
1.6.3, 1.7.0 sRGB, 1.6.1 ED (plain)

Current projects:
Celestial (a Celestia-like program written in Python)

Avatar
Topic author
EarthMoon
Posts: 200
Joined: 02.07.2022
With us: 2 years 4 months
Location: Germany

Calculating periapsis, apoapsis, SMA and eccentricity

Post #2by EarthMoon » 21.10.2023, 10:22

Here are more formulas, this time about calculating periapsis & apoapsis distance, semi-major axis and eccentricity of an orbit.

a = SMA
e = Eccentricity
q = Periapsis
Q = Apoapsis

Code: Select all

e = (Q - q) / (Q + q)
a = (Q + q) / 2
q = a * (1 - e)
Q = a * (1 + e)


orb_ecc.png
orb_ecc.png (4.41 KiB) Viewed 7897 times
Crew: "We are orbiting a black hole."
Control Center: "Do not fly too close to the black hole!"
Crew: "OH OOPS..."

Celestia versions:
1.6.3, 1.7.0 sRGB, 1.6.1 ED (plain)

Current projects:
Celestial (a Celestia-like program written in Python)


Return to “Physics and Astronomy”