
Writeup Hack-A-Sat: Fiddlin' John Carson
2024-08-20
> docker run --rm -i -e FLAG=pouet kepler:challenge
KEPLER
CHALLANGE
a e i Ω ω υ
. .
,' ,=, .
, / \ .
. | | .
. \ / .
+ '=' .
. .'
. . '
'
Your spacecraft reports that its Cartesian ICRF position (km) and velocity (km/s) are:
Pos (km): [8449.401305, 9125.794363, -17.461357]
Vel (km/s): [-1.419072, 6.780149, 0.002865]
Time: 2021-06-26-19:20:00.000-UTC
What is its orbit (expressed as Keplerian elements a, e, i, Ω, ω, and υ)?
Semimajor axis, a (km):
from poliastro.twobody.orbit import u
pos = [8449.401305, 9125.794363, -17.461357]
vel = [-1.419072, 6.780149, 0.002865]
pos_km = [*pos] * u.km
vel_kms = [*vel] * u.km / u.s
u.km
and u.km/u.s
(from astropy) converts each coordinate into a Quantity
with the appropriate units.Orbit.from_vectors
to calculate the orbital elements:from poliastro.bodies import Earth
from poliastro.twobody import Orbit
time = "2021-06-26 19:20:00.000"
orb = Orbit.from_vectors(Earth, pos_km, vel_kms, time)
Earth
provides the necessary gravitational parameters. And specifying the exact time is crucial since orbital parameters can change over time.a = orb.a # Semimajor axis in km
e = orb.ecc # Eccentricity
i = orb.inc.to_value(u.deg) # Inclination (converted to degrees)
Omega = orb.raan.to_value(u.deg) # Right ascension of the ascending node (deg)
omega = orb.argp.to_value(u.deg) # Argument of perigee (deg)
nu = orb.nu.to_value(u.deg) # True anomaly (deg)
to_value(u.deg)
(from astropy) converts the angles from radians to degrees.> docker run --rm -i -e FLAG=pouet kepler:challenge
KEPLER
CHALLANGE
a e i Ω ω υ
. .
,' ,=, .
, / \ .
. | | .
. \ / .
+ '=' .
. .'
. . '
'
Your spacecraft reports that its Cartesian ICRF position (km) and velocity (km/s) are:
Pos (km): [8449.401305, 9125.794363, -17.461357]
Vel (km/s): [-1.419072, 6.780149, 0.002865]
Time: 2021-06-26-19:20:00.000-UTC
What is its orbit (expressed as Keplerian elements a, e, i, Ω, ω, and υ)?
Semimajor axis, a (km): 24732.885760723184
Eccentricity, e: 0.7068070220620631
Inclination, i (deg): 0.11790360842507447
Right ascension of the ascending node, Ω (deg): 90.22650379956278
Argument of perigee, ω (deg): 226.58745900876278
True anomaly, υ (deg): 90.389955034578
You got it! Here's your flag:
pouet