plot_skyplot module
Visualization functions for GNSS data.
- plot_skyplot.plot_skyplot(navdata, receiver_state, save=False, prefix='', fname=None, add_sv_id_label=True, step='auto', trim_options=None)[source]
Skyplot of satellite positions relative to receiver.
First adds
el_sv_deg
andaz_sv_deg
rows to navdata if they do not yet exist.Breaks up satellites by constellation names in
gnss_id
and thesv_id
if the row is present in navdata.- Parameters:
navdata (gnss_lib_py.navdata.navdata.NavData) – Instance of the NavData class. Must include
gps_millis
as well as satellite ECEF positions asx_sv_m
,y_sv_m
,z_sv_m
,gnss_id
andsv_id
.receiver_state (gnss_lib_py.navdata.navdata.NavData) – Either estimated or ground truth receiver position in ECEF frame in meters as an instance of the NavData class with the following rows:
x_rx*_m
,y_rx*_m
,z_rx*_m
,gps_millis
.save (bool) – Saves figure if true to file specified by
fname
or defaults to the Results folder otherwise.prefix (string) – File prefix to add to filename.
fname (string or path-like) – Path to save figure to. If not None,
fname
is passed directly to matplotlib’s savefig fname parameter and prefix will be overwritten.add_sv_id_label (bool) – If the
sv_id
row is available, will add SV ID label near the satellite trail.step (int or "auto") – Skyplot plotting is sped up by only plotting a portion of the satellite trajectories. If default is set to “auto” then it will plot a maximum of 50 points across each satellite trajectory. If the step variable is set to a positive integer
n
then only every nth point will be used in the trajectory. Setting the steps variable to 1 will plot every satellite trajectory point and may be slow to plot.trim_options (None or dict) – The
trim_options
variables gives control for line segments being trimmed between satellite points. For example, if 24 hours of a satellite is plotted, often the satellite will come in and out of view and the segment between when it was lost from view and when the satellite comes back in view should be trimmed. If trim_options is set to the default of None, then the default is set of trimming according to az_and_el and gps_millis. The current options for the trim_options dictionary are listed here. {“az” : az_limit} means that if at two timesteps the azimuth difference in degrees is greater than az_limit, then the line segment will be trimmed. {“az_and_el” : (az_limit,el_limit)} means that if at two timesteps the azimuth difference in degrees is greater than az_limit as well as the average of the elevation angle across the two timesteps is less than el_limit in degrees, then the line segment will be trimmed. The el_limit is because satellites near 90 degrees elevation can traverse large amounts of degrees in azimuth in a valid trajectory but at low elevations should not have such large azimuth changes quickly. {“gps_millis”,gps_millis_limit} means that line segments will be trimmed if the milliseconds between the two points is larger than the gps_millis_limit. This option only works if the gps_millis row is included in thenavdata
variable input. Default options for the trim options are"az_and_el" : (15.,30.)
and"gps_millis" : 3.6E6
.
- Returns:
fig – Figure object of skyplot.
- Return type:
matplotlib.pyplot.figure