Re: Calculating a planet\'s mass & gravitational pull
Hmm, I was *way* off, but now I'm closer. I went back to S_J's original calculation of g = GM/(1000*R)^2
(dunno where I got g=G*m*(r*1000)^3 from)
g = GM/(1000*R)^2
g*(1000*R)^2 = GM
(1000*R)^2 = GM/g
(1000*R) = squareroot(GM/g)
R=(squareroot(GM/g))/1000
In javascript, that comes out as
radius=(Math.sqrt(GRAV*mass)/gravity)/1000
and it works. Sorry for all the fuss, ppl.
[ August 27, 2003, 15:12: Message edited by: dogscoff ]
|