Commit Graph

11502 Commits

Author SHA1 Message Date
Andrew Tridgell d17e3b17bf AP_AHRS: special handling for flying fixed wing with no compass
we need to accept EKF having no absolute position and velocity before
takeoff with no compass
2016-05-27 10:18:53 +10:00
Paul Riseborough de15928921 AP_NavEKF2: prevent potential arithmetic error in declination fusion 2016-05-27 09:00:41 +10:00
Paul Riseborough 722eb0d706 AP_NavEKF2: Fix bug for start of wind speed estimation
The commencement of airspeed fusion could cause pitch errors due to small variances and large innovations. This issue is addressed by the following changes:
1) The airspeed measurement is used to set wind states to a value that reduces initial innovations.
2) The wind state variances are set to values that better reflect the wind speed uncertainty
2016-05-27 09:00:41 +10:00
Paul Riseborough ac329ec31c AP_NavEKF2: use observation noise to set initial magnetic field variances 2016-05-27 09:00:41 +10:00
Paul Riseborough 830751c0ae AP_NavEKF2: remove un-wanted functionality from mag and yaw reset
The function used to reset magnetic field states and yaw angle should not be used when there is no magnetometer. If it is incorrectly called without a magnetometer it should not change the attitude or field states.
2016-05-27 09:00:41 +10:00
Paul Riseborough 11c6ea7ef6 AP_NavEKF2: attitude co-variance reset for all post alignment yaw resets
Whenever the yaw angle is changed, the correlation with other state errors will be incorrect and the terms should be zeroed.
2016-05-27 09:00:41 +10:00
Paul Riseborough cdd09df9ac AP_NavEKF: Add function to zero attitude state co-variances
When changing the vehicle yaw angle, the correlation between the attitude errors and errors in other states is invalid so the corresponding co-variance terms need to be zeroed.
This needs to be done in more than one place.
2016-05-27 09:00:41 +10:00
Paul Riseborough 6d34ac5ceb AP_NavEKF2: improve switch-over to use of mag field states
Set initial variances to measurement uncertainties
Always perform a field  and yaw reset
2016-05-27 09:00:40 +10:00
Paul Riseborough fe9ddfdfeb AP_NavEKF2: remove code that prevents attitude updates after mag reset
This code assumes a vehicle is close to level and will not work for all vehicle types. It will be replaced by a different method.
2016-05-27 09:00:40 +10:00
Paul Riseborough fe85c68344 AP_NavEKF2: move yaw reset for no compass case
Should not be in a function that performs reset on magnetic field states
2016-05-27 09:00:40 +10:00
Paul Riseborough da0622827d AP_NavEKF: update tuning defaults
Increase speed of scale factor learning
2016-05-27 09:00:40 +10:00
Andrew Tridgell 4c66e14563 SITL: fixed air resistance bug for heli, balloon and singlecopter 2016-05-26 20:38:20 +10:00
Randy Mackay d26a9d4a22 SITL: fix compiler warning by defaulting frame_type 2016-05-26 17:03:28 +09:00
Andrew Tridgell 969b6ebea9 HAL_SITL: support coaxcopter in SITL 2016-05-26 17:09:22 +10:00
Andrew Tridgell a2ed8fb313 AP_Motors: prevent negative thrust
this prevents a sqrt of a negative number
2016-05-26 17:09:11 +10:00
Andrew Tridgell 9f33ece3ef SITL: support coax copter 2016-05-26 17:08:27 +10:00
Andrew Tridgell 6855899cbf AP_Motors: fixed servo constructor for coax 2016-05-26 16:41:16 +10:00
Andrew Tridgell 4e5e301c4e AP_Motors: fixed servo constructor for heli 2016-05-26 16:41:06 +10:00
Andrew Tridgell a80e233836 HAL_SITL: added SingleCopter 2016-05-26 16:30:39 +10:00
Andrew Tridgell 8944d298ed SITL: added SingleCopter simulator 2016-05-26 16:30:39 +10:00
Andrew Tridgell f9fb098222 AP_Motors: fixed channel output for SingleCopter 2016-05-26 16:26:43 +10:00
Andrew Tridgell 163783fefd AP_HAL: define CH_NONE
for servos not connected to a channel
2016-05-26 16:26:30 +10:00
Andrew Tridgell 65eb9ceb32 AP_Motors: expose min/max pwm 2016-05-26 14:33:57 +10:00
Andrew Tridgell dda35a366c HAL_PX4: prevent rate changes once oneshot is setup
this fixes a problem with small motor outputs at the start of a motor
test.

