TITLE: Working out an orbital period, given constants (earth's radius and GM) and average altitude
QUESTION [5 upvotes]: I am having some trouble figuring out a formula for a JavaScript coding exercise.
Given a GM of 398,600.4418, earth's radius of 6,367.4447, and an average altitude of 35,873.5553, I must return an answer of 86,400.
I have experimented with the formula shown here but I cannot figure out how the average altitude comes into the equation, nor how to work out SMa³.
I just need a hint or two to help me understand the formula. Many thanks.

REPLY [5 votes]: If the orbit is circular, then $a$ in that formula is the orbital radius, which is the sum of altitude and Earth's radius.