Commit Graph

6444 Commits

Author SHA1 Message Date
priseborough
79698f7742 AP_NavEKF : improvements to range finder fusion 2014-12-06 18:16:45 +11:00
priseborough
1222559da0 AP_NavEKF : Fix bug affecting sonar fusion 2014-12-06 18:16:45 +11:00
priseborough
117bd2a998 AP_NavEKF : Add time based noise to terrain offset state 2014-12-06 18:16:45 +11:00
priseborough
b1d3d5d9a3 AP_NavEKF : Don't update focal length scale factor at low speeds 2014-12-06 18:16:45 +11:00
priseborough
8dd1081f54 AP_NavEKF : Add range measurement to EKF debug message 2014-12-06 18:16:45 +11:00
priseborough
f358d5e20f DataFlash : Add range measurement to EKF debug message 2014-12-06 18:16:45 +11:00
priseborough
744c72d40b AP_NavEKF : Updates to range finder fusion 2014-12-06 18:16:45 +11:00
priseborough
a07e402ebf DataFlash : Update names in EKF optical flow logging 2014-12-06 18:16:45 +11:00
priseborough
a20729f60f AP_NavEKF : Update names in optical flow debug logging 2014-12-06 18:16:45 +11:00
priseborough
235b3bebda AP_NavEKF : Add range finder health and enable range finder fusion
The 2-state auxiliary filter is also renamed.
2014-12-06 18:16:45 +11:00
priseborough
a4984a1e76 AP_AHRS : Add range finder health status to EKF optical flow data 2014-12-06 18:16:44 +11:00
priseborough
988de2a898 AP_NavEKF : Add smoothing to optical flow fusion 2014-12-06 18:16:44 +11:00
priseborough
70c779dbc2 AP_NavEKF : Optical flow numerical optimisations 2014-12-06 18:16:44 +11:00
priseborough
2a1420171a AP_NavEKF : reduce minimum accepted flow quality 2014-12-06 18:16:44 +11:00
priseborough
3fbedc9f98 AP_NAvEKF : update comments 2014-12-06 18:16:44 +11:00
priseborough
81b09c9361 AP_NavEKF : temporary mods to test use of flow sensor internal gyro data 2014-12-06 18:16:44 +11:00
priseborough
12b012a00e AP_AHRS : temporary mods to test use of flow sensor internal gyro data 2014-12-06 18:16:44 +11:00
priseborough
cd418c946c AP_NavEKF : preliminary implementation for optical flow and range finder fusion
Range finder measurements are not input to EKF at this time, however the method for fusing them is
implemented.
2014-12-06 18:16:44 +11:00
priseborough
bc74abcd00 DataFlash : EKF optical flow fusion support preliminary changes 2014-12-06 18:16:44 +11:00
priseborough
7b76fc29fb AP_AHRS : EKF optical flow fusion support preliminary changes 2014-12-06 18:16:44 +11:00
priseborough
13df6fb1c9 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.

Time stamps are now explicitly initialised to the current IMU time to avoid unwanted activation of timeout logic on filter start and the various calls to the hal.scheduler->millis() object have been consolidated.

Unused variables have been removed
2014-12-06 18:16:43 +11:00
priseborough
dcb252cc05 AP_NavEKF : Fix bug in reset of position and velocity states
If the inertial solution velocity or position needs to be reset to the GPS, the stored state history for the corresponding states should also be reset.
Otherwise the next GPS measurement will be compared to an invalid previous state and will be rejected.
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-12-06 18:16:43 +11:00
priseborough
cb4d5986e0 AP_OpticalFlow : Update PX4Flow interface
Interface now uses the integral of flow and body rates
2014-12-06 18:16:43 +11:00
priseborough
0d774d301d AP_OpticalFlow : Remove support for ADNS3080 sensor
It is not compatible with the new interface and data fusion requirements
2014-12-06 18:16:43 +11:00
Randy Mackay
4452aa8448 AP_AHRS_DCM: compile error fix for low speed CPUs
Also correct initialisatoin order to remove compiler warning
2014-12-05 19:43:05 +09:00
Jonathan Challinger
bfe71fea82 AC_PosControl: Use blended accelerometer measurement in altitude control 2014-12-05 19:40:10 +09:00
Jonathan Challinger
9261dfdefb AP_AHRS_NavEKF: overload get_accel_ef and get_accel_ef_blended functions 2014-12-05 19:40:08 +09:00
Jonathan Challinger
4975cefd84 AP_AHRS_DCM: update _accel_ef_blended 2014-12-05 19:40:06 +09:00
Jonathan Challinger
033ee3c900 AP_AHRS: Add get_accel_ef_blended function 2014-12-05 19:40:04 +09:00
Jonathan Challinger
7692761f34 AP_NavEKF: Added getAccelNED function 2014-12-05 19:40:01 +09:00
priseborough
874d0780aa AP_NavEKF: Reduce vulnerability to ground fixed magnetic interference
Re-initialisation of the magnetic field states and yaw angle is now only performed a maximum of two times after start-up.