Thanks to Luis for reporting this.
2016-05-26 12:18:49 +10:00
Andrew Tridgell a44b0e0011 AP_Motors: don't setup oneshot for a zero output mask 2016-05-26 12:18:49 +10:00
Andrew Tridgell d90a2f7deb DataFlash: added get_structures() API
used in Replay
2016-05-25 20:46:00 +10:00
Andrew Tridgell ac8c4d9beb AP_Mount: use zero length flexible arrays in unions 2016-05-25 19:55:49 +10:00
Andrew Tridgell af116d238f AP_GPS: use zero length flexible arrays
this works with gcc-6.1 and also works with asan. Hopefully it will
make coverity happy too.
2016-05-25 19:55:49 +10:00
Andrew Tridgell ae3cb0557d HAL_PX4: disable "Overtime in task" msg
this hasn't helped us find any bugs and it is very annoying with nsh
over MAVLink
2016-05-25 12:35:42 +10:00
Paul Riseborough 9eef97d108 AP_NavEKF2: use consistent parameter naming
M_NSE is a measurement noise
P_NSE is a observation noise
I_GATE is an innovation gate

This also ensures the new parameter values required to use the EKF2 will be enforced.
2016-05-25 12:06:04 +10:00
Fredrik Hedberg 75d5c87788 AP_Motors: Fix setpoint bug with 0~1 conversion in AP_MotorsHeli 2016-05-25 09:27:40 +09:00
Andrew Tridgell 1fd4cbffb2 DataFlash: update for changed AP_Airspeed API 2016-05-24 17:00:56 +10:00
Andrew Tridgell 4131b98f8c AP_Airspeed: use non-blocking airspeed calibration
this prevents the EKF from being upset by a time jump
2016-05-24 17:00:56 +10:00
Andrew Tridgell 1581a5e354 AP_Param: fixed forced save of constructor override parameters
this fixes the problem where setting ATC_RAT_YAW_FILT to 20 in copter
didn't stick across reboots
2016-05-24 16:55:45 +10:00
Grant Morphett 52755c893d Rover: Print message when running skid steering SITL 2016-05-24 12:24:53 +10:00
Randy Mackay 8d1f50e78f AP_Motors: rename get_pwm_min to get_pwm_output_min 2016-05-24 10:00:25 +09:00
Randy Mackay 0c225cf498 AP_MotorsMulticopter: fix typo in comments 2016-05-24 10:00:25 +09:00
Randy Mackay ff93524ba4 AP_Motors: rename MOT_THST_MAX to MOT_SPIN_MAX
Also renamed:
MOT_THST_BAT_MIN,MAX to MOT_BAT_VOLT_MIN,MAX
MOT_CURR_MAX to MOT_BAT_CURR_MAX
2016-05-24 10:00:25 +09:00
Randy Mackay f1cbdbe914 AP_Motors: update some comments 2016-05-24 10:00:25 +09:00
Randy Mackay 49b14b3cb6 AP_Motors: add PWM_MIN, MAX
These parameters allow the motor PWM output range to be different from receiver's throttle input range
Also renamed throttle_pass_through to set_throttle_passthrough_for_esc_calibration and change the method's input to the 0 to 1 range instead of direct PWM value
2016-05-24 10:00:25 +09:00
Lucas De Marchi bbe3a94175 AP_HAL: remove support for main without argc
This was only used by flymaple. Also add missing copyright notice to
header.
2016-05-23 21:49:45 -03:00
Lucas De Marchi b067bce140 AP_InertialSensor: remove support for flymaple 2016-05-23 21:49:45 -03:00
Lucas De Marchi 346bdf5f8f AP_HAL: remove support for flymaple 2016-05-23 21:49:45 -03:00
Lucas De Marchi 7703e5f1d1 AP_Common: remove support for flymaple 2016-05-23 21:49:45 -03:00
Lucas De Marchi e448f161d2 AP_BattMonitor: remove support for flymaple 2016-05-23 21:49:45 -03:00
Lucas De Marchi 62f048c417 AP_Airspeed: remove support for flymaple 2016-05-23 21:49:45 -03:00
Lucas De Marchi 7503c1b6d4 AP_InertialSensor: update doc about used ids 2016-05-23 21:49:45 -03:00
Lucas De Marchi 01b9316114 AP_HAL_AVR: remove examples
These were committed by mistake after AP_HAL_AVR was removed.
2016-05-23 21:49:45 -03:00
Lucas De Marchi dfde4a27e6 AP_HAL_FLYMAPLE: remove hal
This is untested and not being updated lately. We can support it on the
avr branch or add it back later when someone is willing to maintain it
in upstream.
2016-05-23 21:49:45 -03:00
Andrew Tridgell 64e105464d GCS_MAVLink: fixed disabling of signing remotely 2016-05-24 07:25:54 +10:00