Commit Graph

76 Commits

Author SHA1 Message Date
murata a6feb97668 Copter: Match type to set value 2023-02-10 15:38:10 +09:00
Peter Barker c0b0ae44d5 Copter: don't use uninitialised stack data when determining ekf_over_threshold 2023-02-09 09:28:46 +09:00
Randy Mackay dd0d1d6b3c Copter: minor comment fixes to ekf failsafe
the bad variances can be from the compass, velocity or position estimate
2022-05-31 07:50:16 +09:00
Randy Mackay 0f73d705a7 Copter: add failsafe_ekf_recheck
this allows modes to retrigger the EKF failsafe if they move from a sub mode that did not require GPS to one that does
2022-05-31 07:50:16 +09:00
Randy Mackay 1ac8661899 Copter: vibration compensation turns off in manual modes 2022-05-09 08:40:28 +09:00
Peter Barker 285d752143 ArduCopter: create and use AP_OPTICALFLOW_ENABLED
Including a define for each backend.
2021-12-29 18:12:03 +11:00
Randy Mackay 5dea87ae41 Copter: remove ekf check debug logging 2021-08-03 17:05:09 +09:00
Paul Riseborough cd0eb379fd Revert "Copter: failsafe if bad vibration"
This reverts commit fce517fef45d1de95b6cb8d5f79ddd6c374f8482.
2021-07-22 18:20:45 +10:00
Paul Riseborough 5dcd4834f3 Copter: failsafe if bad vibration 2021-07-22 18:20:45 +10:00
Paul Riseborough 9654697415 Copter: rework ekf_check to use the EKF vibration_affected status 2021-07-22 18:20:45 +10:00
Peter Barker f0e660db51 ArduCopter: remove ability to use DCM as AHRS 2021-07-21 21:01:39 +10:00
Tatsuya Yamaguchi 0cce5699b2 Copter: change from control_mode to flightmode 2021-03-23 22:48:20 +11:00
Tatsuya Yamaguchi 941c5f8179 Copter: add EKF failsafe notify tones 2021-03-17 20:29:32 +09:00
Randy Mackay 49486b7cea Copter: ekf failsafe may trigger while disarmed but takes no action 2021-03-16 13:02:46 +09:00
Randy Mackay 5babe93201 Copter: ekf failsafe only triggers if it has ever passed 2021-03-16 13:02:46 +09:00
Paul Riseborough 379506b718 ArduCopter: Don't request EKF yaw reset unless innovations are large
This prevents unwanted resets if GPS fails.
2020-10-30 14:45:40 +09:00
Randy Mackay 248d80eb37 Copter: integrate ahrs::get_variances change
offset is no longer returned
2020-10-21 08:58:45 +09:00
Randy Mackay 77ff169757 Copter: minor comment fix 2020-04-24 18:18:05 +09:00
Randy Mackay 6c48a9c305 Copter: use AHRS::get_primary_core_index instead of EKF2 equivalent 2020-04-24 18:18:05 +09:00
Randy Mackay ddaa5dee86 Copter: use static assert to simplify use of EKF_CHECK_ITERATIONS_MAX 2020-04-24 09:43:23 +10:00
Paul Riseborough 8ce97af40e ArduCopter: Preserve original check criteria 2020-04-24 09:43:23 +10:00
Paul Riseborough 36031c01a9 ArduCopter: rework ekf check to use separate yaw reset request
ArduCopter: Request lane or yaw reset switch sooner

ArduCopter: rework ekf check to use separate yaw reset request

ArduCopter: Rework EKF failsafe

During flight operations it is the deviation in position of the vehicle that matters during most scenarios.
t patch ensures that an EKF fail-safe will be triggered when the position inconsistency exceeds check limits in addition to either a bad mag or velocity innovation.
This will stop velocity noise triggering an early fail-safe when electromagnetic interference is present.
2020-04-24 09:43:23 +10:00
Andrew Tridgell 1222aa2c43 Copter: make EKF mag variance check use max
this makes it consistent with logged value
2020-04-06 17:30:29 +10:00
Randy Mackay b2a298fa5f Copter: update vibration failsafe comments 2020-03-02 15:12:57 +09:00
Peter Barker e3dd0d33e7 Copter: allow NavEKFs to be compiled out 2020-01-21 11:53:18 +11:00
Peter Barker 45dc4cf25c Copter: EKF objects have moved into AP_AHRS_NavEKF 2020-01-21 11:53:18 +11:00
Peter Barker d652bd4455 Copter: correct compilation when optical flow is disabled 2019-11-06 16:36:35 +11:00
Peter Barker e6c6189fe5 Copter: cope with change in namespace of LogEvent enum
Also move Acro Trainer types into an enum class as the global defines
interfere with the Event names.

