static void mask_sat_callback(u16 sender_id, u8 len, u8 msg[], void* context) { (void)sender_id; (void)len; (void) context; enum { MASK_ACQUISITION = 1, MASK_TRACKING = 2, }; msg_mask_satellite_t *m = (msg_mask_satellite_t *)msg; /* FIXME constellation/band support */ assert(m->sid.constellation == CONSTELLATION_GPS); assert(m->sid.band == BAND_L1); u8 prn = m->sid.sat; log_info("Mask for PRN %02d = 0x%02x", prn+1, m->mask); if (m->mask & MASK_ACQUISITION) { acq_prn_param[prn].masked = true; } else { acq_prn_param[prn].masked = false; } if (m->mask & MASK_TRACKING) { tracking_drop_satellite(sid_from_sbp(m->sid)); } }
static void mask_sat_callback(u16 sender_id, u8 len, u8 msg[], void* context) { (void)sender_id; (void)len; (void) context; enum { MASK_ACQUISITION = 1, MASK_TRACKING = 2, }; msg_mask_satellite_t *m = (msg_mask_satellite_t *)msg; gnss_signal_t sid = sid_from_sbp(m->sid); if (sid_supported(sid)) { u16 global_index = sid_to_global_index(sid); acq_status_t *acq = &acq_status[global_index]; acq->masked = (m->mask & MASK_ACQUISITION) ? true : false; track_mask[global_index] = (m->mask & MASK_TRACKING) ? true : false; log_info_sid(sid, "Mask = 0x%02x", m->mask); } else { log_warn("Mask not set for invalid SID"); } }