Skip to content

Commit a4ba440

Browse files
committed
Step_4
1 parent 3609da1 commit a4ba440

File tree

1 file changed

+174
-0
lines changed

1 file changed

+174
-0
lines changed

src/u-blox_structs.h

+174
Original file line numberDiff line numberDiff line change
@@ -753,6 +753,180 @@ typedef struct
753753
UBX_NAV_HPPOSLLH_data_t *callbackData;
754754
} UBX_NAV_HPPOSLLH_t;
755755

756+
// UBX-NAV-PVAT (0x01 0x17): Navigation position velocity attitude time solution
757+
const uint16_t UBX_NAV_PVAT_LEN = 116;
758+
759+
typedef struct
760+
{
761+
uint32_t iTOW; // GPS time of week of the navigation epoch: ms
762+
uint8_t version; // Message version (0x00 for this version)
763+
union
764+
{
765+
uint8_t all;
766+
struct
767+
{
768+
uint8_t validDate : 1; // 1 = valid UTC Date
769+
uint8_t validTime : 1; // 1 = valid UTC time of day
770+
uint8_t fullyResolved : 1; // 1 = UTC time of day has been fully resolved (no seconds uncertainty).
771+
uint8_t validMag : 1; // 1 = valid magnetic declination
772+
} bits;
773+
} valid;
774+
uint16_t year; // Year (UTC)
775+
uint8_t month; // Month, range 1..12 (UTC)
776+
uint8_t day; // Day of month, range 1..31 (UTC)
777+
uint8_t hour; // Hour of day, range 0..23 (UTC)
778+
uint8_t min; // Minute of hour, range 0..59 (UTC)
779+
uint8_t sec; // Seconds of minute, range 0..60 (UTC)
780+
uint8_t reserved0;
781+
uint8_t reserved1[2];
782+
uint32_t tAcc; // Time accuracy estimate (UTC): ns
783+
int32_t nano; // Fraction of second, range -1e9 .. 1e9 (UTC): ns
784+
uint8_t fixType; // GNSSfix Type:
785+
// 0: no fix
786+
// 1: dead reckoning only
787+
// 2: 2D-fix
788+
// 3: 3D-fix
789+
// 4: GNSS + dead reckoning combined
790+
// 5: time only fix
791+
union
792+
{
793+
uint8_t all;
794+
struct
795+
{
796+
uint8_t gnssFixOK : 1; // 1 = valid fix (i.e within DOP & accuracy masks)
797+
uint8_t diffSoln : 1; // 1 = differential corrections were applied
798+
uint8_t reserved : 1;
799+
uint8_t vehRollValid : 1; // 1 = roll of vehicle is valid, only set if the receiver is in sensor fusion mode
800+
uint8_t vehPitchValid : 1; // 1 = pitch of vehicle is valid, only set if the receiver is in sensor fusion mode
801+
uint8_t vehHeadingValid : 1; // 1 = heading of vehicle is valid, only set if the receiver is in sensor fusion mode
802+
uint8_t carrSoln : 2; // Carrier phase range solution status:
803+
// 0: no carrier phase range solution
804+
// 1: carrier phase range solution with floating ambiguities
805+
// 2: carrier phase range solution with fixed ambiguities
806+
} bits;
807+
} flags;
808+
union
809+
{
810+
uint8_t all;
811+
struct
812+
{
813+
uint8_t reserved : 5;
814+
uint8_t confirmedAvai : 1; // 1 = information about UTC Date and Time of Day validity confirmation is available
815+
uint8_t confirmedDate : 1; // 1 = UTC Date validity could be confirmed
816+
uint8_t confirmedTime : 1; // 1 = UTC Time of Day could be confirmed
817+
} bits;
818+
} flags2;
819+
uint8_t numSV; // Number of satellites used in Nav Solution
820+
int32_t lon; // Longitude: deg * 1e-7
821+
int32_t lat; // Latitude: deg * 1e-7
822+
int32_t height; // Height above ellipsoid: mm
823+
int32_t hMSL; // Height above mean sea level: mm
824+
uint32_t hAcc; // Horizontal accuracy estimate: mm
825+
uint32_t vAcc; // Vertical accuracy estimate: mm
826+
int32_t velN; // NED north velocity: mm/s
827+
int32_t velE; // NED east velocity: mm/s
828+
int32_t velD; // NED down velocity: mm/s
829+
int32_t gSpeed; // Ground Speed (2-D): mm/s
830+
uint32_t sAcc; // Speed accuracy estimate: mm/s
831+
int32_t vehRoll; // Vehicle roll: 1e-5 deg
832+
int32_t vehPitch; // Vehicle pitch: 1e-5 deg
833+
int32_t vehHeading; // Vehicle heading: 1e-5 deg
834+
int32_t motHeading; // Motion heading.: 1e-5 deg
835+
uint16_t accRoll; // Vehicle roll accuracy (if null, roll angle is not available): 1e-2 deg
836+
uint16_t accPitch; // Vehicle pitch accuracy (if null, pitch angle is not available): 1e-2 deg
837+
uint16_t accHeading; // Vehicle heading accuracy (if null, heading angle is not available): 1e-2 deg
838+
int16_t magDec; // Magnetic declination: 1e-2 deg
839+
uint16_t magAcc; // Magnetic declination accuracy: 1e-2 deg
840+
uint16_t errEllipseOrient; // Orientation of semi-major axis of error ellipse (degrees from true north): 1e-2 deg
841+
uint32_t errEllipseMajor; // Semi-major axis of error ellipse: mm
842+
uint32_t errEllipseMinor; // Semi-minor axis of error ellipse: mm
843+
uint8_t reserved2[4];
844+
uint8_t reserved3[4];
845+
} UBX_NAV_PVAT_data_t;
846+
847+
typedef struct
848+
{
849+
union
850+
{
851+
uint32_t all;
852+
struct
853+
{
854+
uint32_t all : 1;
855+
856+
uint32_t iTOW : 1;
857+
uint32_t version : 1;
858+
859+
uint32_t validDate : 1;
860+
uint32_t validTime : 1;
861+
uint32_t fullyResolved : 1;
862+
uint32_t validMag : 1;
863+
864+
uint32_t year : 1;
865+
uint32_t month : 1;
866+
uint32_t day : 1;
867+
uint32_t hour : 1;
868+
uint32_t min : 1;
869+
uint32_t sec : 1;
870+
871+
uint32_t tAcc : 1;
872+
uint32_t nano : 1;
873+
uint32_t fixType : 1;
874+
875+
uint32_t gnssFixOK : 1;
876+
uint32_t diffSoln : 1;
877+
uint32_t vehRollValid : 1;
878+
uint32_t vehPitchValid : 1;
879+
uint32_t vehHeadingValid : 1;
880+
uint32_t carrSoln : 1;
881+
882+
uint32_t confirmedAvai : 1;
883+
uint32_t confirmedDate : 1;
884+
uint32_t confirmedTime : 1;
885+
886+
uint32_t numSV : 1;
887+
uint32_t lon : 1;
888+
uint32_t lat : 1;
889+
uint32_t height : 1;
890+
uint32_t hMSL : 1;
891+
uint32_t hAcc : 1;
892+
uint32_t vAcc : 1;
893+
} bits;
894+
} moduleQueried1;
895+
union
896+
{
897+
uint32_t all;
898+
struct
899+
{
900+
uint32_t velN : 1;
901+
uint32_t velE : 1;
902+
uint32_t velD : 1;
903+
uint32_t gSpeed : 1;
904+
uint32_t sAcc : 1;
905+
uint32_t vehRoll : 1;
906+
uint32_t vehPitch : 1;
907+
uint32_t vehHeading : 1;
908+
uint32_t motHeading : 1;
909+
uint32_t accRoll : 1;
910+
uint32_t accPitch : 1;
911+
uint32_t accHeading : 1;
912+
uint32_t magDec : 1;
913+
uint32_t magAcc : 1;
914+
uint32_t errEllipseOrient : 1;
915+
uint32_t errEllipseMajor : 1;
916+
uint32_t errEllipseMinor : 1;
917+
} bits;
918+
} moduleQueried2;
919+
} UBX_NAV_PVAT_moduleQueried_t;
920+
921+
typedef struct
922+
{
923+
ubxAutomaticFlags automaticFlags;
924+
UBX_NAV_PVAT_data_t data;
925+
UBX_NAV_PVAT_moduleQueried_t moduleQueried;
926+
void (*callbackPointer)(UBX_NAV_PVAT_data_t);
927+
UBX_NAV_PVAT_data_t *callbackData;
928+
} UBX_NAV_PVAT_t;
929+
756930
// UBX-NAV-TIMEUTC (0x01 0x21): UTC time solution
757931
const uint16_t UBX_NAV_TIMEUTC_LEN = 20;
758932

0 commit comments

Comments
 (0)