mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-05-23 04:45:37 +08:00
XSens backwards option...
This commit is contained in:
@@ -286,8 +286,13 @@ void handle_ins_msg( void) {
|
||||
|
||||
|
||||
// Send to Estimator (Control)
|
||||
#ifdef XSENS_BACKWARDS
|
||||
EstimatorSetAtt((-ins_phi+ins_roll_neutral), (ins_psi + RadOfDeg(180)), (-ins_theta+ins_pitch_neutral));
|
||||
EstimatorSetRate(-ins_p,-ins_q);
|
||||
#else
|
||||
EstimatorSetAtt(ins_phi+ins_roll_neutral, ins_psi, ins_theta+ins_pitch_neutral);
|
||||
EstimatorSetRate(ins_p,ins_q);
|
||||
#endif
|
||||
|
||||
// Position
|
||||
float gps_east = gps.utm_pos.east / 100.;
|
||||
@@ -311,7 +316,6 @@ void handle_ins_msg( void) {
|
||||
float fcourse = atan2f((float)ins_vy, (float)ins_vx);
|
||||
EstimatorSetSpeedPol(fspeed, fcourse, fclimb);
|
||||
|
||||
|
||||
// Now also finish filling the gps struct for telemetry purposes
|
||||
gps.gspeed = fspeed * 100.;
|
||||
gps.speed_3d = (uint16_t)(sqrt(ins_vx*ins_vx + ins_vy*ins_vy + ins_vz*ins_vz) * 100);
|
||||
|
||||
Reference in New Issue
Block a user