improved sim sensor params definition

This commit is contained in:
Antoine Drouin
2009-07-29 23:49:56 +00:00
parent 8e1bbd928f
commit e9912fd19f
4 changed files with 26 additions and 15 deletions
+5
View File
@@ -73,6 +73,11 @@
<define name="BODY_TO_IMU_PHI" value="ANGLE_BFP_OF_REAL(RadOfDeg(4.))"/>
<define name="BODY_TO_IMU_THETA" value="ANGLE_BFP_OF_REAL(RadOfDeg(3.))"/>
<define name="BODY_TO_IMU_PSI" value="ANGLE_BFP_OF_REAL(RadOfDeg(0.))"/>
<!--
<define name="BODY_TO_IMU_PHI" value="ANGLE_BFP_OF_REAL(RadOfDeg(0.))"/>
<define name="BODY_TO_IMU_THETA" value="ANGLE_BFP_OF_REAL(RadOfDeg(0.))"/>
<define name="BODY_TO_IMU_PSI" value="ANGLE_BFP_OF_REAL(RadOfDeg(0.))"/>
-->
</section>
@@ -27,10 +27,15 @@
#include "airframe.h"
#if 1
#define NPS_BODY_TO_IMU_PHI RadOfDeg(4.)
#define NPS_BODY_TO_IMU_THETA RadOfDeg(3.)
#define NPS_BODY_TO_IMU_PSI RadOfDeg(0.)
#else
#define NPS_BODY_TO_IMU_PHI RadOfDeg(0.)
#define NPS_BODY_TO_IMU_THETA RadOfDeg(0.)
#define NPS_BODY_TO_IMU_PSI RadOfDeg(0.)
#endif
/*
* Accelerometer
@@ -38,17 +43,17 @@
#define NPS_ACCEL_RESOLUTION (65536)
/* ms-2 */
/* aka 2^10/ACCEL_X_SENS */
#define NPS_ACCEL_SENSITIVITY_XX -408.92695
#define NPS_ACCEL_SENSITIVITY_YY -412.69325
#define NPS_ACCEL_SENSITIVITY_ZZ -407.32522
#define NPS_ACCEL_SENSITIVITY_XX ACCEL_BFP_OF_REAL(-1./2.50411474)
#define NPS_ACCEL_SENSITIVITY_YY ACCEL_BFP_OF_REAL(-1./2.48126183)
#define NPS_ACCEL_SENSITIVITY_ZZ ACCEL_BFP_OF_REAL(-1./2.51396167)
#define NPS_ACCEL_NEUTRAL_X 32081
#define NPS_ACCEL_NEUTRAL_Y 33738
#define NPS_ACCEL_NEUTRAL_Z 32441
/* m2s-4 */
#define NPS_ACCEL_NOISE_STD_DEV_X 1.e-1
#define NPS_ACCEL_NOISE_STD_DEV_Y 1.e-1
#define NPS_ACCEL_NOISE_STD_DEV_Z 1.1e-1
#define NPS_ACCEL_NOISE_STD_DEV_X 0.e-1
#define NPS_ACCEL_NOISE_STD_DEV_Y 0.e-1
#define NPS_ACCEL_NOISE_STD_DEV_Z 0.e-1
/* ms-2 */
#define NPS_ACCEL_BIAS_X 0
#define NPS_ACCEL_BIAS_Y 0
@@ -64,9 +69,9 @@
#define NPS_GYRO_RESOLUTION 65536
/* 2^12/GYRO_X_SENS */
#define NPS_GYRO_SENSITIVITY_PP ( 4055.)
#define NPS_GYRO_SENSITIVITY_QQ (-4055.)
#define NPS_GYRO_SENSITIVITY_RR (-4055.)
#define NPS_GYRO_SENSITIVITY_PP RATE_BFP_OF_REAL( 1./1.01)
#define NPS_GYRO_SENSITIVITY_QQ RATE_BFP_OF_REAL(-1./1.01)
#define NPS_GYRO_SENSITIVITY_RR RATE_BFP_OF_REAL(-1./1.01)
#define NPS_GYRO_NEUTRAL_P 33924
#define NPS_GYRO_NEUTRAL_Q 33417
@@ -77,8 +82,8 @@
#define NPS_GYRO_NOISE_STD_DEV_R RadOfDeg(0.5)
#define NPS_GYRO_BIAS_INITIAL_P RadOfDeg( 0.0)
#define NPS_GYRO_BIAS_INITIAL_Q RadOfDeg( .0)
#define NPS_GYRO_BIAS_INITIAL_R RadOfDeg( .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.)
#define NPS_GYRO_BIAS_RANDOM_WALK_STD_DEV_Q RadOfDeg(0.)
+3 -2
View File
@@ -1,10 +1,11 @@
#include "nps_sensor_accel.h"
#include "airframe.h"
#include "airframe.h" /* to get NPS_SENSORS_PARAMS */
#include "nps_fdm.h"
#include "nps_random.h"
#include NPS_SENSORS_PARAMS
#include "math/pprz_algebra_int.h"
void nps_sensor_accel_init(struct NpsSensorAccel* accel, double time) {
VECT3_ASSIGN(accel->value, 0., 0., 0.);
+1 -1
View File
@@ -3,7 +3,7 @@
#include "airframe.h"
#include "nps_fdm.h"
#include NPS_SENSORS_PARAMS
#include "math/pprz_algebra_int.h"
void nps_sensor_gyro_init(struct NpsSensorGyro* gyro, double time) {
VECT3_ASSIGN(gyro->value, 0., 0., 0.);