48 Commits

Author SHA1 Message Date
Paul Riseborough
8421ad3dfd commander: Changes following code review 2017-05-03 08:37:14 +02:00
priseborough
8ea0b2d3c5 commander: rework posvel validity checks
Move into functions.
Reset probation time and recalculate checks if a mode change is demanded to give the operator ability to regain control as soon as possible after nav performance is regained. (+11 squashed commits)
Squashed commits:
[a4bb800] commander: enable pilot to quickly recover from loss of position accuracy
[19e16a0] commander: rework postal probation time
[f96284e] commander: rework bad pos and vel test probation time
[00d5f0c] commander: Allow EKF preflight checks to pass with moving vehicle

Separates the 'is using GPS' and the GPS quality checks.
Uses a reasonable subset of the GPS quality checks which allows checks to pass if the vehicle is moving.
[4cdfb5c] commander: remove unused variable
[349385a] commander: add EKF GPS quality checks to pre-arm checking

Only perform check if GPs checking is activated by parameter setting.
Display fault messages that makes it clear if EKF quality checks are failing or the EKF is not using GPS for another reason. We do not want to confuse this with GPS lock.
[340ae29] commander: make position invalid fail-safe more sticky

Require check to pass for 7 seconds before exiting failsafe. This is required because if GPs is failing innovation tests for a prolonged period, the EKF will periodically reset to the GPS and report good accuracy at the time of reset.
Adding this delay gives time for an underlying error condition (eg bad IMU or compass) to be re-detected.
[b04ac95] commander: Increase RAM allocation to eliminate low stack warnings
[9dca12f] commander: add missing position invalid fail-safe responses
[69f264d] commander: Update position invalid fail-safe responses

Replace separate logic for each case with a generic function
Add velocity checks.
[8e8cef1] commander: rework position validity checks

Consolidate existing checks for global and local position validity and add checking of velocity accuracy.
Enable checks to be bypassed using the CBRK_VELPOSERR parameter.
2017-05-03 08:37:14 +02:00
Nate Weibley
9038be2d83 Fix EKF velocity innovation limit preflight check 2017-04-15 01:21:10 +02:00
Beat Küng
04303dcf72 PreflightCheck: use orb_unsubscribe instead of px4_close 2017-04-06 11:48:35 +02:00
Lorenz Meier
a13082bfed commander: Widen pre-flight check for airspeed 2017-01-16 08:26:37 -08:00
Lorenz Meier
fff35fe34b Commander: Improve preflight check experience
* Loosen thresholds for gyro consistency check until temperature compensated units are the norm
  * Cut down string lengths so they make it through the MAVLink transport as a whole
