@@ -285,7 +285,11 @@ def plot_skyplot(navdata, receiver_state, save=False, prefix="",
285285
286286 navdata = navdata .copy ()
287287 navdata ["az_sv_rad" ] = np .radians (navdata ["az_sv_deg" ])
288+ # remove SVs below horizon
288289 navdata = navdata .where ("el_sv_deg" ,0 ,"geq" )
290+ # remove np.nan values caused by potentially faulty data
291+ navdata = navdata .where ("az_sv_rad" ,np .nan ,"neq" )
292+ navdata = navdata .where ("el_sv_deg" ,np .nan ,"neq" )
289293
290294 for c_idx , constellation in enumerate (_sort_gnss_ids (np .unique (navdata ["gnss_id" ]))):
291295 const_subset = navdata .where ("gnss_id" ,constellation )
@@ -297,11 +301,6 @@ def plot_skyplot(navdata, receiver_state, save=False, prefix="",
297301 # iterate through each satellite
298302 for sv_name in np .unique (const_subset ["sv_id" ]):
299303 sv_subset = const_subset .where ("sv_id" ,sv_name )
300- # remove np.nan values caused by potentially faulty data
301- sv_subset = sv_subset .where ("az_sv_rad" ,np .nan ,"neq" )
302- sv_subset = sv_subset .where ("el_sv_deg" ,np .nan ,"neq" )
303- if len (sv_subset ) == 0 :
304- continue
305304 # only plot ~ 50 points for each sat to decrease time
306305 # it takes to plot these line collections
307306 step = max (1 ,int (len (sv_subset )/ 50. ))
0 commit comments