Commit Graph

13243 Commits

Author SHA1 Message Date
Randy Mackay da2a463f18 Copter: shift pos targets to current location before takeoff 2014-09-29 15:28:16 +09:00
Randy Mackay 2d7f819e1d AC_WPNav: add shift_wp_origin_to_current_pos for takeoff
This shifts the origin to the vehicle's current position and should be
called just before take-off to ensure there are no sudden roll or pitch
moves on takeoff.
2014-09-29 15:28:14 +09:00
priseborough a6cd04ca4c AP_NavEKF : Fix bug in GPS innovation variance growth calculation
The uncertainty in acceleration is currently only scaled using horizontal accelerations, however during vertical plane aerobatics and high g pullups, misalignment in angles can cause significant horizontal acceleration error.
The scaling now uses the 3D acceleration vector length to better work during vertical plane high g maneouvres.
This error was found during flight testing with 8g pullups
2014-09-27 10:34:54 +09:00
priseborough 1f1670279b AP_NavEKF : Fix bug in reset of position, height and velocity states
If the inertial solution velocity or position needs to be reset to the GPS or baro, the stored state history for the corresponding states should also be reset.
Otherwise the next GPS or baro measurement will be compared to an invalid previous state and will be rejected. This is particularly a problem if IMU saturation or timeout has occurred because the previous states could be out by a large amount
The position state should be reset to a GPS position corrected for velocity and measurement latency. This will make a noticeable difference for high speed flight vehicles, eg 11m at 50m/s.
2014-09-27 10:34:51 +09:00
Randy Mackay 20d35b4bd1 Copter: bugfix to condition-yaw for relative angles
Thanks to roque-canales for raising the issue and paradisephil for finding
the specific piece of code that went wrong and suggesting the fix.
2014-09-26 12:26:05 +09:00
Randy Mackay eb89b53714 Copter: version to AC3.2-rc10 2014-09-24 14:29:15 +09:00
Randy Mackay 56242176da Copter: update AC3.2-rc10 release notes 2014-09-24 14:29:14 +09:00
priseborough 9c1b4e2332 AP_NavEKF : Explicitly initialise gpsNoiseScaler to default value 2014-09-24 14:29:12 +09:00
Randy Mackay a0cb4301a1 Copter: allow passthru for ch 9 ~ 14
Based on work by Emile Castelnuovo
2014-09-24 10:28:41 +09:00
priseborough 3233416e43 AP_NavEKF : Reduce weighting on GPS when not enough satellites
GPS measurement variance is doubled if only 5 satellites, and quadrupled if 4 or less.
The GPS glitch rejection thresholds remain the same
This will reduce the impact of GPS glitches on attitude.
2014-09-23 20:39:50 +09:00
priseborough 62339c217c AP_AHRS : Prevent EKF starting if GPS sats less than AHRS_GPS_MINSATS 2014-09-23 20:39:48 +09:00
Randy Mackay 9c3379ff48 Compass: always default devid to zero 2014-09-23 20:36:54 +09:00
Randy Mackay d66ffd5b07 Copter: use disparity threshold define for pre-arm checks
There are two duplicate checks, one in the pre-arm checks (i.e. checks
run every 15 seconds or so before the vehicle is armed) and one in the
arming checks (run immediately before arming).  The definition in the
pre-arm checks was still using the old hardcoded value.
2014-09-23 19:33:53 +09:00
Randy Mackay 5e197407b9 AC_PosControl: 4hz filter on z-axis velocity error 2014-09-22 13:41:02 +09:00
Randy Mackay e047093013 AC_PosControl: 2hz filter on accel error
Replaced hard-coded filter with LowPassFilter class allowing the
filter's to be 2hz on both APM and Pixhawk
2014-09-22 13:40:59 +09:00
Randy Mackay 9693ee0417 LowPassFilter: add div by zero check 2014-09-22 13:40:57 +09:00
Randy Mackay 1cf7f7eaa9 Copter: increase Alt Disparity check to 2m 2014-09-20 12:27:40 +09:00
Randy Mackay 93dbfd009e Copter: rename land_maybe_complete function 2014-09-19 22:41:41 +09:00
Randy Mackay 5f909f1a73 Copter: add land_complete_maybe flag 2014-09-19 22:41:38 +09:00
Randy Mackay 7f9709300c Copter: soften loiter target when maybe landed
Applies to auto's land, land, loiter, pos hold and rtl flight modes
2014-09-19 22:41:35 +09:00
Randy Mackay ab4b545bb5 AC_WPNav: add loiter_soften_for_landing method
This resets the position target to the current location.
2014-09-19 22:41:30 +09:00
Randy Mackay a1ea43461a Copter: typo fix for baro vs inav alt disparity definition 2014-09-19 22:41:28 +09:00
Randy Mackay b8c74b7363 Copter: define limit for baro vs inav alt disparity 2014-09-19 22:41:25 +09:00
Andre Kjellstrup be2f308802 Copter: reset battery_fs after dis/rearming 2014-09-19 22:41:20 +09:00
priseborough bf1ccba742 AP_NavEKF : Reduce sensitivity on filter divergence check
Flying aerobatics with Trad Heli has shown that the divergence check can be false triggered when large magnetometer errors and GPS dropouts are present.
This can also happen with multi rotors if large yaw rates are present.
This was an unintended consequence of the ekfsmoothing patch which improved filter stability during high rate manoeuvres, but made the divergence test more sensitive.
2014-09-16 10:37:00 +09:00
Jonathan Challinger 3993927cb7 Copter: Log NTUN while in LAND mode with GPS 2014-09-16 10:35:43 +09:00
Randy Mackay b212c02057 Copter: version to AC3.2-Iris
Interim release 3DRobotics's use with IRIS+ frames
2014-09-12 15:06:57 +09:00
Randy Mackay 0a3ec84e86 Copter: THR_ACCEL_IMAX default to 800 2014-09-12 15:04:29 +09:00
Randy Mackay 5fd39ce436 Copter: reduce throttle to min once landed in RTL
This catches the case where the vehicle lands but the user doesn't
immediately put the throttle to zero.  Before this check it would
continue to attempt to hold it's
2014-09-12 14:55:36 +09:00
Randy Mackay 64cc4986bd Copter: THR_ACCEL_IMAX param range increased 2014-09-12 14:55:33 +09:00
Randy Mackay 75a1e46d82 Copter: version to AC3.2-rc9 2014-09-11 20:28:43 +09:00
Randy Mackay a7233c48be Copter: AC3.2-rc9 release notes 2014-09-11 20:28:35 +09:00
Andrew Tridgell 939df78a2f HAL_VRBRAIN: fixed storage bug in VRBRAIN too 2014-09-11 20:22:12 +09:00
Andrew Tridgell d24159204e HAL_PX4: fixed dirty_mask calculation in FRAM storage
this could lead to a number of bytes on 512 byte boundaries not being
written when changed in ram, so they would revert on next boot
2014-09-11 20:21:02 +09:00
Randy Mackay 12f3e96cc1 Copter: version to AC3.2-rc8 2014-09-11 16:36:43 +09:00
Randy Mackay 1ed11c7c37 Copter: AC3.2-rc8 release notes 2014-09-11 16:35:29 +09:00
priseborough 058fb8f3ee AP_NavEKF : Reduce ripple in estimates that can cause copter motor 'pulsing'
This patch reduces the level of 5Hz and 10Hz 'pulsing' heard in motors due to GPS and altimeter fusion which cause a small 5Hz and 10Hz ripple on the output under some conditions. Attitude, velocity and position state corrections from GPS, altimeter and magnetometer measurements are applied incrementally in the interval from receiving the measurement to the predicted time of receipt of the next measurement. Averaging of attitude state corrections is not performed during periods of rapid rotation.
2014-09-11 16:35:27 +09:00
priseborough 01536e0c80 AP_NavEKF : Clean up time stamps
Time stamps are now explicitly initialised to the current IMU time to avoid unwanted activation of timeout logic on filter start and various calls to the hal.scheduler->millis() object have been consolidated.
2014-09-11 16:35:25 +09:00
Randy Mackay cac10a3041 Copter: never send unhealthy terrain status
Copter does not yet rely on the terrain data (it's for informational
purposes only) so we will temporarily disable the failure flags to the
GCS to avoid support calls
2014-09-09 22:20:33 +09:00
Randy Mackay e706c24542 Copter: send extended status to GCS only after initialisation 2014-09-09 22:20:31 +09:00
Andrew Tridgell c8e652432d DataFlash: allow use of a smaller writebuf for PX4v1
this fixes logging on PX4v1
2014-09-09 16:45:13 +09:00
Randy Mackay 0aab3a024e TradHeli: update AttControl params to match multicopters 2014-09-09 16:45:12 +09:00
Randy Mackay 4b47a618a4 Copter: reduce alt hold defaults
Throttle Rate P to 5.0 (was 6.0)
Throttle Accel P to 0.5 (was 0.75)
Throttle Accel I to 1.0 (was 1.5)
2014-09-09 16:45:11 +09:00
Randy Mackay 62a4e66481 Copter: increase EKF_CHECK_THRESH default to 0.8
Also remove unused #define related to inertial nav check (now removed)
2014-09-09 15:18:15 +09:00
Randy Mackay faf124771a Copter: version to AC3.2-rc7 2014-09-04 15:44:10 +09:00
Randy Mackay fe07df5562 Cotper: AC3.2-rc7 release notes 2014-09-04 15:43:36 +09:00
Randy Mackay cdc4038f27 Copter: pre-arm consistency check of gyros 2014-09-04 15:23:56 +09:00
Randy Mackay dbb0283dba Copter: land check gets overall throttle and rotation rate check
add check that overall throttle level is below the non-takeoff throttle
instead of just checking that it's motors have hit their lower limits
because low limits can also be caused by high yaw rotation requests.
Absolute climb rate requirement reduced to 30cm/s
2014-09-04 15:23:53 +09:00
Randy Mackay b214b8ba15 Copter: add short delay to arming to allow RC input
The short delay gives time for the RC inputs to be processed which
removes the chance of a false-positive on the "late frame" radio check.
A false positive could lead to an immediate disarm right after arming.
2014-09-04 15:23:51 +09:00
Randy Mackay 8e7b93d1b7 Copter: pre-arm consistency check of accels 2014-09-03 13:52:58 +09:00