I have the exact Drawing Earth satellite groundtracks example written in Spyder but when I run the script the graphic never generates.
Useful for defining quantities
from astropy import units as u
Earth focused modules, ISS example orbit and time span generator
from hapsira.earth import EarthSatellite
from hapsira.earth.plotting import GroundtrackPlotter
from hapsira.examples import iss
from hapsira.util import time_range
I have tested other examples like the Quickstart and was able to reproduce the same graphic, but I'm not sure why the ground tracks example does not produce anything. The console does not print any errors or messages after the script has run.
Any advice would be greatly appreciated and I do apologize of there is a simple mistake I am making.
I have the exact Drawing Earth satellite groundtracks example written in Spyder but when I run the script the graphic never generates.
Useful for defining quantities
from astropy import units as u
Earth focused modules, ISS example orbit and time span generator
from hapsira.earth import EarthSatellite from hapsira.earth.plotting import GroundtrackPlotter from hapsira.examples import iss from hapsira.util import time_range
Build spacecraft instance
iss_spacecraft = EarthSatellite(iss, None) t_span = time_range( iss.epoch - 1.5 u.h, num_values=150, end=iss.epoch + 1.5 u.h )
Generate an instance of the plotter, add title and show latlon grid
gp = GroundtrackPlotter() gp.update_layout(title="International Space Station groundtrack")
Plot previously defined EarthSatellite object
gp.plot( iss_spacecraft, t_span, label="ISS", color="red", marker={ "size": 10, "symbol": "triangle-right", "line": {"width": 1, "color": "black"}, }, )
For building geo traces
import plotly.graph_objects as go
Position in [LAT LON]
STATION = [40.416729, -3.703339] * u.deg
Let us add a new trace in original figure
gp.add_trace( go.Scattergeo( lat=STATION[0], lon=STATION[-1], name="Madrid", marker={"color": "blue"}, ) ) gp.fig.show()
I have tested other examples like the Quickstart and was able to reproduce the same graphic, but I'm not sure why the ground tracks example does not produce anything. The console does not print any errors or messages after the script has run.
Any advice would be greatly appreciated and I do apologize of there is a simple mistake I am making.
Thank you