Skip to content

Commit

Permalink
fix urls
Browse files Browse the repository at this point in the history
  • Loading branch information
s-m-e committed Mar 2, 2024
1 parent 1f3a910 commit bce3039
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ from hapsira.twobody import Orbit
from hapsira.util import norm, time_range
```

All the data for Juno's mission is sorted [here](https://github.com/hapsira/hapsira/wiki/EuroPython:-Per-Python-ad-Astra). The main maneuvers that the spacecraft will perform are listed down:
All the data for Juno's mission is sorted [here](https://github.com/poliastro/poliastro/wiki/EuroPython:-Per-Python-ad-Astra). The main maneuvers that the spacecraft will perform are listed down:

* Inner cruise phase 1: This will set Juno in a new orbit around the sun.
* Inner cruise phase 2: Fly-by around Earth. Gravity assist is performed.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ kernelspec:

# Going to Mars with Python using hapsira

This is an example on how to use [hapsira](https://github.com/hapsira/hapsira), a little library I've been working on to use in my Astrodynamics lessons. It features conversion between **classical orbital elements** and position vectors, propagation of **Keplerian orbits**, initial orbit determination using the solution of the **Lambert's problem** and **orbit plotting**.
This is an example on how to use [hapsira](https://github.com/pleiszenburg/hapsira), a little library I've been working on to use in my Astrodynamics lessons. It features conversion between **classical orbital elements** and position vectors, propagation of **Keplerian orbits**, initial orbit determination using the solution of the **Lambert's problem** and **orbit plotting**.

In this example we're going to draw the trajectory of the mission [Mars Science Laboratory (MSL)](http://mars.jpl.nasa.gov/msl/), which carried the rover Curiosity to the surface of Mars in a period of something less than 9 months.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ kernelspec:

+++

However, it turns out that GP data in general, and TLEs in particular, are poorly understood even by professionals ([[1]](https://www.linkedin.com/posts/tom-johnson-32333a2_flawed-data-activity-6825845118990381056-yJX7), [[2]](https://twitter.com/flightclubio/status/1435303066085982209), [[3]](https://github.com/hapsira/hapsira/issues/1185)). The core issue is that TLEs and OMMs contain _Brouwer mean elements_, which **cannot be directly translated to osculating elements**.
However, it turns out that GP data in general, and TLEs in particular, are poorly understood even by professionals ([[1]](https://www.linkedin.com/posts/tom-johnson-32333a2_flawed-data-activity-6825845118990381056-yJX7), [[2]](https://twitter.com/flightclubio/status/1435303066085982209), [[3]](https://github.com/poliastro/poliastro/issues/1185)). The core issue is that TLEs and OMMs contain _Brouwer mean elements_, which **cannot be directly translated to osculating elements**.

From "Spacetrack Report #3":

Expand Down Expand Up @@ -58,7 +58,7 @@ Therefore, the **correct** way of using GP data is:
As explained in the [Orbit Mean-Elements Messages (OMMs) support assessment](https://opensatcom.org/2020/12/28/omm-assessment-sgp4-benchmarks/) deliverable of OpenSatCom, OMM input/output support in open source libraries is somewhat scattered. Luckily, [python-sgp4](https://pypi.org/project/sgp4/) supports reading OMM in CSV and XML format, as well as usual TLE and 3LE formats. On the other hand, Astropy has accurate transformations from TEME to other reference frames.

```{code-cell} ipython3
# From https://github.com/hapsira/hapsira/blob/main/contrib/satgpio.py
# From https://github.com/pleiszenburg/hapsira/blob/main/contrib/satgpio.py
"""
Author: Juan Luis Cano Rodríguez
Expand Down
2 changes: 1 addition & 1 deletion src/hapsira/twobody/propagation/farnocchia.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def propagate_many(self, state, tofs):
rv0 = state.to_value()

# TODO: This should probably return a ClassicalStateArray instead,
# see discussion at https://github.com/hapsira/hapsira/pull/1492
# see discussion at https://github.com/poliastro/poliastro/pull/1492
rr, vv = farnocchia_rv_gf(k, *rv0, tofs.to_value(u.s)) # pylint: disable=E0633

return (
Expand Down
4 changes: 2 additions & 2 deletions src/hapsira/twobody/sampling.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ def sample(self, orbit):
# However, we are also returning the epochs
# (since computing them here is more efficient than doing it from the outside)
# but there are open questions around StateArrays and epochs.
# See discussion at https://github.com/hapsira/hapsira/pull/1492
# See discussion at https://github.com/poliastro/poliastro/pull/1492
cartesian = CartesianRepresentation(
rr, differentials=CartesianDifferential(vv, xyz_axis=1), xyz_axis=1
)
Expand Down Expand Up @@ -160,7 +160,7 @@ def sample(self, orbit):
# However, we are also returning the epochs
# (since computing them here is more efficient than doing it from the outside)
# but there are open questions around StateArrays and epochs.
# See discussion at https://github.com/hapsira/hapsira/pull/1492
# See discussion at https://github.com/poliastro/poliastro/pull/1492
cartesian = CartesianRepresentation(
rr, differentials=CartesianDifferential(vv, xyz_axis=1), xyz_axis=1
)
Expand Down
2 changes: 1 addition & 1 deletion tests/tests_plotting/test_orbit_plotter.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ def test_set_frame_plots_same_colors():


def test_redraw_keeps_trajectories():
# See https://github.com/hapsira/hapsira/issues/518
# See https://github.com/poliastro/poliastro/issues/518
op = OrbitPlotter()
trajectory = churi.sample()
op.plot_body_orbit(Mars, J2000_TDB, label="Mars")
Expand Down
10 changes: 5 additions & 5 deletions tests/tests_twobody/test_orbit.py
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@ def test_sample_numpoints():


def test_sample_big_orbits():
# See https://github.com/hapsira/hapsira/issues/265
# See https://github.com/poliastro/poliastro/issues/265
ss = Orbit.from_vectors(
Sun,
[-9_018_878.6, -94_116_055, 22_619_059] * u.km,
Expand Down Expand Up @@ -1199,14 +1199,14 @@ def test_time_to_anomaly(expected_nu):
# In some corner cases the resulting anomaly goes out of range,
# and rather than trying to fix it right now
# we will wait until we remove the round tripping,
# see https://github.com/hapsira/hapsira/issues/921
# see https://github.com/poliastro/poliastro/issues/921
# FIXME: Add test that verifies that `orbit.nu` is always within range
assert_quantity_allclose(iss_propagated.nu, expected_nu, atol=1e-12 * u.rad)


@pytest.mark.xfail
def test_can_set_iss_attractor_to_earth():
# See https://github.com/hapsira/hapsira/issues/798
# See https://github.com/poliastro/poliastro/issues/798
epoch = Time("2019-11-10 12:00:00")
ephem = Ephem.from_horizons(
"International Space Station",
Expand Down Expand Up @@ -1235,7 +1235,7 @@ def test_issue_916(mock_query):


def test_near_parabolic_M_does_not_hang(near_parabolic):
# See https://github.com/hapsira/hapsira/issues/907
# See https://github.com/poliastro/poliastro/issues/907
expected_nu = -168.65 * u.deg
orb = near_parabolic.propagate_to_anomaly(expected_nu)

Expand All @@ -1253,7 +1253,7 @@ def test_propagation_near_parabolic_orbits_zero_seconds_gives_same_anomaly(


def test_propagation_near_parabolic_orbits_does_not_hang(near_parabolic):
# See https://github.com/hapsira/hapsira/issues/475
# See https://github.com/poliastro/poliastro/issues/475
orb_final = near_parabolic.propagate(near_parabolic.period)

# Smoke test
Expand Down
6 changes: 3 additions & 3 deletions tests/tests_twobody/test_propagation.py
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ def test_propagate_to_date_has_proper_epoch():
)
def test_propagate_long_times_keeps_geometry(method):
# TODO: Extend to other propagators?
# See https://github.com/hapsira/hapsira/issues/265
# See https://github.com/poliastro/poliastro/issues/265
time_of_flight = 100 * u.year

res = iss.propagate(time_of_flight, method=method)
Expand Down Expand Up @@ -436,7 +436,7 @@ def test_propagation_sets_proper_epoch():


def test_sample_around_moon_works():
# See https://github.com/hapsira/hapsira/issues/649
# See https://github.com/poliastro/poliastro/issues/649
orbit = Orbit.circular(Moon, 100 << u.km)

coords = orbit.sample(10)
Expand All @@ -446,7 +446,7 @@ def test_sample_around_moon_works():


def test_propagate_around_moon_works():
# See https://github.com/hapsira/hapsira/issues/649
# See https://github.com/poliastro/poliastro/issues/649
orbit = Orbit.circular(Moon, 100 << u.km)
new_orbit = orbit.propagate(1 << u.h)

Expand Down

0 comments on commit bce3039

Please sign in to comment.