void get_mbg_utc( unsigned char **buffpp, UTC *utcp ) { utcp->csum = (CSUM) get_lsb_short(buffpp); utcp->valid = get_lsb_int16(buffpp); get_mbg_tgps(buffpp, &utcp->t0t); if (fetch_ieee754(buffpp, IEEE_DOUBLE, &utcp->A0, mbg_double) != IEEE_OK) { L_CLR(&utcp->A0); } if (fetch_ieee754(buffpp, IEEE_DOUBLE, &utcp->A1, mbg_double) != IEEE_OK) { L_CLR(&utcp->A1); } utcp->WNlsf = get_lsb_uint16(buffpp); utcp->DNt = get_lsb_int16(buffpp); utcp->delta_tls = *(*buffpp)++; utcp->delta_tlsf = *(*buffpp)++; }
void get_mbg_sw_rev( unsigned char **bufpp, SW_REV *sw_revp ) { sw_revp->code = get_lsb_uint16(bufpp); memcpy(sw_revp->name, *bufpp, sizeof(sw_revp->name)); *bufpp += sizeof(sw_revp->name); }
void get_mbg_tgps( unsigned char **bufpp, T_GPS *tgpsp ) { tgpsp->wn = get_lsb_uint16(bufpp); tgpsp->sec = get_lsb_long(bufpp); tgpsp->tick = get_lsb_long(bufpp); }
void get_mbg_header( unsigned char **bufpp, GPS_MSG_HDR *headerp ) { headerp->cmd = (GPS_CMD) get_lsb_short(bufpp); headerp->len = get_lsb_uint16(bufpp); headerp->data_csum = (CSUM) get_lsb_short(bufpp); headerp->hdr_csum = (CSUM) get_lsb_short(bufpp); }
void get_mbg_tm( unsigned char **buffpp, TM_GPS *tmp ) { tmp->year = get_lsb_int16(buffpp); tmp->month = *(*buffpp)++; tmp->mday = *(*buffpp)++; tmp->yday = get_lsb_int16(buffpp); tmp->wday = *(*buffpp)++; tmp->hour = *(*buffpp)++; tmp->min = *(*buffpp)++; tmp->sec = *(*buffpp)++; tmp->frac = get_lsb_long(buffpp); tmp->offs_from_utc = get_lsb_long(buffpp); tmp->status = get_lsb_uint16(buffpp); }
void get_mbg_eph( unsigned char ** buffpp, EPH *ephp ) { ephp->csum = (CSUM) get_lsb_short(buffpp); ephp->valid = get_lsb_int16(buffpp); ephp->health = (HEALTH) get_lsb_short(buffpp); ephp->IODC = (IOD) get_lsb_short(buffpp); ephp->IODE2 = (IOD) get_lsb_short(buffpp); ephp->IODE3 = (IOD) get_lsb_short(buffpp); get_mbg_tgps(buffpp, &ephp->tt); get_mbg_tgps(buffpp, &ephp->t0c); get_mbg_tgps(buffpp, &ephp->t0e); FETCH_DOUBLE(buffpp, &ephp->sqrt_A); FETCH_DOUBLE(buffpp, &ephp->e); FETCH_DOUBLE(buffpp, &ephp->M0); FETCH_DOUBLE(buffpp, &ephp->omega); FETCH_DOUBLE(buffpp, &ephp->OMEGA0); FETCH_DOUBLE(buffpp, &ephp->OMEGADOT); FETCH_DOUBLE(buffpp, &ephp->deltan); FETCH_DOUBLE(buffpp, &ephp->i0); FETCH_DOUBLE(buffpp, &ephp->idot); FETCH_DOUBLE(buffpp, &ephp->crc); FETCH_DOUBLE(buffpp, &ephp->crs); FETCH_DOUBLE(buffpp, &ephp->cuc); FETCH_DOUBLE(buffpp, &ephp->cus); FETCH_DOUBLE(buffpp, &ephp->cic); FETCH_DOUBLE(buffpp, &ephp->cis); FETCH_DOUBLE(buffpp, &ephp->af0); FETCH_DOUBLE(buffpp, &ephp->af1); FETCH_DOUBLE(buffpp, &ephp->af2); FETCH_DOUBLE(buffpp, &ephp->tgd); ephp->URA = get_lsb_uint16(buffpp); ephp->L2code = *(*buffpp)++; ephp->L2flag = *(*buffpp)++; }