Once when coming out of static modefor the first time (first arm event)
Again (for copter only) when the altitude gain above the arming altitude exceeds 1.5m

this prevents magnetic interference present at arming (eg arming on a metal roof)from corrupting the magnetic field states enough to cause bad heading errors and toilet bowling on copter
2014-12-05 14:33:04 +11:00
Andrew Tridgell
ede920f293 AP_Mission: ensure location options are zero at start of mavlink conversion 2014-12-03 18:29:43 +11:00
Andrew Tridgell
f98e283091 GCS_MAVLink: re-generate with updated upstream mavlink 2014-12-03 10:08:36 +11:00
Andrew Tridgell
940966f3e3 DataFlash: fixed example sketch build 2014-12-03 08:39:36 +11:00
Andrew Tridgell
86bf02d64c RC_Channel: update example sketch to copy input to output 2014-12-02 16:27:33 +11:00
Andrew Tridgell
5aabfd4dc4 AP_HAL: added RCInput example sketch 2014-12-02 15:49:50 +11:00
Andrew Tridgell
8e36c1cd60 AP_HAL: fixed RCOutput example 2014-12-02 15:03:59 +11:00
Andrew Tridgell
4ec6a74829 AP_HAL: addex UART_test example sketch 2014-12-02 13:14:03 +11:00
Andrew Tridgell
9e0a7e6631 AP_HAL: fixed printf example build 2014-12-02 13:14:03 +11:00
Andrew Tridgell
c5e4e8f035 SITL: fixed SITL for example sketches
cope with no SITL object
2014-12-02 13:14:03 +11:00
Randy Mackay
9e731550fd AHRS: default EKF on for copter 2014-12-01 17:29:39 +09:00
priseborough
053c5054f3 AP_TECS: Change default landing damp gain to 0.5 2014-11-29 20:03:49 +11:00
priseborough
0912f05e7c AP_TECS: Add parameter to adjust height rate gain during flare 2014-11-29 20:03:41 +11:00
priseborough
11aefa6858 AP_TECS: Fix bug in parameter label 2014-11-29 20:03:37 +11:00
priseborough
bd97f15d06 AP_TECS: make flare height demand consistent with height rate demand 2014-11-29 20:03:34 +11:00
Holger Steinhaus
ebed80cd2a AP_GPS: work-around for invalid time reported by PX4 GPS 2014-11-28 13:30:21 +01:00
Holger Steinhaus
df7c4baed9 AP_GPS: check lock type before accepting position and speed information 2014-11-28 13:26:51 +01:00
Andrew Tridgell
38c1b622f3 AP_AHRS: fixed example build on APM2 2014-11-28 17:59:18 +11:00
Andrew Tridgell
48abfcede7 AP_Scheduler: added example sketch 2014-11-28 12:59:47 +11:00
Andrew Tridgell
89cdae62b4 AP_AHRS: fixed example build 2014-11-28 10:40:52 +11:00
Andrew Tridgell
e45522f51d AP_Baro: fixed example build 2014-11-28 10:40:43 +11:00
Andrew Tridgell
a686494127 AP_Compass: fixed example build 2014-11-28 10:40:34 +11:00
Andrew Tridgell
908ad46e8e AP_GPS: fixed example build 2014-11-28 10:40:26 +11:00
Andrew Tridgell
7bb56e50aa AP_InertialSensor: fixed example build 2014-11-28 10:40:19 +11:00
Andrew Tridgell
0811f9c175 AP_Notify: fixed example build 2014-11-27 17:27:56 +11:00
John Williams
d0e467aea0 AP_HAL_Linux: Bypass manual CS assertion for SPI_CS_KERNEL mode
Missed from initial patch series

