View Single Post
  #24  
Old August 27th, 2003, 04:03 PM
dogscoff's Avatar

dogscoff dogscoff is offline
General
 
Join Date: Mar 2001
Location: UK
Posts: 4,245
Thanks: 0
Thanked 0 Times in 0 Posts
dogscoff is on a distinguished road
Default 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 ]
Reply With Quote