Monday, November 21, 2016

Public Service ??

sk999 recently (and generously) made a terrific info filled post on the JW blog. One of the many items posted were the orbital parameters for 3F1.

That document can be found here:

satellite.pdf

A Python (2.7) code implementation for computing satellite position and satellite velocity in the ECEF coordinate frame is copy pasted below:



































POR parameters:
lsat = 178.078 deg
i = 1.0354 deg
e = 0.000519
rs = 42164.2 km
uto = 6.418 hr
utp = 0.0689 hr
Victor - 6 June 2017

Plain text below for copy/pasting into a file:

from math import pi,cos,sin

k = 15.041*2*pi/360 # radians per hour
rs = 42164.7 # km
i = 1.6401*2*pi/360
e = 0.00054
ut0 = 13.62 # decimal hours
utp = 7.607 # decimal hours

ut = input("time hrs.xx: ") # e.g. 00:11 input as 24.1833
nu = k*(ut-utp)
phi = k*(ut-ut0)

xr = rs*(1 + 0.25*i*i*(cos(2*phi) - 1) - e*cos(nu))
yr = rs*(-0.25*i*i*sin(2*phi) + 2*e*sin(nu))
z = rs*i*sin(phi)

vxr = rs*k*(-0.5*i*i*sin(2*phi) + e*sin(nu))
vyr = rs*k*(-0.5*i*i*cos(2*phi) + 2*e*cos(nu))
vz = rs*k*i*cos(phi)

# rotate xr, yr, vxr, vyr to ECEF

theta = 2*pi*64.516/360

x = xr*cos(theta) - yr*sin(theta)
y = xr*sin(theta) + yr*cos(theta)
vx = vxr*cos(theta) - vyr*sin(theta)
vy = vxr*sin(theta) + vyr*cos(theta)

print 'x:',"%0.1f" % x,'km'
print 'y:',"%0.1f" % y,'km'
print 'z:',"%0.1f" % z,'km'

# scale velocities from km/hr to km/sec

vx = vx/3600
vy = vy/3600
vz = vz/3600

print 'x_dot:',"%0.5f" % vx,'km/sec'
print 'y_dot:',"%0.5f" % vy,'km/sec'
print 'z_dot:',"%0.5f" % vz,'km/sec'