Also eliminate the Log_Write_Event wrappers.
2019-11-05 08:19:26 +08:00
Michael du Breuil b42b1c08c4 Copter: Support new AP_Vehicle::set_mode 2019-10-25 08:48:22 +08:00
Peter Barker 198c93e479 Copter: correct use of nanf 2019-10-18 13:52:07 +09:00
Randy Mackay 7b0da89708 Copter: add vibration check 2019-10-18 11:15:25 +09:00
chobits 5a0fe4e322 Copter: do not speed up EKF failsafe if optflow works 2019-10-04 11:15:38 +09:00
Peter Barker b4537bebd8 Copter: move control_mode_t into being Mode::Number enum class
Fixes this compiler error:

In file included from ../../ArduCopter/sensors.cpp:1:
In file included from ../../ArduCopter/Copter.h:195:
../../ArduCopter/mode.h:1291:9: fatal error: declaration shadows a variable in the global namespace [-Wshadow]
        AUTO,           // after A and B defined, pilot toggle the switch from one side to the other, vehicle flies autonomously
        ^
../../ArduCopter/defines.h:38:5: note: previous declaration is here
    AUTO =          3,  // fully automatic waypoint control using mission commands
    ^
1 error generated.
2019-09-13 13:12:08 +09:00
Andrew Tridgell 7c44ad04b6 Copter: check for EKF lane switch to avoid EKF failsafe
this fixes an issue with mismatch between the EKF lane switch
threshold and the copter EKF failsafe threshold
2019-06-12 09:52:20 +10:00
Tom Pittenger 7824b64ad6 Copter: rename dataflash to logger 2019-03-28 16:40:57 +11:00
Peter Barker c7e21d95ef Copter: move Log_Write_Error into library 2019-03-27 12:36:40 +11:00
Patrick José Pereira 33764d6c3b Copter: Fix typo
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
2019-03-26 15:39:23 +11:00
Randy Mackay 467e8481fb Copter: minor formatting fix to ekf failsafe check 2019-03-15 15:44:01 +09:00
chobits 6bee4216c0 Copter: speed up EKF failsafe by checking if velocity innovations > 2x FS_EKF_THRESH 2019-03-15 15:36:13 +09:00
Peter Barker 70d159cb38 Copter: raise EKF failure even if USB is connected
This will let EKF go bad if your PixHawk is connected to your laptop.
This doesn't seem to be a problem for the other vehicles.

This also allows the EKF to go bad in-flight if you happen to have
connected (against AP's recommendations) your companion computer to your
flight controller via USB.  Since people do this, it is better to have
the checks than not.
2018-06-26 10:07:55 +10:00
Randy Mackay 6f138ddcfa Copter: ekf failsafe first enforces landing with no GPS
thanks to khancyr for spotting this
2018-05-10 08:59:37 +09:00
Leonard Hall 656892cd88 Copter: ekf failsafe disabled for acro and stabilize
Also restructure to combine ekf_over_threshold and ekf_check_position_problem
2018-05-10 08:59:37 +09:00
Leonard Hall a727305a59 Copter: integrate attitude control EKF inertial-frame-reset 2018-03-16 13:50:57 +09:00
murata c13d6580ae Copter: delete \n from the log using gcs().send_text 2018-02-02 09:38:39 +09:00
Randy Mackay 2d23e1f7c7 Copter: rename flightmode_ objects to mode_ 2017-12-12 10:39:26 +09:00
Peter Barker ef1489e87a Copter: eliminate mode_requires_gps 2017-12-06 08:24:24 +09:00
Peter Barker 3b1ca99b95 Copter: FlightMode - convert LAND flight mode 2017-12-06 08:24:24 +09:00
Peter Barker 45d056fcf0 Copter: ekf position checks are done before we call failsafe_ekf_event 2017-09-19 12:44:43 +01:00
Peter Barker d5caff3f1b Copter: do not enter ekf-failsafe based on position if pos not needed 2017-09-19 12:44:43 +01:00
Peter Barker ff82f23cf6 Copter: factor out a ekf_check_position_problem method 2017-09-19 12:44:43 +01:00