rrlp-ephemeris: Fill ref time with UBX AID_INI messages

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
This commit is contained in:
Sylvain Munaut 2009-12-28 15:49:29 +01:00 committed by Harald Welte
parent 14039dd324
commit 9c3ae67f8b
1 changed files with 6 additions and 2 deletions

View File

@ -84,8 +84,12 @@ _ubx_msg_parse_aid_ini(struct ubx_hdr *hdr, void *pl, int pl_len, void *ud)
//printf("[.] AID_INI\n");
// FIXME: Extract info for "Reference Time"
/* Extract info for "Reference Time" */
gps->fields |= GPS_FIELD_REFTIME;
gps->ref_time.wn = aid_ini->wn;
gps->ref_time.tow = (double)aid_ini->tow * 1e-3;
// FIXME: We could extract ref position as well but we need it in
// WGS84 geodetic coordinates and it's provided as ecef, so
// we need a lot of math ...