Skip to content

Commit e3e9b83

Browse files
committedJan 9, 2021
Update Theory.md
1 parent 0a964f3 commit e3e9b83

File tree

1 file changed

+23
-13
lines changed

1 file changed

+23
-13
lines changed
 

‎Theory.md

+23-13
Original file line numberDiff line numberDiff line change
@@ -76,29 +76,39 @@ Notes:
7676

7777
## Migrating your code to v2.0
7878

79+
Migrating to v2.0 is easy. There are two small changes all users will need to make:
80+
81+
* The name of the library class has changed from ```SFE_UBLOX_GPS``` to ```SFE_UBLOX_GNSS``` to reflect that the library supports all of the Global Navigation Satellite Systems:
82+
* As a minimum, you need to change: ```SFE_UBLOX_GPS myGPS;```
83+
* to: ```SFE_UBLOX_GNSS myGPS;```
84+
* But we would encourage you to use ```SFE_UBLOX_GNSS myGNSS;```. You will see that all of the library examples now use ```myGNSS``` instead of ```myGPS```.
85+
* The name of the library header and C++ files have changed too:
86+
* Change: ```#include <SparkFun_Ublox_Arduino_Library.h>```
87+
* to: ```#include <SparkFun_u-blox_GNSS_Arduino_Library.h>```
88+
7989
The biggest change in v2.0 is that data is now stored in a _struct_ which matches the u-blox interface description for that message. For example:
8090
- In v1, the NAV PVT (Position Velocity Time) latitude and longitude were stored in 'global' _int32_t_ variables called ```latitude``` and ```longitude```
8191
- In v2.0, the data is now stored in <strong>UBX_NAV_PVT_t *packetUBXNAVPVT</strong>
82-
- ```myGPS.latitude``` becomes ```myGPS.packetUBXNAVPVT->data.lat```
83-
- ```myGPS.longitude``` becomes ```myGPS.packetUBXNAVPVT->data.lon```
84-
- The helper functions ```myGPS.getLatitude()``` and ```myGPS.getLongitude()``` are still available and work in the same way.
92+
- ```myGPS.latitude``` becomes ```myGNSS.packetUBXNAVPVT->data.lat```
93+
- ```myGPS.longitude``` becomes ```myGNSS.packetUBXNAVPVT->data.lon```
94+
- The helper functions ```myGNSS.getLatitude()``` and ```myGNSS.getLongitude()``` are still available and work in the same way.
8595
- In v1, the ESF Sensor Fusion data for the Dead Reckoning modules was stored in 'global' variables ```imuMeas```, ```ubloxSen``` and ```vehAtt```
8696
- In v2.0, the data is now stored in:
8797
- <strong>UBX_ESF_ALG_t *packetUBXESFALG</strong> contains the IMU alignment information (roll, pitch and yaw)
8898
- <strong>UBX_ESF_INS_t *packetUBXESFINS</strong> contains the vehicle dynamics information (acceleration and angular rate)
8999
- <strong>UBX_ESF_MEAS_t *packetUBXESFMEAS</strong> contains the sensor fusion measurements
90100
- <strong>UBX_ESF_RAW_t *packetUBXESFRAW</strong> contains the raw sensor measurements
91101
- <strong>UBX_ESF_STATUS_t *packetUBXESFSTATUS</strong> contains the sensor fusion status
92-
- e.g. ```myGPS.imuMeas.fusionMode``` becomes ```myGPS.packetUBXESFSTATUS->data.fusionMode```
102+
- e.g. ```myGPS.imuMeas.fusionMode``` becomes ```myGNSS.packetUBXESFSTATUS->data.fusionMode```
93103
- The helper functions ```getSensorFusionMeasurement```, ```getRawSensorMeasurement``` and ```getSensorFusionStatus``` can be used to extract the sensor data for an individual sensor
94-
- "auto" data can be marked as stale by calling (e.g.) ```myGPS.flushESFALG()```
104+
- "auto" data can be marked as stale by calling (e.g.) ```myGNSS.flushESFALG()```
95105
- Please see the [**Dead_Reckoning/Example4_vehicleDynamics**](./examples/Dead_Reckoning/Example4_vehicleDynamics/Example4_vehicleDynamics.ino) example for more details
96106
- In v1, the HNR (High Navigation Rate) data for the Dead Reckoning modules was stored in 'global' variables ```hnrAtt```, ```hnrVehDyn``` and ```hnrPVT```
97107
- In v2.0, e.g.:
98-
- ```myGPS.hnrAtt.roll``` becomes ```myGPS.packetUBXHNRATT->data.roll```
99-
- ```myGPS.hnrVehDyn.xAccel``` becomes ```myGPS.packetUBXHNRINS->data.xAccel```
100-
- ```myGPS.hnrPVT.lat``` becomes ```myGPS.packetUBXHNRPVT->data.lat```
101-
- "auto" data can be marked as stale by calling (e.g.) ```myGPS.flushHNRATT()```
108+
- ```myGPS.hnrAtt.roll``` becomes ```myGNSS.packetUBXHNRATT->data.roll```
109+
- ```myGPS.hnrVehDyn.xAccel``` becomes ```myGNSS.packetUBXHNRINS->data.xAccel```
110+
- ```myGPS.hnrPVT.lat``` becomes ```myGNSS.packetUBXHNRPVT->data.lat```
111+
- "auto" data can be marked as stale by calling (e.g.) ```myGNSS.flushHNRATT()```
102112
- Please see the [**Dead_Reckoning/Example6_getAutoHNRData**](./examples/Dead_Reckoning/Example6_getAutoHNRData/Example6_getAutoHNRData.ino) example for more details
103113

