mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-02-20 10:54:14 +01:00
some fixes and corrections as suggested in review
This commit is contained in:
parent
e82a52e8ff
commit
6435604182
@ -703,8 +703,9 @@ static int32_t updateAttitudeINSGPS(bool first_run, bool outdoor_mode)
|
||||
magData.y = mags.y;
|
||||
magData.z = mags.z;
|
||||
MagStateSet(&magData);
|
||||
} else {
|
||||
MagStateGet(&magData);
|
||||
}
|
||||
MagStateGet(&magData);
|
||||
|
||||
BaroSensorGet(&baroData);
|
||||
AirspeedSensorGet(&airspeedData);
|
||||
@ -1051,9 +1052,9 @@ static int32_t updateAttitudeINSGPS(bool first_run, bool outdoor_mode)
|
||||
VelocityStateSet(&velocityState);
|
||||
|
||||
GyroStateData gyroState;
|
||||
gyroState.x = RAD2DEG(gyros[0] - Nav.gyro_bias[0]);
|
||||
gyroState.y = RAD2DEG(gyros[1] - Nav.gyro_bias[1]);
|
||||
gyroState.z = RAD2DEG(gyros[2] - Nav.gyro_bias[2]);
|
||||
gyroState.x = RAD2DEG(gyros[0] - RAD2DEG(Nav.gyro_bias[0]));
|
||||
gyroState.y = RAD2DEG(gyros[1] - RAD2DEG(Nav.gyro_bias[1]));
|
||||
gyroState.z = RAD2DEG(gyros[2] - RAD2DEG(Nav.gyro_bias[2]));
|
||||
GyroStateSet(&gyroState);
|
||||
|
||||
EKFStateVarianceData vardata;
|
||||
|
@ -369,7 +369,7 @@ static int32_t complementaryFilter(struct data *this, float gyro[3], float accel
|
||||
|
||||
// Accumulate integral of error. Scale here so that units are (deg/s) but Ki has units of s
|
||||
this->gyroBias[0] -= accel_err[0] * this->attitudeSettings.AccelKi - gyro[0] * this->rollPitchBiasRate;
|
||||
this->gyroBias[1] -= accel_err[1] * this->attitudeSettings.AccelKi - gyro[1] * this->rollPitchBiasRate;;
|
||||
this->gyroBias[1] -= accel_err[1] * this->attitudeSettings.AccelKi - gyro[1] * this->rollPitchBiasRate;
|
||||
if (this->useMag) {
|
||||
this->gyroBias[2] -= mag_err[2] * this->attitudeSettings.MagKi - gyro[2] * this->rollPitchBiasRate;
|
||||
} else {
|
||||
|
@ -1,6 +1,6 @@
|
||||
<xml>
|
||||
<object name="AccelSensor" singleinstance="true" settings="false">
|
||||
<description>The accel data.</description>
|
||||
<object name="AccelSensor" singleinstance="true" settings="false" category="Sensors">
|
||||
<description>Calibrated sensor data from 3 axis accelerometer in m/s².</description>
|
||||
<field name="x" units="m/s^2" type="float" elements="1"/>
|
||||
<field name="y" units="m/s^2" type="float" elements="1"/>
|
||||
<field name="z" units="m/s^2" type="float" elements="1"/>
|
||||
|
@ -1,5 +1,5 @@
|
||||
<xml>
|
||||
<object name="AccelState" singleinstance="true" settings="false">
|
||||
<object name="AccelState" singleinstance="true" settings="false" category="State">
|
||||
<description>The filtered acceleration data.</description>
|
||||
<field name="x" units="m/s^2" type="float" elements="1"/>
|
||||
<field name="y" units="m/s^2" type="float" elements="1"/>
|
||||
|
@ -1,5 +1,5 @@
|
||||
<xml>
|
||||
<object name="AirspeedSensor" singleinstance="true" settings="false">
|
||||
<object name="AirspeedSensor" singleinstance="true" settings="false" category="Sensors">
|
||||
<description>The raw data from the dynamic pressure sensor with pressure, temperature and airspeed.</description>
|
||||
<field name="SensorConnected" units="" type="enum" elements="1" options="False,True"/>
|
||||
<field name="SensorValue" units="raw" type="uint16" elements="1"/>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<xml>
|
||||
<object name="AirspeedState" singleinstance="true" settings="false">
|
||||
<description>UAVO for true airspeed, calibrated airspeed, angle of attack, and angle of slip</description>
|
||||
<object name="AirspeedState" singleinstance="true" settings="false" category="State">
|
||||
<description>UAVO for true airspeed and calibrated airspeed state estimation.</description>
|
||||
<field name="CalibratedAirspeed" units="m/s" type="float" elements="1"/>
|
||||
<field name="TrueAirspeed" units="m/s" type="float" elements="1"/>
|
||||
<access gcs="readwrite" flight="readwrite"/>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<xml>
|
||||
<object name="AttitudeState" singleinstance="true" settings="false">
|
||||
<description>The updated Attitude estimation from @ref AHRSCommsModule.</description>
|
||||
<object name="AttitudeState" singleinstance="true" settings="false" category="State">
|
||||
<description>The updated Attitude estimation from @ref StateEstimationModule.</description>
|
||||
<field name="q1" units="" type="float" elements="1"/>
|
||||
<field name="q2" units="" type="float" elements="1"/>
|
||||
<field name="q3" units="" type="float" elements="1"/>
|
||||
|
@ -1,5 +1,5 @@
|
||||
<xml>
|
||||
<object name="BaroSensor" singleinstance="true" settings="false">
|
||||
<object name="BaroSensor" singleinstance="true" settings="false" category="Sensors">
|
||||
<description>The raw data from the barometric sensor with pressure, temperature and altitude estimate.</description>
|
||||
<field name="Altitude" units="m" type="float" elements="1"/>
|
||||
<field name="Temperature" units="C" type="float" elements="1"/>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<xml>
|
||||
<object name="GPSPositionSensor" singleinstance="true" settings="false">
|
||||
<description>Raw GPS data from @ref GPSModule. Should only be used by @ref AHRSCommsModule.</description>
|
||||
<object name="GPSPositionSensor" singleinstance="true" settings="false" category="Sensors">
|
||||
<description>Raw GPS data from @ref GPSModule.</description>
|
||||
<field name="Status" units="" type="enum" elements="1" options="NoGPS,NoFix,Fix2D,Fix3D"/>
|
||||
<field name="Latitude" units="degrees x 10^-7" type="int32" elements="1"/>
|
||||
<field name="Longitude" units="degrees x 10^-7" type="int32" elements="1"/>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<xml>
|
||||
<object name="GPSVelocitySensor" singleinstance="true" settings="false">
|
||||
<description>Raw GPS data from @ref GPSModule.</description>
|
||||
<object name="GPSVelocitySensor" singleinstance="true" settings="false" category="Sensors">
|
||||
<description>Raw GPS velocity in NED frame and m/s from @ref GPSModule.</description>
|
||||
<field name="North" units="m/s" type="float" elements="1"/>
|
||||
<field name="East" units="m/s" type="float" elements="1"/>
|
||||
<field name="Down" units="m/s" type="float" elements="1"/>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<xml>
|
||||
<object name="GyroSensor" singleinstance="true" settings="false">
|
||||
<description>The gyro data.</description>
|
||||
<object name="GyroSensor" singleinstance="true" settings="false" catgory="Sensors">
|
||||
<description>Calibrated sensor data from 3 axis gyroscope in deg/s.</description>
|
||||
<field name="x" units="deg/s" type="float" elements="1"/>
|
||||
<field name="y" units="deg/s" type="float" elements="1"/>
|
||||
<field name="z" units="deg/s" type="float" elements="1"/>
|
||||
|
@ -1,5 +1,5 @@
|
||||
<xml>
|
||||
<object name="GyroState" singleinstance="true" settings="false">
|
||||
<object name="GyroState" singleinstance="true" settings="false" category="State">
|
||||
<description>The filtered rotation sensor data.</description>
|
||||
<field name="x" units="deg/s" type="float" elements="1"/>
|
||||
<field name="y" units="deg/s" type="float" elements="1"/>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<xml>
|
||||
<object name="MagSensor" singleinstance="true" settings="false">
|
||||
<description>The mag data.</description>
|
||||
<object name="MagSensor" singleinstance="true" settings="false" category="Sensors">
|
||||
<description>Calibrated sensor data from 3 axis magnetometer in MilliGauss.</description>
|
||||
<field name="x" units="mGa" type="float" elements="1"/>
|
||||
<field name="y" units="mGa" type="float" elements="1"/>
|
||||
<field name="z" units="mGa" type="float" elements="1"/>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<xml>
|
||||
<object name="MagState" singleinstance="true" settings="false">
|
||||
<description>The mag data.</description>
|
||||
<object name="MagState" singleinstance="true" settings="false" category="State">
|
||||
<description>The filtered magnet vector.</description>
|
||||
<field name="x" units="mGa" type="float" elements="1"/>
|
||||
<field name="y" units="mGa" type="float" elements="1"/>
|
||||
<field name="z" units="mGa" type="float" elements="1"/>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<xml>
|
||||
<object name="PositionSensor" singleinstance="true" settings="false">
|
||||
<description>Contains the position measured relative to @ref HomeLocation</description>
|
||||
<object name="PositionSensor" singleinstance="true" settings="false" category="Sensors">
|
||||
<description>Contains the position in NED frame measured relative to @ref HomeLocation.</description>
|
||||
<field name="North" units="m" type="float" elements="1"/>
|
||||
<field name="East" units="m" type="float" elements="1"/>
|
||||
<field name="Down" units="m" type="float" elements="1"/>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<xml>
|
||||
<object name="PositionState" singleinstance="true" settings="false">
|
||||
<description>Contains the current position relative to @ref HomeLocation</description>
|
||||
<object name="PositionState" singleinstance="true" settings="false" category="State">
|
||||
<description>Contains the estimate of the current position relative to @ref HomeLocation, in NED coordinates</description>
|
||||
<field name="North" units="m" type="float" elements="1"/>
|
||||
<field name="East" units="m" type="float" elements="1"/>
|
||||
<field name="Down" units="m" type="float" elements="1"/>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<xml>
|
||||
<object name="VelocityState" singleinstance="true" settings="false">
|
||||
<description>Updated by filters, velocity relative to @ref HomeLocation</description>
|
||||
<object name="VelocityState" singleinstance="true" settings="false" category="State">
|
||||
<description>Updated by @ref StateEstimationModule, velocity relative to @ref HomeLocation.</description>
|
||||
<field name="North" units="m/s" type="float" elements="1"/>
|
||||
<field name="East" units="m/s" type="float" elements="1"/>
|
||||
<field name="Down" units="m/s" type="float" elements="1"/>
|
||||
|
Loading…
x
Reference in New Issue
Block a user