# NOT RUN {
# The following orbital parameters correspond to an object with NORAD catalogue
# number 88888 the 1st of October, 1980 at 23:41:24 UTC.
n0 <- 16.05824518*((2*pi)/(1440)) # Multiplication by 2pi/1440 to convert to radians/min
e0 <- 0.0086731 # mean eccentricity at epoch
i0 <- 72.8435*pi/180 # mean inclination at epoch in radians
M0 <- 110.5714*pi/180 # mean anomaly at epoch in radians
omega0 <- 52.6988*pi/180 # mean argument of perigee at epoch in radians
OMEGA0 <- 115.9689*pi/180 # mean longitude of ascending node at epoch in radians
Bstar <- 0.66816e-4 # drag coefficient
# Calculation of the orbital period
2*pi/n0
# The period is lower than 225 min, and therefore the SGP4 model is valid.
# Let<U+00B4>s calculate the position and velocity of the satellite 40 minutes after
# epoch
new_state <- sgp4(n0=n0, e0=e0, i0=i0, M0=M0, omega0=omega0, OMEGA0=OMEGA0,
Bstar=Bstar,targetTime = 40)
new_state
# }
Run the code above in your browser using DataLab