Commit Graph

6094 Commits

Author SHA1 Message Date
Randy Mackay 01fa4ba619 Compass_PX4: primary compass based on use_for_yaw 2014-10-01 13:02:02 +10:00
Randy Mackay 798cc36e64 Compass: use_for_yaw for each compass 2014-10-01 13:02:02 +10:00
Randy Mackay 84d792216e Compass: use_for_yaw to use primary compass health
This allows the internal compass to be used if the external compass
fails.
2014-10-01 13:02:02 +10:00
Andrew Tridgell d6c56b8f7a AP_NavEKF: make it clear that all sat counts are covered 2014-10-01 12:55:29 +10:00
Andrew Tridgell a1f5be5b9e AP_NavEKF: simplify variable handling in EKF
use named state variables instead of states[] array where possible.
2014-10-01 12:55:29 +10:00
priseborough 8223a0d193 AP_NavEKF : Explicitly initialise gpsNoiseScaler to default value 2014-10-01 12:55:29 +10:00
priseborough b61a6c64d7 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-10-01 12:55:29 +10:00
priseborough 7370e07c8d AP_AHRS : Prevent EKF starting if GPS sats less than AHRS_GPS_MINSATS 2014-10-01 12:55:29 +10:00
priseborough f99f5759f5 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-10-01 12:55:29 +10:00
priseborough f0ee11e951 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-10-01 12:55:28 +10:00
Randy Mackay e7b4a02d26 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:42:31 +09:00
Andrew Tridgell f6cc8ce5bc GCS_MAVLink: fixed log erase and log request end 2014-10-01 11:45:51 +10:00
Randy Mackay 47c135c4e1 GCS_MAVLink: add comments around checking target 2014-09-30 15:18:35 +10:00
Randy Mackay 0322a876eb GCS_MAVLink: check target before erasing log 2014-09-30 15:18:31 +10:00
Randy Mackay dbe1c55666 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:26:18 +09:00
Randy Mackay 0803d79701 INS: param descriptions for ACC2, GYR2 2014-09-27 21:05:33 +09:00
Randy Mackay e14ae0c0b1 Compass: param descriptions for OFS2, MOT2 2014-09-27 17:59:26 +09:00
Randy Mackay 5ca3c4baf6 Mission: fix CHANGE_ALT to store climb rate in lat param
The slightly confusing storage of climb rate in the lat field led to a
bug fix a few months ago that actually created a bug.
2014-09-26 23:23:04 +09:00
Andrew Tridgell 5eee51b5a4 APM_OBC: added heartbeat() method
this is used for when the plane is calibrating sensors, to ensure
heartbeat is continued to the failsafe board
2014-09-24 12:02:38 +10:00
Randy Mackay c2c5807ec7 Compass: always default devid to zero 2014-09-23 20:35:18 +09:00
Randy Mackay cf3b2be99c AC_PosControl: 4hz filter on z-axis velocity error 2014-09-22 13:40:01 +09:00
Randy Mackay 665f353416 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-21 17:53:55 +09:00
Randy Mackay cf35bd3f42 LowPassFilter: add div by zero check 2014-09-21 17:33:59 +09:00
Jason Short b57539a9ad AP_Motors: throttle_pass_through accepts pwm 2014-09-19 22:21:45 +09:00
Randy Mackay 765420ee04 AC_WPNav: add loiter_soften_for_landing method
This resets the position target to the current location.
2014-09-19 16:43:10 +09:00
Randy Mackay ad37fc0408 AC_WPNav: WP_SPEED_DN parameter range to 0~500
Previous permissible descent speed of 10m/s was unnecessarily lenient.
Users can still bypass the suggested range through the MP's full
parameter list if they really want a very high descent speed.
2014-09-18 10:44:33 +09:00
Randy Mackay 6da1420541 HAL_VRBrain: implement force_safety_on 2014-09-18 09:58:48 +09:00
Randy Mackay ffcd259b4e HAL_PX4: implement force_safety_on 2014-09-18 09:58:46 +09:00
Randy Mackay 033b14db16 AP_HAL: add force_safety_on method 2014-09-18 09:58:44 +09:00
Randy Mackay 1ce8e453c2 Mission: add support for DO_GRIPPER 2014-09-17 21:14:17 +09:00
Randy Mackay 1de89804e5 GCS_MAVLink: version update after adding DO_GRIPPER 2014-09-17 21:14:14 +09:00
Randy Mackay 064e214992 GCS_MAVLink: generate after adding DO_GRIPPER 2014-09-17 21:14:12 +09:00
Randy Mackay b3bce13bdf GCS_MAVLink: add MAV_CMD_DO_GRIPPER 2014-09-17 21:14:09 +09:00
Randy Mackay cffc904671 GCS_MAVLink: version update after generate 2014-09-17 21:14:06 +09:00
Randy Mackay 6b38547fc2 GCS_MAVLink: generate after move of PARACHUTE_ACTION 2014-09-17 21:13:54 +09:00
Randy Mackay 868f1a777d GCS_MAVLink: version updates after generate 2014-09-17 21:13:52 +09:00
Randy Mackay 69fd7b80aa GCS_MAVLink: generate run on master 2014-09-17 21:13:50 +09:00
Randy Mackay d09bbd1d91 EPM: add params for pwm levels add re-grab feature
Also include some minor commenting changes
2014-09-17 21:13:37 +09:00
Randy Mackay 1401ee4077 EPM: add support for ver2, remove support ver 1 2014-09-17 21:13:32 +09:00
Randy Mackay 79f95efb71 RC_Channel_aux: add epm to servo function enum 2014-09-17 21:13:30 +09:00
priseborough f71aeea61d 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-17 10:22:55 +09:00
priseborough 36bf304f29 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-17 10:22:49 +09:00
priseborough 5b72cb7610 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-17 10:22:45 +09:00
Andrew Tridgell b69262b054 GCS_MAVLink: rebuild MAVLink headers 2014-09-11 20:16:27 +10:00
Andrew Tridgell 25f6dc2549 GCS_MAVLink: mavlink XML updates from upstream 2014-09-11 20:15:44 +10:00
Andrew Tridgell 593a97afd6 HAL_VRBRAIN: fixed storage bug in VRBRAIN too 2014-09-11 18:58:54 +10:00
Andrew Tridgell d238ff7c5d HAL_Linux: fixed storage bug in Linux too 2014-09-11 18:58:54 +10:00
Andrew Tridgell 74525cad89 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 18:58:54 +10:00
Andrew Tridgell 9d846d5f2a DataFlash: allow use of a smaller writebuf for PX4v1
this fixes logging on PX4v1
2014-09-09 17:32:44 +10:00
Randy Mackay 3e1bd04c94 TradHeli: update AttControl params to match multicopters 2014-09-09 14:41:57 +09:00
Andrew Tridgell d3347e528d AP_Relay: added RELAY_DEFAULT parameter
this is useful when using a Pixhawk with an external relay, as it
allows you to cope with the pullup on the PWM pins
2014-09-04 16:48:33 +10:00
Andrew Tridgell 15470bd81b AP_GPS: added GPS_MIN_ELEV parameter
allows setting of satellite elevation mask in degrees
2014-09-04 14:46:10 +10:00
Andrew Tridgell 840a4dee1e AP_GPS: added GPS_SBAS_MODE parameter
allows SBAS to be enabled/disabled
2014-09-04 14:46:10 +10:00
Andrew Tridgell cd50fe82b6 AP_GPS: fixed GPS time in HIL
account for 10 year difference in epoch between unix time and GPS time
2014-09-04 06:37:42 +10:00
Andrew Tridgell effccacf46 AP_Mission: fixed acceptance radius outgoing
this needs to match incoming
2014-09-03 21:15:56 +10:00
Andrew Tridgell 3a5e960fe5 AP_Mission: revert APM_BUILD_TYPE change 2014-09-03 13:28:17 +10:00
Andrew Tridgell c09c86868f AP_Vehicle: make APM_BUILD_TYPE() valid under arduino IDE 2014-09-03 13:28:04 +10:00
Andrew Tridgell 36b854fa98 AP_Mission: fixed build for arduino IDE 2014-09-03 13:20:31 +10:00
Andrew Tridgell c4f84232e2 AP_Mission: make cmd.p1 be radius on plane for NAV_WAYPOINT 2014-09-03 12:38:30 +10:00
Randy Mackay 74553e523d 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:22:46 +09:00
Randy Mackay 50ae5b2519 InertialSensor: reorder .cpp file to match .h
No functional changes
2014-09-03 11:19:36 +09:00
Randy Mackay 102b71cde3 InertialNav: add credit to Tony Lambregts 2014-08-31 13:23:03 +09:00
Emile Castelnuovo 25d2ec1dea AP_HAL_VRBRAIN: enable 2nd GPS for VRBRAIN 5 2014-08-31 10:56:58 +09:00
Emile Castelnuovo 7a70c0132d AP_HAL: VRBRAIN corrected EEPROM size and added terrain folder on MicroSD 2014-08-31 10:56:56 +09:00
Emile Castelnuovo 4a5c31fe74 AP_relay: added default relay pin for VRBRAIN 2014-08-31 10:56:52 +09:00
Emile Castelnuovo 8e42b21bab AP_HAL_VRBRAIN: added management for external relay 1 and 2 2014-08-31 10:56:48 +09:00
Andrew Tridgell a6ca11facf AP_TECS: allow zero throttle in flare for landing 2014-08-30 05:14:57 +10:00
Andrew Tridgell 6c1eed0a20 AP_TECS: bring in flare sink rate more slowly
this should reduce pitch overshoot in the flare
2014-08-30 05:13:18 +10:00
Randy Mackay 1c6606cc58 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 11:00:51 +09:00
Andrew Tridgell 7547cd45f5 AP_TECS: bring the flare height rate demand in slowly
bring it in over 0.5s to give less of a bounce
2014-08-27 20:13:01 +10:00
Andrew Tridgell 500e20b08d AP_TECS: make TECS aware of LAND_PITCH_CD
this makes the flare a bit smoother
2014-08-27 20:11:48 +10:00
Andrew Tridgell fb4ef0b5c6 AP_Vehicle: added land_pitch_cd for fixed wing 2014-08-27 20:11:03 +10:00
Andrew Tridgell 46ac52bccc HAL_Linux: removed retry loop on UART open
this was there for HAL_PX4 only, and makes no sense on Linux
2014-08-27 18:31:38 +10:00
Randy Mackay d6aa868cac Mission: start next nav cmd immediately after prev completes 2014-08-27 18:05:49 +10:00
Andrew Tridgell 68dd61c7c7 AP_TECS: added TECS_LAND_TCONST
this allows control of the time constant for landing in TECS. A lower
time constant gives tighter altitude control on landing approach
2014-08-27 17:14:19 +10:00
Andrew Tridgell 5da5360dde HAL_SITL: fixed sonar correction for attitude 2014-08-27 17:14:19 +10:00
Andrew Tridgell 6b893a5865 GCS_MAVLink: slow down parameter send a lot with no flow control 2014-08-25 22:19:30 +10:00
priseborough 0f62dbf6ed AP_NavEKF : Clear compass fail on transition between armed and disarmed
This allows a compass that has been declared failed, possibly because of
external disturbances (eg movement of hatches, proximity of tools, etc)
to be given a second chance when the vehicle is armed.
2014-08-25 19:29:07 +10:00
Ju1ien 1c96bf0b1d AP_Mount.cpp - correct units in description
That should be corrected also in MP as the current code is expecting
degrees, not centidegrees.
2014-08-25 15:55:07 +09:00
Andrew Tridgell eeb04ba1b8 AP_Terrain: fetch more terrain data around waypoints
this ensures we have data for a wide region (1km) around each waypoint
2014-08-25 14:55:15 +10:00
Andrew Tridgell e9a9e33280 AP_AHRS: use EKF use_compass() if EKF enabled
this allows magfailed status to show on console via SYS_STATUS health
bits
2014-08-24 21:00:56 +10:00
Andrew Tridgell 5d40ec8014 AP_NavEKF: make use_compass() public 2014-08-24 21:00:24 +10:00
Randy Mackay 5a66ff1ef9 AC_AttControl: bug fix for ef target during acro 2014-08-23 22:17:54 +09:00
Randy Mackay 3e0b573dfe AC_AttControl: remove debug message 2014-08-22 22:58:48 +09:00
Randy Mackay f6e12bda06 AC_AttControlHeli: integrate div-by-zero check for bf-to-ef conversion 2014-08-22 22:56:18 +09:00
Randy Mackay c45338f080 AC_AttControl: div-by-zero check for bf-to-ef conversion 2014-08-22 22:56:15 +09:00
Andrew Tridgell 024d3b71e7 HAL_Linux: use a semaphore in suspend_timer_procs()
this is the start of multi-core aware code
2014-08-22 21:13:11 +10:00
Andrew Tridgell dcdb53584b AP_InertialSensor: use lockless structures in MPU9250 driver
this avoids suspending timers when transferring data between main
thread and SPI read thread
2014-08-22 21:13:11 +10:00
Andrew Tridgell 7343de2893 AP_Notify: avoid suspend_timer_procs() by using atomic updates in ToshibaLED_PX4 2014-08-22 21:13:11 +10:00
Randy Mackay 691a3d8126 AC_AttControlHeli: add passthrough_bf_roll_pitch_rate_yaw 2014-08-22 16:28:57 +09:00
Robert Lefebvre 7d3e22af59 AC_AttitudeControl_Heli: Add use_flybar_passthrough accessor function. 2014-08-22 16:28:45 +09:00
Robert Lefebvre 9b1d9e3cf0 AC_AttitudeControl_Heli: Add passthrough_to_motor_roll_pitch function. 2014-08-22 16:28:42 +09:00
Robert Lefebvre 5c04af6d20 AC_AttitudeControl_Heli: Create Flybar Passthrough flag which will be used for control pass-through. 2014-08-22 16:28:38 +09:00
Andrew Tridgell 43e8b36e5b AP_RangeFinder: removed use of hrt_absolute_time() 2014-08-20 09:10:25 +10:00
Andrew Tridgell 5c9e5fbc11 AP_InertialSensor: removed use of hrt_absolute_time() 2014-08-20 09:10:24 +10:00
Andrew Tridgell e143acd8bf HAL_VRBRAIN: minimise use of hrt_absolute_time() 2014-08-20 09:10:24 +10:00
Andrew Tridgell 48247b6adc HAL_PX4: minimise usage of hrt_absolute_time() 2014-08-20 09:10:24 +10:00
Andrew Tridgell 9f6d1f987b AP_Compass: removed use of hrt_absolute_time() 2014-08-20 08:41:28 +10:00
Andrew Tridgell 5280d8936d AP_Baro: remove usage of hrt_absolute_time()
use a single time base in all code
2014-08-20 08:41:15 +10:00
Andrew Tridgell a14f8dbd0a AP_InertialSensor_MPU9250: use micros64() and millis64() 2014-08-20 08:02:34 +10:00