mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-05-30 11:37:06 +08:00
little bit cleanup in estimator, no functional changes
This commit is contained in:
+2
-11
@@ -75,19 +75,13 @@ float estimator_AOA;
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// FIXME maybe vz = -climb for NED??
|
|
||||||
#define EstimatorSetSpeedCart(vx, vy, vz) { \
|
#define EstimatorSetSpeedCart(vx, vy, vz) { \
|
||||||
estimator_vx = vx; \
|
estimator_vx = vx; \
|
||||||
estimator_vy = vy; \
|
estimator_vy = vy; \
|
||||||
estimator_vz = vz; \
|
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 ) {
|
void estimator_init( void ) {
|
||||||
|
|
||||||
EstimatorSetPosXY(0., 0.);
|
EstimatorSetPosXY(0., 0.);
|
||||||
@@ -99,17 +93,14 @@ void estimator_init( void ) {
|
|||||||
|
|
||||||
EstimatorSetRate(0., 0., 0.);
|
EstimatorSetRate(0., 0., 0.);
|
||||||
|
|
||||||
#if USE_AIRSPEED
|
|
||||||
EstimatorSetAirspeed( 0. );
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef USE_AOA
|
#ifdef USE_AOA
|
||||||
EstimatorSetAOA( 0. );
|
EstimatorSetAOA( 0. );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
estimator_flight_time = 0;
|
estimator_flight_time = 0;
|
||||||
|
|
||||||
estimator_airspeed = NOMINAL_AIRSPEED;
|
// FIXME? Set initial airspeed to zero if USE_AIRSPEED ?
|
||||||
|
EstimatorSetAirspeed( NOMINAL_AIRSPEED );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user