2016-12-26 14:04:30 +01:00
Paul Riseborough
1fbc688757 Commander: Fix pre-flight EKF check errors 2016-12-09 17:58:23 +01:00
Andreas Antener
b531e65f6a Airspeed check: updated message and explained test parameters 2016-12-02 22:56:48 +01:00
Andreas Antener
f772fc2d02 Airspeed: preflight check for bad offset, fixed calls to preflight checks (vtol & airspeed) 2016-12-02 22:56:48 +01:00
Paul Riseborough
983cfb8fdd commander: Add preflight checking for EKF health and IMU sensor consistency 2016-11-19 15:12:08 +01:00
Michael Schaeuble
062df05865 Add __PX4_POSIX_BEBOP define to PreflightCheck.cpp 2016-10-18 20:48:17 +02:00
Beat Küng
ce0d31b7d9 mavlink log: ensure all critical & emergency msgs are also logged to console & ulog
Critical messages that the user sees should also go to the log file, so
that the exact error (with time) can later be analyzed from the log file.
2016-09-30 13:50:51 +02:00
Beat Küng
c606554da3 PreflightCheck.cpp: use __PX4_POSIX_RPI instead of __LINUX for RPI 2016-09-30 13:50:51 +02:00
Sander Smeets
c4eabbd083 VTOL transition switch parameter checking (#5545)
* VTOL transition switch parameter checking

* Code style
2016-09-26 10:18:23 +02:00
Hidenori
76ee17e532 RC input and PWM output for Navio2 2016-07-01 23:08:17 +02:00
Beat Küng
89f5bd27e8 vehicle_gps_position: use timestamp field instead of timestamp_position
timestamp was unused. This allows to remove timestamp_position.
2016-06-24 00:22:01 +02:00
Julian Oes
a88c3c2dbe commander: printf fine tuning 2016-06-07 22:10:56 +02:00
Julian Oes
9a5aa4f112 commander: pass PreflightCheck on Snapdragon
The tests don't work properly on Snapdragon yet, so just report happy
for now. Otherwise users get messages such as "No Gyro found" which is
wrong.
2016-03-30 10:00:22 +02:00
Julian Oes
bba0d0384d drivers/modules: changes after mavlink_log change
The mavlink_log API changes lead to changes in all drivers/modules using
it.
2016-03-24 13:10:02 +01:00
Mark Charlebois
9f3bf8e9f4 Rebase changes on upstream master
This brings in many of the changes from the PX4 fork on ATLFLight.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2016-02-19 16:59:41 +01:00
Lorenz Meier
345246953b Airspeed pre-flight check: do not arm if sensor data is stuck or bus errors are high 2016-02-18 18:48:50 +01:00
Lorenz Meier
069471a62c Commander: Indicate error number on failure 2016-01-31 14:53:54 +01:00
Lorenz Meier
75e962ee7c Merged master into driver_framework 2015-11-20 09:14:37 +01:00
Lorenz Meier
7a5391a723 Commander: Fix preflight check reporting and simplify logic 2015-11-19 18:28:16 +01:00
Mark Charlebois
52957ab0cc Don't add DriverFramework dir for NuttX
I am unable to get the nuttx build dependencies set up so that
it builds the export dir before it builds df_driver_framework.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-11-18 20:14:48 -08:00
Mark Charlebois
b8c40ecb6b Enabled DriverFramework drivers for SITL build
The code here works only for SITL at the present time.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-11-18 11:58:21 -08:00
Lorenz Meier
e070f671ae Preflight: better reporting 2015-11-17 12:24:51 +01:00
Lorenz Meier
ff88fc00c0 Commander: Preflight check reporting cleanup, add USB breaker 2015-11-14 15:02:56 +01:00
Kabir Mohammed
5fcfdb759c commander : hotplug sensor support, better failure reporting 2015-11-11 15:53:44 +05:30
Lorenz Meier
336ca86117 Commander: Ensure primary sensor is present if configured 2015-10-14 20:02:02 +02:00
Lorenz Meier
53ff04e016 Commander: Finish preflight update for prime sensor IDs 2015-10-14 19:35:12 +02:00
Lorenz Meier
e5bb1cff91 Store primary sensor ID to allow cross-check of calibration on next boot 2015-10-14 19:35:12 +02:00
Lorenz Meier
a7c6a343c6 Commander: Do not enforce sensor order, only enforce that all present sensors need to be calibrated. 2015-10-14 19:35:12 +02:00
Lorenz Meier
b0a0e60c5f POSIX: Workaround for broken px4_read interface to accel 2015-07-01 19:54:17 -07:00
Mark Charlebois
28dd9759a6 POSIX: fixes for use of open vs px4_open, etc
Fixes for the posix build when virtual devices are used.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-07-01 23:51:12 +02:00
Lorenz Meier
d906fb8f31 Merged master into linux 2015-05-19 21:00:02 +02:00
Johan Jansen
cd67609da5 PreflightCheck: Reduce GPS timeout to 2 sec 2015-05-18 12:49:53 +02:00
Johan Jansen
38004cdd95 PreflightCheck: Increase GPS timeout to 4 sec 2015-05-18 12:31:16 +02:00
Johan Jansen
52222de021 Commander: Wait up to 1 second to allow GPS module to be detected 2015-05-14 20:59:23 +02:00
Johan Jansen
45f1fd6634 Commander: Add preflight check for missing GPS module 2015-05-14 19:19:30 +02:00
Mark Charlebois
190814bc97 Merge remote-tracking branch 'upstream/master' into linux
Signed-off-by: Mark Charlebois <charlebm@gmail.com>

Conflicts:
	src/drivers/rgbled/rgbled.cpp
	src/modules/commander/PreflightCheck.cpp
	src/modules/commander/airspeed_calibration.cpp
	src/modules/commander/calibration_routines.cpp
	src/modules/commander/gyro_calibration.cpp
	src/modules/commander/mag_calibration.cpp
	src/modules/mc_att_control/mc_att_control_main.cpp
2015-04-28 11:48:26 -07:00
Simon Wilks
868b9b33ed Make sure we log the airspeed check to the console as well. 2015-04-27 13:30:37 +02:00
Lorenz Meier
75df06bc76 commander: Better text feedback in preflight-check 2015-04-25 09:43:54 +02:00
Mark Charlebois
20d35e33da Platform header file cleanup and consolidation
Removed obsolete porting cruft from px4_XXX.h files and merged the
POSIX changes in PreflightCheck_posix.cpp back to PreflightCheck.cpp

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-24 11:45:14 -07:00
Mark Charlebois
455b0dcaff Fixed parenthesis bug
Clang found the following:
       if (fabsf(airspeed.indicated_airspeed_m_s > 6.0f))

which is doing fsbsf( bool )

Fixed to be:
       if (fabsf(airspeed.indicated_airspeed_m_s) > 6.0f)

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 12:04:46 -07:00
Lorenz Meier
554719c78f Harmonize preflight and prearm checks, run same code except for dynamic range check only on arming 2015-04-20 09:14:13 +02:00
Lorenz Meier
7dbb6c4fa8 Commander: Improved preflight check routines. Running checks on all connected sensors. Re-run checks once GCS is connected. 2015-04-20 09:14:13 +02:00
Johan Jansen
fde244f903 Commander: Add PreflightCheck to the commander 2015-04-20 09:14:12 +02:00