Sorry, I overlooked that. You did give it.

If I'm understanding this correctly, I'd like to get rid of all r's and v's in the equation, replacing them with rx, ry, rz, vx, vy, vz so I can plug in the actual values.

So solving for ex should look like:

http://orbitsimulator.com/BA/ex.gif
But I suspect I made a mistake somewhere because:

Code:

`'Visual Basic 6.0`

'where mu= 1.32673637E+20 (mks units)

' Rx = -46720169584.3259 m

' Ry = 115742152531.547

' Rz = 0

' Vx = -30938.7102458567 m/s

' Vy = -16802.9119738538

Ex = (1 / mu) * ((Vx ^ 2 + Vy ^ 2 + Vz ^ 2 - (mu / Sqr(Rx ^ 2 + Ry ^ 2 + Rz ^ 2))) * Rx - (Rx * Vx + Ry * Vy + Rz * Vz) * Vx)

Ey = (1 / mu) * ((Vx ^ 2 + Vy ^ 2 + Vz ^ 2 - (mu / Sqr(Rx ^ 2 + Ry ^ 2 + Rz ^ 2))) * Ry - (Rx * Vx + Ry * Vy + Rz * Vz) * Vy)

Ex = (1 / mu) * ((Vx ^ 2 + Vy ^ 2 + Vz ^ 2 - (mu / Sqr(Rx ^ 2 + Ry ^ 2 + Rz ^ 2))) * Rz - (Rx * Vx + Ry * Vy + Rz * Vz) * Vz)

EccentricityVector = Sqr(Ex ^ 2 + Ey ^ 2 + Ez ^ 2)

Eccentricity = Abs(EccentricityVector)

'I should get Eccentricity = 0.2

'Instead, I get Eccentricity = 9.08106826571385E-02

Did I make a dumb mistake somewhere? :confused: