mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-05-26 16:30:07 +08:00
Setteable MIN_COUSE_SPEED in ahrs_float_dcm (#2794)
Co-authored-by: jesusBV20 <jesbauti@ucm.es> Co-authored-by: Hector Garcia de Marina <hgdemarina@gmail.com>
This commit is contained in:
committed by
GitHub
parent
ce706bcd04
commit
360b6a82f9
@@ -181,7 +181,7 @@ void ahrs_dcm_update_gps(struct GpsState *gps_s UNUSED)
|
||||
ahrs_dcm.gps_age = 0;
|
||||
ahrs_dcm.gps_speed = gps_s->speed_3d / 100.;
|
||||
|
||||
if (gps_s->gspeed >= 500) { //got a 3d fix and ground speed is more than 5.0 m/s //FIXME: Should be settable
|
||||
if (gps_s->gspeed >= 100*AHRS_FLOAT_MIN_SPEED_GPS_COURSE) { // AHRS_FLOAT_MIN_SPEED_GPS_COURSE m/s
|
||||
ahrs_dcm.gps_course = ((float)gps_s->course) / 1.e7;
|
||||
ahrs_dcm.gps_course_valid = true;
|
||||
} else {
|
||||
|
||||
@@ -72,6 +72,9 @@ extern struct AhrsFloatDCM ahrs_dcm;
|
||||
// Mode 1 = DCM integration with Kp and Ki
|
||||
// Mode 2 = direct accelerometer -> euler
|
||||
|
||||
#ifndef AHRS_FLOAT_MIN_SPEED_GPS_COURSE
|
||||
#define AHRS_FLOAT_MIN_SPEED_GPS_COURSE 5 // m/s
|
||||
#endif
|
||||
|
||||
#define PERFORMANCE_REPORTING 1
|
||||
#if PERFORMANCE_REPORTING == 1
|
||||
|
||||
Reference in New Issue
Block a user