little bit cleanup in estimator, no functional changes

This commit is contained in:
Felix Ruess
2012-02-10 15:25:33 +01:00
parent 127a2406d3
commit c1e1cd3b6a
2 changed files with 8 additions and 17 deletions
+6 -6
View File
@@ -12,13 +12,13 @@
<define name="USE_BARO_AS_ALTIMETER"/>
<raw>
ifeq ($(BOARD), navgo)
ap.CFLAGS += -DUSE_I2C1 -DUSE_ADS1114_1
ap.CFLAGS += -DADS1114_I2C_DEVICE=i2c1
ap.srcs += peripherals/ads1114.c
ap.CFLAGS += -DUSE_I2C1 -DUSE_ADS1114_1
ap.CFLAGS += -DADS1114_I2C_DEVICE=i2c1
ap.srcs += peripherals/ads1114.c
else ifeq ($(BOARD), umarim)
ap.CFLAGS += -DUSE_I2C1 -DUSE_ADS1114_1
ap.CFLAGS += -DADS1114_I2C_DEVICE=i2c1
ap.srcs += peripherals/ads1114.c
ap.CFLAGS += -DUSE_I2C1 -DUSE_ADS1114_1
ap.CFLAGS += -DADS1114_I2C_DEVICE=i2c1
ap.srcs += peripherals/ads1114.c
endif
</raw>
</makefile>
+2 -11
View File
@@ -75,19 +75,13 @@ float estimator_AOA;
}
// FIXME maybe vz = -climb for NED??
#define EstimatorSetSpeedCart(vx, vy, vz) { \
estimator_vx = vx; \
estimator_vy = vy; \
estimator_vz = vz; \
}
// estimator_hspeed_mod = sqrt( estimator_vx * estimator_vx + estimator_vy * estimator_vy);
// estimator_hspeed_dir = atan2(estimator_vy, estimator_vx);
//FIXME is this true ?? estimator_vx = estimator_hspeed_mod * cos(estimator_hspeed_dir);
//FIXME is this true ?? estimator_vy = estimator_hspeed_mod * sin(estimator_hspeed_dir);
void estimator_init( void ) {
EstimatorSetPosXY(0., 0.);
@@ -99,17 +93,14 @@ void estimator_init( void ) {
EstimatorSetRate(0., 0., 0.);
#if USE_AIRSPEED
EstimatorSetAirspeed( 0. );
#endif
#ifdef USE_AOA
EstimatorSetAOA( 0. );
#endif
estimator_flight_time = 0;
estimator_airspeed = NOMINAL_AIRSPEED;
// FIXME? Set initial airspeed to zero if USE_AIRSPEED ?
EstimatorSetAirspeed( NOMINAL_AIRSPEED );
}