Post Reply 
Distance from the Sun & Orbital Speed
06-27-2015, 04:00 PM
Post: #1
Distance from the Sun & Orbital Speed
Link to the full blog entry: http://edspi31415.blogspot.com/2015/06/h...ocity.html

Equations

Angle used:

θ = 360° * d/N
d = number of days from perihelion
N = number of days in a planet’s “year”, or number of days it takes for a planet to make one orbit around the Sun

Distance from Sun (in meters):

r = (a*(1 - ϵ)/(1 + ϵ cos θ ))
a = length of semi-major axis of a planet’s orbit
ϵ = the eccentricity of an orbit (ellipse)

Orbital Speed (in meters/second):

v = √( G * (M_Sun + M_planet) * (2/r – 1/a))
G = Gravitational Constant = 6.63784 * 10^-11 m^3/(s^2 *kg)
M_Sun = Mass of the Sun ≈ 1.9884 * 10^30 kg
M_planet = Mass of the planet


Code:
EXPORT ORBSD()
BEGIN
// Orbital distance and
// speed around the Sun
// EWS 2015-06-25


// Initialization
LOCAL lm,pm,la,pa,le,pe;
LOCAL ld,pd;
LOCAL p,sp,θ,d,v,r;

// Planets
sp:={"Mercury","Venus","Earth",
"Mars","Jupiter","Saturn",
"Uranus","Neptune",
"Pluto (Dwarf)"};

// Mass (kg)
lm:={3.29438ᴇ23,4.85749ᴇ24,
5.9722ᴇ24,6.40397ᴇ23,1.89469ᴇ27,
5.67312ᴇ26,8.66437ᴇ25,1.02224ᴇ26,
1.31ᴇ22};

// Semi-Major Axis (m)
la:={57909829824,108209876544,
149594962176,227921734656,
778412012083,1.42673ᴇ12,
2.87097ᴇ12,4.49825ᴇ12,
5.90637ᴇ12};

// Eccentricity (ε)
le:={.206,.007,.017,.093,.048,
.056,.046,.009,.249};

// Days in a year
ld:={87.96899,224.701,365.256,
686.98,4332.58899,10759.22,
30685.4,60189,90465};

// Input
INPUT({{p,sp},d},"Data",
{"Planet:","# Days:"},
{"Planet","# Days after 
Perihelion"});

pm:=lm[p];
pa:=la[p];
pe:=le[p];
pd:=ld[p];
θ:=360*d/pd;
HAngle:=1; // degree

// distance
r:=(pa*(1-pe^2))/(1+pe*COS(θ));

// orbit distance
v:=√((1.9884ᴇ30+pm)*6.63784ᴇ−11*
(2/r-1/pa)); 

// output
PRINT();
PRINT("Distance from the Sun:");
PRINT(STRING(r)+" m");
PRINT("Orbital Speed:");
PRINT(STRING(v)+" m/s");

RETURN {r,v};

END;
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)