@@ -12773,6 +12773,60 @@ uint32_t SFE_UBLOX_GNSS::getVerticalAccuracy(uint16_t maxWait)
12773
12773
return (packetUBXNAVHPPOSLLH->data.vAcc);
12774
12774
}
12775
12775
12776
+ // ***** PVAT Helper Functions
12777
+
12778
+ int32_t SFE_UBLOX_GNSS::getVehicleRoll(uint16_t maxWait)
12779
+ {
12780
+ if (packetUBXNAVPVAT == NULL) initPacketUBXNAVPVAT(); //Check that RAM has been allocated for the PVAT data
12781
+ if (packetUBXNAVPVAT == NULL) //Bail if the RAM allocation failed
12782
+ return 0;
12783
+
12784
+ if (packetUBXNAVPVAT->moduleQueried.moduleQueried2.bits.vehRoll == false)
12785
+ getNAVPVAT(maxWait);
12786
+ packetUBXNAVPVAT->moduleQueried.moduleQueried2.bits.vehRoll = false; //Since we are about to give this to user, mark this data as stale
12787
+ packetUBXNAVPVAT->moduleQueried.moduleQueried1.bits.all = false;
12788
+ return (packetUBXNAVPVAT->data.vehRoll);
12789
+ }
12790
+
12791
+ int32_t SFE_UBLOX_GNSS::getVehiclePitch(uint16_t maxWait)
12792
+ {
12793
+ if (packetUBXNAVPVAT == NULL) initPacketUBXNAVPVAT(); //Check that RAM has been allocated for the PVAT data
12794
+ if (packetUBXNAVPVAT == NULL) //Bail if the RAM allocation failed
12795
+ return 0;
12796
+
12797
+ if (packetUBXNAVPVAT->moduleQueried.moduleQueried2.bits.vehPitch == false)
12798
+ getNAVPVAT(maxWait);
12799
+ packetUBXNAVPVAT->moduleQueried.moduleQueried2.bits.vehPitch = false; //Since we are about to give this to user, mark this data as stale
12800
+ packetUBXNAVPVAT->moduleQueried.moduleQueried1.bits.all = false;
12801
+ return (packetUBXNAVPVAT->data.vehPitch);
12802
+ }
12803
+
12804
+ int32_t SFE_UBLOX_GNSS::getVehicleHeading(uint16_t maxWait)
12805
+ {
12806
+ if (packetUBXNAVPVAT == NULL) initPacketUBXNAVPVAT(); //Check that RAM has been allocated for the PVAT data
12807
+ if (packetUBXNAVPVAT == NULL) //Bail if the RAM allocation failed
12808
+ return 0;
12809
+
12810
+ if (packetUBXNAVPVAT->moduleQueried.moduleQueried2.bits.vehHeading == false)
12811
+ getNAVPVAT(maxWait);
12812
+ packetUBXNAVPVAT->moduleQueried.moduleQueried2.bits.vehHeading = false; //Since we are about to give this to user, mark this data as stale
12813
+ packetUBXNAVPVAT->moduleQueried.moduleQueried1.bits.all = false;
12814
+ return (packetUBXNAVPVAT->data.vehHeading);
12815
+ }
12816
+
12817
+ int32_t SFE_UBLOX_GNSS::getMotionHeading(uint16_t maxWait)
12818
+ {
12819
+ if (packetUBXNAVPVAT == NULL) initPacketUBXNAVPVAT(); //Check that RAM has been allocated for the PVAT data
12820
+ if (packetUBXNAVPVAT == NULL) //Bail if the RAM allocation failed
12821
+ return 0;
12822
+
12823
+ if (packetUBXNAVPVAT->moduleQueried.moduleQueried2.bits.motHeading == false)
12824
+ getNAVPVAT(maxWait);
12825
+ packetUBXNAVPVAT->moduleQueried.moduleQueried2.bits.motHeading = false; //Since we are about to give this to user, mark this data as stale
12826
+ packetUBXNAVPVAT->moduleQueried.moduleQueried1.bits.all = false;
12827
+ return (packetUBXNAVPVAT->data.motHeading);
12828
+ }
12829
+
12776
12830
// ***** SVIN Helper Functions
12777
12831
12778
12832
bool SFE_UBLOX_GNSS::getSurveyInActive(uint16_t maxWait)
0 commit comments