mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2024-12-01 09:24:10 +01:00
OP-1404 uncrustify
This commit is contained in:
parent
c68dd3c00e
commit
6f4b1d5c03
@ -255,41 +255,41 @@ void parse_ubx_nav_pvt(struct UBX_NAV_PVT *pvt, GPSPositionSensorData *GpsPositi
|
|||||||
{
|
{
|
||||||
GPSVelocitySensorData GpsVelocity;
|
GPSVelocitySensorData GpsVelocity;
|
||||||
|
|
||||||
msgtracker.currentTOW = pvt->iTOW;
|
msgtracker.currentTOW = pvt->iTOW;
|
||||||
msgtracker.msg_received = (SOL_RECEIVED | VELNED_RECEIVED | POSLLH_RECEIVED);
|
msgtracker.msg_received = (SOL_RECEIVED | VELNED_RECEIVED | POSLLH_RECEIVED);
|
||||||
|
|
||||||
GpsVelocity.North = (float)pvt->velN / 100.0f;
|
GpsVelocity.North = (float)pvt->velN / 100.0f;
|
||||||
GpsVelocity.East = (float)pvt->velE / 100.0f;
|
GpsVelocity.East = (float)pvt->velE / 100.0f;
|
||||||
GpsVelocity.Down = (float)pvt->velD / 100.0f;
|
GpsVelocity.Down = (float)pvt->velD / 100.0f;
|
||||||
GPSVelocitySensorSet(&GpsVelocity);
|
GPSVelocitySensorSet(&GpsVelocity);
|
||||||
|
|
||||||
GpsPosition->Groundspeed = (float)pvt->gSpeed * 0.01f;
|
GpsPosition->Groundspeed = (float)pvt->gSpeed * 0.01f;
|
||||||
GpsPosition->Heading = (float)pvt->heading * 1.0e-5f;
|
GpsPosition->Heading = (float)pvt->heading * 1.0e-5f;
|
||||||
GpsPosition->Altitude = (float)pvt->hMSL * 0.001f;
|
GpsPosition->Altitude = (float)pvt->hMSL * 0.001f;
|
||||||
GpsPosition->GeoidSeparation = (float)(pvt->height - pvt->hMSL) * 0.001f;
|
GpsPosition->GeoidSeparation = (float)(pvt->height - pvt->hMSL) * 0.001f;
|
||||||
GpsPosition->Latitude = pvt->lat;
|
GpsPosition->Latitude = pvt->lat;
|
||||||
GpsPosition->Longitude = pvt->lon;
|
GpsPosition->Longitude = pvt->lon;
|
||||||
GpsPosition->Satellites = pvt->numSV;
|
GpsPosition->Satellites = pvt->numSV;
|
||||||
if(pvt->flags & PVT_FLAGS_GNNSFIX_OK) {
|
if (pvt->flags & PVT_FLAGS_GNNSFIX_OK) {
|
||||||
GpsPosition->Status = pvt->fixType == PVT_FIX_TYPE_3D ?
|
GpsPosition->Status = pvt->fixType == PVT_FIX_TYPE_3D ?
|
||||||
GPSPOSITIONSENSOR_STATUS_FIX3D : GPSPOSITIONSENSOR_STATUS_FIX2D;
|
GPSPOSITIONSENSOR_STATUS_FIX3D : GPSPOSITIONSENSOR_STATUS_FIX2D;
|
||||||
} else {
|
} else {
|
||||||
GpsPosition->Status = GPSPOSITIONSENSOR_STATUS_NOFIX;
|
GpsPosition->Status = GPSPOSITIONSENSOR_STATUS_NOFIX;
|
||||||
}
|
}
|
||||||
#if !defined(PIOS_GPS_MINIMAL)
|
#if !defined(PIOS_GPS_MINIMAL)
|
||||||
if (pvt->valid & PVT_VALID_VALIDTIME) {
|
if (pvt->valid & PVT_VALID_VALIDTIME) {
|
||||||
// Time is valid, set GpsTime
|
// Time is valid, set GpsTime
|
||||||
GPSTimeData GpsTime;
|
GPSTimeData GpsTime;
|
||||||
|
|
||||||
GpsTime.Year = pvt->year;
|
GpsTime.Year = pvt->year;
|
||||||
GpsTime.Month = pvt->month;
|
GpsTime.Month = pvt->month;
|
||||||
GpsTime.Day = pvt->day;
|
GpsTime.Day = pvt->day;
|
||||||
GpsTime.Hour = pvt->hour;
|
GpsTime.Hour = pvt->hour;
|
||||||
GpsTime.Minute = pvt->min;
|
GpsTime.Minute = pvt->min;
|
||||||
GpsTime.Second = pvt->sec;
|
GpsTime.Second = pvt->sec;
|
||||||
|
|
||||||
GPSTimeSet(&GpsTime);
|
GPSTimeSet(&GpsTime);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
#if !defined(PIOS_GPS_MINIMAL)
|
#if !defined(PIOS_GPS_MINIMAL)
|
||||||
|
@ -35,23 +35,23 @@
|
|||||||
#include "GPS.h"
|
#include "GPS.h"
|
||||||
|
|
||||||
|
|
||||||
#define UBX_SYNC1 0xb5 // UBX protocol synchronization characters
|
#define UBX_SYNC1 0xb5 // UBX protocol synchronization characters
|
||||||
#define UBX_SYNC2 0x62
|
#define UBX_SYNC2 0x62
|
||||||
|
|
||||||
// From u-blox6 receiver protocol specification
|
// From u-blox6 receiver protocol specification
|
||||||
|
|
||||||
// Messages classes
|
// Messages classes
|
||||||
#define UBX_CLASS_NAV 0x01
|
#define UBX_CLASS_NAV 0x01
|
||||||
|
|
||||||
// Message IDs
|
// Message IDs
|
||||||
#define UBX_ID_POSLLH 0x02
|
#define UBX_ID_POSLLH 0x02
|
||||||
#define UBX_ID_STATUS 0x03
|
#define UBX_ID_STATUS 0x03
|
||||||
#define UBX_ID_DOP 0x04
|
#define UBX_ID_DOP 0x04
|
||||||
#define UBX_ID_SOL 0x06
|
#define UBX_ID_SOL 0x06
|
||||||
#define UBX_ID_VELNED 0x12
|
#define UBX_ID_VELNED 0x12
|
||||||
#define UBX_ID_TIMEUTC 0x21
|
#define UBX_ID_TIMEUTC 0x21
|
||||||
#define UBX_ID_SVINFO 0x30
|
#define UBX_ID_SVINFO 0x30
|
||||||
#define UBX_ID_PVT 0x07
|
#define UBX_ID_PVT 0x07
|
||||||
|
|
||||||
// private structures
|
// private structures
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user