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

Committer:
NaotoMorita
Date:
22 months ago
Revision:
144:b3a713b4f1c4
Parent:
143:53808e4e684c

File content as of revision 144:b3a713b4f1c4:

#include "global.hpp"

void getGPSval()
{
    gpsUpdateFlag = false;
    gps.Update();
    if (gps.iTOW_STATUS != itow_status){
        itow_status = gps.iTOW_STATUS;
        if(gps.gpsFix == 0x02 || gps.gpsFix == 0x03){
            if(gpsLlh0Fixed == false){
                gps.CalculateUnit();
                gps.Calculate(pi(0),pi(1),pi(2),vi(0),vi(1),vi(2));
                gpsUpdateFlag = true;
                gpsLlh0Fixed = true;
            }else{
                gps.Calculate(pi(0),pi(1),pi(2),vi(0),vi(1),vi(2));
                gpsUpdateFlag = true;
            }
        }
    }
}