Signed-off-by: John Williams <john@whelanwilliams.net>
2014-11-27 15:57:12 +11:00
Andrew Tridgell
eb22815668 AP_TECS: fixed range values 2014-11-26 19:02:51 +11:00
Staroselskii Georgii
d40011acf3 AP_Notify: added abstract Led and RGBLed classes 2014-11-26 11:16:27 +11:00
Mikhail Avkhimenia
955753f3f0 HAL_Linux: Optimize bandwidth for RCOutput_Navio
40% less bytes in I2C transactions for PCA9685.
2014-11-26 11:14:44 +11:00
Mikhail Avkhimenia
50459bdca0 HAL_Linux: Enable external clk for RCOutput_Navio
That should fix PWM value drifts.
2014-11-26 11:14:44 +11:00
Andrew Tridgell
d0087c91e9 DataFlash: prevent build errors on non-PX4 targets 2014-11-26 11:14:44 +11:00
Andrew Tridgell
1d0122e6c2 DataFlash: log each ESC separately
this saves log space for ESCs that are not initialised (eg. only 3rd
ESC on fixed wing) and is a bit easier to deal with as a user
2014-11-26 11:14:44 +11:00
Holger Steinhaus
294d944cbd DataFlash: added logging of ESC feedback (currently only available with UAVCAN ESCs) 2014-11-26 11:14:44 +11:00
Andrew Tridgell
4132b53541 HAL_PX4: publish actuator values for UAVCAN ESCs
this publishes scaled actuator values so that the uavcan module can
drive ESCs
2014-11-26 11:14:44 +11:00
Andrew Tridgell
e89d380b73 AP_HAL: added set_esc_scaling() RCOutput function
this will be used to scale outputs for uavcan ESCs based on throttle
range
2014-11-26 11:14:44 +11:00
Andrew Tridgell
22cb1c8525 HAL_Linux: tidy up SPI debugging a bit 2014-11-26 10:16:39 +11:00
John Williams
0fe3959d7e AP_HAL_Linux: Add support for in-kernel SPI CS handling
Add support for /dev/spidev<bus>.<cs> in-kernel SPI CS handling, and convert
existing SPI devices over.

 * Add a new member _subdev to the LinuxSPIDeviceDriver class, and initialiser
   in LinuxSPIDevice constructor.  Use subdev 0 for GPIO-managed CS
 * Extend the _cs_pin to signed 16 bits and define SPI_CS_KERNEL (-1) for
   kernel-managed CS
 * Move to per-device file descriptors (required for in-kernel CS)
 * Extend spidev filenames to include bus and subdevice numbers, possibly
   longer than 1 digit each
 * Allow support for platforms enumerating /dev/spidevNNN from non-zero bases
 * Convert existing users over to the new API

