Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* [nps] add angle of attack and sideslip to NPS * [module] extra_dl can work with nps * [module] add sideslip sensor to aoa_pwm module and fix apogee board file * [module] add wind estimation module This module is an experimental wind estimation filter based on UKF that aims at estimating all 3 local wind components in real-time. It is based on ChibiOS as the algorithm runs in a dedicated thread. The algorithm itself is generated from a Matlab/Simulink model. * [tool] read Meso-NH meteo data and feed NPS with wind information * [module] remove nps target from extra_dl, uart not well supported on FW * [mesonh] remove unused UDP interface * [chibios] add compilation error message for wind estimator module
- Loading branch information
1 parent
12b01e2
commit 0e8b580
Showing
28 changed files
with
3,854 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<!DOCTYPE module SYSTEM "module.dtd"> | ||
|
||
<module name="wind_estimator" dir="meteo"> | ||
<doc> | ||
<description> | ||
Wind Estimator. | ||
Using an UKF filter generated by MATLAB running in a CHibiOS thread | ||
Requires: | ||
- IMU for inertial data (rates and accel) | ||
- GPS for ground speed vector | ||
- magnetometer for true heading | ||
- pitot for airspeed norm | ||
- angle of attack probe (better and faster estimate of vertical component | ||
</description> | ||
</doc> | ||
<settings> | ||
<dl_settings> | ||
<dl_settings name="wind"> | ||
<dl_setting MAX="1" MIN="1" STEP="1" values="RESET" module="modules/meteo/wind_estimator" VAR="wind_estimator.reset" shortname="reset"/> | ||
<dl_setting MAX="2." MIN="0." STEP="0.01" module="modules/meteo/wind_estimator" VAR="wind_estimator.r_gs" shortname="R_GS" handler="Set_R_GS"/> | ||
<dl_setting MAX="2." MIN="0." STEP="0.01" module="modules/meteo/wind_estimator" VAR="wind_estimator.r_va" shortname="R_VA" handler="Set_R_VA"/> | ||
<dl_setting MAX="0.1" MIN="0." STEP="0.0001" module="modules/meteo/wind_estimator" VAR="wind_estimator.r_aoa" shortname="R_AOA" handler="Set_R_AOA"/> | ||
<dl_setting MAX="0.1" MIN="0." STEP="0.0001" module="modules/meteo/wind_estimator" VAR="wind_estimator.r_ssa" shortname="R_SSA" handler="Set_R_SSA"/> | ||
<dl_setting MAX="1." MIN="0." STEP="0.01" module="modules/meteo/wind_estimator" VAR="wind_estimator.q_va" shortname="Q_VA" handler="Set_Q_VA"/> | ||
<dl_setting MAX="0.01" MIN="0." STEP="0.0001" module="modules/meteo/wind_estimator" VAR="wind_estimator.q_wind" shortname="Q_WIND" handler="Set_Q_WIND"/> | ||
<dl_setting MAX="0.001" MIN="0." STEP="0.0001" module="modules/meteo/wind_estimator" VAR="wind_estimator.q_va_scale" shortname="Q_VA_SCALE" handler="Set_Q_VA_SCALE"/> | ||
</dl_settings> | ||
</dl_settings> | ||
</settings> | ||
<header> | ||
<file name="wind_estimator.h"/> | ||
</header> | ||
<init fun="wind_estimator_init()"/> | ||
<periodic fun="wind_estimator_periodic()" freq="10." autorun="TRUE"/> | ||
<event fun="wind_estimator_event()"/> | ||
<makefile target="ap|nps"> | ||
<file name="wind_estimator.c"/> | ||
<file name="lib_ukf_wind_estimator/UKF_Wind_Estimator.c"/> | ||
</makefile> | ||
</module> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,171 @@ | ||
/* | ||
* Copyright (C) 2016 Gautier Hattenberger | ||
* | ||
* This file is part of paparazzi. | ||
* | ||
* paparazzi is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation; either version 2, or (at your option) | ||
* any later version. | ||
* | ||
* paparazzi is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with paparazzi; see the file COPYING. If not, write to | ||
* the Free Software Foundation, 59 Temple Place - Suite 330, | ||
* Boston, MA 02111-1307, USA. | ||
*/ | ||
|
||
#ifndef NPS_SENSORS_PARAMS_H | ||
#define NPS_SENSORS_PARAMS_H | ||
|
||
#include "generated/airframe.h" | ||
#include "subsystems/imu.h" | ||
|
||
|
||
#define NPS_BODY_TO_IMU_PHI IMU_BODY_TO_IMU_PHI | ||
#define NPS_BODY_TO_IMU_THETA IMU_BODY_TO_IMU_THETA | ||
#define NPS_BODY_TO_IMU_PSI IMU_BODY_TO_IMU_PSI | ||
|
||
/* | ||
* Accelerometer | ||
*/ | ||
/* MPU60x0 has 16bit resolution */ | ||
#define NPS_ACCEL_MIN -32767 | ||
#define NPS_ACCEL_MAX 32767 | ||
/* ms-2 */ | ||
/* aka 2^10/ACCEL_X_SENS */ | ||
#define NPS_ACCEL_SENSITIVITY_XX (IMU_ACCEL_X_SIGN * ACCEL_BFP_OF_REAL(1./IMU_ACCEL_X_SENS)) | ||
#define NPS_ACCEL_SENSITIVITY_YY (IMU_ACCEL_Y_SIGN * ACCEL_BFP_OF_REAL(1./IMU_ACCEL_Y_SENS)) | ||
#define NPS_ACCEL_SENSITIVITY_ZZ (IMU_ACCEL_Z_SIGN * ACCEL_BFP_OF_REAL(1./IMU_ACCEL_Z_SENS)) | ||
|
||
#define NPS_ACCEL_NEUTRAL_X IMU_ACCEL_X_NEUTRAL | ||
#define NPS_ACCEL_NEUTRAL_Y IMU_ACCEL_Y_NEUTRAL | ||
#define NPS_ACCEL_NEUTRAL_Z IMU_ACCEL_Z_NEUTRAL | ||
/* m2s-4 */ | ||
#define NPS_ACCEL_NOISE_STD_DEV_X 5.e-2 | ||
#define NPS_ACCEL_NOISE_STD_DEV_Y 5.e-2 | ||
#define NPS_ACCEL_NOISE_STD_DEV_Z 5.e-2 | ||
/* ms-2 */ | ||
#define NPS_ACCEL_BIAS_X 0 | ||
#define NPS_ACCEL_BIAS_Y 0 | ||
#define NPS_ACCEL_BIAS_Z 0 | ||
/* s */ | ||
#ifndef NPS_ACCEL_DT | ||
#define NPS_ACCEL_DT (1./125.) | ||
#endif | ||
|
||
|
||
|
||
/* | ||
* Gyrometer | ||
*/ | ||
/* MPU60x0 has 16 bit resolution */ | ||
#define NPS_GYRO_MIN -32767 | ||
#define NPS_GYRO_MAX 32767 | ||
|
||
/* 2^12/GYRO_X_SENS */ | ||
#define NPS_GYRO_SENSITIVITY_PP (IMU_GYRO_P_SIGN * RATE_BFP_OF_REAL(1./IMU_GYRO_P_SENS)) | ||
#define NPS_GYRO_SENSITIVITY_QQ (IMU_GYRO_Q_SIGN * RATE_BFP_OF_REAL(1./IMU_GYRO_Q_SENS)) | ||
#define NPS_GYRO_SENSITIVITY_RR (IMU_GYRO_R_SIGN * RATE_BFP_OF_REAL(1./IMU_GYRO_R_SENS)) | ||
|
||
#define NPS_GYRO_NEUTRAL_P IMU_GYRO_P_NEUTRAL | ||
#define NPS_GYRO_NEUTRAL_Q IMU_GYRO_Q_NEUTRAL | ||
#define NPS_GYRO_NEUTRAL_R IMU_GYRO_R_NEUTRAL | ||
|
||
#define NPS_GYRO_NOISE_STD_DEV_P RadOfDeg(0.) | ||
#define NPS_GYRO_NOISE_STD_DEV_Q RadOfDeg(0.) | ||
#define NPS_GYRO_NOISE_STD_DEV_R RadOfDeg(0.) | ||
|
||
#define NPS_GYRO_BIAS_INITIAL_P RadOfDeg( 0.0) | ||
#define NPS_GYRO_BIAS_INITIAL_Q RadOfDeg( 0.0) | ||
#define NPS_GYRO_BIAS_INITIAL_R RadOfDeg( 0.0) | ||
|
||
#define NPS_GYRO_BIAS_RANDOM_WALK_STD_DEV_P RadOfDeg(0.5) | ||
#define NPS_GYRO_BIAS_RANDOM_WALK_STD_DEV_Q RadOfDeg(0.5) | ||
#define NPS_GYRO_BIAS_RANDOM_WALK_STD_DEV_R RadOfDeg(0.5) | ||
/* s */ | ||
#ifndef NPS_GYRO_DT | ||
#define NPS_GYRO_DT (1./125.) | ||
#endif | ||
|
||
|
||
|
||
/* | ||
* Magnetometer | ||
*/ | ||
/* HMC5843 has 12 bit resolution */ | ||
#define NPS_MAG_MIN -2047 | ||
#define NPS_MAG_MAX 2047 | ||
|
||
#define NPS_MAG_IMU_TO_SENSOR_PHI 0. | ||
#define NPS_MAG_IMU_TO_SENSOR_THETA 0. | ||
#define NPS_MAG_IMU_TO_SENSOR_PSI 0. | ||
|
||
#define NPS_MAG_SENSITIVITY_XX (IMU_MAG_X_SIGN * MAG_BFP_OF_REAL(1./IMU_MAG_X_SENS)) | ||
#define NPS_MAG_SENSITIVITY_YY (IMU_MAG_Y_SIGN * MAG_BFP_OF_REAL(1./IMU_MAG_Y_SENS)) | ||
#define NPS_MAG_SENSITIVITY_ZZ (IMU_MAG_Z_SIGN * MAG_BFP_OF_REAL(1./IMU_MAG_Z_SENS)) | ||
|
||
#define NPS_MAG_NEUTRAL_X IMU_MAG_X_NEUTRAL | ||
#define NPS_MAG_NEUTRAL_Y IMU_MAG_Y_NEUTRAL | ||
#define NPS_MAG_NEUTRAL_Z IMU_MAG_Z_NEUTRAL | ||
|
||
#define NPS_MAG_NOISE_STD_DEV_X 2e-3 | ||
#define NPS_MAG_NOISE_STD_DEV_Y 2e-3 | ||
#define NPS_MAG_NOISE_STD_DEV_Z 2e-3 | ||
|
||
#define NPS_MAG_DT (1./60.) | ||
|
||
|
||
/* | ||
* Barometer | ||
*/ | ||
/* m */ | ||
/* aka 2^8/INS_BARO_SENS */ | ||
#define NPS_BARO_QNH 1013.25 | ||
#define NPS_BARO_SENSITIVITY 4.0 | ||
#define NPS_BARO_DT (1./5.) | ||
#define NPS_BARO_NOISE_STD_DEV 5.e-2 | ||
|
||
/* | ||
* GPS | ||
*/ | ||
|
||
#ifndef GPS_PERFECT | ||
#define GPS_PERFECT 1 | ||
#endif | ||
|
||
#if GPS_PERFECT | ||
|
||
#define NPS_GPS_SPEED_NOISE_STD_DEV 0. | ||
#define NPS_GPS_SPEED_LATENCY 0. | ||
#define NPS_GPS_POS_NOISE_STD_DEV 0.001 | ||
#define NPS_GPS_POS_BIAS_INITIAL_X 0. | ||
#define NPS_GPS_POS_BIAS_INITIAL_Y 0. | ||
#define NPS_GPS_POS_BIAS_INITIAL_Z 0. | ||
#define NPS_GPS_POS_BIAS_RANDOM_WALK_STD_DEV_X 0. | ||
#define NPS_GPS_POS_BIAS_RANDOM_WALK_STD_DEV_Y 0. | ||
#define NPS_GPS_POS_BIAS_RANDOM_WALK_STD_DEV_Z 0. | ||
#define NPS_GPS_POS_LATENCY 0. | ||
|
||
#else | ||
|
||
#define NPS_GPS_SPEED_NOISE_STD_DEV 0.5 | ||
#define NPS_GPS_SPEED_LATENCY 0.2 | ||
#define NPS_GPS_POS_NOISE_STD_DEV 2 | ||
#define NPS_GPS_POS_BIAS_INITIAL_X 0e-1 | ||
#define NPS_GPS_POS_BIAS_INITIAL_Y -0e-1 | ||
#define NPS_GPS_POS_BIAS_INITIAL_Z -0e-1 | ||
#define NPS_GPS_POS_BIAS_RANDOM_WALK_STD_DEV_X 1e-3 | ||
#define NPS_GPS_POS_BIAS_RANDOM_WALK_STD_DEV_Y 1e-3 | ||
#define NPS_GPS_POS_BIAS_RANDOM_WALK_STD_DEV_Z 1e-3 | ||
#define NPS_GPS_POS_LATENCY 0.2 | ||
|
||
#endif /* GPS_PERFECT */ | ||
|
||
#define NPS_GPS_DT (1./5.) | ||
|
||
#endif /* NPS_SENSORS_PARAMS_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.