104114
Other changes include:
@@ -109,9 +119,9 @@ Other changes include:
109119
- New helper functions (```getRelPosAccN```, ```getRelPosAccE``` and ```getRelPosAccD```) provide backward-compatibility
110120
- Please see the [**ZED-F9P/Example5_RelativePositioningInformation**](./examples/ZED-F9P/Example5_RelativePositioningInformation/Example5_RelativePositioningInformation.ino) example for more details
111121
- getSurveyStatus now returns data via <strong>UBX_NAV_SVIN_t *packetUBXNAVSVIN</strong>
112-
- ```myGPS.svin.active``` becomes ```myGPS.packetUBXNAVSVIN->data.active```
113-
- ```myGPS.svin.valid``` becomes ```myGPS.packetUBXNAVSVIN->data.valid```
114-
- ```myGPS.svin.observationTime``` becomes ```myGPS.packetUBXNAVSVIN->data.dur``` and is now uint32_t (not uint16_t)
115-
- ```myGPS.svin.MeanAccuracy``` becomes ```myGPS.packetUBXNAVSVIN->data.meanAcc``` and is now uint32_t * 0.1mm (not float * m)
122+
- ```myGPS.svin.active``` becomes ```myGNSS.packetUBXNAVSVIN->data.active```
123+
- ```myGPS.svin.valid``` becomes ```myGNSS.packetUBXNAVSVIN->data.valid```
124+
- ```myGPS.svin.observationTime``` becomes ```myGNSS.packetUBXNAVSVIN->data.dur``` and is now uint32_t (not uint16_t)
125+
- ```myGPS.svin.MeanAccuracy``` becomes ```myGNSS.packetUBXNAVSVIN->data.meanAcc``` and is now uint32_t * 0.1mm (not float * m)
116126
- New helper functions (```getSurveyInActive```, ```getSurveyInValid```, ```getSurveyInObservationTime``` and ```getSurveyInMeanAccuracy```) provide backward-compatibility
117127
- Please see the [**ZED-F9P/Example3_StartRTCMBase**](./examples/ZED-F9P/Example3_StartRTCMBase/Example3_StartRTCMBase.ino) example for more details

0 commit comments

Comments
 (0)
Please sign in to comment.