Skip to content

Commit

Permalink
Fix GNSS msg timestamp when converting from NOV-B (#22)
Browse files Browse the repository at this point in the history
Co-authored-by: Kailin <[email protected]>
  • Loading branch information
fixposition-support and khuang93 authored May 17, 2023
1 parent cfb5c74 commit 1c9c1bf
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions fixposition_driver_lib/src/helper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ void SplitMessage(std::vector<std::string>& tokens, const std::string& msg, cons

void BestGnssPosToNavSatFix(const Oem7MessageHeaderMem* const header, const BESTGNSSPOSMem* const bestgnsspos,
NavSatFixData& navsatfix) {
// Header timestamp
navsatfix.stamp.wno = header->gps_week;
navsatfix.stamp.tow = header->gps_milliseconds * 1e-3;

// Data
navsatfix.latitude = bestgnsspos->lat;
navsatfix.longitude = bestgnsspos->lon;
navsatfix.altitude = bestgnsspos->hgt;
Expand Down

0 comments on commit 1c9c1bf

Please sign in to comment.