Eigen Revision
Dependencies: mbed LPS25HB_I2C LSM9DS1 PIDcontroller Autopilot_Eigen LoopTicker GPSUBX_UART_Eigen SBUS_without_mainfile MedianFilter Eigen UsaPack solaESKF_Eigen Vector3 CalibrateMagneto FastPWM
gps.cpp@141:725321fe2949, 2021-12-10 (annotated)
- Committer:
- cocorlow
- Date:
- Fri Dec 10 10:43:50 2021 +0000
- Revision:
- 141:725321fe2949
- Parent:
- 139:b378528c05f2
- Child:
- 143:53808e4e684c
Eigen completed
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
cocorlow | 141:725321fe2949 | 1 | #include "global.hpp" |
cocorlow | 141:725321fe2949 | 2 | |
cocorlow | 141:725321fe2949 | 3 | void getGPSval() |
cocorlow | 141:725321fe2949 | 4 | { |
cocorlow | 141:725321fe2949 | 5 | gpsUpdateFlag = false; |
cocorlow | 141:725321fe2949 | 6 | gps.Update(); |
cocorlow | 141:725321fe2949 | 7 | if (gps.iTOW_STATUS != itow_status){ |
cocorlow | 141:725321fe2949 | 8 | itow_status = gps.iTOW_STATUS; |
cocorlow | 141:725321fe2949 | 9 | if(gps.gpsFix == 0x02 || gps.gpsFix == 0x03){ |
cocorlow | 141:725321fe2949 | 10 | vi = gps.VelocityNED; |
cocorlow | 141:725321fe2949 | 11 | if(gpsLlh0Fixed == false){ |
cocorlow | 141:725321fe2949 | 12 | gps.CalculateUnit(); |
cocorlow | 141:725321fe2949 | 13 | gpsLlh0Fixed = true; |
cocorlow | 141:725321fe2949 | 14 | }else{ |
cocorlow | 141:725321fe2949 | 15 | gps.Calculate(); |
cocorlow | 141:725321fe2949 | 16 | } |
cocorlow | 141:725321fe2949 | 17 | pi = gps.PositionNED; |
cocorlow | 141:725321fe2949 | 18 | gpsUpdateFlag = true; |
cocorlow | 141:725321fe2949 | 19 | } |
cocorlow | 141:725321fe2949 | 20 | } |
cocorlow | 141:725321fe2949 | 21 | } |