diff options
author | Sylvain Munaut <tnt@246tNt.com> | 2009-12-28 15:49:29 +0100 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2010-01-07 10:22:24 +0100 |
commit | ad0140572c1f5769cd589c807bedbde228e51615 (patch) | |
tree | c09f9e4375da74887a2f3654663f7c8c69b410a7 /rrlp-ephemeris/ubx-parse.c | |
parent | b74cbcf7ec94f0d927f94e8152f6a8c395fd6e3a (diff) |
rrlp-ephemeris: Fill ref time with UBX AID_INI messages
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Diffstat (limited to 'rrlp-ephemeris/ubx-parse.c')
-rw-r--r-- | rrlp-ephemeris/ubx-parse.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/rrlp-ephemeris/ubx-parse.c b/rrlp-ephemeris/ubx-parse.c index 1dbb279f7..c3d0f70d7 100644 --- a/rrlp-ephemeris/ubx-parse.c +++ b/rrlp-ephemeris/ubx-parse.c @@ -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 ... |