Signed-off-by: John Williams <john@whelanwilliams.net>
2014-11-26 09:55:09 +11:00
Andrew Tridgell
38c5f25c70 AP_Math: fixed example build 2014-11-25 13:22:17 +11:00
Michael Day
b3e693daa4 AP_Mission: Support MAV_CMD_DO_FENCE_ENABLE as a mission item. 2014-11-25 13:02:47 +11:00
Michael Day
b36c1b2c3d AP_Mission: support for MAV_CMD_CONTINUE_AND_CHANGE_ALT 2014-11-25 10:43:15 +11:00
Michael Day
dca99a9643 GCS_MAVLink: code generation from XML for MAV_CMD_CONTINUE_AND_CHANGE_ALT. 2014-11-25 10:43:15 +11:00
Andrew Tridgell
d5ced15acf GCS_MAVLink: include units in CONTINUE_AND_CHANGE_ALT 2014-11-25 10:43:14 +11:00
Michael Day
958d8ffacc GCS_Mavlink: New message def: MAV_CMD_NAV_CONTINUE_AND_CHANGE_ALT 2014-11-25 08:49:13 +11:00
Kirill A. Kornilov
33e4f44434 RC_Channel: added set_radio_trimmed()
take into account trim value in set_radio()
2014-11-25 08:19:27 +11:00
Andrew Tridgell
8d54368650 AP_Math: fixed build warning 2014-11-25 08:17:15 +11:00
Andrew Tridgell
09547c40cb DataFlash: added staticmode to EKF4 message
useful when diagnosing logs
2014-11-22 18:27:51 +11:00
Andrew Tridgell
46f601d703 AP_NavEKF: added getStaticMode() function 2014-11-22 18:27:51 +11:00
Andrew Tridgell
8acfbb2ee0 AP_NavEKF: add another health check in the EKF
if SV, SP and SH are all off then the most likely cause is divergence
of the EKF. This was done based on a flight log with bad gyro cal
2014-11-22 18:27:51 +11:00
Andrew Tridgell
f84f432ecf AP_InertialSensor: allow gyro calibration to take up to 30 seconds
this gives time for the user time to get their battery hatches on and
hold the model steady. 5 seconds was just far too short
2014-11-22 18:27:51 +11:00
Randy Mackay
20f3f19285 Compass: add new rotation to ORIENT param description 2014-11-22 14:13:25 +09:00
Randy Mackay
503d14428d AP_Math: add new rotation to example rotation sketch 2014-11-22 14:10:00 +09:00
Randy Mackay
3d2c9910b3 AP_Math: add yaw 293, pitch 68, roll 180 rotation 2014-11-22 14:09:16 +09:00
priseborough
d57c99f1cc DataFlash: Fix bug in logging of EKF IMU1 Z accel bias 2014-11-18 13:39:42 +11:00
Andrew Tridgell
78db698108 AP_Mount: allow a MOUNT_CONTROL message to reset RC targetting
fixes issue #1617
2014-11-18 13:35:11 +11:00
Randy Mackay
73f3b50e2f RC_Channel: make get_control_mid const 2014-11-17 18:16:12 -08:00
Jonathan Challinger
9375fc8947 RC_Channel: add get_control_mid function 2014-11-17 18:16:09 -08:00
Jonathan Challinger
4d7988b302 RC_Channel: replace long with int32_t 2014-11-17 18:16:08 -08:00
Andrew Tridgell
14467b75a1 AP_Mount: use norm_input_dz()
this makes rc targeting much easier without drift
2014-11-18 12:44:29 +11:00
Andrew Tridgell
6b0c15b70f RC_Channel: added norm_input_dz()
normalised input, taking into account dead zone
2014-11-18 12:44:05 +11:00
Andrew Tridgell
ad0e6dccbb GCS_MAVLink: re-generate headers 2014-11-18 11:20:44 +11:00
Andrew Tridgell
de294277e9 GCS_MAVLink: cope with new mavlink repo change in mavlink_system_t 2014-11-18 11:20:28 +11:00
Andrew Tridgell
abba6395ad AP_TECS: fixed spelling error 2014-11-18 11:12:57 +11:00
Randy Mackay
8ef2948f27 GCS_MAVLink: generate update to version 2014-11-17 15:59:36 -08:00
Randy Mackay
e46be909a4 GCS_MAVLink: generate after mount_status msg change 2014-11-17 15:59:33 -08:00
Arthur Benemann
9b5684d007 GCS_MAVLink: add MOUNT_STATUS to message enum 2014-11-17 15:59:28 -08:00
Arthur Benemann
f7f9bedc38 AP_Mount: update the status_msg() method to match the new definition 2014-11-17 15:59:23 -08:00
Arthur Benemann
c5b4121fc7 GCS_MAVLink: MOUNT_STATUS to always be reporting the angle of the gimbal
This is useful for GCS trying to plot the camera footprint.
2014-11-17 15:59:21 -08:00
Jonathan Challinger
055d3bee1f GCS_MAVLink: run generate.sh 2014-11-17 14:38:53 -08:00
Jonathan Challinger
a4f994e8f0 GCS_MAVLink: update MAV_FRAME enum 2014-11-17 14:38:51 -08:00
Jonathan Challinger
2cc65dffe0 AC_WPNav: add set_spline_dest_and_vel function 2014-11-17 14:38:46 -08:00