Commit Graph

5935 Commits

Author SHA1 Message Date
Randy Mackay 29c704fecc AHRS: rename ekfNotStarted method to initialised
Also created default implementation in AP_AHRS class so AP_AHRS_DCM does
not need to implement it.
2014-10-02 15:02:52 +09:00
priseborough b51d01f979 AP_AHRS : add method to report if EKF is waiting to start 2014-10-02 15:02:50 +09:00
Andrew Tridgell 89755c2bb5 AP_NavEKF: make it clear that all sat counts are covered 2014-10-01 13:12:48 +09:00
Andrew Tridgell 468ebd811c AP_NavEKF: simplify variable handling in EKF
use named state variables instead of states[] array where possible.
2014-10-01 13:12:46 +09:00
Randy Mackay c338b1675f GPS: fix SIRF set-binary message
This fixes an issue in which the the update rate for the mediatek, which
uses a similar protocol, was not being set correctly
2014-10-01 11:43:24 +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
priseborough 9c1b4e2332 AP_NavEKF : Explicitly initialise gpsNoiseScaler to default value 2014-09-24 14:29:12 +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 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 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
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
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
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
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 7fc5d693c2 INS: add get_accel_health_all and get_gyro_health_all
Returns true only if all available accels or gyros are healthy
2014-09-03 11:38:42 +09:00
Randy Mackay 5ead80994e InertialSensor: reorder .cpp file to match .h
No functional changes
2014-09-03 11:38:40 +09:00
Emile Castelnuovo 0f2083a9b8 AP_HAL: added missing CONFIG_HAL_BOARD_SUBTYPE #define for HAL_BOARD_VRBRAIN 2014-09-01 10:48:14 +09:00
Emile Castelnuovo e995641e48 AP_HAL_VRBRAIN: enable 2nd GPS for VRBRAIN 5 2014-08-31 11:40:17 +09:00
Emile Castelnuovo ada7be6ae1 AP_HAL: VRBRAIN corrected EEPROM size and added terrain folder on MicroSD 2014-08-31 11:40:15 +09:00
Emile Castelnuovo 781f15ba59 AP_relay: added default relay pin for VRBRAIN 2014-08-31 11:40:11 +09:00
Emile Castelnuovo 5d7a2726e2 AP_HAL_VRBRAIN: added management for external relay 1 and 2 2014-08-31 11:40:09 +09:00
Randy Mackay ff94120fbd AC_WPNav: resolve twitch when passing spline waypoints
The target positions target velocity was being reset to zero as we
passed through a spline waypoint.
2014-08-28 17:03:14 +09:00
Randy Mackay 5759a69992 Mission: start next nav cmd immediately after prev completes 2014-08-28 17:03:11 +09:00
Andrew Tridgell 62d526a50d AP_AHRS: use EKF use_compass() if EKF enabled
this allows magfailed status to show on console via SYS_STATUS health
bits
2014-08-26 11:23:10 +09:00
Andrew Tridgell 6a654ff461 AP_NavEKF: make use_compass() public 2014-08-26 11:23:07 +09:00
Randy Mackay ec2308bcd2 AC_AttControl: bug fix for ef target during acro 2014-08-23 22:22:03 +09:00
Randy Mackay d7d90b4ff8 AC_AttControl: remove debug message 2014-08-22 22:59:53 +09:00
Randy Mackay 06e06438b3 AC_AttControlHeli: integrate div-by-zero check for bf-to-ef conversion 2014-08-22 22:59:47 +09:00
Randy Mackay 91817b0884 AC_AttControl: div-by-zero check for bf-to-ef conversion 2014-08-22 22:59:43 +09:00
Randy Mackay 440f4ebb95 AC_AttControlHeli: add passthrough_bf_roll_pitch_rate_yaw 2014-08-22 21:37:19 +09:00
Robert Lefebvre 9326d36e54 AC_AttitudeControl_Heli: Add use_flybar_passthrough accessor function. 2014-08-22 21:37:08 +09:00
Robert Lefebvre 244d38138e AC_AttitudeControl_Heli: Add passthrough_to_motor_roll_pitch function. 2014-08-22 21:37:06 +09:00
Robert Lefebvre deaffecbf5 AC_AttitudeControl_Heli: Create Flybar Passthrough flag which will be used for control pass-through. 2014-08-22 21:36:57 +09:00
Andrew Tridgell 308c90f138 HAL_VRBrain: prevent read past end of buffer 2014-08-19 11:12:33 +09:00
Andrew Tridgell 54af047b87 HAL_PX4: prevent read past end of buffer 2014-08-19 11:12:30 +09:00
Andrew Tridgell 57956dbda2 AP_GPS: moved UBX log headers to DataFlash
headers were not always being written
2014-08-19 11:09:32 +09:00
Andrew Tridgell c395a6657a DataFlash: moved UBX logging headers to DataFlash 2014-08-19 11:09:28 +09:00
NullVoxPopuli 86abf82cc7 Copter: Added support for V-Shaped and A-Shaped VTail Quadcopter frames
Signed-off-by: NullVoxPopuli <LPSego3+dev@gmail.com>
2014-08-18 14:31:54 +09:00
Randy Mackay d6890ce878 Notify: remove ToshibaLED support from APM
This saves about 1k of precious flash
2014-08-16 10:30:30 +09:00
Andrew Tridgell b38c9544f9 AP_RangeFinder: make values clearer for APM2 2014-08-15 20:28:22 +10:00
Randy Mackay 0c4ee422a4 Rally: fix comment to clarify altitudes are absolute 2014-08-14 21:10:21 +09:00