summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSylvain Munaut <tnt@246tNt.com>2009-12-28 14:51:08 +0100
committerHarald Welte <laforge@gnumonks.org>2010-01-07 10:22:24 +0100
commit9819d8baf2a443710bc006b88c406d51555de62c (patch)
tree4fd3fee10a77ec68df3d83f509936cdba591f66d
parent8dbd19e6d8bfea5c1e1913e1f4015d5aab66d305 (diff)
rrlp-ephemeris: Fill ref pos with UBX NAV_POSLLH messages
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
-rw-r--r--ubx-parse.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/ubx-parse.c b/ubx-parse.c
index cb8c22e..60bc057 100644
--- a/ubx-parse.c
+++ b/ubx-parse.c
@@ -69,7 +69,11 @@ _ubx_msg_parse_nav_posllh(struct ubx_hdr *hdr, void *pl, int pl_len, void *ud)
//printf("[.] NAV_POSLLH\n");
- // FIXME: Extract info for "Reference Position"
+ gps->fields |= GPS_FIELD_REFPOS;
+
+ gps->ref_pos.latitude = (double)(nav_posllh->lat) * 1e-7;
+ gps->ref_pos.longitude = (double)(nav_posllh->lon) * 1e-7;
+ gps->ref_pos.altitude = (double)(nav_posllh->height) * 1e-3;
}
static void