mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2024-12-01 09:24:10 +01:00
OP-1370 - Fixes parameters name, values and cosmetic issues.
This commit is contained in:
parent
78662eb356
commit
2ddbb72bcf
@ -300,7 +300,7 @@ static void gpsTask(__attribute__((unused)) void *parameters)
|
|||||||
// we appear to be receiving GPS sentences OK, we've had an update
|
// we appear to be receiving GPS sentences OK, we've had an update
|
||||||
// criteria for GPS-OK taken from this post...
|
// criteria for GPS-OK taken from this post...
|
||||||
// http://forums.openpilot.org/topic/1523-professors-insgps-in-svn/page__view__findpost__p__5220
|
// http://forums.openpilot.org/topic/1523-professors-insgps-in-svn/page__view__findpost__p__5220
|
||||||
if ((gpspositionsensor.PDOP < gpsSettings.MaxPDOP) && (gpspositionsensor.Satellites >= gpsSettings.MinSattelites) &&
|
if ((gpspositionsensor.PDOP < gpsSettings.MaxPDOP) && (gpspositionsensor.Satellites >= gpsSettings.MinSatellites) &&
|
||||||
(gpspositionsensor.Status == GPSPOSITIONSENSOR_STATUS_FIX3D) &&
|
(gpspositionsensor.Status == GPSPOSITIONSENSOR_STATUS_FIX3D) &&
|
||||||
(gpspositionsensor.Latitude != 0 || gpspositionsensor.Longitude != 0)) {
|
(gpspositionsensor.Latitude != 0 || gpspositionsensor.Longitude != 0)) {
|
||||||
AlarmsClear(SYSTEMALARMS_ALARM_GPS);
|
AlarmsClear(SYSTEMALARMS_ALARM_GPS);
|
||||||
@ -442,9 +442,9 @@ void updateGpsSettings(__attribute__((unused)) UAVObjEvent *ev)
|
|||||||
GPSSettingsUBXAutoConfigGet(&ubxAutoConfig);
|
GPSSettingsUBXAutoConfigGet(&ubxAutoConfig);
|
||||||
GPSSettingsUBXRateGet(&newconfig.navRate);
|
GPSSettingsUBXRateGet(&newconfig.navRate);
|
||||||
GPSSettingsUBXDynamicModelGet(&ubxDynamicModel);
|
GPSSettingsUBXDynamicModelGet(&ubxDynamicModel);
|
||||||
|
newconfig.autoconfigEnabled = ubxAutoConfig == GPSSETTINGS_UBXAUTOCONFIG_DISABLED ? false : true;
|
||||||
|
newconfig.storeSettings = ubxAutoConfig == GPSSETTINGS_UBXAUTOCONFIG_CONFIGUREANDSTORE;
|
||||||
|
|
||||||
newconfig.autoconfigEnabled = ubxAutoConfig == GPSSETTINGS_UBXAUTOCONFIG_FALSE ? false : true;
|
|
||||||
newconfig.storeSettings = ubxAutoConfig == GPSSETTINGS_UBXAUTOCONFIG_STORE;
|
|
||||||
newconfig.dynamicModel = ubxDynamicModel == GPSSETTINGS_UBXDYNAMICMODEL_PORTABLE ? UBX_DYNMODEL_PORTABLE :
|
newconfig.dynamicModel = ubxDynamicModel == GPSSETTINGS_UBXDYNAMICMODEL_PORTABLE ? UBX_DYNMODEL_PORTABLE :
|
||||||
ubxDynamicModel == GPSSETTINGS_UBXDYNAMICMODEL_STATIONARY ? UBX_DYNMODEL_STATIONARY :
|
ubxDynamicModel == GPSSETTINGS_UBXDYNAMICMODEL_STATIONARY ? UBX_DYNMODEL_STATIONARY :
|
||||||
ubxDynamicModel == GPSSETTINGS_UBXDYNAMICMODEL_PEDESTRIAN ? UBX_DYNMODEL_PEDESTRIAN :
|
ubxDynamicModel == GPSSETTINGS_UBXDYNAMICMODEL_PEDESTRIAN ? UBX_DYNMODEL_PEDESTRIAN :
|
||||||
|
@ -55,30 +55,30 @@ typedef struct {
|
|||||||
|
|
||||||
ubx_cfg_msg_t msg_config_ubx6[] = {
|
ubx_cfg_msg_t msg_config_ubx6[] = {
|
||||||
// messages to disable
|
// messages to disable
|
||||||
{ .msgClass = UBX_CLASS_NAV, .msgID = UBX_ID_NAV_CLOCK, .rate = 0 },
|
{ .msgClass = UBX_CLASS_NAV, .msgID = UBX_ID_NAV_CLOCK, .rate = 0 },
|
||||||
{ .msgClass = UBX_CLASS_NAV, .msgID = UBX_ID_NAV_POSECEF, .rate = 0 },
|
{ .msgClass = UBX_CLASS_NAV, .msgID = UBX_ID_NAV_POSECEF, .rate = 0 },
|
||||||
{ .msgClass = UBX_CLASS_NAV, .msgID = UBX_ID_NAV_SBAS, .rate = 0 },
|
{ .msgClass = UBX_CLASS_NAV, .msgID = UBX_ID_NAV_SBAS, .rate = 0 },
|
||||||
{ .msgClass = UBX_CLASS_NAV, .msgID = UBX_ID_NAV_TIMEGPS, .rate = 0 },
|
{ .msgClass = UBX_CLASS_NAV, .msgID = UBX_ID_NAV_TIMEGPS, .rate = 0 },
|
||||||
{ .msgClass = UBX_CLASS_NAV, .msgID = UBX_ID_NAV_VELECEF, .rate = 0 },
|
{ .msgClass = UBX_CLASS_NAV, .msgID = UBX_ID_NAV_VELECEF, .rate = 0 },
|
||||||
|
|
||||||
{ .msgClass = UBX_CLASS_MON, .msgID = UBX_ID_MON_HW, .rate = 0 },
|
{ .msgClass = UBX_CLASS_MON, .msgID = UBX_ID_MON_HW, .rate = 0 },
|
||||||
{ .msgClass = UBX_CLASS_MON, .msgID = UBX_ID_MON_HW2, .rate = 0 },
|
{ .msgClass = UBX_CLASS_MON, .msgID = UBX_ID_MON_HW2, .rate = 0 },
|
||||||
{ .msgClass = UBX_CLASS_MON, .msgID = UBX_ID_MON_IO, .rate = 0 },
|
{ .msgClass = UBX_CLASS_MON, .msgID = UBX_ID_MON_IO, .rate = 0 },
|
||||||
{ .msgClass = UBX_CLASS_MON, .msgID = UBX_ID_MON_MSGPP, .rate = 0 },
|
{ .msgClass = UBX_CLASS_MON, .msgID = UBX_ID_MON_MSGPP, .rate = 0 },
|
||||||
{ .msgClass = UBX_CLASS_MON, .msgID = UBX_ID_MON_RXBUFF, .rate = 0 },
|
{ .msgClass = UBX_CLASS_MON, .msgID = UBX_ID_MON_RXBUFF, .rate = 0 },
|
||||||
{ .msgClass = UBX_CLASS_MON, .msgID = UBX_ID_MON_RXR, .rate = 0 },
|
{ .msgClass = UBX_CLASS_MON, .msgID = UBX_ID_MON_RXR, .rate = 0 },
|
||||||
{ .msgClass = UBX_CLASS_MON, .msgID = UBX_ID_MON_TXBUF, .rate = 0 },
|
{ .msgClass = UBX_CLASS_MON, .msgID = UBX_ID_MON_TXBUF, .rate = 0 },
|
||||||
|
|
||||||
{ .msgClass = UBX_CLASS_RXM, .msgID = UBX_ID_RXM_SVSI, .rate = 0 },
|
{ .msgClass = UBX_CLASS_RXM, .msgID = UBX_ID_RXM_SVSI, .rate = 0 },
|
||||||
|
|
||||||
// message to enable
|
// message to enable
|
||||||
{ .msgClass = UBX_CLASS_NAV, .msgID = UBX_ID_NAV_POSLLH, .rate = 1 },
|
{ .msgClass = UBX_CLASS_NAV, .msgID = UBX_ID_NAV_POSLLH, .rate = 1 },
|
||||||
{ .msgClass = UBX_CLASS_NAV, .msgID = UBX_ID_NAV_DOP, .rate = 1 },
|
{ .msgClass = UBX_CLASS_NAV, .msgID = UBX_ID_NAV_DOP, .rate = 1 },
|
||||||
{ .msgClass = UBX_CLASS_NAV, .msgID = UBX_ID_NAV_SOL, .rate = 1 },
|
{ .msgClass = UBX_CLASS_NAV, .msgID = UBX_ID_NAV_SOL, .rate = 1 },
|
||||||
{ .msgClass = UBX_CLASS_NAV, .msgID = UBX_ID_NAV_STATUS, .rate = 1 },
|
{ .msgClass = UBX_CLASS_NAV, .msgID = UBX_ID_NAV_STATUS, .rate = 1 },
|
||||||
{ .msgClass = UBX_CLASS_NAV, .msgID = UBX_ID_NAV_VELNED, .rate = 1 },
|
{ .msgClass = UBX_CLASS_NAV, .msgID = UBX_ID_NAV_VELNED, .rate = 1 },
|
||||||
{ .msgClass = UBX_CLASS_NAV, .msgID = UBX_ID_NAV_TIMEUTC, .rate = 1 },
|
{ .msgClass = UBX_CLASS_NAV, .msgID = UBX_ID_NAV_TIMEUTC, .rate = 1 },
|
||||||
{ .msgClass = UBX_CLASS_NAV, .msgID = UBX_ID_NAV_SVINFO, .rate = 10 },
|
{ .msgClass = UBX_CLASS_NAV, .msgID = UBX_ID_NAV_SVINFO, .rate = 10 },
|
||||||
};
|
};
|
||||||
|
|
||||||
ubx_cfg_msg_t msg_config_ubx7[] = {
|
ubx_cfg_msg_t msg_config_ubx7[] = {
|
||||||
|
@ -103,7 +103,7 @@ static filterResult filter(__attribute__((unused)) stateFilter *self, stateEstim
|
|||||||
GPSPositionSensorGet(&gpsdata);
|
GPSPositionSensorGet(&gpsdata);
|
||||||
|
|
||||||
// check if we have a valid GPS signal (not checked by StateEstimation istelf)
|
// check if we have a valid GPS signal (not checked by StateEstimation istelf)
|
||||||
if ((gpsdata.PDOP < this->settings.MaxPDOP) && (gpsdata.Satellites >= this->settings.MinSattelites) &&
|
if ((gpsdata.PDOP < this->settings.MaxPDOP) && (gpsdata.Satellites >= this->settings.MinSatellites) &&
|
||||||
(gpsdata.Status == GPSPOSITIONSENSOR_STATUS_FIX3D) &&
|
(gpsdata.Status == GPSPOSITIONSENSOR_STATUS_FIX3D) &&
|
||||||
(gpsdata.Latitude != 0 || gpsdata.Longitude != 0)) {
|
(gpsdata.Latitude != 0 || gpsdata.Longitude != 0)) {
|
||||||
int32_t LLAi[3] = {
|
int32_t LLAi[3] = {
|
||||||
|
@ -2,17 +2,16 @@
|
|||||||
<object name="GPSSettings" singleinstance="true" settings="true" category="Sensors">
|
<object name="GPSSettings" singleinstance="true" settings="true" category="Sensors">
|
||||||
<description>GPS Module specific settings</description>
|
<description>GPS Module specific settings</description>
|
||||||
<field name="DataProtocol" units="" type="enum" elements="1" options="NMEA,UBX" defaultvalue="UBX"/>
|
<field name="DataProtocol" units="" type="enum" elements="1" options="NMEA,UBX" defaultvalue="UBX"/>
|
||||||
<field name="MinSattelites" units="" type="uint8" elements="1" defaultvalue="7"/>
|
<field name="MinSatellites" units="" type="uint8" elements="1" defaultvalue="7"/>
|
||||||
<field name="MaxPDOP" units="" type="float" elements="1" defaultvalue="3.5"/>
|
<field name="MaxPDOP" units="" type="float" elements="1" defaultvalue="3.5"/>
|
||||||
<!-- ubx self configuration. Enable to allow the flight board to auto configure ubx GPS options,
|
<!-- Ubx self configuration. Enable to allow the flight board to auto configure ubx GPS options,
|
||||||
store does AutoConfig and save GPS settings (i.e. to prevent issues if gps is power cycled) -->
|
store does AutoConfig and save GPS settings (i.e. to prevent issues if gps is power cycled) -->
|
||||||
<field name="UBXAutoConfig" units="" type="enum" elements="1" options="FALSE,TRUE,STORE" defaultvalue="FALSE"/>
|
<field name="UbxAutoConfig" units="" type="enum" elements="1" options="Disabled,Configure,ConfigureAndStore" defaultvalue="Disabled"/>
|
||||||
<!-- ubx position rate, -1 for auto -->
|
<!-- Ubx position update rate, -1 for auto -->
|
||||||
<field name="UBXRate" units="Hz" type="int8" elements="1" defaultvalue="5" />
|
<field name="UbxRate" units="Hz" type="int8" elements="1" defaultvalue="5" />
|
||||||
<!-- Ubx dynamic model, see UBX datasheet for more details -->
|
<!-- Ubx dynamic model, see UBX datasheet for more details -->
|
||||||
<field name="UBXDynamicModel" units="" type="enum" elements="1"
|
<field name="UbxDynamicModel" units="" type="enum" elements="1"
|
||||||
options="Portable,Stationary,Pedestrian,Automotive,Sea,Airborne1G,Airborne2G,Airborne4G" defaultvalue="Airborne1G" />
|
options="Portable,Stationary,Pedestrian,Automotive,Sea,Airborne1G,Airborne2G,Airborne4G" defaultvalue="Airborne1G" />
|
||||||
|
|
||||||
<access gcs="readwrite" flight="readwrite"/>
|
<access gcs="readwrite" flight="readwrite"/>
|
||||||
<telemetrygcs acked="true" updatemode="onchange" period="0"/>
|
<telemetrygcs acked="true" updatemode="onchange" period="0"/>
|
||||||
<telemetryflight acked="true" updatemode="onchange" period="0"/>
|
<telemetryflight acked="true" updatemode="onchange" period="0"/>
|
||||||
|
Loading…
Reference in New Issue
Block a user