57,6 → 57,7 |
#include "91x_lib.h" |
#include "uart1.h" |
#include "ubx.h" |
#include "main.h" |
#include "led.h" |
#include "timer1.h" |
#include "GPS.h" |
293,6 → 294,7 |
// update GPS data only if the status is INVALID or PROCESSED |
if(GPSData.Status != NEWDATA) |
{ // wait for new data at all neccesary ubx messages |
CountNewGpsDataIn5Sec++; |
GPSData.Status = INVALID; |
// update message cycle time |
GPSData.MsgCycleTime = (u16)(UbxSol.itow-last_itow); |
302,6 → 304,8 |
GPSData.Flags = (GPSData.Flags & 0xf0) | (UbxSol.Flags & 0x0f); // we take only the lower bits |
GPSData.NumOfSats = UbxSol.numSV; |
GPSData.SatFix = UbxSol.GPSfix; |
//if(Parameter.User3 > 100) { GPSData.NumOfSats = 0; GPSData.SatFix = 0;} |
//if(Parameter.User3 > 100) { GPSData.SatFix = 0;} |
GPSData.Position_Accuracy = UbxSol.PAcc; // in steps of 1cm |
GPSData.Speed_Accuracy = UbxSol.SAcc; // in steps of 1cm/s |
SetGPSTime(&SystemTime); // update system time |
323,9 → 327,9 |
{ |
if(GPSData.SatFix != SATFIX_3D || GPSData.NumOfSats < 6) // simulate satfix |
{ |
GPSData.SatFix = SATFIX_3D; |
GPSData.Flags |= FLAG_GPSFIXOK; |
GPSData.NumOfSats = 8; |
GPSData.SatFix = SATFIX_3D; // Simulation |
GPSData.Flags |= FLAG_GPSFIXOK; // Simulation |
GPSData.NumOfSats = 8; // Simulation |
if(!SystemTime.Valid) |
{ |
UbxSol.Status = 1; |
519,6 → 523,7 |
} // EOF filter matches |
} // EOF != INVALID |
}// EOF crc ok |
else DebugOut.Analog[13]++; // CRC Error -> since 2.10e (6.2015) |
ubxState = UBXSTATE_IDLE; // ready to parse new data |
break; |
|