solaESKF_EIGEN
Dependencies: mbed LPS25HB_I2C LSM9DS1 PIDcontroller LoopTicker GPSUBX_UART_Eigen SBUS_without_mainfile MedianFilter Eigen UsaPack solaESKF_Eigen Vector3 CalibrateMagneto FastPWM
gps.cpp@144:b3a713b4f1c4, 22 months ago (annotated)
- Committer:
- NaotoMorita
- Date:
- Wed Jun 29 07:57:10 2022 +0000
- Revision:
- 144:b3a713b4f1c4
- Parent:
- 143:53808e4e684c
can fly
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 | if(gpsLlh0Fixed == false){ |
cocorlow | 141:725321fe2949 | 11 | gps.CalculateUnit(); |
NaotoMorita | 143:53808e4e684c | 12 | gps.Calculate(pi(0),pi(1),pi(2),vi(0),vi(1),vi(2)); |
NaotoMorita | 143:53808e4e684c | 13 | gpsUpdateFlag = true; |
cocorlow | 141:725321fe2949 | 14 | gpsLlh0Fixed = true; |
cocorlow | 141:725321fe2949 | 15 | }else{ |
NaotoMorita | 143:53808e4e684c | 16 | gps.Calculate(pi(0),pi(1),pi(2),vi(0),vi(1),vi(2)); |
NaotoMorita | 143:53808e4e684c | 17 | gpsUpdateFlag = true; |
cocorlow | 141:725321fe2949 | 18 | } |
cocorlow | 141:725321fe2949 | 19 | } |
cocorlow | 141:725321fe2949 | 20 | } |
cocorlow | 141:725321fe2949 | 21 | } |