Update to v1.8.0 #100
@ -101,7 +101,13 @@ ReturnValue_t GPSHyperionHandler::scanForReply(const uint8_t *start, size_t len,
|
|||||||
gpsSet.latitude.value = gpsData.latitude;
|
gpsSet.latitude.value = gpsData.latitude;
|
||||||
// Negative longitude -> West direction
|
// Negative longitude -> West direction
|
||||||
gpsSet.longitude.value = gpsData.longitude;
|
gpsSet.longitude.value = gpsData.longitude;
|
||||||
gpsSet.altitude.value = gpsData.altitude;
|
if(gpsData.altitude > 600000.0 or gpsData.altitude < 400000.0) {
|
||||||
|
gpsSet.altitude.setValid(false);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
gpsSet.altitude.setValid(true);
|
||||||
|
gpsSet.altitude.value = gpsData.altitude;
|
||||||
|
}
|
||||||
gpsSet.fixMode.value = gpsData.fix_mode;
|
gpsSet.fixMode.value = gpsData.fix_mode;
|
||||||
gpsSet.satInUse.value = gpsData.sats_in_use;
|
gpsSet.satInUse.value = gpsData.sats_in_use;
|
||||||
Clock::TimeOfDay_t timeStruct = {};
|
Clock::TimeOfDay_t timeStruct = {};
|
||||||
@ -120,6 +126,7 @@ ReturnValue_t GPSHyperionHandler::scanForReply(const uint8_t *start, size_t len,
|
|||||||
gpsSet.hours = gpsData.hours;
|
gpsSet.hours = gpsData.hours;
|
||||||
gpsSet.minutes = gpsData.minutes;
|
gpsSet.minutes = gpsData.minutes;
|
||||||
gpsSet.seconds = gpsData.seconds;
|
gpsSet.seconds = gpsData.seconds;
|
||||||
|
gpsSet.unixSeconds = timeval.tv_sec;
|
||||||
if(debugHyperionGps) {
|
if(debugHyperionGps) {
|
||||||
sif::info << "GPS Data" << std::endl;
|
sif::info << "GPS Data" << std::endl;
|
||||||
printf("Valid status: %d\n", gpsData.is_valid);
|
printf("Valid status: %d\n", gpsData.is_valid);
|
||||||
|
Loading…
Reference in New Issue
Block a user