Commit Graph

8131 Commits

Author SHA1 Message Date
Randy Mackay
6cfd48d0c6 Buzzer: handle arming_failed as event 2015-02-03 06:14:55 +09:00
Randy Mackay
a991b4a823 Linux: handle arming_failed as event 2015-02-03 06:14:54 +09:00
Randy Mackay
3361002379 ToneAlarm: handle arming_failed as event 2015-02-03 06:14:53 +09:00
Randy Mackay
bd1ae13fdb Notify: arming_failed flag moved to events 2015-02-03 06:14:53 +09:00
Randy Mackay
6a827459ad Notify: increase size of flags type 2015-02-03 06:14:52 +09:00
Randy Mackay
0a68d4ef39 Notify: clear all flags and events during init 2015-02-03 06:14:44 +09:00
Randy Mackay
272768bc0f Notify: init RGBLed members 2015-02-03 06:14:35 +09:00
Randy Mackay
3550e52560 MotorsTri: add 80% throttle limit
This limit was moved from the main copter flight code to the motors
library in order that the throttle_upper flag could be set properly.
2015-02-02 22:31:06 +09:00
Emile Castelnuovo
c044901f9f AP_Notify: added missing VRBRAIN led files 2015-02-02 08:44:01 +11:00
Emile Castelnuovo
ebc3dcd142 DataFlash: Clean up, VRBRAIN deleted unused boards. 2015-02-02 08:44:01 +11:00
Emile Castelnuovo
90663664f3 AP_BattMonitor: VRBRAIN deleted unused boards, corrected default batt volt divider. 2015-02-02 08:44:01 +11:00
Emile Castelnuovo
a863f0bca8 AP_Airspeed: VRBRAIN code clean up. Deleted unused boards. 2015-02-02 08:44:01 +11:00
Emile Castelnuovo
d78ff43971 AP_HAL_VRBRAIN: code clean up. Deleted unused boards. 2015-02-02 08:44:00 +11:00
Emile Castelnuovo
5e8c1b61b5 AP_Compass: AP_Compass_VRBRAIN.cpp added _is_external overwrite to deal with external compass attached to internal I2C BUS 2015-02-02 08:44:00 +11:00
LukeMike
61f4239e47 AP_Airspeed: enabled PX4 library for VR boards 2015-02-02 08:44:00 +11:00
LukeMike
6473ae2c37 Storage: updated to the PX4 library 2015-02-02 08:44:00 +11:00
Emile Castelnuovo
26432d6064 AP_Notify: use RGB driver for board led in VRBRAIN boards. 2015-02-02 08:43:59 +11:00
Emile Castelnuovo
3e97592e5c AP_Rangefinder: added #if for VRBRAIN boards. 2015-02-02 08:43:59 +11:00
Emile Castelnuovo
c38b11eec8 AP_RangeFinder: added VRBRAIN to use PX4 libraries 2015-02-02 08:43:59 +11:00
Emile Castelnuovo
dae32984f1 AP_InertialSensor: use PX4 library for VRBRAIN boards. 2015-02-02 08:43:59 +11:00
Emile Castelnuovo
25818f08a3 AP_Airspeed: added VRBRAIN board type 2015-02-02 08:43:59 +11:00
Emile Castelnuovo
ffd26e59cd DataFlash: added new VRBRAIN boards 2015-02-02 08:43:59 +11:00
Emile Castelnuovo
b0b892e578 AP_Rangefinder: added support for VRBRAIN boards 2015-02-02 08:43:59 +11:00
Emile Castelnuovo
731329fc55 AP_InertialSensor: correction to AP_InertialSensor_VRBRAIN 2015-02-02 08:43:58 +11:00
Emile Castelnuovo
92e0bc3a2f AP_HAL_VRBRAIN: updates to libraries for new boards 2015-02-02 08:43:58 +11:00
Emile Castelnuovo
a0673b56f9 AP_HAL: added new VRBRAIN boards and new subtypes 2015-02-02 08:43:58 +11:00
Emile Castelnuovo
de8a0ebc08 AP_Airspeed: added #defines for new VR boards. 2015-02-02 08:43:58 +11:00
LukeMike
edd0f13845 AP_HAL: mapped the different sizes of storage for all VR boards 2015-02-02 08:43:58 +11:00
LukeMike
6a93148b92 AP_InertialSensor: added library for VRBRAIN Inertial Sensor 2015-02-02 08:43:58 +11:00
LukeMike
b29f50ba9b AP_Airspeed: Defined AirSpeed analog inputs for ArduPlane on VR Micro Brain 5 2015-02-02 08:43:57 +11:00
LukeMike
7dc5541484 AP_HAL_VRBRAIN: Added analog inputs for ArduPlane on VR Micro Brain 5 2015-02-02 08:43:57 +11:00
Andrew Tridgell
a2adb9b1b0 AP_Arming: check for AHRS health and calibration for arming 2015-02-01 14:13:57 +11:00
Andrew Tridgell
6e62e1ca7b AP_InertialSensor: make calibrated() const 2015-02-01 14:13:54 +11:00
Andrew Tridgell
68f64fa11c AP_AHRS: make the healthy() method const 2015-02-01 14:13:52 +11:00
Andrew Tridgell
850af14949 AP_NavEKF: raise EKF_POS_GATE and EKF_GLITCH_RAD for planes
This weights GPS position more heavily for planes

Pair-Programmed-With: Paul Riseborough <p_riseborough@live.com.au>
2015-01-31 21:49:20 +11:00
Holger Steinhaus
8911dfd791 DataFlash: fix out-of-bounds read when logging
Checked in my rmackay9
2015-01-31 13:24:34 +09:00
Randy Mackay
0d94d5441f SerialManager: correct protocol comments
Correct value for 2nd MAVLink protocol
2015-01-31 12:18:47 +09:00
Matthias Badaire
b5b67cf68a SerialManager: Fix SERIALX_PROTOCOL comments
Fix SERIALX_PROTOCOL to have a proper documentation of the protocol types available
2015-01-31 12:18:36 +09:00
Randy Mackay
07a0388f25 AC_PosControl: move alt limit to set_alt_target_from_climb_rate
The alt limit is instead enforced when the target is set using the
set_alt_target_from_climb_rate function
Also updated comments
2015-01-30 14:13:52 +09:00
Robert Lefebvre
02f3f96310 AC_PosControl: Enable altitude limit checking. 2015-01-30 14:13:45 +09:00
Andrew Tridgell
79cad28a25 AP_Mount: simplify some uses of frontend 2015-01-29 17:23:33 +11:00
Andrew Tridgell
c05f36d29b AP_SerialManager: make the state structure private 2015-01-29 16:02:24 +11:00
Andrew Tridgell
1d272e5a32 AP_Frsky_Telem: don't use flow control for FrSky
Pair-Programmed-With: Randy Mackay <rmackay9@yahoo.com>
2015-01-29 15:53:41 +11:00
Andrew Tridgell
362b53e1da AP_GPS: force flow control off on GPS serial ports 2015-01-29 15:53:20 +11:00
Andrew Tridgell
5980ff8e1c AP_Common: removed map_baudrate()
Pair-Programmed-With: Randy Mackay <rmackay9@yahoo.com>
2015-01-29 15:47:48 +11:00
Andrew Tridgell
d6ab4722cd AP_SerialManager: moved map_baudrate() into class
Pair-Programmed-With: Randy Mackay <rmackay9@yahoo.com>
2015-01-29 15:47:36 +11:00
Andrew Tridgell
085a926e61 AP_Frsky_telem: update for find_serial() change 2015-01-29 15:37:18 +11:00
Andrew Tridgell
9ba2fefde3 AP_GPS: update for find_serial() change 2015-01-29 15:37:08 +11:00
Andrew Tridgell
60f266da19 AP_Mount: update for new find_serial() interface 2015-01-29 15:36:38 +11:00
Andrew Tridgell
59d5351dab GCS_MAVLink: update for new find_serial() 2015-01-29 15:36:19 +11:00
Andrew Tridgell
e28deacc4c AP_SerialManager: simplify interface, returning direct uart
added find_baudrate() for getting baudrate

Pair-Programmed-With: Randy Mackay <rmackay9@yahoo.com>
2015-01-29 15:35:42 +11:00
Randy Mackay
0a195671b3 SerialManager: set_console_baud uses first matching protocol
This ensures we set the baud to the first serial port with the specified
protocol instead of the last.
2015-01-29 14:05:15 +11:00
Matthias Badaire
5f432eaa2d AP_Mount_Alexmos : take into account available negative numbers
uartdriver->available () function brings back a signed int, we should be carefull to avoid an endless loop if that happens.
2015-01-29 14:05:15 +11:00
Randy Mackay
4a4387530a Mount: remove unused num_instances 2015-01-29 14:05:14 +11:00
Randy Mackay
d6433266d2 Mount_MAVLink: use SerialManager for init
use serial_manager's get_mavlink_channel
2015-01-29 14:05:14 +11:00
Randy Mackay
4848b03ac6 Mount_AlexMos: use SerialManager for init 2015-01-29 14:05:14 +11:00
Randy Mackay
56f872b38c Mount_Servo: use SerialManager for init 2015-01-29 14:05:13 +11:00
Randy Mackay
886cc9aa46 Mount: use SerialManager for init 2015-01-29 14:05:13 +11:00
Randy Mackay
19aa8939de FrSky_Telem: init uart when protocol is S-Port 2015-01-29 14:05:13 +11:00
Randy Mackay
5c086acc15 FrSky_Telem: comments, formatting and reordering
No functional change
Added comments and moved main functions to the top
Removed spaces between function name and brackets
2015-01-29 14:05:13 +11:00
Randy Mackay
6ef996d553 FrSky_Telem: init all members to zero and move to cpp 2015-01-29 14:05:13 +11:00
Randy Mackay
d16f787bd0 Frsky_Telem: use SerialManager for init 2015-01-29 14:05:12 +11:00
Randy Mackay
ebf5f98dbd GPS: detect_instance does not set uart rx, tx size 2015-01-29 14:05:12 +11:00
Randy Mackay
2eddecb10d GPS: use SerialManager for init 2015-01-29 14:05:12 +11:00
Randy Mackay
0c3a8f585a GCS_MAVLink: add get_uart accessor
use by flight code to print messages during startup
2015-01-29 14:05:12 +11:00
Randy Mackay
1275ff7d40 GCS_MAVLink: have_flow_control uses mavlink_comm 2015-01-29 14:05:12 +11:00
Randy Mackay
1157c13eb6 GCS_MAVLink: mavlink_comm_x become UARTDrivers 2015-01-29 14:05:12 +11:00
Randy Mackay
febda988af GCS_MAVLink: mavlink_channel from SerialManager 2015-01-29 14:05:11 +11:00
Randy Mackay
c6326fc9b7 GCS_MAVLink: use SerialManager for setup_uart 2015-01-29 14:05:11 +11:00
Randy Mackay
0fe4436c72 SerialManager: do not init uart for FrSky S-Port 2015-01-29 14:05:11 +11:00
Randy Mackay
cc71db1e2f SerialManager: lib to configure UART protocol 2015-01-29 14:05:11 +11:00
Randy Mackay
ee369f8a0d Mount_AlexMos: use reference to state 2015-01-29 14:05:11 +11:00
Randy Mackay
b083c99966 Mount_MAVLink: use reference to state 2015-01-29 14:05:11 +11:00
Randy Mackay
32ea258594 Mount_Servo: use reference to state 2015-01-29 14:05:10 +11:00
Randy Mackay
acbcf3c54e Mount: backends use reference to their state 2015-01-29 14:05:10 +11:00
Randy Mackay
bf82e82282 Mount_MAVLink: remove unused _enable and find_mount 2015-01-29 14:05:10 +11:00
Randy Mackay
b5127b680f Mount: set primary to first instance 2015-01-29 14:05:10 +11:00
Matthias Badaire
24af65a41a AP_Mount_Alexmos: critical fix to avoid endless loop if byte arrive to fast in serial buffer
This fix reads the number of bytes available and iterates on it instead of looking for new bytes in the serial buffer (potentially forever)
2015-01-29 14:05:10 +11:00
Matthias Badaire
46e92f99fe AP_Mount_Alexmos: use struct for CMD_CONTROL command
new struct created in header and used in control_axis function
2015-01-29 14:05:09 +11:00
Matthias Badaire
81d60af4a8 AP_Mount_Alexmos : cleanup initialization of class fields 2015-01-29 14:05:09 +11:00
Randy Mackay
c5ef5d21d3 Mount: add Alexmos to MNT2_TYPE param description 2015-01-29 14:05:09 +11:00
Randy Mackay
93323e2136 Mount_Alexmos: comments and formatting
No functional change
2015-01-29 14:05:09 +11:00
Matthias Badaire
1e5ddf3ce7 AP_Mount_Alexmos : make sure get_angles is called to get the real angles from the gimbal
get_angles calls the Alexmos API to get the current angles. It was not being called before.
2015-01-29 14:05:09 +11:00
Matthias Badaire
0b88f15a37 AP_Mount: fix Backend enum for AP_Mount_Alexmos and add comments
fix Backend enum for AP_Mount_Alexmos and add comments
2015-01-29 14:05:09 +11:00
Matthias Badaire
cdeb1fb8f3 AP_Mount_Alexmos : changes some define to avoid conflicting
change SPEED to AP_MOUNT_ALEXMOS_SPEED and the control mode defines as well
2015-01-29 14:05:08 +11:00
Matthias Badaire
6e5e438b0f AP_Mount: Make use of the new AP_Mount_Alexmos backend
This is adding AP_Mount_Alexmos as one of the available backend
2015-01-29 14:05:08 +11:00
Matthias Badaire
dfc086f9e9 AP_Mount_Alexmos : Add Alexmos Serial support for 8bit cards
This is the initial implementation of Alemox gimbal protocol. the uart output is for the moment hard coded but should become a parameter.
2015-01-29 14:05:08 +11:00
Randy Mackay
66ad56161b Mount_MAVLink: fix to calc_angle_to_location params 2015-01-29 14:05:08 +11:00
Randy Mackay
f509dad991 Mount_Servo: bug fix to calc_angle_to_location params 2015-01-29 14:05:08 +11:00
Randy Mackay
a78309734d Mount_MAVLink: remove set_roi_target, configure
These methods are now in the backend
2015-01-29 14:05:07 +11:00
Randy Mackay
99c35d5cf7 Mount_Servo: remove set_roi_target, configure
These methods are now in the backend
2015-01-29 14:05:07 +11:00
Randy Mackay
72fec52f0f Mount_Backend: move set_roi_target, configure to backend 2015-01-29 14:05:07 +11:00
Randy Mackay
efeb05876e AP_Mount: initialise mode to default 2015-01-29 14:05:07 +11:00
Randy Mackay
ace1fd8740 Mount_MAVLink: handle RC and GPS targeting in lib
Previously we expected the mount to do this but it is likely that the
first versions of MAVLink enable mounts will only be capable of pointing
at a particular angle
2015-01-29 14:05:07 +11:00
Randy Mackay
9d4210b82a Mount_Backend: move RC target handling to backend 2015-01-29 14:05:07 +11:00
Randy Mackay
b3044ced1f Mount_Backend: move calc_angle_to_lcoation to backend 2015-01-29 14:05:07 +11:00
Randy Mackay
8fabacf5ff Mount_MAVLink: use sysid from vehicle, compid of 10 2015-01-29 14:05:06 +11:00
Randy Mackay
6af5a6687f Mount: add params for second mount 2015-01-29 13:57:19 +11:00
Randy Mackay
5d30af233a Mount: move param underscore to lib 2015-01-29 13:57:18 +11:00
Randy Mackay
2ed4ca409c Mount_Servo: check_servo_map every 3sec 2015-01-29 13:57:18 +11:00
Randy Mackay
cb5a122dab Mount_Servo: add set_mode 2015-01-29 13:57:17 +11:00
Randy Mackay
a41ff2375b Mount_Backend: add set_mode virtual method 2015-01-29 13:57:17 +11:00
Randy Mackay
ef719b145b Mount: rename MODE to DFLT_MODE, move set_mode to backend 2015-01-29 13:57:17 +11:00
Randy Mackay
6c766051e8 Mount_MAVLink: minimalist mavlink backend
We assume MAVLink enabled mount will do all the hard work of support all modes
2015-01-29 13:57:17 +11:00
Randy Mackay
8a9df1c894 Mount_Servo: Servo functions moved to backend 2015-01-29 13:57:17 +11:00
Randy Mackay
7df2892b8d Mount_Backend: add backend class 2015-01-29 13:57:17 +11:00
Randy Mackay
88db50c3a7 Mount: parent class becomes front-end 2015-01-29 13:57:17 +11:00
Randy Mackay
12bd5cd6b1 AP_HAL_PX4: fix example sketch 2015-01-28 21:00:30 +09:00
Randy Mackay
aa7f946e04 GCS_MAVLink: fix example sketch 2015-01-28 17:15:52 +09:00
Randy Mackay
857c3ef0e9 Scheduler: fix example sketch 2015-01-28 17:15:51 +09:00
Randy Mackay
d5f02ec0df RangeFinder: fix example sketch 2015-01-28 17:15:50 +09:00
Randy Mackay
6e482d5c56 PerfMon: fix example sketch 2015-01-28 17:15:49 +09:00
Randy Mackay
52ca06fc22 Parachute: fix example sketch 2015-01-28 17:15:48 +09:00
Randy Mackay
f48a71f30a OptFlow: fix example sketch 2015-01-28 17:15:47 +09:00
Randy Mackay
775cbfba38 Notify: fix example sketch 2015-01-28 17:15:47 +09:00
Randy Mackay
314eb2536f Mount: fix example sketch 2015-01-28 17:15:46 +09:00
Randy Mackay
38702a7e23 Motors: fix example sketch 2015-01-28 17:15:45 +09:00
Randy Mackay
355a92aff4 Mission: fix example sketch 2015-01-28 17:15:44 +09:00
Randy Mackay
689cc9e298 AP_Math: fix example sketch 2015-01-28 17:15:43 +09:00
Randy Mackay
b43dc3bdfb INS: fix example sketch 2015-01-28 17:15:42 +09:00
Randy Mackay
7c293f01d9 HAL_AVR: fix example sketch 2015-01-28 17:15:41 +09:00
Randy Mackay
f84d31b838 HAL: fix example sketch 2015-01-28 17:15:40 +09:00
Randy Mackay
1141363868 GPS: fix example sketches 2015-01-28 17:15:39 +09:00
Randy Mackay
635ff92d6b Compass: fix example sketch 2015-01-28 17:15:39 +09:00
Randy Mackay
1475cf27ac AP_Common: fix example sketch 2015-01-28 17:15:38 +09:00
Randy Mackay
bb4204c045 Baro: fix example sketch 2015-01-28 17:15:37 +09:00
Randy Mackay
293eb74a37 AirSpeed: fix example sketch 2015-01-28 17:15:36 +09:00
Randy Mackay
d8664d15d6 AHRS: fix example sketch 2015-01-28 17:15:35 +09:00
Randy Mackay
d0d1254f03 AC_WPNav: fix example sketch 2015-01-28 17:15:34 +09:00
Randy Mackay
a5ec3e3ec1 AC_Sprayer: fix example sketch 2015-01-28 17:15:33 +09:00
Randy Mackay
99046ebda6 AC_Fence: fix example sketch 2015-01-28 17:15:32 +09:00
Randy Mackay
d7f7af8c13 AC_AttControl: fix example sketch 2015-01-28 17:15:32 +09:00
Randy Mackay
51cb7185f2 InertialNav: fix example sketch 2015-01-28 17:15:27 +09:00
Randy Mackay
0480828350 Dataflash: fix example sketch 2015-01-28 16:31:50 +09:00
Andrew Tridgell
3d433d2106 AP_Mission: loop check is only needed in one place 2015-01-23 13:48:45 +11:00
Andrew Tridgell
540cadc086 AP_Mission: prevent infinite loop with linked jump commands
this prevents a "jump loop" from causing a firmware lockup. Thanks to
dellarb for reporting this!
2015-01-23 13:14:27 +11:00
Andrew Tridgell
4ee9575e6d AP_Frsky_Telem: fixed code formatting
match ArduPilot coding standards
2015-01-22 16:49:39 +11:00
Matthias Badaire
f59f85d4a4 AP_Frsky_Telem: add SBUS support
add sbus support using a timer on a thread
2015-01-22 16:49:39 +11:00
priseborough
5df733a883 AP_NavEKF: Allow flight transition to optical flow mode if GPS is lost 2015-01-22 14:41:04 +09:00
priseborough
04810c012d AP_NavEKF: Increase flow data valid timeout to handle arming delays
When Copter arms, the AHRS/EKF may not be run for a few hundred msec depending on conditions. This can cause the arming check to fail the optical flow sensor and place the EKF in a constant position mode.
2015-01-22 14:41:01 +09:00
priseborough
073b8e7c43 AP_NavEKF: Always explicitly set required const pos or vel mode when arming
This additional explicit setting of the constPosMode and constVelMode reduces the likelihood of logic errors being introduced in the future as it places the intended setting of these parameters at arming in the one place. the constVelmode and constPosMode only have one set of conditions each that can trigger these modes in flight, so if these modes are true after arming it will be clear that it was the in-flight condition that triggered.
2015-01-22 14:40:59 +09:00
priseborough
9c6dabe1cc AP_NavEKF: Add separate flow default parameters for platform types
Also reduces flow measurement noise default for copter only and increases gate to compensate.
2015-01-22 14:40:57 +09:00
priseborough
d2da16e652 AP_NavEKF: Consistently set timeout flags whenever aiding is inhibited
This ensures the position and velocity measurement status will be set as timed out immediately after use of those measurements is inhibited. This will improve the timeliness of filter status reporting.
2015-01-22 14:40:55 +09:00
priseborough
824425625c AP_NavEKF: Update public method used to inhibit GPS use
This method is not currently used by any of our vehicle types, but will be required to enable a user selectable 'indoor mode'.
2015-01-22 14:40:52 +09:00
priseborough
1033f5fc1e AP_NavEKF: Apply flow nav vehicle limits regardless of sensor health
It does not make sense to relax the limits on vehicle speed and nav gains just because we have received some invalid flow data. This could make the situation worse if the invalid data was being caused by too much speed.
If we are relying on flow data the vehicle limits should always be applied.
2015-01-22 14:40:50 +09:00
priseborough
14b51f6d74 AP_NavEKF: Unconditionally fuse velocity in constant velocity mode
The zero velocity measurements in this mode are by definition always correct and should never be rejected
2015-01-22 14:40:48 +09:00
priseborough
6663d80176 AP_NavEKF: Simplify nested logic - functionally equivalent
Additional if else statement was unnecessary
2015-01-22 14:40:45 +09:00
priseborough
12c3368c4d AP_NavEKF: Bypass GPS glitch logic when not aiding
When we are not using GPS measurements, we should not be allowing the GPS glitch logic to reset position states as this can interfere with operation of non GPS modes.
2015-01-22 14:40:43 +09:00
priseborough
5c8e71a8d1 AP_NavEKF: Don't reset the position measurement timeout if not aiding
When PV aiding is disabled, then the timeout time reference should not be reset becasue we want the position measurement timeout status to remain true the whole time the measurement is not being used.
2015-01-22 14:40:41 +09:00
priseborough
c505a458de AP_NavEKF: Always declare a position measurement timeout if aiding not used
If position and velocity aiding is turned off, then the position measurement should always be reported as timed out.
2015-01-22 14:40:39 +09:00
priseborough
3b166372cc AP_NavEKF: Always declare a velocity measurement timeout if velocity not used
If position and velocity aiding is turned off, then the velocity measurement should always be reported as timed out.
2015-01-22 14:40:36 +09:00
priseborough
95c3197170 AP_NavEKF: Ensure velocity will not be reset unless needed for aiding 2015-01-22 14:40:34 +09:00
priseborough
8aeec82846 AP_NavEKF: Continually turn off aiding whilst the vehicle is disarmed
This prevents the possibility of any logic errors turning aiding back on.

AP_NavEKF: Fix bug in logic
2015-01-22 14:40:31 +09:00
priseborough
81ee339e25 AP_NavEKF: Synchronise non-aiding mode state corrections
Synchronise with covariance prediction to improve numerical stability and accuracy of angle corrections. The 'noise' this produces in the position and velocity estimate is irrelevantbecause these are not used by the control loops during this mode of operation (they are nominally zero anyway).
2015-01-22 14:40:29 +09:00
priseborough
ae6b85e63d AP_NavEKF: Explicitly set aiding to off when disarmed
This fixes a bug that could cause the AHRS to drift whilst the vehicle was disarmed depending sensor combinations at startup.
2015-01-22 14:40:27 +09:00
priseborough
fb1962b111 AP_NavEKF: Let reported position whilst disarmed show inertial errors
Showing the positon states (which are nominally zero) in addition to the last known offset can provide useful log information.
2015-01-22 14:40:25 +09:00
Randy Mackay
01c669ee15 RangeFinder: minor param description update
Also initialise primary instance to 0.
No functional change.
2015-01-22 14:40:16 +09:00
Randy Mackay
c24e997fb2 AC_Fence: use inertial nav's get_filter_status 2015-01-22 14:39:40 +09:00
Randy Mackay
f35efc56e0 InertialNav_EKF: get_filter_status replaces position_ok 2015-01-22 14:39:37 +09:00
Randy Mackay
5d80481723 InertialNav: get_filter_status replaces position_ok
altitude_ok also replaced.
2015-01-22 14:39:35 +09:00
Andrew Tridgell
61be4ce2d2 HAL_Linux: fixed #if for linux builds 2015-01-22 15:58:20 +11:00
Víctor Mayoral Vilches
2b74d018fe HAL_Linux: Adjust set_system_clock
Do nothing for HAL_BOARD_SUBTYPE_NONE.
2015-01-22 15:43:16 +11:00
Víctor Mayoral Vilches
974f243c7e HAL_Linux: Add set_system_clock 2015-01-22 15:43:16 +11:00
Jonathan Challinger
d679831c75 GCS_MAVLink: run generate.sh 2015-01-22 15:28:44 +11:00
Jonathan Challinger
0997ab23a4 GCS_MAVLink: merge upstream changes to common.xml 2015-01-22 15:19:47 +11:00
Grant Morphett
236efad159 AP_HAL_AVR: Increased number of AVR input channels from 8 to 11 2015-01-22 14:48:15 +11:00
mirkix
d11c5286c3 AP_HAL: HAL_COMPASS_AK8963 used but not defined anywhere 2015-01-22 14:35:51 +11:00
mirkix
9a65a8c8fb AP_Compass: add AK8963 to auto-detect in test suite 2015-01-22 14:34:23 +11:00
mirkix
e9d4165a8d AP_Compass: add AK8963 support to test suite 2015-01-22 14:34:17 +11:00
mirkix
7ceb93befa AP_HAL: make the examples usable with Linux 2015-01-22 14:30:47 +11:00
Andrew Tridgell
5512a6f8a0 SITL: lower the default noise in SITL
the noise levels were well above realistic levels, especially for gyro
noise, and were causing EKF issues
2015-01-22 11:33:09 +11:00
Randy Mackay
842efe71be DataFlash: move COMPASS2,3 formats to extra structures 2015-01-21 14:38:13 +09:00
Randy Mackay
e7471c5fe5 DataFlash: fix message id and CURR formatting 2015-01-21 14:38:03 +09:00
Randy Mackay
09e3dcd821 DataFlash: pass ahrs, batt, targets by reference 2015-01-21 14:38:01 +09:00
Randy Mackay
f23959b5fa DataFlash: fix missing slash lost in merge 2015-01-21 14:37:59 +09:00
Robert Lefebvre
80929c389e DataFlash: Handle multiple compass instances natively inside the Library. 2015-01-21 14:37:50 +09:00
Robert Lefebvre
5b70550b73 DataFlash: Fix potentially uninitialized variable compiler warning. 2015-01-21 14:37:27 +09:00
Robert Lefebvre
be803f4f39 DataFlash: Minor whitespace changes/cleanup. No effect. 2015-01-21 14:37:25 +09:00
Robert Lefebvre
2657610373 DataFlash: Add common-vehicle Mode logging method.
Conflicts:
	libraries/DataFlash/DataFlash.h
2015-01-21 14:37:18 +09:00
Robert Lefebvre
12c3593bc3 DataFlash: Add common-vehicle Compass logging method. 2015-01-21 14:37:14 +09:00
Robert Lefebvre
2fdcd99db2 Arducopter: Move Attitude Message structure definition to the Base Structures section.
Conflicts:
	libraries/DataFlash/DataFlash.h
2015-01-21 14:37:12 +09:00
Robert Lefebvre
d2adf2cdd7 DataFlash.h: Move format characters string to a more convenient location. 2015-01-21 14:37:10 +09:00
Robert Lefebvre
392e5257cc DataFlash: Add voltage2 data to Current log, to be used by plane. 2015-01-21 14:37:07 +09:00
Robert Lefebvre
50b5376945 DataFlash: Add common-vehicle Current logging message. 2015-01-21 14:37:01 +09:00
Robert Lefebvre
db1a066f43 DataFlash: Add common-vehicle Attitude logging message. 2015-01-21 14:36:56 +09:00
Robert Lefebvre
743c5e4fde AC_AttitudeControl: Remove un-needed #include 2015-01-21 14:36:54 +09:00
Andrew Tridgell
8b59c72eb9 AP_InertialSensor: cope with 2 IMUs in SITL 2015-01-20 19:47:45 +11:00
Andrew Tridgell
a37f3680e4 AP_Arming: support skip_gyro_cal
also break up arming INS reports, to be clearer for users
2015-01-20 19:47:15 +11:00
Andrew Tridgell
765d833efa AP_Arming: check compass.use_for_yaw() 2015-01-20 11:33:39 +11:00
Andrew Tridgell
e8017a5079 AP_NavEKF: cope with the changed semantics of airspeed.use() 2015-01-20 11:28:14 +11:00
Andrew Tridgell
ed0a56cc3c AP_AHRS: cope with the changed semantics of airspeed.use() 2015-01-20 11:27:58 +11:00
Andrew Tridgell
850b3b89ea AP_Arming: added INS checks and airspeed checks
this also displays all failing arming checks, not just the first
one. That is more useful for the user
2015-01-20 11:27:13 +11:00
Andrew Tridgell
2235d18d67 AP_Airspeed: make it possible to tell if a airspeed sensor is unhealthy
we need use() to reflect if the user wants to use the sensor, so the
arming checks can tell if it is not working as expected
2015-01-20 11:26:20 +11:00
Andrew Tridgell
b3ce56d34d AP_InertialSensor: fixed 2nd IMU in Replay
this makes for much more accurate replay runs
2015-01-20 09:20:47 +11:00
Andrew Tridgell
5d83124675 DataFlash: moved airspeed msg to DataFlash
so it can be used by Replay
2015-01-20 09:10:33 +11:00
Andrew Tridgell
62e7778ba8 AP_GPS: fixed build warning 2015-01-19 11:22:10 +11:00
Randy Mackay
aeecc46f7b AC_PosControl: remove unnecessary set of desired_accel
The desired_accel is set again 11 lines lower so this line did nothing.
2015-01-14 16:23:26 +09:00
Jonathan Challinger
9ebd0e9960 AC_PosControl: reincarnate dead block of code 2015-01-14 16:20:17 +09:00
Jonathan Challinger
a580cd83e8 AC_PosControl: Fill _vel_desired.z for reporting 2015-01-14 16:08:48 +09:00
priseborough
c40c3632bb AP_NavEKF: Critical Bug Fix
Prevents possible loss of attitude reference for flights without optical flow and GPS.

The optical flow measurement timeout can reset the velocity states which decouples the position states from IMU errors and therefore significantly reduces the amount of attitude error correction.
2015-01-13 16:05:31 +13:00
mirkix
62a05a0438 AP_Notify: fix if statement 2015-01-13 12:15:32 +13:00
mirkix
fa950a735e AP_InertialSensor: add support for BBBMINI, simple ArduPilot DIY Cape for the BeagleBone Black 2015-01-12 21:36:40 +13:00
mirkix
c58a022111 AP_HAL_Linux: add support for BBBMINI, simple ArduPilot DIY Cape for the BeagleBone Black 2015-01-12 21:36:40 +13:00
mirkix
70445d11f6 AP_HAL: add support for BBBMINI, simple ArduPilot DIY Cape for the BeagleBone Black 2015-01-12 21:36:40 +13:00
Randy Mackay
c93e7a69a7 Baro: init external_temperature in constructor 2015-01-12 13:56:35 +09:00
mirkix
b03a9e2911 AP_Notify: ToneAlarm_Linux.h includes itself 2015-01-11 11:50:07 +09:00
Andrew Tridgell
b1d8df3d54 AP_Baro: only allow calibrated sensors to be used 2015-01-09 12:59:01 +11:00
Andrew Tridgell
e8b1fc72e0 DataFlash: fixed build warning 2015-01-09 12:43:15 +11:00
Andrew Tridgell
3320dfd7fa AP_Baro: fixed ms5611 spelling error 2015-01-09 11:59:49 +11:00
Andrew Tridgell
0a8677b3e2 AP_Baro: fixed build after rebase with all_healthy() 2015-01-09 11:51:52 +11:00
Andrew Tridgell
1c2a6deaaf AP_Baro: added all_healthy() method 2015-01-09 11:51:51 +11:00
Andrew Tridgell
8359c082ca AP_Baro: fixed baro on NavIO
don't use the 1kHz timer as it conflicts with other I2C devices
2015-01-09 11:51:51 +11:00
Andrew Tridgell
b85001bf4a DataFlash: added logging of 2nd baro 2015-01-09 11:51:51 +11:00
Andrew Tridgell
b1342c2d39 GCS_MAVLink: send SCALED_PRESSURE2 if available 2015-01-09 11:50:57 +11:00
Andrew Tridgell
19c717df2e AP_OpticalFlow: updates for new AP_Baro API 2015-01-09 11:50:56 +11:00
Andrew Tridgell
8aa1a89081 AP_Mission: updates for new AP_Baro API 2015-01-09 11:50:56 +11:00
Andrew Tridgell
cd7fbddcce AP_InertialNav: updates for new AP_Baro API 2015-01-09 11:50:56 +11:00
Andrew Tridgell
197c09fcd8 AP_Baro: added num_instances() API 2015-01-09 11:50:56 +11:00
Andrew Tridgell
d2c827aa4b AP_AHRS: updates for new AP_Baro API 2015-01-09 11:50:56 +11:00
Andrew Tridgell
25f69f05eb AC_WPNav: updates for new AP_Baro API 2015-01-09 11:50:56 +11:00
Andrew Tridgell
5ec8ce933e AC_Sprayer: updates for new AP_Baro API 2015-01-09 11:50:56 +11:00
Andrew Tridgell
55ec316718 AC_Fence: updates for new AP_Baro API 2015-01-09 11:50:56 +11:00
Andrew Tridgell
5c4440a9ac AC_AttitudeControl: updates for new AP_Baro API 2015-01-09 11:50:56 +11:00
Andrew Tridgell
bb6deb4817 GCS_MAVLink: re-generated headers 2015-01-09 11:50:55 +11:00
Andrew Tridgell
56f682f186 GCS_MAVLink: added SCALED_PRESSURE2 message 2015-01-09 11:50:55 +11:00
Andrew Tridgell
8a3d3bed72 SITL: changes for new AP_Baro API 2015-01-09 11:50:54 +11:00
Andrew Tridgell
f1891cea1f AP_Baro: BMP085 driver done, but untested 2015-01-09 11:50:54 +11:00
Andrew Tridgell
5bb57a31f7 AP_Baro: split into frontend/backend
this allows for support of multiple sensors on a board
2015-01-09 11:50:54 +11:00
Andrew Tridgell
464714f1ab HAL_PX4: fixed build warning 2015-01-09 11:37:46 +11:00
Andrew Tridgell
d34e5b3f42 AP_GPS: fixed PX4 GPS driver for new upstream format 2015-01-09 11:37:38 +11:00
Andrew Tridgell
ef5cdb0d6c AP_NavEKF: use more array bounds checked variables 2015-01-09 11:05:07 +11:00
Andrew Tridgell
fefdc37a4d AP_Math: fixed warnings on bounds checking in quaternion 2015-01-09 11:04:50 +11:00
priseborough
3d46680348 AP_NavEKF: Make NED origin independent of home position
This enables the filter to report the last known position after disarm.
The LLH location of the filters NED origin is published and should be logged every time the vehicle is armed to assist with post-flight trajectory reconstruction.
The LLH location of the filters NED origin can be set externally whilst the vehicle is disarmed.
2015-01-09 10:51:24 +11:00
priseborough
f0ea858e4c AP_NavEKF: Make LLH output report last known position in const pos mode 2015-01-09 10:51:24 +11:00
priseborough
a0957a83f8 AP_NavEKF: Fix bug in reported position and velocity
The last known position was being output on the velocities when in constant position mode.
2015-01-09 10:51:24 +11:00
priseborough
7d1cd604a8 AP_NavEKF: Report last known position when GPS is lost 2015-01-09 10:51:24 +11:00
priseborough
1789dc08a3 AP_NavEKF: Correctly report position timeout when GPS is lost 2015-01-09 10:51:24 +11:00
Randy Mackay
3e583e3650 DataFlash: fix EKF4 logging 2015-01-09 10:51:24 +11:00
Randy Mackay
e6e6a781c1 AP_NavEKF: init filter status bits to zero 2015-01-09 10:51:23 +11:00
priseborough
ffd9f7a4ed AP_NavEKF: Predict filter solution status 2015-01-09 10:51:23 +11:00
Randy Mackay
3896dadc77 DataFlash: EKF logs filter status as uint16 2015-01-09 10:51:23 +11:00
Randy Mackay
657afcfe7a AP_NavEKF: add pred_horiz_pos flags to filter status 2015-01-09 10:51:23 +11:00
Randy Mackay
54cff29fc2 DataFlash: EKF logging uses nav_filter_status 2015-01-09 10:51:23 +11:00
Randy Mackay
f4d8bc586c Nav_EKF: getFilterStatus returns nav_filter_status struct 2015-01-09 10:51:23 +11:00
Randy Mackay
8a914af4a8 AP_NavEKF: add nav_filter_status definition 2015-01-09 10:51:23 +11:00
priseborough
d57e0b6bde AP_NavEKF: Remove compiler warning messages 2015-01-09 10:51:23 +11:00
priseborough
a4ba4d1000 AP_NavEKF: Fix bug in optical flow innovation variances
Also improves protection against badly conditioned variances
2015-01-09 10:51:23 +11:00
priseborough
8bc8d1444a AP_NavEKF: Extend definition of GPS availability to include user inhibit 2015-01-09 10:51:22 +11:00
priseborough
d0d49065e7 AP_NavEKF: Prevent potential repeated use of optical flow data 2015-01-09 10:51:22 +11:00
priseborough
b0c703e4f7 AP_NavEKF: Fix bug in optical flow fusion control logic 2015-01-09 10:51:22 +11:00
priseborough
d656c94bbc AP_NavEKF: Fix out of bounds index bug 2015-01-09 10:51:22 +11:00
priseborough
300ba65f64 AP_NavEKF: Remove duplicate flow measurement state correction 2015-01-09 10:51:22 +11:00
priseborough
92bb75a635 AP_NavEKF: Prevent load leveling from dropping flow measurements 2015-01-09 10:51:22 +11:00
priseborough
873860e810 DataFlash: Allow negative HAGL values in the EKF optical flow debug log 2015-01-09 10:51:22 +11:00
priseborough
2f5aa210ce AP_NavEKF: Enable recovery from extended flow measurement rejection 2015-01-09 10:51:21 +11:00
priseborough
d470d55234 DataFlash: Update EKF optical flow debug logging 2015-01-09 10:51:21 +11:00
priseborough
9f4baaa865 AP_NavEKF: Update flow debug logging 2015-01-09 10:51:21 +11:00
priseborough
8d1dae3ac1 AP_NavEKF: Improve optical flow terrain height estimation
The two state auxiliary EKF has been replaced with a single state filter that only estimates terrain offset. The new filter fuses a optical flow line of sight rate scalar (length of the optical flow LOS rate vector) which provides a terrain offset estimate that is less affected by yaw errors.
Estimation of focal length scale factor error in flight wasn't accurate enough and will be replaced with a pre-flight intrinsic sensor calibration procedure as the scale factor error does not change over time provided the lens assembly is not adjusted.

AP_NavEKF: Remove unwanted printf
2015-01-09 10:51:21 +11:00
priseborough
d599fa588e AP_NavEKF: Don't allow EKF to initialise without GPS lock if we are a plane
This is needed because planes arm automatically.

AP_NavEKF: Fix bug in GPS patch
2015-01-09 10:51:21 +11:00
Staroselskii Georgii
c16eb5d330 AP_Compass: fixed corrections for AK8963 2015-01-09 06:38:22 +11:00
Staroselskii Georgii
4394f0cf75 AP_Compass: fixed external compass detection for AK8963 2015-01-09 06:38:22 +11:00
Staroselskii Georgii
f0753e965e AP_Compass: eliminated possible division by zero in AK8963 2015-01-09 06:38:22 +11:00
Staroselskii Georgii
b804430276 AP_Compass: changed default orientation for AK8963 on Navio 2015-01-09 06:38:22 +11:00
Mikhail Avkhimenia
954b0795d4 HAL_Linux: Enable PCA9685 output after its setup 2015-01-09 06:38:21 +11:00
Randy Mackay
2a5a133bbf AC_AttControl: remove deprecated trigger_xy method 2015-01-07 14:03:49 +09:00
Randy Mackay
ed7e176c61 LandingGear: command_mode becomes enum 2015-01-07 11:58:22 +09:00
Robert Lefebvre
c297aaeeab AP_LandingGear: Add force_deploy method. 2015-01-07 11:58:19 +09:00
Robert Lefebvre
4177852d89 AP_LandingGear: Remove relay control from library. 2015-01-07 11:58:17 +09:00
Robert Lefebvre
4935a42054 RC_Channel_Aux: Add new landing gear control to Aux_servo_function_t enum.
Conflicts:
	libraries/RC_Channel/RC_Channel_aux.h
2015-01-07 11:58:17 +09:00
Robert Lefebvre
9b0a33c453 AP_LandingGear: Create LandingGear Library. 2015-01-07 11:58:15 +09:00
Andrew Tridgell
1b3c3c754d AP_InertialSensor: use correct ifdef for AK8963 2015-01-07 11:58:05 +11:00
Andrew Tridgell
9835544163 AP_Compass: fixed build on non-Linux platforms 2015-01-07 08:41:14 +11:00
Andrew Tridgell
2ddf3e728a DataFlash: use common RingBuffer.h 2015-01-07 08:41:14 +11:00
Andrew Tridgell
9d3a9c20a8 HAL_VRBrain: use common RingBuffer.h 2015-01-07 08:41:14 +11:00
Andrew Tridgell
0c73dc2440 HAL_PX4: use common RingBuffer.h 2015-01-07 08:41:14 +11:00
Andrew Tridgell
4da0a24887 HAL_Linux: use common RingBuffer.h 2015-01-07 08:41:14 +11:00
Andrew Tridgell
6fb00f4fc3 AP_HAL: create a common utility/RingBuffer.h header 2015-01-07 08:41:14 +11:00
Staroselskii Georgii
43c88c37eb AP_Baro: fixed MS5611 initialisation in order to get rid off conflicts with other I2C devices 2015-01-07 08:41:13 +11:00
Staroselskii Georgii
f7f9cd2173 AP_InertialSensor: prevented MPU9250 from disabling I2C slaves 2015-01-07 08:41:13 +11:00
Staroselskii Georgii
a08a34f863 AP_HAL: changed default compass for Navio 2015-01-07 08:41:13 +11:00
Staroselskii Georgii
0d1cf347c7 AP_Compass: added AK8963 support 2015-01-07 08:41:12 +11:00
Staroselskii Georgii
e4a21f291d AP_HAL_Linux: added LinuxSPIUARTDriver that can handle SPI-driven Ublox 2015-01-07 08:41:12 +11:00
Staroselskii Georgii
2b589d4604 AP_HAL_Linux: enable output for PCA9685 PWM in NavioRCOuput 2015-01-07 08:41:12 +11:00
Randy Mackay
f41d7ddaee Rally: reduce distance limit to 300m for copter
This reduces the chance that a forgotten rally point will cause the
vehicle to RTL to a distant location because instead it will RTL to
home.
2015-01-06 15:55:47 +09:00
Andrew Tridgell
e9058df31f SITL: added optional flow delay 2015-01-06 14:19:02 +11:00
Andrew Tridgell
228b04e21e SITL: added SIM_FLOW_DELAY parameter 2015-01-06 14:19:02 +11:00
Andrew Tridgell
0076413c0a SITL: produce flow data at the requested rate 2015-01-06 14:19:02 +11:00
Andrew Tridgell
5758f39127 SITL: added SIM_FLOW_RATE parameter 2015-01-06 14:19:02 +11:00
Andrew Tridgell
b499cd1b59 AP_AHRS: fixed examples build
using a relative include works as the object is just passed through,
not used, in this header
2015-01-05 07:04:27 +11:00
priseborough
2f0b1b3d9c AP_NavEKF: Fix bug preventing use of optical flow without GPS 2015-01-03 21:49:22 +11:00
Andrew Tridgell
f13248e5f5 SITL: implement SIM_TERRAIN
either use AP_Terrain or flat earth
2015-01-03 21:47:54 +11:00
Andrew Tridgell
9b65376961 SITL: added SIM_TERRAIN parameter
to choose either flat earth or AP_Terrain for sonar and optical flow
AGL emulation
2015-01-03 21:47:28 +11:00
Andrew Tridgell
d25bd8955d GCS_MAVLINK: move send_opticalflow() into common library 2015-01-03 15:53:22 +11:00
Andrew Tridgell
66a03d100e SITL: make some units clearer in comment 2015-01-03 15:44:19 +11:00
Andrew Tridgell
16affe51be AP_NavEKF: avoid an extra quaternion copy 2015-01-03 15:44:07 +11:00
Andrew Tridgell
023c42593f SITL: fixed units of body frame conversion for optical flow 2015-01-03 15:43:30 +11:00
priseborough
bf4ebcfda1 AP_HAL_AVR_SITL: Add maths for calculation of truth optical flow rates 2015-01-03 14:45:13 +11:00
Andrew Tridgell
70c2aeca42 AP_AHRS: make optflow available via AHRS
same pattern as compass and airspeed sensor
2015-01-03 14:16:34 +11:00
Andrew Tridgell
51cd64b3b2 SITL: make velocity and rotmat available to the optical flow simulator 2015-01-03 14:16:34 +11:00
Andrew Tridgell
aff01c6d09 AP_OpticalFlow: fixed reversed timestamp
thanks to Randy
2015-01-03 14:16:34 +11:00
Andrew Tridgell
d2634a26bd SITL: added framework for SITL optical flow sensor 2015-01-03 14:16:34 +11:00
Andrew Tridgell
254aa32d4e SITL: added SIM_FLOW_ENABLE option 2015-01-03 14:16:34 +11:00
Andrew Tridgell
11ff12dfd3 AP_OpticalFlow: split library into frontend/backend
this will make it easier to add a SITL backend
2015-01-03 14:16:33 +11:00
priseborough
a9eec29e45 DataFlash: Update EKF optical flow data logging 2015-01-03 14:09:15 +11:00
priseborough
69e86d3ea4 AP_NavEKF: Update EKF optical flow data logging 2015-01-03 14:09:12 +11:00
priseborough
b651eac48d AP_NavEKF: Apply timeout to terrain offset validity reporting
The terrain offset solution status is usable for a short period of time without state updates so a timeout has been added which prevents the rapid changes in solution status due to short duration sensor read errors.
2015-01-03 14:09:09 +11:00
priseborough
e6474d676e AP_NavEKF: Report correct horiz vel sol'n status during optical flow nav 2015-01-03 14:09:05 +11:00
priseborough
75201c8968 AP_NavEKF: Prevent divide by zero casued by Tnb_flow.c.z = 0 2015-01-03 14:07:13 +11:00
Andrew Tridgell
6bb4a8c361 AP_Math: make location_path_proportion() and location_passed_point() more efficient
the dot product is much more efficient than the trigonometry. Thanks
to Paul for the suggestion
2015-01-03 14:06:59 +11:00
Andrew Tridgell
6993be54b7 HAL_Linux: raise storage size to 16k
match PX4 size
2015-01-03 14:06:54 +11:00
Andrew Tridgell
745b739ab7 AP_InertialSensor: make calibrated() function fast enough to call in flight
this will be used in plane to make AHRS SYS_STATUS unhealthy if a user
tries to fly with EKF enabled without a full 3D accel cal.

Note that it doesn't rely on using AP_Param load() to detect that a
value has been set, as some users are first doing a 3D cal then later
doing a 1D cal. In that case load() was returning true and would give
a false positive
2015-01-03 14:06:42 +11:00
Randy Mackay
5ba1b20d3b BattMon: add SMBus to MONITOR param description 2015-01-02 17:20:05 +09:00
Randy Mackay
ffbc3862bd Compass: update compass orient param description
Update rotation 38 to Yaw293Pitch68Roll90
2015-01-02 17:19:12 +09:00
Jonathan Challinger
9e5a30d5ba AP_Math: change ROTATION_YAW_293_PITCH_68_ROLL_180 to ROLL_90 2015-01-02 17:15:18 +09:00
Andrew Tridgell
ef55a3c6a6 AP_GPS: keep reporting GPS status messages when no GPS at 1Hz
to ensure the GCS knows that we have lost the GPS we need to keep
reporting GPS_RAW_INT messages when the GPS disappears. Sending at 1Hz
should be sufficient

Fixes issue #1722
2015-01-02 17:10:23 +11:00
priseborough
8d3940ce1b AP_NavEKF: Improved use of enumerated type for aiding mode 2015-01-02 12:10:41 +09:00
priseborough
76d1378962 AP_NavEKF: Fix compiler warning messages 2015-01-01 23:39:48 +11:00
priseborough
3e3dd9d695 AP_NavEKF: Fix parenthesis error in EKF status reporting and clean up logic
This fixes a bug which could have caused the realative position status to be incorrectly reported under some conditions and also caused a compiler warning message. the logic used to report the filter solution status has been broken down into smaller, easier to understand statements.
2015-01-01 23:39:48 +11:00
priseborough
c06f6e105e AP_NavEKF: Consistent initialisation of tuning parameters and variables
Non user adjustable parameters are now declared as 'const' in the header.
The _ prefix has been removed from non user adjustable tuning parameters.
We use a function call rather than a constructor to initialise variables because it enables the filter to be re-started in flight if necessary.
For consistency some signed integer type declarations have been changed to unsigned where appropriate.
2015-01-01 23:39:31 +11:00
priseborough
f1dfa282dc AP_NavEKF: Consolidate constant velocity mode decision logic
The decision to switch to constant velocity mode during optical flow operation and te decision to switch back were previously being made in two different places in code. Both decisions are now made in the one place which makes the code easier to follow and maintain.
2015-01-01 19:53:21 +11:00
priseborough
9caf2ac895 AP_NavEKF: Make reversion to no GPS mode unambiguous 2015-01-01 19:53:21 +11:00
priseborough
58e9dd5dcd AP_NavEKF: Enumerate Position and Velocity aiding status 2015-01-01 19:53:21 +11:00
Andrew Tridgell
fb5e53e1e4 AP_Param: cope with older gcc versions
Travis-CI uses 4.6.3
2015-01-01 18:55:11 +11:00
Andrew Tridgell
9ae0dd05f8 AP_Param: avoid build warning due to %S format 2015-01-01 18:25:05 +11:00
Andrew Tridgell
f38f86ab8c AP_Math: added location_path_proportion()
this can be used for glide slope calculations
2015-01-01 15:17:10 +11:00
Andrew Tridgell
4e5510c99e AP_TECS: fixed warning 2015-01-01 15:14:48 +11:00
Andrew Tridgell
f8bce994b5 AP_OpticalFlow: don't write an error message if no flow sensor
most users have no flow sensor
2015-01-01 11:02:43 +11:00
Andrew Tridgell
06a72839ed AP_InertialSensor: fixed error detection on secondary IMUs
the break; was preventing error detection on lsm303d/l3gd20
2015-01-01 08:55:57 +11:00
Randy Mackay
022c549339 BattMon_SMBus_I2C: use get_PEC to check reads 2014-12-31 15:23:00 +09:00
Randy Mackay
bf0e5a350c BattMon_SMBus_I2C: add get_PEC method 2014-12-31 15:22:59 +09:00
Randy Mackay
3951e4d99b BattMon: example sketch reads from SMBus 2014-12-31 15:22:58 +09:00
Randy Mackay
aecc8aac1f BattMon: correct typo in monitor type enum 2014-12-31 15:22:57 +09:00
Randy Mackay
909d525206 BattMon: fix example sketch compile error 2014-12-31 15:22:51 +09:00
Randy Mackay
cf36fd55bd GCS_MAVlink: correct sending of 2nd battery's voltage 2014-12-31 15:22:49 +09:00
Randy Mackay
76a28a962c BattMon: remove #defines for monitor type 2014-12-31 15:22:47 +09:00
Randy Mackay
f077ecd338 BattMon_PX4: class to read from PX4Firmware via orb 2014-12-31 15:22:46 +09:00
Randy Mackay
3f35dc54fe BattMon_I2C: smart battery class for APM 2014-12-31 15:22:45 +09:00
Randy Mackay
314db1403d BattMon_SMBus: smart battery monitor driver 2014-12-31 15:22:45 +09:00
Randy Mackay
4d7df9ed26 BattMon_Analog: move analog features to new class 2014-12-31 15:22:44 +09:00
Randy Mackay
39dbf05c8f BattMon_Backend: create backend class 2014-12-31 15:22:43 +09:00
Randy Mackay
eec66d8451 BattMon: parent class becomes frontend class 2014-12-31 15:22:42 +09:00
Randy Mackay
c36253b9b2 AC_PosControl: add comments
No functional change
2014-12-31 14:03:22 +09:00
Jonathan Challinger
6eab698e85 AC_WPNav: remove various timing hacks 2014-12-31 14:03:20 +09:00
Jonathan Challinger
557d339cf1 AC_PosControl: remove various unnecessary timing hacks 2014-12-31 14:03:18 +09:00
Jonathan Challinger
5438d38df5 AC_WPNav: provide reset_I to init_xy_controller 2014-12-31 14:03:16 +09:00
Jonathan Challinger
d6e455417f AC_PosControl: change keep_xy_I_terms to a parameter of init_xy_controller 2014-12-31 14:03:13 +09:00
priseborough
b016bae445 AP_NavEKF: Clean up reset of constant velocity mode
Move velocity store out of optical flow to velocity and position fusion control as it is a velocity fusion function.
Always clear the previous mode status
2014-12-31 13:16:16 +09:00
priseborough
3d207c316a AP_NavEKF: Change names for position and velocity hold modes
Name change done to avoid confusion with flight modes. modes are now referred to as constant position and constant velocity mode.
2014-12-31 13:16:15 +09:00
priseborough
b650ee51a9 AP_NavEKF: Consolidate arming checks 2014-12-31 13:16:15 +09:00
priseborough
48cae0df15 AP_NavEKF: Fall back to attitude and hgt estimation for copter if GPS lost 2014-12-31 13:16:14 +09:00
priseborough
b21f9daa90 AP_NavEKF: Update solution status reporting
This patch makes the reporting of an absolute position solution less abbiguaous and ensures that relative position is always true if absolute position is true
2014-12-31 13:16:13 +09:00
priseborough
b99b3c7b9d DataFlash: Don't log EKF optical flow data if not required 2014-12-31 13:16:09 +09:00
priseborough
b6d300db19 AP_NavEKF: clean up determination of GPS availability 2014-12-31 13:14:22 +09:00
priseborough
40b02fc19a AP_NavEKF: Ensure filter doesn't try to use GPS after initialisation 2014-12-31 13:14:20 +09:00
priseborough
bab1a69f1c AP_NavEKF: make position and velocity resets consistent with GPS usage 2014-12-31 13:14:18 +09:00
priseborough
0dc2356175 AP_NavEKF: Ensure initialisation methods read required sensor data 2014-12-31 13:14:16 +09:00
priseborough
5d1de79f08 AP_NavEKF: Modify initial values to make startup behaviour more consistent 2014-12-31 13:14:14 +09:00
priseborough
a63af34d8f AP_NavEKF: Allow 10 seconds for the filter to settle after initialisation
Filter is declared unhealthy and will not arm for first 10 seconds after initialisation
2014-12-31 13:14:12 +09:00
priseborough
0a5de21dc7 AP_NavEKF: Fix bug in reporting of solution status
Because synthetic  position measurements at 0,0 are fused during position hold mode, a position timeout cannot be used as the only means of detecting position solution status.
2014-12-31 13:14:09 +09:00
priseborough
92c3026072 AP_NavEKF: Link process noise to arm status, not pos hold mode 2014-12-31 13:14:07 +09:00
priseborough
a535b73a6d AP_NavEKF: Initialise timeout status to true
This status will be cleared when data arrives and is fused successfully
2014-12-31 13:14:04 +09:00
priseborough
363c1e393d AP_NavEKF: Latch use of position hold mode for duration of flight
Required to prevent acquisition of GPS mid flight causing unwanted change in position and velocity
A distinction has been mad between the arm and disarm transition and the decision to use position hold mode (formerly static mode)
2014-12-31 13:14:02 +09:00
priseborough
a0a6c0362f AP_NavEKF: Relax timeout check applied to optical flow data
200 msec was too short and could lead to false positives. 5000 msec is the largest time we can go free inertial.
2014-12-31 13:14:00 +09:00
priseborough
5bd4ee9715 AP_NavEKF: Use compensation for baro delay in position hold mode 2014-12-31 13:13:58 +09:00
priseborough
4dc1ee2d66 AP_NavEKF: Rename static mode to avoid confusion with other non-GPS modes
This renames static mode as posHoldMode to make it clearer what this and the other non-GPS modes do
2014-12-31 13:13:54 +09:00
priseborough
b160f4c03b AP_NavEKF: Compensate optical flow fusion for GPS glitch recovery offset 2014-12-31 13:13:52 +09:00
priseborough
e4c969084d AP_NavEKF: Improve behaviour recovering from a GPS timeout
When regaining GPS after a timeout, an offset is applied when fusing  GPS velocity so that GPS velocity and position data as fused by the EKF is kinematically consistent.
This velocity offset is also accounted for when fusing air data so that wind estimates are not corrupted when the GPS position offset is being pulle back to zero.
The intended behaviour is that the EKF position will be pulled back to the GPS position at a rate of 5m/s for planes and 1 m/s for copters. This avoids large deviations in trajectory when GPS is regained.
2014-12-31 13:13:50 +09:00
priseborough
6eb533121c AP_NavEKF: Add static mode to solution status message 2014-12-31 13:13:48 +09:00
priseborough
5c3a56a087 AP_NavEKF: Fix error in comments 2014-12-31 13:13:46 +09:00
priseborough
3891dada78 AP_NavEKF: remove unnecessary function 2014-12-31 13:13:44 +09:00
priseborough
a16253796f AP_NavEKF: Fix bug preventing the non-GPS mode being selected externally
When on the ground it is likely the flow sensor will be returning  data that does not meet the minimum quality requirements selected.
The previous check was for the presence of valid data. This has been loosened to look for the presence of data.
When the vehicle becomes airborne, the quality of flow data normally improves as the image comes into focus.
2014-12-31 13:13:42 +09:00
priseborough
a42100e4c5 AP_NavEKF: Improved handling of no GPS
This patch enables indoor operation of the EKF by putting it into static mode if optical flow operation is not enabled and no GPS is available
2014-12-31 13:13:40 +09:00
priseborough
73a06cd0c1 AP_NavEKF: Fix bug causing magnetic field state learning to be forgotten 2014-12-31 13:13:37 +09:00
priseborough
bf89c56e54 AP_NavEKF: Fix comments error in description of flow sensor sign conventions 2014-12-31 13:13:35 +09:00
priseborough
685fa383e4 DataFlash: Log EKF solution status message
This message is a bitmasked integer that will be used by control software to determine what data is available from the EKF and decide what control modes are available.
Duplicate static mode message removed. Static mode is now contained in the bitmasked solution status message
2014-12-31 13:13:33 +09:00
priseborough
4eb19c2324 AP_NavEKF: Rationalise health status reporting
1) Un-used public methods to report height and position drifting have been removed
2) A time-out has been added to the airspeed innovation consistency check so that if we are relying on airspeed to constrain velocity drift, a filter divergence or other fault that causes the airspeed to be continually rejected will trigger a change in health status.
3) A timeout of velocity, position or height measurements does not cause a filter fault to be reported. Timeouts can be due to sensor errors and do not necessarily indicate that the filter has failed.
4) Time-outs of various measurements are used to present a consolidated bitmask which inidicates which parts of the solution can be used, eg attitude, height, velocity, relative position, absolute position, etc.
2014-12-31 13:13:31 +09:00
priseborough
78b30e4ce5 AP_NavEKF: Increase rate at which GPS glitch offsets are reduced for planes 2014-12-31 13:13:29 +09:00
Andrew Tridgell
e0943851d6 DataFlash: log gyro and accel error counts 2014-12-30 12:16:02 +11:00
Andrew Tridgell
b9adc6e466 AP_InertialSensor: prefer sensors that have zero error counts
if a sensor has failed in flight then try not to use it if another
error-free sensor is available
2014-12-29 21:19:35 +11:00
Randy Mackay
4a1ba9b186 AC_WPNav: minor const fix 2014-12-27 13:19:32 +09:00
Randy Mackay
c7192c5eef Notify: remove Led class
This class didn't add any functionality beyond what the NotifyDevice class
already provided so in keeping with our desire to keep things simple we
can remove this class
2014-12-26 13:06:41 +09:00
Randy Mackay
352b52d73f Notify: remove reliance on Led class 2014-12-26 13:06:24 +09:00
Randy Mackay
d67b4a8d49 Notify: add pre_arm_gps_check flag
RGB LED will remain flashing blue when vehicle is disarmed and this
check has failed (i.e. false).
2014-12-26 12:32:34 +09:00
Andrew Tridgell
c93ae67541 DataFlash: don't try and open logfile on failure more than once
this prevents a corrupted microSD card from causing a continuous
attempt to open a log file while in flight, which can cause large
scheduler delays

Pair-Programmed-With: Grant Morphett <grant@gmorph.com>
2014-12-21 14:50:42 +11:00
Andrew Tridgell
abd1ece6e3 DataFlash: don't write out parameters if log open fails 2014-12-21 14:50:42 +11:00
priseborough
f2c506339a AP_NavEKF: Reduce time required to recover from GPS timeouts
The time required for GPS to be lost or rejected before vehicles with airspeed sensors either reset to GPS or invoke the zero side-slip assumption to constrain drift has been reduced from 15 to 10 seconds
A duplicate zeroing of the GPS position offset has been removed
If the vehicle is a non hovering vehicle (eg a plane) then the speed at which the GPS offset is pulled back to zero after a reset is increased from 1 to 3  m/s

This also improves recovery from bad inertial data for planes
2014-12-18 21:50:40 +11:00
priseborough
f73816dbb5 AP_NavEKF: Improve robustness to long periods without GPS 2014-12-18 21:07:45 +11:00
Randy Mackay
a44b4b5e87 Mission: allow 15 do-jump commands on Pixhawk 2014-12-18 17:02:48 +09:00
priseborough
3afde0061f AP_NavEKF: Use named states for velocity reset
Readibility improvement
2014-12-18 17:29:50 +11:00
priseborough
f6ce25df2a AP_NavEKF: Do not reset vertical velocity state from GPS
Doing this can cause large height and height rate errors if large GPS velocity errors cause the GPS tn be rejected for long enough to cause a timeout and reset of states.
2014-12-18 17:29:47 +11:00
Andrew Tridgell
597273cfff AP_TECS: remove lag from height demand in landing
this predicts ahead the height demand for landing, where we have a
continuous demanded descent. This removes the effect of the lag
introduced by the height demand filters
2014-12-18 09:58:12 +11:00
Andrew Tridgell
b5a5b71512 GCS_MAVLink: reverse sense of check_and_forward()
also increase number of routes on larger systems and improved route
learning logic
2014-12-17 10:32:28 +11:00
Andrew Tridgell
a967a682a4 GCS_MAVLink: added routing test sketch 2014-12-17 10:32:28 +11:00
Andrew Tridgell
7f817502c4 GCS_MAVLINK: implement new routing rules
see description in coments
2014-12-17 10:32:28 +11:00
Andrew Tridgell
70f5ec60e8 AP_TECS: added get_land_sinkrate() 2014-12-15 21:51:07 +11:00
Andrew Tridgell
8c1cab84c7 AP_SpdHgtControl: added get_land_sinkrate() 2014-12-15 21:51:07 +11:00
Randy Mackay
21beb26484 Notify: minor event reordering
No functional change
2014-12-15 14:10:26 +09:00
Randy Mackay
e68a69e139 ToneAlarm_PX4: remove user_mode_init flag
Replaced by an initialised check in the main ArduCopter flight code
2014-12-15 14:10:21 +09:00
Randy Mackay
1c8ab375e2 Notify: rename failsafe_action event 2014-12-15 14:10:15 +09:00
Randy Mackay
972c8e47d2 Notify: rename notify_types to notify_flags_type 2014-12-15 14:10:10 +09:00
Randy Mackay
bfc86ac7c0 ToneAlarm_PX4: add comments 2014-12-15 14:10:06 +09:00
Randy Mackay
c75ab8f3e5 Notify: add comments re events 2014-12-15 14:09:15 +09:00
Jonathan Challinger
3dfcdde6be AP_Notify: Rework ToneAlarm_PX4 to play tones from local array 2014-12-15 14:09:04 +09:00
priseborough
e2d47f836e AP_TECS: Fix bug causing plane to fly high on landing approach
The introduction of the height rate flare logic caused the demanded height rate to be zero except when a flare manouevre was being performed. This caused the plane to lag behind height changes if the D gain was non-zero, which caused it to fly high during landing approach.
2014-12-14 09:43:46 +11:00
Randy Mackay
b54b7b7448 GCS_MAVLink: fix compiler error 2014-12-11 16:26:26 +09:00
Randy Mackay
e581e81da5 AP_NavEKF: reorder declation to fix compiler warning
No functional change
2014-12-11 15:37:56 +09:00
Randy Mackay
ddda0d52ce Baro: reorder declaration to fix compiler warning
No functional change
2014-12-11 13:06:24 +09:00
Andrew Tridgell
ade7f9e1a9 GCS_MAVLink: fixed forwarding of non-targetted messages 2014-12-11 12:32:50 +09:00
Andrew Tridgell
fcf17829cc GCS_MAVLink: fixed addition to routing table 2014-12-11 12:32:48 +09:00
Andrew Tridgell
079158d4b8 GCS_MAVLink: strip out the old GCS_Class class
this is not longer needed as we don't support multiple protocol
classes
2014-12-11 12:32:45 +09:00
Andrew Tridgell
f198cdcf20 GCS_MAVLink: added support for a MAVLink snoop function
this can be used to watch messages for different targets
2014-12-11 12:32:32 +09:00
Andrew Tridgell
34be7f808e GCS_MAVLink: only try to fwd packets to active channels 2014-12-11 12:32:30 +09:00
Andrew Tridgell
411766f45a AP_Mount: removed use of mavlink_check_target() 2014-12-11 12:32:27 +09:00
Andrew Tridgell
4a9331c505 AP_Camera: removed use of mavlink_check_target() 2014-12-11 12:32:24 +09:00
Andrew Tridgell
f1edd1bafb GCS_MAVLink: removed use of mavlink_check_target()
not needed now we do routing properly, as messages will only be
processed if they are for us
2014-12-11 12:31:06 +09:00
Andrew Tridgell
aa88ba4158 GCS_MAVLink: only call message handler for our own messages 2014-12-11 12:30:59 +09:00
Andrew Tridgell
11f88f0f5d GCS_MAVLink: added routing object to GCS_MAVLink 2014-12-11 12:30:55 +09:00
Andrew Tridgell
b91529622b GCS_MAVLink: initial implementation of MAVLink routing object
will be used to auto-route packets over all available links
2014-12-11 12:30:50 +09:00
Andrew Tridgell
76c710f596 GCS_MAVLink: removed obsolete headers 2014-12-11 12:30:46 +09:00
Andrew Tridgell
3354cb37d0 AP_GPS: fixed vertical velocity in Replay
fixed NavEKF use of velocity velocity
2014-12-09 18:57:17 +11:00
Andrew Tridgell
4a91546ced HAL_PX4: FRAM does not support fsync
the fsync just wastes time reopening /fs/mtd
2014-12-09 14:35:36 +11:00
Randy Mackay
da247bacf8 GCS_MAVLink: add OPTICAL_FLOW to ap_message enum 2014-12-08 14:58:30 +09:00
Randy Mackay
3c23f00e81 OptFlow: remove ADNS3080 image grabber example 2014-12-08 14:58:24 +09:00
Andrew Tridgell
193bda068c HAL_Linux: run IO processes when we do a stop_clock()
this has the effect of allowing logging to progress in Replay where we
are running at much more than realtime speeds
2014-12-08 11:24:39 +11:00
Andrew Tridgell
cb9c518ab8 Revert "AP_NavEKF : Reduce ripple in estimates that can cause copter motor 'pulsing'"
This reverts commit 13df6fb1c9.

This patch was a result of an incorrect merge of the optflow branch
into master. It reintroduced the bug fixed by this commit:

  AP_NavEKF : Fix bug in reset of GPS glitch offset
  8aa267f75f
2014-12-08 07:53:47 +11:00
Andrew Tridgell
22a7b69260 AP_OpticalFlow: don't build optical flow example
broken by library changes
2014-12-06 22:05:42 +11:00
Andrew Tridgell
ed510d4f87 AP_OpticalFlow: run PX4 flow sensor at 10Hz
Pair-Programmed-With: Paul Riseborough <p_riseborough@live.com.au>
2014-12-06 18:16:51 +11:00
priseborough
a2bd3b4a42 AP_NavEKF: Add public method returning height above ground level 2014-12-06 18:16:51 +11:00
priseborough
d701cfcb75 AP_NavEKF: Output terrain relative PosD when relying on Optical Flow 2014-12-06 18:16:51 +11:00
priseborough
0156d846f1 AP_NavEKF: Increase height at which nav gain reduction starts
Compensates for optical flow induced noise increase with height.
2014-12-06 18:16:51 +11:00
priseborough
12ea1d6e85 AC_AttitudeControl: Scale angle demand noise filter
Scales filter frequency using EKF nav gain scaler to take advantage of the reduced nav frequency whichcan tolerate a slower angle response.
This is required to reduce the effect of EKF optical flow noise increase with height.
2014-12-06 18:16:51 +11:00
priseborough
a905432ffe AP_NavEKF: reduce height at which nav gain reduction starts 2014-12-06 18:16:51 +11:00
priseborough
5785272933 AP_NavEKF: Improve robustness to corrupted flow sensor data 2014-12-06 18:16:51 +11:00
priseborough
b1d44d4dde AP_NavEKF: Add protection for negative height above ground 2014-12-06 18:16:50 +11:00
priseborough
e80b1c67cd AC_AttitudeControl: Add EKF optical flow noise gain scaler
Allows gains to be adjusted to compensate for optical flow noise
2014-12-06 18:16:50 +11:00
priseborough
11fb51ceba AC_WPNav: Add nav velocity gain scaler to interfaces
Allows gains to be adjusted to compensate for optical flow noise
2014-12-06 18:16:50 +11:00
priseborough
5b8265ad6f AP_AHRS: Expand EKF speed limit public method to handle control limits 2014-12-06 18:16:50 +11:00
priseborough
d994da0886 AP_NavEKF: Expand EKF speed limit public method to handle control limits 2014-12-06 18:16:50 +11:00
priseborough
5fa0c59310 AC_WPNav: Add EKF ground speed limit to loiter speed control
This is required to prevent the speed controller saturating the optical flow sensor during low altitude flying.
2014-12-06 18:16:50 +11:00
priseborough
83775554ea AP_AHRS: Publish EKF ground speed limit 2014-12-06 18:16:50 +11:00
priseborough
bc2255d6b1 AP_NavEKF: Improve comments in setInhibitGPS public method 2014-12-06 18:16:50 +11:00
priseborough
416eaf4633 AP_NavEKF: Apply single definition of using optical flow 2014-12-06 18:16:50 +11:00
priseborough
b56b68ce10 AP_NavEKF: Add public method reporting horizontal speed limit
This is required if using optical flow, as depending on height, the speed must be limited to prevent the sensor saturating
2014-12-06 18:16:50 +11:00
priseborough
c8fb376cc4 AP_NavEKF: Fix bug in bias rate of change limiting
This doesn't change the behaviour, but means the result is achieved using the correct parameters, and comments are consistent
2014-12-06 18:16:50 +11:00
priseborough
599e53f3f2 AP_NavEKF: Prevent flow scale factor updating on ground 2014-12-06 18:16:49 +11:00
priseborough
083e22966c AP_NavEKF: Add public method to report available output data 2014-12-06 18:16:49 +11:00
priseborough
5532750a99 AP_AHRS: Add public method to inhibit GPS useage when using EKF
This provides the calling vehicle software the abiity to request the EKF to not use GPS.
An integer is returned that indicates the type of operation available:
0 = request rejected (request will only be accepted if the EKF is in static mode, eg pre-armed)
1 = request accepted, attitude, vertical velocity and position estimates available
2 = request accepted, attitude, height rate, height, horizontal velocity and relative position estimates available
2014-12-06 18:16:49 +11:00
priseborough
e53d28854e AP_NavEKF: Add public method to inhibit GPS use and clean-up GPS use logic
This provides the calling vehicle software the abiity to request the EKF to not use GPS.
An integer is returned that indicates the type of operation available:
0 = request rejected (request will only be accepted if the EKF is in static mode, eg pre-armed)
1 = request accepted, attitude, vertical velocity and position estimates available
2 = request accepted, attitude, height rate, height, horizontal velocity and relative position estimates available
2014-12-06 18:16:49 +11:00
priseborough
8fb1d9cf8d AP_NavEKF: Fix bug preventing opt flow scale factor estimation
Also removes un-used variable declarations
2014-12-06 18:16:49 +11:00
priseborough
a78920761c AP_NavEKF: Update comments in flow data interface 2014-12-06 18:16:49 +11:00
priseborough
063fb41748 AP_OpticalFlow: Add separate scale factors for X and Y axis.
The resolution is also increased to take advantage of the planned introduction of automated calibration methods
2014-12-06 18:16:49 +11:00
priseborough
52c7e56a4a AP_NavEKF: Add parameter for max valid optical flow rate magnitude 2014-12-06 18:16:49 +11:00
priseborough
6f8971d80a AP_NavEKF: Speed up flow sensor gyro bias correction 2014-12-06 18:16:49 +11:00
priseborough
d7ad45ebda AP_NavEKF: Don't fuse flow measurements if too big 2014-12-06 18:16:49 +11:00
priseborough
2dff76394d AC_PosControl: Add spike and noise filter to demanded angles
This has been done to provide a smooth psotion hold when using an optical flow aided EKF which can be noisy.

Signed-off-by: priseborough <p_riseborough@live.com.au>
2014-12-06 18:16:49 +11:00
priseborough
84944fdd4e AP_NAvEKF: Revert back to 10Hz fusion 2014-12-06 18:16:49 +11:00
priseborough
f4f0dfc45c AP_OpticalFlow: efficiency improvements to data processing 2014-12-06 18:16:49 +11:00
priseborough
1f78a73cdb AP_NavEKF: Make flow measurement delay vehicle specific
This takes into account the inter-sampling delay between the flow driver and the APM software which depends on the rate at which the dirver is being checked. This is 50Hz for plane and rover, and 200Hz for Copter.
2014-12-06 18:16:49 +11:00
priseborough
5f941655a8 AP_NavEKF: changes to support to 20Hz flow fusion rate 2014-12-06 18:16:48 +11:00
priseborough
0bf991eef9 AP_NavEKF: Fix bug in optical flow fusion smoothing 2014-12-06 18:16:48 +11:00
priseborough
7d27a22f77 DataFlash : Fix EKF optical flow logging bug 2014-12-06 18:16:48 +11:00
priseborough
7ec8dfebcf AP_OpticalFlow : Remove gyro scale factor user adjustable parameter
No longer required because bug in flow sensor has been fixed.
2014-12-06 18:16:48 +11:00
priseborough
2baa1e56ed Dataflash : Fix bug in EKF opt flow logging 2014-12-06 18:16:48 +11:00
priseborough
df59f3311a AP_OpticalFlow : Add gyro scale factor correction parameter 2014-12-06 18:16:48 +11:00
priseborough
eec49ce1dd AP_OpticalFlow : Add parameter for flow rate scale factor correction 2014-12-06 18:16:48 +11:00
priseborough
839b814d12 AP_NavEKF : Inhibit flow and range fusion in static mode 2014-12-06 18:16:47 +11:00
priseborough
9b9934ac06 AP_NavEKF : fix velocity timeout bug during optical flow operation 2014-12-06 18:16:47 +11:00
priseborough
cc8e6dbfad DataFlash : Add EKF additional fault and timeout logging 2014-12-06 18:16:47 +11:00
priseborough
517026980b AP_NavEKF : Add fault and timeout logging 2014-12-06 18:16:47 +11:00
priseborough
f640ec30ff AP_NavEKF : Reset held velocity on arming
This held velocity is used to constrain the drift in the optical flow solution before the vehicle is high enough for the optical flow sensor to work.
2014-12-06 18:16:47 +11:00
priseborough
4616721b0d DataFlash : Update EKF debug logging 2014-12-06 18:16:47 +11:00
priseborough
06c19a3a4d AP_NavEKF : Update optical flow debug logging 2014-12-06 18:16:47 +11:00
priseborough
1791dec622 AP_NavEKF : Fix velocity hold mode 2014-12-06 18:16:47 +11:00
priseborough
84421e0a35 AP_NavEKF : Adjust initial flow scale factor and limits 2014-12-06 18:16:47 +11:00
priseborough
573633daf7 AP_NavEKF : Fix incorrect use of flow sensor time-stamp
flow sensor time stamp is now issued by the flow sensor and is on a different time-base
2014-12-06 18:16:47 +11:00
priseborough
92e9336fe1 AP_OpticalFlow : prevent divide by zero 2014-12-06 18:16:47 +11:00
priseborough
9ea97c1a38 AP_NavEKF : Modify optical flow data interface
Sign conventions have changed
2014-12-06 18:16:46 +11:00
priseborough
8faeb190de AP_NavEKF : Rework logic to cope with bad flow data 2014-12-06 18:16:46 +11:00
priseborough
44e1695d5a AP_AHRS : Enable EKF start without GPS 2014-12-06 18:16:46 +11:00
priseborough
41f0231cfb AP_NavEKF : improve logic dealing with lack of flow or range data 2014-12-06 18:16:46 +11:00
priseborough
9ba46ad795 AP_NavEKF : Improve handling of flow sensor failure 2014-12-06 18:16:46 +11:00
priseborough
2ee1c549be AP_NavEKF : improve criteria used to inhibit scale factor estimation 2014-12-06 18:16:46 +11:00
priseborough
e09ff84218 AP_NavEKF : Don't estimate focal length scale factor without reliable velocity 2014-12-06 18:16:46 +11:00
priseborough
4c92a5f23f AP_NavEKF : Use GPS velocity if PX4Flow sensor fails 2014-12-06 18:16:46 +11:00
priseborough
283811edcb AP_NavEKF : stop velocity change when flow measurements drop out 2014-12-06 18:16:46 +11:00
priseborough
9132fcfe43 AP_NavEKF : Change mag fusion to use corrected compass values
This enables compass units to be switched in-flight
2014-12-06 18:16:46 +11:00
priseborough
c3be486c29 AP_NavEKF : Enable inhibiting of GPS measurements 2014-12-06 18:16:45 +11:00
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
Andrew Tridgell
809ff15b43 AP_GPS: make NMEA driver a bit easier to read
thanks to crashpilot100
2014-11-16 14:12:14 +11:00
Andrew Tridgell
b81b9e1bb8 AP_GPS: prevent bad NMEA strings from causing overruns in parser
fixes issue #961

thanks to crashpilot100 for spotting this!
2014-11-16 14:08:20 +11:00
Andrew Tridgell
7497b4dfb1 HAL_Linux: fixed Replay with new AP_InertialSensor library 2014-11-16 12:30:50 +11:00
Andrew Tridgell
7c288e020b AP_InertialSensor: fixed detection of dead IMU
if a PX4 sensor does not give new data we need to avoid calling
_rotate_and_offset_*() to avoid marking it as healthy. Otherwise if
the MPU6k dies we won't switch to the LSM303D automatically
2014-11-16 12:30:33 +11:00
Andrew Tridgell
22237f2530 HAL_SITL: fixed handling of SIM_FLOAT_EXCEPT in main thread 2014-11-16 11:05:55 +11:00
Randy Mackay
d9d238cc3c Relay: param descr match labels for Pixhawk
Renamed Pixhawk FMU AUX1 to Pixhawk AUXOUT1 to match labels on case to
make it easier for users to know what value to choose
2014-11-15 12:49:02 -08:00
Randy Mackay
0d3e1131a7 Relay: Pixhawk AUXOUT2 enabled by default 2014-11-15 12:45:12 -08:00
bugobliterator
9d39c0407e HAL_Linux: added ToneAlarmDriver.h 2014-11-15 21:25:55 +11:00
bugobliterator
485abbac3a AP_Notify: cleanup use of bool from toneAlarm_init() 2014-11-15 16:59:28 +11:00
bugobliterator
329c1f5190 HAL_Linux:create ToneAlarmDriver as a separate class
ToneAlarm is now declared as a separate class instance of which is added as a private member of LinuxUtil
Some minor fixes in this patch include changing return type of tonealarm_init() to bool and use dprintf
2014-11-15 16:59:06 +11:00
bugobliterator
ad460659ad AP_HAL: make toneAlarm_init() return bool 2014-11-15 16:59:06 +11:00
bugobliterator
f058131140 HAL_Linux Scheduler: reduce the delay inside tonealarm thread
Since the tonealarm is now passthrough the delay inside the thread needs to be reduced for precise tune generation
2014-11-15 16:59:06 +11:00
bugobliterator
3b94cb3072 HAL_Linux: make tonealarm generation a passthrough operation
get rid of all delays and while loops(that may turn into infinite loop)
2014-11-15 16:59:06 +11:00
bugobliterator
e254b406d0 HAL_Linux: make rtttl tune and tune repeat flag list static members
instead of initialising them inside constructor
2014-11-15 16:59:06 +11:00
Andrew Tridgell
c8c822422a HAL_Linux: give error msg on failure to start toneAlarm 2014-11-15 16:58:58 +11:00
Andrew Tridgell
7718be81cb AP_Notify: give error msgs on failure to start 2014-11-15 16:58:40 +11:00
Andrew Tridgell
682cf02770 GCS_MAVLink: regenerate after merge 2014-11-14 15:25:06 +11:00
Andrew Tridgell
0dba1b370a GCS_MAVLINK: merge with upstream XML 2014-11-14 15:24:34 +11:00
Andrew Tridgell
d3b087d2c1 AP_GPS: fixed build on non-PX4 platforms 2014-11-14 14:48:42 +11:00
Andrew Tridgell
e69582aa1c AP_GPS: added PX4EXPERIMENTAL to GPS type drop down 2014-11-14 14:39:46 +11:00
Holger Steinhaus
abad58874c AP_GPS: enable GNSS modules handled by PX4 firmware via GPS_TYPE
GNSS modules handled by PX4 drivers are not auto-detectable, some are not even
connected to a UART port. The activation is therefore controlled by GPS_TYPE
only. Baud rate and port settings (if applicable) have to be handled by the PX4
firmware.
2014-11-14 14:36:10 +11:00
Holger Steinhaus
442aafbd1e AP_GPS: add proxy driver for GNSS modules handled by PX4 firmware 2014-11-14 14:36:10 +11:00
John Williams
57d2fc1dd5 HAL_Linux: RCInput support for Zynq 2014-11-14 14:10:35 +11:00
Jason Short
7ee5b58535 AP_Mount: Axis mask speedup
Using a simple bit mask to avoid calculating an unneeded ATAN2() for AVR users.
2014-11-14 13:51:16 +11:00
Matthias Badaire
1d3a49e466 AP_HAL_PX4 : make UARTDriver capable to be called from different threads.
The modification allows the read and write functions to be called by any thread but the calling thread must be the last one that called the begin() function.
2014-11-14 13:51:16 +11:00
Andrew Tridgell
154bf51279 HAL_PX4: minor tidy up of if statement 2014-11-14 13:51:16 +11:00
Holger Steinhaus
9e9c62d245 HAL_PX4: work-around for periodic enable_ch() calls 2014-11-14 13:51:16 +11:00
Holger Steinhaus
e5549c90a1 HAL_PX4: do not overwrite disabled channels with zeros
Fixes #1321
2014-11-14 13:51:16 +11:00
Randy Mackay
d34ea4c124 AC_PosControl: fix to default force_descend param 2014-11-13 18:40:45 -08:00
Jonathan Challinger
e81c1dd5a1 AC_PosControl: add force_descend option to set_alt_target_from_climb_rate 2014-11-13 18:40:38 -08:00
Andrew Tridgell
2270a904ce RC_Channel: make flaperson range from -4500 to 4500 2014-11-14 11:23:52 +11:00
Jonathan Challinger
cc955b738b AP_NavEKF: Clean up flight detector logic 2014-11-14 10:34:49 +11:00
priseborough
5359da9c68 AP_NavEKF : Improved Magnetometer Error Handling
(Plane Only) If the yaw and GPS heading disagree by more than 45 degrees on takeoff, then the magnetometer is declared as failed. The heading is then reset based on the difference between GPS ground track and stgate velocity vector.
Magnetometer fusion uses corrected data and bias states are initialised to zero. This allows the compass to be switched in flight.
For persistent compass errors that trigger a timeout, the compass is not permanently failed, however for non-forward fly vehicles the compass weighting is reduced.
2014-11-14 10:34:48 +11:00
Staroselskii Georgii
a55db1c25d AP_HAL_Linux: fixed LinuxGPIO_RPI::read() 2014-11-14 10:28:34 +11:00
Mikhail Avkhimenia
49d3035ee5 HAL_Linux: fix types, remove printfs in GPIO_RPI 2014-11-14 10:28:34 +11:00
Mikhail Avkhimenia
6f993fe64a HAL_Linux: add prototype RCInput code for Navio 2014-11-14 10:28:34 +11:00
Staroselskii Georgii
ef420a2544 AP_HAL_Linux: changed SPI mode for MPU9250 2014-11-14 10:28:34 +11:00
Staroselskii Georgii
bf860ee41f AP_HAL_Linux: Ublox SPI stub 2014-11-14 10:28:34 +11:00
Víctor Mayoral Vilches
ce4c4c43dc AP_HAL_Linux: Scheduler reboot fix
exit from the autpilot when reboot is commanded.
The software assumes that the code is being
launched in an infinite loop thereby an exit
will make it reboot.
2014-11-14 10:27:19 +11:00
John Williams
ae87399919 HAL_Linux: Basic Zynq Linux platform support
Preliminary support for Zynq/Linux on the 'ZyboPilot' HW platform.

see https://github.com/trjw/ZyboPilot-bsp for the PetaLinux / Vivado project
files.

At this stage CPPM/Pulse in and PWM out work, and in CLI mode the passthru
test works correctly.

The platform has passed minimal smoke testing in HIL mode.

ZYNQ IS NOT FLIGHT TESTED YET!  FLY THIS PLATFORM AT YOUR OWN RISK!

Signed-off-by: John Williams <john@whelanwilliams.net>
2014-11-14 10:21:04 +11:00
Andrew Tridgell
adcf994356 AP_HAL: added Zynq platform type 2014-11-14 10:21:04 +11:00
Staroselskii Georgii
7f00dd413f AP_Compass: fixed HMC5883's initialisation code 2014-11-14 10:21:04 +11:00
Andrew Tridgell
3b6c732b3b APM_Control: changed default I gain for roll/pitch controllers to non-zero
too many people are still not tuning. At least this will give them a
chance to get their aircraft back in a cross-wind
2014-11-13 22:13:25 +11:00
Andrew Tridgell
258542b939 AP_Airspeed: added ARSPD_SKIP_CAL parameter
allows airspeed calibration to be skipped for easier startup
2014-11-13 21:12:37 +11:00
Andrew Tridgell
9c631944f7 AP_Airspeed: expose raw pressure for logging 2014-11-13 17:49:04 +11:00
Andrew Tridgell
f04f8e226d SITL: abort on floating point error
this creates a core file
2014-11-13 17:27:20 +11:00
Andrew Tridgell
1fc8116069 AP_L1_Control: update NAV_L1_PERIOD docs 2014-11-13 14:26:42 +11:00
Andrew Tridgell
1552278fa3 AP_TECS: use aparm.stall_prevention 2014-11-13 14:05:33 +11:00
Andrew Tridgell
04b63a61bf AP_Vehicle: added stall_prevention variable 2014-11-13 14:05:22 +11:00
Andrew Tridgell
3667900e84 AP_SpdHgtControl: added load_factor in update_pitch_throttle() 2014-11-12 13:36:02 +11:00
Andrew Tridgell
bf591b0008 AP_TECS: take load factor into account in min airspeed
this will push up minimum airspeed when turning
2014-11-12 13:36:02 +11:00
Andrew Tridgell
d404cc6542 AP_Baro: add set_external_temperature()
this allows the use of an external temperature sensor for calibration
purposes, such as the sensor built in to the digital airspeed sensor.

The main affect this has is on the EAS2TAS calculation

The get_calibration_temperature() is used to choose either an external
temperature or an internal one. If an internal one is used then it is
clamped at no higher than 25 degrees C, to prevent hot electronics
on startup affecting altitude scaling and EAS2TAS
2014-11-12 13:36:01 +11:00
Andrew Tridgell
8b794602d1 AP_Baro: make get_temperature() a const function 2014-11-12 13:36:01 +11:00
Andrew Tridgell
986b7bf894 AP_InertialSensor: fixed frequency to 16 bit in LDM303D and L3GD20 drivers 2014-11-11 17:06:22 +11:00
Andrew Tridgell
c750cbebfb GCS_MAVLink: prevent asan errors in send_text_all 2014-11-11 15:16:26 +11:00
Andrew Tridgell
a566ebe4ec HAL_SITL: prevent array overruns in RCInput/RCOutput 2014-11-11 15:16:26 +11:00
Randy Mackay
67690553c5 BaroGlitch: add reset method 2014-11-09 13:34:15 -08:00
Andrew Tridgell
2eeec3fabe AP_RangeFinder: fixed oversized parameter RNGFND2_SETTLE_MS 2014-11-10 08:09:41 +11:00
Andrew Tridgell
ec17c5806e AP_Param: check parameter tables for bad suffix lengths 2014-11-10 08:09:08 +11:00
Andrew Tridgell
00526359b0 HAL_Linux: use dprintf() instead of sprintf and write 2014-11-10 06:51:53 +11:00
Andrew Tridgell
bec1c05773 AP_Notify: fixed bitfields 2014-11-10 06:33:54 +11:00
bugobliterator
e48fcf2df7 AP_Notify:change tonealarm-type bitmask to bool type,
change parameter data type from const uint8_t to uint8_t,
initialise tonealarm error flag to value -1 at tonealarm class initiallisation

This is a part of a set of fixes for the bugs and typos tridge discovered and shared inside earlier commits for setting up tonealarm.
2014-11-10 06:27:49 +11:00
bugobliterator
9f5f5871f2 AP_Notify:Fix the typo, usage of toshibaled.init() instead of toshibaled.update()
This is a part of a set of fixes for the bugs and typos tridge discovered and shared inside earlier commits for setting up tonealarm.
2014-11-10 06:27:48 +11:00
bugobliterator
af203760bd HAL_Linux: change the return type of AP_HAL::Util::tonealarm_init() to signed int8_t.
This is a part of a set of fixes for the bugs and typos tridge discovered and shared inside earlier commits for setting up tonealarm.
2014-11-10 06:27:48 +11:00
bugobliterator
fa6e83318d AP_HAL: Add virtual toneAlarm member functions to be declared under Linux_HAL 2014-11-10 06:27:48 +11:00
bugobliterator
298b27444a HAL_Linux: Add ToneAlarm Driver to Linux_HAL
ToneAlarm is setup for Beaglebone Black using pwm, toneAlarm thread runs on second last priority.
2014-11-10 06:27:48 +11:00
bugobliterator
5d6af51517 AP_Notify:Add ToneAlarm Support for HAL_Linux Boards 2014-11-10 06:27:48 +11:00
Jonathan Challinger
2d288d46a4 AP_HAL_AVR_SITL: fill in ublox accuracy metrics with reasonable values 2014-11-08 19:07:50 +11:00
Randy Mackay
31087e4f20 Compass: shorten EXTERNAL2/3 to EXTERN2/3
Bug discovered by Michael Day
2014-11-08 10:21:22 +09:00
Robert Lefebvre
a2958e2ffd AP_MotorsSingle: Fix parameter comments. 2014-11-08 10:18:03 +09:00
Randy Mackay
98f5a93e10 AC_AttControl: remove unused logging structure 2014-11-08 10:17:32 +09:00
Andrew Tridgell
02581f4c05 HAL_Linux: re-fix dirty mask bug in Storage
when conversion to a single parent class was done it re-introduced a
bug that was fixed a while ago

See commit d238ff7c5d
2014-11-08 11:55:55 +11:00
Andrew Tridgell
330dab2fe3 HAL_Linux: fixed some warnings 2014-11-08 11:49:09 +11:00
bugobliterator
4908e335d2 HAL_Linux: Add Storage.cpp containing common storage class member definitions 2014-11-08 11:36:12 +11:00
bugobliterator
dd6d520385 HAL_Linux:Create subclass to handle FRAM Storage under main Storage Class 2014-11-08 11:36:09 +11:00
Victor Mayoral Vilches
46c8714996 AP_GPS: make the examples compile in Linux 2014-11-08 11:25:35 +11:00
Andrew Tridgell
14a6878bcd HAL_Linux: fixed termios settings on BBB initial boot
this should fix the problem of losing the GPS in flight
2014-11-07 22:15:28 +11:00
Andrew Tridgell
e22c8b27a9 HAL_PX4: if there are no enabled channels don't send to PX4IO
this makes it possible to disable PWM output to IO to test override
2014-11-07 10:39:07 +11:00
Andrew Tridgell
16fd113020 RC_Channel: added channel_function()
this is used in the plane mixing code
2014-11-07 10:39:07 +11:00
Clay McClure
71586d40e3 AC_WPNav: minor fix to comments 2014-11-06 11:53:56 +09:00
squilter
cab2010a8f AP_Arming: remove abbreviations from GCS messages 2014-11-06 11:13:26 +09:00
Jonathan Challinger
6c4d4713aa AP_NavEKF: Add parameter that specifies EKF-to-DCM/INAV fallback strictness 2014-11-06 10:03:52 +11:00
Jonathan Challinger
2293070a5b AP_GPS: Add uBlox accuracy metrics interface and logging 2014-11-06 07:38:41 +11:00
Jonathan Challinger
9be7039be1 DataFlash: add UBX3 message for accuracy logging 2014-11-06 07:38:41 +11:00
Jonathan Challinger
d03ed7a2c3 AP_Mount: Added lead filter 2014-11-06 07:35:32 +11:00
Andrew Tridgell
7e3b8a30f5 HAL_PX4: use px4io generated values for servo output readback
this makes it easier to observe the behaviour of IO failsafe
2014-11-05 21:54:53 +11:00
Andrew Tridgell
2b48434e60 AP_TECS: fixed throttle demand on underspeed
thanks to Philipp Oettershagen for finding this bug!
2014-11-05 07:55:18 +11:00
priseborough
d6508acfa5 AP_TECS : Prevent throttle undershoot after climb
If the plane was unable to achieve the climb and got significantly below the internal TECS demanded climb profile, the the PD term would be a large value at the top of climb, and would take some time to reduce due to the rate limiter. This meant that the integrator state could be pushed to a very low value and effectively cause the throttle to sit on the lower limit for longer than desired after levelling out.
2014-11-05 07:49:03 +11:00
Andrew Tridgell
3518cf5480 AP_InertialSensor: fixed default MPU9250 orientation for NavIO 2014-11-04 16:18:35 +11:00
Jonathan Challinger
369839c7ca AC_WPNav: Use target yaw instead of current yaw for close waypoints 2014-10-31 15:23:52 +09:00
Randy Mackay
1e4ec5f6a2 Camera: add f to float constants 2014-10-31 14:46:51 +09:00
Randy Mackay
ad7a9bf81b Camera: initialise image_index 2014-10-31 14:46:49 +09:00
Arthur Benemann
7bb4a39608 Camera: record number of pictures taken since boot
The field is useful for detecting in a GCS if a mavlink_msg_camera_feedback message was dropped.
2014-10-31 14:46:45 +09:00
Arthur Benemann
b48edf479b GCS_MAVLink: add CAMERA_FEEDBACK to enum 2014-10-31 14:46:40 +09:00
Arthur Benemann
2e4812afb5 Camera: Added feedback message support
Now the autopilot can publish the state of the camera via the mavlink_msg_camera_feedback message.
2014-10-31 14:46:38 +09:00
Jonathan Challinger
84da5d2d98 DataFlash: use new interface functions for EKF IMU weighting and accel biases 2014-10-30 18:17:38 +11:00
Jonathan Challinger
967986d5c6 AP_NavEKF: Split getAccelBias into getAccelZBias and getIMU1Weighting 2014-10-30 18:17:38 +11:00
Jonathan Challinger
ac2e5f644c DataFlash: fix bug in ekf gyro bias logging 2014-10-30 18:17:37 +11:00
Jonathan Challinger
bb6d8fd44a AP_NavEKF: Set prevDelAng after using it 2014-10-30 18:17:37 +11:00
priseborough
aca78d321f DataFlash : Remove unused numerical divergence metric 2014-10-30 18:17:37 +11:00
Jonathan Challinger
0727ac5c79 AP_NavEKF: clean up unused variable lastDivergeTime_ms 2014-10-30 18:17:37 +11:00
priseborough
5e51c09978 AP_NavEKF : Remove ineffective numerical divergence checks 2014-10-30 18:17:37 +11:00
priseborough
638d63aa90 DataFlash : Change to more descriptive EKF logging names 2014-10-30 18:17:37 +11:00
priseborough
6f759fdb8e AP_AHRS : Tidy up logic used to enable synthetic sideslip fusion 2014-10-30 18:17:36 +11:00
Andrew Tridgell
8506e8b5fb HAL_Linux: fixed linux build 2014-10-30 17:47:18 +11:00
John Williams
b9f0310b82 hal_ap_linux: Make PRU constants private to reduce #define namespace pollution.
Forthcoming Zynq port AP_HAL_Linux uses similar constants with different
values - move these as private member constants to avoid collisions.

Signed-off-by: John Williams <john@whelanwilliams.net>
2014-10-30 13:51:41 +11:00
Mikhail Avkhimenia
81de994fef HAL_Linux: separate RCInput for PRU and Navio 2014-10-30 13:30:07 +11:00
Mikhail Avkhimenia
e05151f0e0 HAL_Linux: Initialize i2c before rcoutput (required by i2c pwm chips for initialization) 2014-10-30 13:30:07 +11:00
Mikhail Avkhimenia
2f0900b0a8 HAL_Linux: add GPIO driver for Raspberry Pi 2014-10-30 13:30:07 +11:00
Mikhail Avkhimenia
07ed93cea0 HAL_Linux: add PCA9685 based RCOutput for Navio 2014-10-30 13:30:07 +11:00
Alexander Mergel
14c401c0f4 AP_HAL_Linux: [Bugfix] prevent memory acces violation in process_dsm_pulse
When a S.Bus signal is fed into the rcin-Pin AruPlane on the BBB get's a
Segmentation fault. This patch prevents the memory acces to dsm_state.bytes[16] outside
of the array bounds. The patch should be reviewed by sombody who knows the DSM protocol,
as i don't.
2014-10-30 11:57:35 +11:00
priseborough
6a85753a5b AP_NavEKF : add INIT_GYRO_BIAS_UNCERTAINTY definition 2014-10-29 17:39:47 +09:00
priseborough
fb14da7a4b AP_NavEKF : Add public method to reset gyro bias states 2014-10-29 15:32:21 +09:00
priseborough
2c07299c04 AP_AHRS : Add reset of EKF gyro bias states 2014-10-29 15:32:18 +09:00
Randy Mackay
8a776f8ff8 GPS: init primary_instance to zero 2014-10-29 12:04:13 +09:00
Benoit PEREIRA DA SILVA
010d267376 GPS: use primary for Notification 2014-10-29 12:04:12 +09:00
Jonathan Challinger
6848897999 AP_GPS: Add agcCnt to UBX1 message 2014-10-29 08:18:04 +11:00
Randy Mackay
dffcfb42bc AHRS: add reset_gyro_drift method 2014-10-28 20:25:33 +09:00
Randy Mackay
7d48704f82 AP_NavEKF: fix parameter descriptions
Errors pointed out by Richard (DK)
2014-10-27 22:20:03 +09:00
Randy Mackay
ac7ea2a12c AC_PosControl: use AttControl's sqrt_controller 2014-10-27 15:20:48 +09:00
Jonathan Challinger
7224669399 AC_AttitudeControl: cleanup angle_ef_roll_pitch_rate_ef_yaw_smooth 2014-10-27 15:20:46 +09:00
Jonathan Challinger
779baa006d AC_PosControl: Use sqrt_controller function 2014-10-27 15:20:44 +09:00
Jonathan Challinger
0c4a489491 AC_AttitudeControl: use sqrt_controller function 2014-10-27 15:20:43 +09:00
Randy Mackay
fc898a00a3 AC_AttControl: add sqrt_controller
Original code by Jonathan Challinger
2014-10-27 15:20:40 +09:00
Andrew Tridgell
26de54c29a AP_AHRS: cope with 90 degree pitch in update_trig()
this prevents a numerical error in Replay
2014-10-25 11:21:04 +11:00
Michael Day
83c2f497a3 AP_Mission: Change jump_to_landing_sequence to get_landing_sequence_start 2014-10-24 21:42:06 +11:00
Andrew Tridgell
5ddbcc296d AP_OpticalFlow: fixed example build 2014-10-24 21:38:03 +11:00
Andrew Tridgell
ad8b73c8aa AP_Airspeed: update ARSPD_AUTOCAL docs 2014-10-24 17:16:17 +11:00
Randy Mackay
41a6393356 RangeFinder: PulsedLight I2C addr to 0x62 2014-10-24 15:08:04 +09:00
Andrew Tridgell
ad7c612334 AP_InertialSensor: fixed SITL with new HIL code 2014-10-24 15:05:44 +11:00
Andrew Tridgell
aeaa3c1e04 AP_InertialSensor: fixed build for VRBrain 2014-10-24 12:10:41 +11:00
Andrew Tridgell
40e83ceb1f AP_InertialSensor: simplify next sample time calculations
this makes the calculation much clearer
2014-10-24 12:10:40 +11:00
Andrew Tridgell
9dfbdb1e69 AP_InertialSensor: run the MPU6000 at 1kHz on fast CPUs
use a software filter and 1kHz sampling for better filtering if we
have a fast enough CPU to do it
2014-10-24 12:10:40 +11:00
Andrew Tridgell
a047d1f569 AP_InertialSensor: moved default filter and sample_rate to frontend
this simplifies the backends and prevents code repitition
2014-10-24 12:10:40 +11:00
Andrew Tridgell
17b2214798 AP_InertialSensor: make it easier to add multiple backends
use _add_backend() to add new backends on startup
2014-10-24 12:10:40 +11:00
Andrew Tridgell
868ee3af23 AP_Mission: fixed example build 2014-10-24 12:10:40 +11:00
Andrew Tridgell
006185f08a AP_InertialNav: fixed example build 2014-10-24 12:10:40 +11:00
Andrew Tridgell
f79ce92673 AP_AHRS: fixed example build 2014-10-24 12:10:40 +11:00
Andrew Tridgell
33c7432e97 AC_WPNav: fixed example build 2014-10-24 12:10:40 +11:00
Andrew Tridgell
31eeb657ca AC_Sprayer: fixed example build 2014-10-24 12:10:39 +11:00
Andrew Tridgell
4fcf46005b AC_Fence: fixed example build 2014-10-24 12:10:39 +11:00
Andrew Tridgell
9a98e63702 AC_AttitudeControl: fixed example build 2014-10-24 12:10:39 +11:00
Andrew Tridgell
bc5d79118d AP_InertialSensor: updated comments 2014-10-24 12:10:39 +11:00
Andrew Tridgell
3a9a5a9c18 AP_InertialSensor: implement gyro and accel health monitoring
sensor is healthy if it gave a sample on the last update()
2014-10-24 12:10:39 +11:00
Andrew Tridgell
586fa9a816 AP_InertialSensor: added product_id support
fill in parameter from first backend
2014-10-24 12:10:39 +11:00
Andrew Tridgell
37dea4e367 AP_Common: added MPU9250 product ID 2014-10-24 12:10:39 +11:00
Andrew Tridgell
520727e5bd AP_InertialSensor: fixed example build 2014-10-24 12:10:39 +11:00
Andrew Tridgell
dbcd02f2be AP_InertialSensor: converted MPU9150 driver
untested conversion
2014-10-24 12:10:38 +11:00
Andrew Tridgell
ff5f791343 AP_InertialSensor: converted flymaple driver to new API 2014-10-24 12:10:38 +11:00
Andrew Tridgell
a42af0f2f1 AP_InertialSensor: use common AP_InertialSensor driver for PX4 and VRBRAIN 2014-10-24 12:10:38 +11:00
Andrew Tridgell
3ce7667e5a AP_InertialSensor: tidy up MPU6000 driver 2014-10-24 12:10:37 +11:00
Andrew Tridgell
2d47a07480 AP_InertialSensor: ported L3G4200D driver to new API 2014-10-24 12:10:37 +11:00
Andrew Tridgell
deafcd6ddc AP_InertialSensor: improved timing in all drivers 2014-10-24 12:10:37 +11:00
Andrew Tridgell
ff6d87f145 AP_InertialSensor: minor tidy up for HIL driver 2014-10-24 12:10:37 +11:00
Andrew Tridgell
85686c22ec AP_InertialSensor: converted the APM1/Oilpan driver to new API 2014-10-24 12:10:37 +11:00
Andrew Tridgell
dcef9bb3b8 AP_InertialSensor: converted the MPU9250 driver to new API 2014-10-24 12:10:37 +11:00
Andrew Tridgell
d48beb0c0f AP_InertialSensor: converted PX4 driver to new API 2014-10-24 12:10:37 +11:00
Andrew Tridgell
0ce5c99c26 SITL: update for new AP_InertialSensor API 2014-10-24 12:10:37 +11:00
Andrew Tridgell
ec11417705 AP_InertialSensor: converted HIL backend, which gets SITL working 2014-10-24 12:10:36 +11:00
Andrew Tridgell
448efc70a3 AP_InertialSensor: first steps in frontend/backend split
This converts the MPU6000 driver to a frontend/backend structure, and
disables all other drivers. They will be progressively re-enabled as
each is converted
2014-10-24 12:10:36 +11:00
Randy Mackay
04eb1073e8 DataFlash: log baro climbrate 2014-10-22 17:29:27 +09:00
Andrew Tridgell
e6c6fe095f AP_Terrain: fixed a warning 2014-10-22 18:27:20 +11:00
Andrew Tridgell
b495905da5 AP_TECS: fixed some warnings 2014-10-22 18:27:18 +11:00
Andrew Tridgell
59610ebe88 AP_L1_Control: fixed some warnings 2014-10-22 18:27:16 +11:00
Andrew Tridgell
b8e73a737a HAL_AVR: fixed warning 2014-10-22 18:26:45 +11:00
Randy Mackay
e80328d3a5 AC_WPNav: bug fix sanity check of set_speed_xy
This corrects a bug that allowed the waypoint speed to be set to zero
2014-10-21 22:10:22 +09:00
Randy Mackay
39c8535223 AHRS_DCM: sanity check AHRS_RP_P and AHRS_YAW_P 2014-10-21 21:41:41 +09:00
priseborough
2bc74934b8 AP_NavEKF: Track baro alt when pre-armed
This will help prevent spurious alt disparity warning messages for copter
2014-10-21 20:58:59 +09:00
Randy Mackay
a1cfd03c9b AC_PosControl: bug fix dt calculation
fixes issue in which now could be earlier than _last_update_xy_ms
leading to a large dt value and a sudden lean on takeoff
2014-10-21 11:40:47 +09:00
Randy Mackay
0e11189c35 AP_InertialNav: add comments 2014-10-20 11:12:54 +09:00
Jonathan Challinger
5e381280dc AP_InertialNav: update properly if home position moves 2014-10-20 10:59:50 +09:00
Andrew Tridgell
d84c1cd3e4 AP_OpticalFlow: fixed example build 2014-10-20 08:42:51 +11:00
Andrew Tridgell
15a661e17a AP_Mission: fixed logic in jump_to_landing_sequence()
see comments on drones-discuss
2014-10-20 08:36:20 +11:00
Andrew Tridgell
8c6b875dcc AP_Mission: avoid the AP_AHRS cast
get_position() is now const
2014-10-20 08:36:20 +11:00
Andrew Tridgell
270bac4472 AP_AHRS: make get_position() const
This allows use from within AP_Mission
2014-10-20 08:36:20 +11:00
Michael Day
ea91f4d47b AP_Mission: Added support for MAV_CMD_DO_LAND_START 2014-10-20 08:36:19 +11:00
Michael Day
d62b9a7044 GCS_MAVLink: re-generated headers 2014-10-20 08:36:19 +11:00
Andrew Tridgell
e1a88a13a7 GCS_MAVLink: added MAV_CMD_DO_LAND_START
see discussion on drones-discuss
2014-10-20 08:36:19 +11:00
Andrew Tridgell
7636cc6971 GCS_MAVLink: merged upstream changes 2014-10-20 08:36:19 +11:00
Jonathan Challinger
1c75ce88f2 AP_Buffer: change pop_front to return a bool if successful 2014-10-20 08:26:14 +11:00
Jonathan Challinger
ceef10cc41 AP_Buffer: Add peek_mutable function allowing in-place modification of buffered objects 2014-10-20 08:26:14 +11:00
Jonathan Challinger
630a87d9a9 AP_Buffer: remove scalar assignment so that non-scalars can be buffered 2014-10-20 08:26:14 +11:00
Jonathan Challinger
cdd2199138 AP_Math: expand frame transformation test case for quaternions 2014-10-20 06:24:33 +11:00
Jonathan Challinger
3befe74afa AP_Math: change quaternion class to use const references where optimal 2014-10-20 06:24:30 +11:00
Jonathan Challinger
70845882a7 AP_Math: fix up rotation test suite 2014-10-20 06:24:27 +11:00
Jonathan Challinger
6076f3fa22 AP_NavEKF: Quaternion::to_euler now uses references instead of pointers 2014-10-20 06:24:25 +11:00
Jonathan Challinger
1f7e393e38 AP_Math: refactor quaternion library 2014-10-20 06:24:22 +11:00
Andrew Tridgell
ef0eca4835 AP_Airspeed: fixed airspeed in Replay 2014-10-19 19:42:15 +11:00
Andrew Tridgell
7db0244dac AP_Compass: added some comments 2014-10-19 17:02:45 +11:00
Jonathan Challinger
9054dd3f9a AP_Compass: use apply_correction_function to eliminate duplication 2014-10-19 17:02:45 +11:00
Randy Mackay
677f6cce7f AP_Motors: reduce slow-start increment for fast CPUs 2014-10-18 20:54:08 +09:00
Randy Mackay
542ec29e49 Parachute: set servo or relay to off position on every update
This resolves the issue of the parachute servo's position not being
initialised to the off position due to an ordering problem of the
auxiliary servos being initialised after the parachute object.
2014-10-18 17:26:23 +09:00
Randy Mackay
eed6a1ce61 OptFlow: fix example sketch so it compiles 2014-10-16 13:52:07 +09:00
Randy Mackay
a476a914b0 OptFlow_PX4: check healthy before updating 2014-10-15 16:36:40 +09:00
Randy Mackay
f504ea7b30 OptFlow_ADNS3080: check healthy before updating 2014-10-15 16:36:38 +09:00
Randy Mackay
d238f48dda OptFlowPX4: fix compile error for APM 2014-10-15 16:36:33 +09:00
Randy Mackay
a9cfbb71b8 OptFlowPX4: use ORB to pull data from sensor
This change is required because PX4Firmware has changed the method used
to pull data from the sensor.
2014-10-15 16:36:25 +09:00
Randy Mackay
ec4581b35a OptFlow: add ground_distance_m 2014-10-15 16:35:48 +09:00
Randy Mackay
4b0548973a OptFlow: add PX4Flow support 2014-10-15 16:35:33 +09:00
Randy Mackay
3c4be75487 OptFlow: reorganise ADNS3080 to simplified interface 2014-10-15 16:35:31 +09:00
Randy Mackay
b64f9ed964 OptFlow: rename and restructure OpticalFlow class
AP_OpticalFlow.h becomes simply a file that includes all other optical
flow header files.
OpticalFlow class simplified to only return surface quality, raw output
and velocity vector.
2014-10-15 16:35:29 +09:00
Andrew Tridgell
4ad643b233 AP_AHRS: use a common function for updating the CD values
this ensures the wrapping of yaw is consistent between the 3 use cases
2014-10-15 13:18:08 +11:00
Andrew Tridgell
eec5cd5add AP_AHRS: restore DCM attitude before update()
The DCM drift correction code uses the current attitude to calculate
error values to update its gyro drift correction. If we were using EKF
then without this patch the DCM code running as an alternative AHRS
source would be using the EKF attitude for calculating the error
value, leading to very bad gyro drift estimation
2014-10-15 11:15:33 +11:00
Andrew Tridgell
63c06ea2af AP_AHRS: fixed calls to DCM in parent class
use_compass() and reset() are common to AP_AHRS_DCM and
AP_AHRS_NavEKF. As AP_AHRS_NavEKF is a child of AP_AHRS_DCM, when we
call use_compass() from within AP_AHRS_DCM we actually end up calling
AP_AHRS_NavEKF::use_compass().

This has the effect of disabling the compass in DCM when EKF is active
and EKF has decided not to use the compass. That means that the DCM
yaw (and in fact the whole attitude) can get badly off while EKF is
enabled, making DCM an ineffective fallback if EKF fails.

The fix is to call the specific class versions of use_compass() and
reset()
2014-10-15 10:12:50 +11:00
Andrew Tridgell
b437977547 AP_Compass: added set_offsets() interface
this will be used by Replay to prevent the need for saving parameters
2014-10-15 09:16:31 +11:00
Randy Mackay
6690aff305 AC_Motors: param description addition 2014-10-14 12:43:22 +09:00
Randy Mackay
d09faa0015 BattMon: minor param description additions 2014-10-14 12:42:57 +09:00
Randy Mackay
45e0e48e54 BattMon: minor param description update 2014-10-14 12:42:45 +09:00
Randy Mackay
3a81732721 Baro: minor param description updates 2014-10-14 12:42:27 +09:00
Randy Mackay
be1621877f Mission: support GUIDED_ENABLE and GUIDED_LIMITS
This replaces the ardupilot only NAV_GUIDED command.
Also remove support for NAV_VELOCITY mission command which will be
replaced by SET_POSITION_TARGET non-mission command.
2014-10-13 21:40:23 +09:00
Andrew Tridgell
3c7cc5f40c AP_RangeFinder: auto-update PX4 ll40ls max/min distance
this allows the range of the Lidar to be set by the user using
RNGFND_MAX_CM and RNGFND_MIN_CM
2014-10-13 19:07:38 +11:00
Jonathan Challinger
4a397a8d67 AC_PosControl: Protect from divide-by-zero in get_stopping_point_xy 2014-10-10 21:17:12 +09:00
Randy Mackay
023b2c0d6b AP_InertialNav: fixed use of ahrs.get_velocity with EKF disabled 2014-10-09 16:43:24 +09:00
Andrew Tridgell
7b02d326f6 AP_InertialNav: fixed use of _ahrs.get_relative_position_NED() with EKF disabled
this prevents a floating point error caused by using an uninitialised
vector3 when switching between DCM and EKF control in AP_InertialNav

Pair-Programmed-With: Randy Mackay <rmackay9@yahoo.com>
2014-10-09 18:30:20 +11:00
Andrew Tridgell
39fadad7d6 HAL_Linux: fixed build warnings 2014-10-09 16:49:23 +11:00
Andrew Tridgell
b3894e8b10 HAL_VRBRAIN: reduce the number of times we split up UART reads and writes 2014-10-09 12:29:25 +11:00
Andrew Tridgell
10b0ca7ea8 HAL_PX4: reduce the number of times we split up UART reads and writes 2014-10-09 12:29:25 +11:00
Andrew Tridgell
c834589daa HAL_Linux: reduce the number of times we split up UART reads 2014-10-09 12:29:25 +11:00
Andrew Tridgell
076bb1294e HAL_Linux: improved UDP packetisation and add flow control reporting
report we have flow control on UDP and TCP
2014-10-09 12:29:25 +11:00
Randy Mackay
834f2bea07 INS: add gyro_calibrated_ok_all method
This returns true if the gyros have been calibrated successfully
2014-10-09 10:00:07 +09:00
Andrew Tridgell
70ca87c4e6 AP_RangeFinder: handle all I2C rangefinder types on PX4 in PX4Firmware 2014-10-09 11:06:16 +11:00
Andrew Tridgell
cebfef3ead HAL_Linux: don't accept less than 5 input channels 2014-10-09 09:19:35 +11:00
Andrew Tridgell
a3fee16604 HAL_Linux: added DSM/Spektrum RCInput support
this decodes DSM using the RCIN pulses from the PRU
2014-10-08 12:50:50 +11:00
Andrew Tridgell
3e3f87188b HAL_Linux: enable DSM power pin 2014-10-08 12:50:50 +11:00
Andrew Tridgell
50e5ae6f7a HAL_Linux: added low level DSM decoder
based on dsm.c from PX4 project
2014-10-08 12:50:50 +11:00
Andrew Tridgell
9b207d029d HAL_Linux: change ring buffer to 300 entries 2014-10-07 14:57:34 +11:00
Andrew Tridgell
b1845ed00d HAL_Linux: initial support for parallel SBUS and PPM-SUM decoding 2014-10-07 14:57:34 +11:00
Andrew Tridgell
42e9dc3c31 HAL_Linux: added SBUS decoder from PX4 project
thanks Lorenz!
2014-10-07 14:57:34 +11:00
Andrew Tridgell
809b6cc855 AP_AHRS: added get_yaw_rate_earth()
used to estimate course correction on takeoff
2014-10-07 07:17:46 +11:00
Craig Elder
be352e9471 AP_GPS: Removed CFG-DAT message from 3DR-Ublox-NEO7
CFG-DAT is generated by U-Center but no longer used by the receiver.
2014-10-06 11:21:42 -07:00
Andrew Tridgell
e0e534628b HAL_Linux: support direct UDP output from UART drivers
this allows safe operation over WiFi links without MAVProxy
2014-10-06 15:13:03 +11:00
Randy Mackay
1754cacf3c AC_PosControl: remove completed to-do comments 2014-10-04 23:49:24 +09:00
Randy Mackay
f65e81cb07 AC_AttControl: remove some old comments 2014-10-04 23:49:21 +09:00
Randy Mackay
793ed20534 CoaxCopter: set throttle upper and lower flags 2014-10-04 23:49:19 +09:00
Randy Mackay
57f6d0ff60 SingleCopter: set throttle upper and lower flags 2014-10-04 23:49:16 +09:00
Randy Mackay
85fb4b122a MotorsMatrix: _min_throttle interpreted as 0 ~ 1000 range for throttle_lower flag
Also trigger throttle_upper flag when throttle in reaches 1000
2014-10-04 23:49:14 +09:00
Randy Mackay
91e5201439 Tri: _min_throttle interpreted as 0~1000 range for throttle_lower flag
limit.throttle_lower flag becomes true when the throttle passed into the
motors lib (which is in the 0 ~ 1000 range) is below _min throttle.
This makes the interpretation of the THR_MIN parameter consistent
between the main code (which uses 0 ~ 1000 range) and the motors lib
(which previously used the RC3_MIN ~ RC3_MAX range).
The remaining problem however is that the output of the motors continues
to use THR_MIN as if it were a pwm.  I don't believe this is a dangerous
problem however.
2014-10-04 23:49:11 +09:00
Craig Elder
7367ea04a7 AP_GPS: Adding support for the NEO7 GPS 2014-10-03 03:21:28 -07:00
priseborough
8aa267f75f AP_NavEKF : Fix bug in reset of GPS glitch offset
The GPS glitch offset was being zeroed during position resets. This caused the filter to reject subsequent GPS measurements if the GPS error persisted long enough to invoke a timeout and a position reset.
2014-10-03 09:17:03 +10:00
Randy Mackay
b3bbec24e4 RangeFinder: TYPE param description to PX4-I2C 2014-10-02 20:24:14 +09:00
Randy Mackay
8ce4893180 RangeFinder: TYPE param description to PX4-MaxbotixI2C
This hopefully reduces confusion for PX4/Pixhawk users with MaxBotix I2C
sonar
2014-10-02 16:49:15 +09:00
Randy Mackay
85eee31510 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 14:40:54 +09:00
priseborough
7cea7c6a18 AP_AHRS : add method to report if EKF is waiting to start 2014-10-02 14:38:29 +09:00
Andrew Tridgell
60aa017e11 GCS_MAVLink: added handle_set_mode() function 2014-10-01 14:19:04 +10:00
Randy Mackay
7caa611eb1 Compass_HIL: use instance specific orient and external 2014-10-01 13:02:03 +10:00
Randy Mackay
86aac4f40c Compass_HMC5843: use instance specific orient and external 2014-10-01 13:02:03 +10:00
Randy Mackay
900896977c Compass_VRBrain: use instance specific orient and external 2014-10-01 13:02:03 +10:00
Randy Mackay
85e82a0399 Compass_PX4: use instance specific orient and external 2014-10-01 13:02:03 +10:00
Randy Mackay
023b6afe8b Compass: add ORIENT2 and EXTERNAL2 params 2014-10-01 13:02:03 +10:00
Randy Mackay
16058cb730 Compass_VRBrain: primary compass based on use_for_yaw 2014-10-01 13:02:02 +10:00
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
Andrew Tridgell
071323a736 HAL_VRBRAIN: added millis64() and micros64() 2014-08-20 08:01:44 +10:00
Andrew Tridgell
1241da466b HAL_PX4: added millis64() and micros64() 2014-08-20 08:01:06 +10:00
Andrew Tridgell
ead82ee581 HAL_Linux: implement millis64() and micros64() 2014-08-20 08:00:21 +10:00
Andrew Tridgell
6450c84987 HAL_Empty: added dummy millis64() and micros64() 2014-08-20 07:59:21 +10:00
Andrew Tridgell
5a55101703 HAL_SITL: added millis64() and micros64() 2014-08-20 07:57:45 +10:00
Andrew Tridgell
7439d34a5d AP_HAL: add millis64() and micros64() on faster boards
this can be used for much simpler scheduling, without any wrap
handling
2014-08-20 07:55:19 +10:00
Andrew Tridgell
d01fa3bfbd AP_Baro: prevent reading the MS5611 too fast
setup the timer start after we've started the conversion to prevent
reading faster than the MS5611 is able to produce values
2014-08-19 21:16:13 +10:00
Andrew Tridgell
b9dc2335ee HAL_Linux: run timer thread at average 1kHz without drift
this avoids drift in the 1kHz timer, to avoid bias in the IMU
filtering
2014-08-19 20:03:34 +10:00
Andrew Tridgell
3c2ab31415 AP_InertialSensor: get rid of data_ready for MPU9250
when running off a 1kHz timer and reading at 1kHz it is better to
double sample than it is to skip a sample, as skipping samples will
throw the filter off, whereas a double sample will have minimal effect
2014-08-19 20:03:33 +10:00
Andrew Tridgell
9e01c657e5 AP_InertialSensor: update MPU9250 driver for 1kHz operation
use a time base sample wait, with 1kHz sampling
2014-08-19 20:03:33 +10:00
Andrew Tridgell
532e9aace4 AP_InertialSensor: fixed timer bug in HIL sensors 2014-08-19 20:03:33 +10:00
Andrew Tridgell
8f280d212b HAL_Linux: don't use usleep() in suspend_timer_procs()
usleep can cause a large delay with PREEMPT kernel
2014-08-19 20:03:33 +10:00
Andrew Tridgell
94e14f5dcb HAL_Linux: split off RCOutput class to be specific to PXF and ERLE
this fixes the Replay tool
2014-08-19 20:03:33 +10:00
Andrew Tridgell
2ce219aeb8 HAL_Linux: split RCInput class into generic and PRU implementations
this will make it easier for other boards (such as NAVIO) to implement
their own RCInput mechanism
2014-08-19 20:03:33 +10:00
Andrew Tridgell
12239de00d AP_InertialSensor: fix data_ready return for L3GD20 2014-08-19 10:14:20 +10:00
Andrew Tridgell
21ff578cb0 HAL_VRBrain: prevent read past end of buffer 2014-08-19 10:08:17 +10:00
Andrew Tridgell
0a20d0db60 HAL_PX4: prevent read past end of buffer 2014-08-19 10:08:17 +10:00
Andrew Tridgell
b4be93113c HAL_Linux: prevent read past end of buffer 2014-08-19 10:08:17 +10:00
Andrew Tridgell
7286e7acd2 AP_InertialSensor: fixed build errors on APM2 2014-08-19 10:08:17 +10:00
Andrew Tridgell
b40bd479c4 HAL_Linux: moved FRAM vs FS choice into HAL_Linux headers 2014-08-19 10:08:17 +10:00
Andrew Tridgell
9fccb5f5ed HAL_Linux: clear more UART flags
this fixes a major timing issue caused by bad UART flags (I suspect
the echo flags) and the GPS auto detection code
2014-08-19 10:08:17 +10:00
Andrew Tridgell
c87b0adc29 HAL_Linux: the MS5611 seems to be a bit happier at higher speed
still getting some bogus data, but less
2014-08-19 10:08:17 +10:00
Andrew Tridgell
41e65c2415 AP_Compass: fixed default orientation for PXF 2014-08-19 10:08:17 +10:00
Andrew Tridgell
50068a7c6a AP_InertialSensor: fixed default orientation for PXF board MPU9250 2014-08-19 10:08:16 +10:00
Andrew Tridgell
226b67d357 AP_HAL: make PXf default to MPU9250 2014-08-19 10:08:16 +10:00
Andrew Tridgell
6cc304e486 HAL_Linux: RCOutput should default to 50Hz on all boards 2014-08-19 10:08:16 +10:00
Andrew Tridgell
9d948d5a26 HAL_Linux: fixed name space collision in RCOutput 2014-08-19 10:08:16 +10:00
Andrew Tridgell
721d349922 HAL_Linux: fixed build of BusTest 2014-08-19 10:08:16 +10:00
Andrew Tridgell
a4ef512f10 SPIDriver: fixed handling of 0 based SPI bus numbers 2014-08-19 10:08:16 +10:00
Andrew Tridgell
5fb2ad0068 HAL_Linux: fixed safety of RCInput code
don't loop forever waiting for pulses
2014-08-19 10:08:16 +10:00
Víctor Mayoral Vilches
5e5319e23b AP_InertialSensor: MPU9250 cleaning 2014-08-19 10:08:16 +10:00
bugobliterator
ac11d282b5 HAL_Linux: Add support for PPM input to HAL_Linux
rcin thread continuously scans for values inside ring buffer maintained by pru with rcinpru0 firmware.
2014-08-19 10:08:16 +10:00
bugobliterator
072c39ea6a AP_HAL: Add option to select Storage type AP_HAL_Boards.h
user can set HAL_STORAGE as USE_FS or USE_FRAM inside AP_HAL_Boards.h as per his/her choice or board setup
2014-08-19 10:08:16 +10:00
bugobliterator
4b2f7cd163 HAL_Linux: Add FRAM HAL driver support for non-volatile storage
Support for File System starage mode is retained, appropriate Storage
mode can be set by defining USE_FS_STORAGE for File System storage
aand US_FRAM_STORAGE for FRAM storage.  Note: FS storage and FRAM
storage are never synced as of now.
2014-08-19 10:08:16 +10:00
Victor Mayoral Vilches
8a71fdf092 HAL_Linux: minor syntax fix in UARTDriver
Typo noticed by @hcervino.
2014-08-19 10:08:16 +10:00
Silvia
b6baf78e73 HAL_Linux:duplicate #include <sys/types<deleted 2014-08-19 10:08:16 +10:00
Silvia
7fd0e8345d HAL_Linux: Duplicate #include <unistd.h>deleted 2014-08-19 10:08:16 +10:00
Víctor Mayoral Vilches
37793cd7fa AP_HAL_Namespace: Change LSM9DS0 into two different devices. 2014-08-19 10:08:15 +10:00
Víctor Mayoral Vilches
df1de4efd6 AP_InertialSensor: Driver added for the LSM303D 2014-08-19 10:08:15 +10:00
Víctor Mayoral Vilches
8968647873 AP_InertialSensor: INS_generic example, add support L3GD20 2014-08-19 10:08:15 +10:00
Víctor Mayoral Vilches
0f908a8ccd HAL_Linux: Add L3GD20 to the AP_InertialSensor header 2014-08-19 10:08:15 +10:00
Víctor Mayoral Vilches
e272ed8d96 AP_HAL: Add support for L3GD20 2014-08-19 10:08:15 +10:00
Víctor Mayoral Vilches
556d46a4ef AP_InertialSensor: L3GD20 driver added
L3GD20 gyro userspace sensor added. The driver constructs
over the implementation of the PX4 Dev Team at
https://github.com/diydrones/PX4Firmware.
2014-08-19 10:08:15 +10:00
Víctor Mayoral Vilches
bfacf08c30 HAL_Linux: LSM9DS0 legacy driver moved to AP_InertialSensor/LSM9DS0/
The new LSM9DS0 driver will consist of the AP_InertialSensor_L3GD20 and
the AP_InertialSensor_LSM303D. For that reason the old LSM9DS0
(consisting of gyro and accel+mag implemented on a single class) has
been moved to a folder.

Legacy LSM9DS0 didn't probe to receive "correct" data.
2014-08-19 10:08:15 +10:00
Víctor Mayoral Vilches
82186a3961 HAL: Add two new SPI devices
SPIDevice_LSM303D and SPIDevice_L3GD20 added to the enum.
The code has also been formated.
2014-08-19 10:08:15 +10:00
Andrew Tridgell
60e501d5ab AP_GPS: moved UBX log headers to DataFlash
headers were not always being written
2014-08-19 10:08:15 +10:00
Andrew Tridgell
2b02fdbbc9 DataFlash: moved UBX logging headers to DataFlash 2014-08-19 10:08:15 +10:00
NullVoxPopuli
c672b3e324 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:01 +09:00
Andrew Tridgell
d8fe4f366d APM_OBC: added AFS_RC_FAIL_MS, AFS_MAX_GPS_LOSS and AFS_MAX_COM_LOSS 2014-08-17 18:06:42 +10:00
Andrew Tridgell
4e97c98fa1 APM_OBC: removed use of extern function 2014-08-17 09:13:29 +10:00
Randy Mackay
de747d215a Revert "GCS_MAVLink: send radio_in using rcmap"
This reverts commit 0881ccbee0.
2014-08-16 20:31:14 +09:00
Emile Castelnuovo
0d62b15292 AP_HAL: added missing CONFIG_HAL_BOARD_SUBTYPE #define for HAL_BOARD_VRBRAIN 2014-08-16 20:28:57 +10:00
Emile Castelnuovo
3b53c167a0 AP_Compass: VRBRAIN. Deal with external mag connected on internal I2C on VRBRAIN 4.5
This enables user to set the external parameter to true even if only one compass is connected
2014-08-16 20:28:50 +10:00
Emile Castelnuovo
bbb9925c47 DataFlash: Added four more channels for logging 2014-08-16 20:28:46 +10:00
Andrew Tridgell
8f3dad0d1c APM_Control: increase available range for roll and pitch 2014-08-16 18:07:22 +10:00
Randy Mackay
0881ccbee0 GCS_MAVLink: send radio_in using rcmap 2014-08-16 15:27:03 +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
Randy Mackay
fd5dee96e4 BaroGlitch: check baro health after alt calculation
Also correct type of distance_cm internal variable
2014-08-14 16:03:33 +09:00
Randy Mackay
424a65663a Baro: init members to resolve compiler warning 2014-08-14 16:03:30 +09:00
Randy Mackay
53b073148b BaroGlitch: use baro healthy() 2014-08-14 16:03:21 +09:00
Randy Mackay
280db8725a Arming: use baro healthy() function 2014-08-14 16:03:18 +09:00
Randy Mackay
78b1bf8282 Baro: example sketch to use healthy() function 2014-08-14 16:03:15 +09:00
Randy Mackay
76634ee8c3 Baro_PX4: use healthy flag 2014-08-14 16:03:12 +09:00
Randy Mackay
d29fe51cb3 Baro_VRBrain: use healthy flag 2014-08-14 16:03:09 +09:00
Randy Mackay
24db492131 Baro_MS5611: use healthy flag 2014-08-14 16:03:06 +09:00
Randy Mackay
72f6985bd8 Baro_HIL: use healthy flag 2014-08-14 16:03:04 +09:00
Randy Mackay
fdb38dec5f Baro_BMP085: use healthy flag 2014-08-14 16:03:02 +09:00
Randy Mackay
330d883f97 Baro: add altitude sanity check
healthy flag made protected
healthy accessor fn added which also check latest calculated altitude
was ok
2014-08-14 16:02:59 +09:00
Randy Mackay
e9fbea9497 Baro: make get_altitude_difference const 2014-08-14 16:02:55 +09:00
Andrew Tridgell
df3c565cd8 AP_L1_Control: prevent another NaN in L1 2014-08-14 14:10:03 +10:00
Randy Mackay
58257e3858 AC_AttControl: set rate D term filter from ins filter 2014-08-14 11:47:35 +09:00
Randy Mackay
51f40fe3d6 INS: add accessor for mpu6k filter 2014-08-14 11:47:23 +09:00
lthall
329118b7c9 Copter: AC_ATT correct yaw error calculation 2014-08-14 11:47:13 +09:00
lthall
90dc9411a5 Copter: ACRO Error calculation fix 2014-08-14 11:47:08 +09:00
Randy Mackay
46369badb3 ServoRelayEvents: init members to resolve compiler warning 2014-08-14 11:27:35 +09:00
Randy Mackay
d026749f1b Notify: add break to resolve compiler warning 2014-08-14 11:27:34 +09:00
Randy Mackay
039f4740ce Mount: correct comment on set_mode_to_default time 2014-08-14 11:27:34 +09:00
Randy Mackay
5614e42063 Mount: init members to resolve compiler warnings 2014-08-14 11:27:33 +09:00
Randy Mackay
9b9f6cd47a AC_MotorsHeli: init member to resolve compiler warning 2014-08-14 11:27:33 +09:00
Randy Mackay
0e7cbd28c8 INS_HIL: init members to resolve compiler warnings 2014-08-14 11:27:32 +09:00
Randy Mackay
534922adc3 GPSGlitch: init members to resolve compiler warnings 2014-08-14 11:27:31 +09:00
Randy Mackay
a6de3283b6 AHRS_DCM: init members to resolve compiler warnings 2014-08-14 11:27:31 +09:00
Randy Mackay
3fd2b3b4a1 AC_WPNav: init members to resolve compiler warnings 2014-08-14 11:27:30 +09:00
Randy Mackay
af28b74944 Baro_BMP085: init members to resolve compiler warnings 2014-08-14 11:27:29 +09:00
Andrew Tridgell
adb9d462aa GCS_MAVLink: regenerated MAVLink headers 2014-08-14 11:01:59 +10:00
Andrew Tridgell
f9d5715754 GCS_MAVLink: merged latest upstream common.xml 2014-08-14 11:01:41 +10:00
Andrew Tridgell
3357df9529 AP_Mission: fixed example sketch 2014-08-14 10:48:31 +10:00
Andrew Tridgell
e1a13edf3d RC_Channel: fixed example build 2014-08-13 22:12:30 +10:00
Andrew Tridgell
184420355d PID: fixed example build 2014-08-13 22:12:24 +10:00
Andrew Tridgell
b16d84023e Filter: fixed example build 2014-08-13 22:12:20 +10:00
Andrew Tridgell
5025f04cb1 AP_OpticalFlow: fixed example build 2014-08-13 22:12:14 +10:00
Andrew Tridgell
c76c3457fd AP_Menu: fixed example build 2014-08-13 22:12:08 +10:00
Andrew Tridgell
184c4c8ac5 AP_Math: fixed example build 2014-08-13 22:12:04 +10:00
Andrew Tridgell
8e15b4db0d HAL_Empty: fixed example build 2014-08-13 22:12:00 +10:00
Andrew Tridgell
928024854e HAL_AVR: fixed example build 2014-08-13 22:11:53 +10:00
Andrew Tridgell
b61ecb47af AP_HAL: fixed example build 2014-08-13 22:11:46 +10:00
Andrew Tridgell
2502ca3ec7 AP_Declination: fixed example build 2014-08-13 22:11:30 +10:00
Andrew Tridgell
c49981c03d AP_Compass: fixed example build 2014-08-13 22:11:25 +10:00
Andrew Tridgell
1c94b39d6e AP_ADC: fixed example build 2014-08-13 22:11:21 +10:00
Andrew Tridgell
83dc9bf5b3 AC_PID: fixed example build 2014-08-13 22:11:16 +10:00
Andrew Tridgell
ea26f15e5e GCS_Console: fixed example build 2014-08-13 21:48:36 +10:00
Andrew Tridgell
6c19f23ace DataFlash: fixed example build 2014-08-13 21:48:36 +10:00
Andrew Tridgell
8540174854 AP_Rangefinder: fixed example build 2014-08-13 21:48:36 +10:00
Andrew Tridgell
e43cac1b26 AP_Notify: fixed example build 2014-08-13 21:48:36 +10:00
Andrew Tridgell
fddf895d66 AP_Mount: fixed example build 2014-08-13 21:48:36 +10:00
Andrew Tridgell
2e83555892 AP_Motors: fixed example build 2014-08-13 21:48:35 +10:00
Andrew Tridgell
ce193f5c5c AP_Mission: fixed example build 2014-08-13 21:48:35 +10:00
Andrew Tridgell
917c9f7865 AP_Math: fixed example build 2014-08-13 21:48:35 +10:00
Andrew Tridgell
24251a7e12 AP_InertialSensor: fixed example build 2014-08-13 21:48:35 +10:00
Andrew Tridgell
f0f25eb1d7 AP_InertialNav: fixed example build 2014-08-13 21:48:35 +10:00
Andrew Tridgell
41f7ad42d4 HAL_PX4: fixed example build 2014-08-13 21:48:35 +10:00
Andrew Tridgell
baa5aeea81 HAL_FLYMAPLE: fixed example build 2014-08-13 21:48:35 +10:00
Andrew Tridgell
4bb72f8d85 HAL_AVR: fixed example build 2014-08-13 21:48:35 +10:00
Andrew Tridgell
5cca163b1f AP_HAL: fixed example build 2014-08-13 21:48:35 +10:00
Andrew Tridgell
b08b76b8ff AP_GPS: fixed example build 2014-08-13 21:48:35 +10:00
Andrew Tridgell
40709f655e AP_BattMonitor: fixed example build 2014-08-13 21:46:22 +10:00
Andrew Tridgell
a400cbc922 AP_Baro: fixed example build 2014-08-13 21:46:14 +10:00
Andrew Tridgell
f6f51ceebe AP_Airspeed: fixed example build 2014-08-13 21:46:09 +10:00
Andrew Tridgell
0f5b65e40e AP_AHRS: fixed example build 2014-08-13 21:46:04 +10:00
Andrew Tridgell
759a55d633 AC_WPNav: fixed example build 2014-08-13 21:45:56 +10:00
Andrew Tridgell
e2b813480f AC_Sprayer: fixed example build 2014-08-13 21:45:49 +10:00
Andrew Tridgell
f721e020f5 AC_Fence: fixed example build 2014-08-13 21:45:43 +10:00
Andrew Tridgell
a9153519dc AC_AttitudeControl: fixed example build 2014-08-13 21:45:38 +10:00
Andrew Tridgell
2297c6bcd2 AP_TECS: added TECS_LAND_SINK parameter
this controls the sink rate for the final stage of landing
2014-08-13 21:38:05 +10:00
Andrew Tridgell
52cdd6394f StorageManager: cope with a wider range of storage sizes 2014-08-13 21:35:26 +10:00
Andrew Tridgell
c864f3eed5 HAL_PX4: enable full storage size on PX4 2014-08-13 18:46:45 +10:00
Andrew Tridgell
e34463a4bb AP_HAL: flymaple build fix 2014-08-13 18:46:44 +10:00
Andrew Tridgell
a70b195a4a SITL: fixed limits on storage 2014-08-13 18:46:44 +10:00
Andrew Tridgell
984064f3d3 AP_InertialSensor: fixed example build 2014-08-13 18:46:44 +10:00
Andrew Tridgell
d40d0f6aec AP_HAL: removed old storage type read/write functions
not needed any more
2014-08-13 18:46:44 +10:00
Andrew Tridgell
2d9e9879a2 AP_Limits: convert to using StorageManager 2014-08-13 18:46:43 +10:00
Andrew Tridgell
7a12ff0271 AP_Mission: convert to using StorageManager 2014-08-13 18:46:43 +10:00
Andrew Tridgell
7cbb326405 AP_Rally: convert to using StorageManager 2014-08-13 18:46:43 +10:00
Andrew Tridgell
f133f45c3c AP_Param: convert to using StorageManager 2014-08-13 18:46:43 +10:00
Andrew Tridgell
f748e07ecf AP_HAL: ensure we have subtypes for all boards 2014-08-13 18:46:43 +10:00
Andrew Tridgell
3640ae9cdf SITL: allow for different storage sizes 2014-08-13 18:46:43 +10:00
Andrew Tridgell
e53c872e1f StorageManager: added example sketch
note: this destroys the data
2014-08-13 18:46:43 +10:00
Andrew Tridgell
66a21c4c33 StorageManager: first version of storage management library
used to divvy up eeprom/fram and allow for expandable storage
2014-08-13 18:29:04 +10:00
Mikhail Avkhimenia
c42cc12f23 AP_Notify: Add dummy LED configuration for Navio 2014-08-12 22:13:00 +10:00
Mikhail Avkhimenia
34da221c3d AP_InertialSensor: Use MPU9250 DRDY pin only on boards that support it 2014-08-12 22:13:00 +10:00
Mikhail Avkhimenia
a09fbb4171 HAL_Linux: Add SPI configuration for Navio
This changes the SPI bus number to be zero based on Linux
2014-08-12 22:13:00 +10:00
Mikhail Avkhimenia
83bbee491c AP_Baro_MS5611: add address switch for Navio board 2014-08-12 22:09:29 +10:00
Mikhail Avkhimenia
784533e9c8 AP_HAL: add configuration for HAL_BOARD_SUBTYPE_LINUX_NAVIO 2014-08-12 22:09:17 +10:00
Andrew Tridgell
bc95e746ce GCS_MAVLink: fixed example sketch builds 2014-08-11 11:06:17 +10:00
Andrew Tridgell
778b5e8a16 AP_PerfMon: removed unusued commented code 2014-08-11 09:39:02 +10:00
Andrew Tridgell
47655ee78e DataFlash: removed more unusued BufferRead functions 2014-08-11 09:39:02 +10:00
Daniel Frenzel
74460cd526 DataFlash: Delete unused BufferRead function
Signed-off-by: Daniel Frenzel <dgdanielf@gmail.com>
2014-08-11 09:24:42 +10:00
Daniel Frenzel
dd705e3fdb AP_Param: signed/unsigned conversion
Signed-off-by: Daniel Frenzel <dgdanielf@gmail.com>
2014-08-11 09:24:34 +10:00
Daniel Frenzel
1c7e8f8fb2 AP_Mission: Consecutive return, break, continue, goto or throw statements are unnecessary.
Signed-off-by: Daniel Frenzel <dgdanielf@gmail.com>
2014-08-11 09:24:26 +10:00
Daniel Frenzel
c97b460a6b AP_GPS: removed wrong reassignment of msec
Signed-off-by: Daniel Frenzel <dgdanielf@gmail.com>
2014-08-11 09:24:19 +10:00
Daniel Frenzel
df075b8f63 AP_PerfMon: removed unused blocking_writes
Signed-off-by: Daniel Frenzel <dgdanielf@gmail.com>
2014-08-11 09:24:11 +10:00
Daniel Frenzel
b1a9d6bbcc AP_Math: Using const references in matrix3
Signed-off-by: Daniel Frenzel <dgdanielf@gmail.com>
2014-08-11 09:24:05 +10:00
Andrew Tridgell
b559e9d331 SITL: better rangefinder simulation
able to handle a wider range, and takes account of attitude
2014-08-10 22:37:07 +10:00
Andrew Tridgell
ef98eba722 SITL: added SIM_SONAR_SCALE parameter
used for simulating different kinds of rangefinders
2014-08-10 22:36:38 +10:00
Andrew Tridgell
a4cd9c4bd7 AP_Airspeed: added HIL support 2014-08-10 18:16:53 +10:00
Andrew Tridgell
b296508da4 AP_GPS: make setHIL take const references 2014-08-09 22:50:15 +10:00
Andrew Tridgell
bf0ce79176 SITL: make it possible to use SITL-HIL
strangely enough, using HIL in SITL is a great way to debug HIL!
2014-08-09 22:50:15 +10:00
Andrew Tridgell
f8ceccce32 AP_InertialSensor: improved HIL timing consistancy
try to keep the average time for each sample right
2014-08-09 22:50:15 +10:00
Andrew Tridgell
2e5913df93 RC_Channel: fixed k_manual for set_servo_limit()
this allows for failsafe takeover of k_manual channels, which fixes
the behaviour for ignition failsafe
2014-08-09 22:50:14 +10:00
Andrew Tridgell
d1a75874a1 HAL_PX4: don't report power status change if in first 5 seconds 2014-08-09 22:50:14 +10:00
Andrew Tridgell
9a1bac06d4 GCS_MAVLink: added send_battery2() 2014-08-09 22:50:14 +10:00
Andrew Tridgell
ab6302540d AP_BattMonitor: added 2nd battery voltage monitoring 2014-08-09 22:50:14 +10:00
Andrew Tridgell
11025c8da9 GCS_MAVLink: rebuild MAVLink headers 2014-08-09 22:50:14 +10:00
Andrew Tridgell
67e1b66757 GCS_MAVLink: added battery2 message 2014-08-09 22:50:14 +10:00
Randy Mackay
5d4e019397 BaroGlitch: increase max accel to 15m/s/s 2014-08-09 15:47:52 +09:00
Andrew Tridgell
3ee3a71644 AP_NavEKF: prevent a possible numerical error on startup
fixes issue #1294
2014-08-08 15:55:20 +10:00
Andrew Tridgell
144dcb4552 APM_OBC: use send_statustext_all() 2014-08-08 13:54:21 +10:00
Andrew Tridgell
f49258eb31 GCS_MAVLink: added send_statustext_all() method
used for sending text messages from libraries
2014-08-08 13:54:21 +10:00
Andrew Tridgell
1d4d848300 AP_InertialSensor: fixed a build warning 2014-08-08 13:48:03 +10:00
Andrew Tridgell
a812bf621f APM_OBC: added AFS_ENABLE parameter
AFS system is disabled by default
2014-08-08 13:48:03 +10:00
priseborough
bc3c85be20 AP_L1_Control : Fix potential divide by zero error 2014-08-07 19:04:42 +10:00
Andrew Tridgell
ed6ab5f1d3 AP_InertialSensor: use bool for blocking_read()
uint8_t return was confusing
2014-08-07 13:09:17 +10:00
Michael Carpenter
b4c0e1215b AP_InertialSensor: Use return value of blocking_read to handle calibration timeouts 2014-08-07 13:04:18 +10:00
Andrew Tridgell
786661ca2b GCS_MAVLink: better handling of high severity STATUSTEXT messages 2014-08-07 12:55:52 +10:00
Przemek Lekston
ae4814a773 AP_AHRS_DCM.cpp: changed the direction of position projection to ensure correct behavious in crosswind 2014-08-07 12:34:30 +10:00
Andrew Tridgell
bc560b466e GCS_MAVLink: regenerate MAVLink headers 2014-08-07 12:34:30 +10:00
Andrew Tridgell
5ed24557b3 GCS_MAVLink: import latest MAVLink XML 2014-08-07 12:34:30 +10:00
Andrew Tridgell
af4dee39d8 AP_Terrain: added note on CPU cost of height_amsl() 2014-08-07 09:51:14 +10:00
Andrew Tridgell
dc72dfb70a AP_Terrain: added terrain lookahead API
this allows for predicting altitude needed to climb over upcoming
terrain
2014-08-07 09:30:35 +10:00
Andrew Tridgell
b92873cab1 AP_Math: prevent negative longitude scaling
for crazy locations
2014-08-07 09:30:02 +10:00
Andrew Tridgell
7752196628 AP_SpdHgtControl: added get_max_climbrate() 2014-08-07 09:29:40 +10:00
Andrew Tridgell
c990714377 AP_TECS: added get_max_climbrate() 2014-08-07 09:29:31 +10:00
Andrew Tridgell
f0f46a77d7 AP_Terrain: don't request data at 0/0 2014-08-06 22:13:37 +10:00
Andrew Tridgell
642a07b6bd AP_Terrain: enable the terrain database by default
MissionPlanner now supports terrain data, and having terrain data in
logs is useful even if users don't fly terrain missions
2014-08-06 20:53:34 +10:00
Andrew Tridgell
efa1d370fa AP_Terrain: added missing TerrainMission.cpp 2014-08-06 19:32:53 +10:00
Andrew Tridgell
88bc1fb4d3 AP_Rally: fixed build for non-standard vehicle types 2014-08-06 17:59:20 +10:00
Andrew Tridgell
a701fa2098 AP_Terrain: added automatic rally point checking 2014-08-06 17:59:19 +10:00
Andrew Tridgell
723aa7e336 AP_Rally: added last_change_time_ms() call 2014-08-06 17:59:19 +10:00
Andrew Tridgell
7da939047f AP_Terrain: added automatic waypoint checking
check we have terrain data for all waypoints
2014-08-06 17:59:19 +10:00
Andrew Tridgell
df55ae86c4 AP_Mission: added last_change_time_ms() call
will be used by terrain lib for scanning waypoints
2014-08-06 17:59:19 +10:00
Andrew Tridgell
9ca65602c6 AP_Terrain: added dataflash logging 2014-08-06 17:59:19 +10:00
Andrew Tridgell
cd8fca40fb DataFlash: added TERR log message for terrain data 2014-08-06 17:59:19 +10:00
Andrew Tridgell
7c4d31c481 AP_TECS: added TECS_PITCH_MAX and TECS_PITCH_MIN
this allows the TECS controlled pitch limits to be smaller than the
FBWA limits. It is common for a human pilot to want a bit more
discretion over pitch than you want the automatic controller to use
2014-08-06 17:59:18 +10:00
Andrew Tridgell
147a7b8b69 AP_Terrain: added extrapolation based on last available data
if we run out of terrain data then extrapolate using the last
available terrain height at the AHRS position. This can be used to
cope with GCS outages over long distances where the terrain data isn't
preloaded
2014-08-06 17:59:18 +10:00
Randy Mackay
e0fc2dd50e AC_PosControl: remove 20cm on takeoff 2014-08-05 09:11:57 +09:00
akdslr
a404404806 AP_RangeFinder: Added a call to sonar.update in RFIND_test 2014-08-04 22:13:16 +10:00
Randy Mackay
1362bdc338 AC_PosControl: smooth take-off with accel PID's I term
This avoids an instantaneous jump in throttle during take-off by loading
the accel PID's I term with the expected change in throttle level
2014-08-04 21:04:09 +09:00
Randy Mackay
5596001d39 AC_Motors: make get_throttle_out const 2014-08-04 21:04:09 +09:00
Randy Mackay
e550c1e9a3 AC_PosControl: add set_alt_target_to_current_alt method 2014-08-04 16:54:04 +09:00
Randy Mackay
009f42b2e1 InertialNav: do not reset velocity after glitch clears 2014-08-04 11:31:46 +09:00
Andrew Tridgell
6ebff35fe2 AP_Baro: don't include I2C MS5611 on APM1 either 2014-08-03 17:17:20 +10:00
Randy Mackay
fe24721218 BaroGlitch: increase default ok distance to 5m
When taking off some copters hove a sudden baro altitude dip of 4m
2014-08-02 11:43:06 +09:00
Randy Mackay
f12d06d76b DataFlash: typo fix in ListAvailableLogs 2014-08-01 15:14:44 +09:00
Randy Mackay
538372c02c InertialNav: remove accessor to set time_constants 2014-08-01 15:14:43 +09:00
Andrew Tridgell
3fa30f91db DataFlash: avoid CLI functions on APM2 for copter 2014-08-01 15:57:15 +10:00
Randy Mackay
c68d4fdfcb BaroGlitch: init members to resolve compiler warning 2014-08-01 14:07:34 +09:00
Randy Mackay
621cc2b953 Mission: bug fix to condition-change-alt
Fix contributed by oniondream, thanks!
2014-08-01 12:51:50 +09:00
priseborough
d5442fe64e AP_NavEKF : Modified compass fail logic
If the vehicle can fly without a compass (a fly forward vehicle)
then if the compass times out (large errors for more than 10 seconds,
then it will be declared permanently failed and will not be
used until the filter is reset
2014-07-31 21:12:11 +10:00
Andrew Tridgell
cc735a4200 AP_InertialSensor: some more debug info for VibTest 2014-07-31 12:48:30 +10:00
Matthias Badaire
c7cd1c9fde AP_Frsky_Telem: added initial Frsky telemetry library
based on work from the PX4Firmware tree, this adds a library which can
create and send Frsky telemetry packets
2014-07-29 17:08:19 -07:00
Randy Mackay
728da12441 BaroGlitch: remove debug 2014-07-29 22:05:09 +09:00
Andrew Tridgell
c538cc0665 AP_Baro: fixed example build 2014-07-29 21:04:26 +10:00
Andrew Tridgell
03dc27147e AP_Math: port examples to Linux 2014-07-29 15:49:38 +10:00
Randy Mackay
053a45e9cf AC_WPNav: fix example sketch 2014-07-29 12:01:09 +09:00
Randy Mackay
6a6482fb03 AC_Sprayer: fix example sketch 2014-07-29 12:00:59 +09:00
Randy Mackay
71df1eb94f AC_Fence: fix example sketch 2014-07-29 12:00:46 +09:00
Randy Mackay
424cb1aeca AC_AttControl: fix example sketch 2014-07-29 12:00:33 +09:00
Randy Mackay
2951fb50e9 InertialNav: fix example sketch 2014-07-29 11:51:49 +09:00
Randy Mackay
4d6588a479 Notify: APM2 buzzer for arming, ekf and baro failures 2014-07-28 22:16:24 +09:00
Randy Mackay
dcc74be4aa Notify: baro warning tone alarm 2014-07-28 22:16:23 +09:00
Randy Mackay
cd9e786935 Notify: RGB led flashes yellow-purple for baro warning 2014-07-28 22:16:22 +09:00
Randy Mackay
5f1f619829 HAL_AVR_SITL: integrate ACC_BIAS and BARO_GLITCH
Adjust simulated accelerometer values and barometer altitude
2014-07-28 22:16:21 +09:00
Randy Mackay
79291f25a0 SITL: add ACC_BIAS and BARO_GLITCH parameters
These allow testing accelerometer bias which often comes from vibration
and sudden changes in baro altitude.
2014-07-28 22:16:21 +09:00
Randy Mackay
4db4471f49 INav_EKF: accept baro_glitch in constructor
Required so it can create an InertialNav object
2014-07-28 22:16:19 +09:00
Randy Mackay
322f527c4f InertialNav: skip baro updates when glitching
Also resets inertial nav alt estimate once glitch clears
2014-07-28 22:16:19 +09:00
Randy Mackay
ee6d4d570a Notify: add baro_glitch flag 2014-07-28 22:16:18 +09:00
Randy Mackay
2289b98d34 Baro_Glitch: initial version of baro glitch protection
Based on GPS Glitch protection library
2014-07-28 22:16:12 +09:00
Andrew Tridgell
2ebdfce4ea GCS_MAVLink: avoid integer underflow in mavlink txspace check 2014-07-27 22:18:52 +10:00
Andrew Tridgell
f7b01a6f3f AP_InertialSensor: avoid integer underflow in mavlink txspace check 2014-07-27 22:18:52 +10:00
Andrew Tridgell
a21998aece GCS_MAVLink: prevent integer underflow with comm_get_txspace() 2014-07-27 22:12:08 +10:00
Randy Mackay
b665ebd7a0 MotorsMatrix: implement get_motor_mask 2014-07-26 16:33:24 +09:00
Randy Mackay
d73605ece8 MotorsCoax: implement get_motor_mask 2014-07-26 16:33:22 +09:00
Randy Mackay
72c3e9cc72 TradHeli: implement get_motor_mask 2014-07-26 16:33:20 +09:00
Randy Mackay
6d99524e56 MotorsSingle: implement get_motor_mask 2014-07-26 16:33:18 +09:00
Randy Mackay
6ae855c1cf MotorsTri: implement get_motor_mask 2014-07-26 16:33:16 +09:00
Randy Mackay
7749bfe82c Motors: add get_motor_mask method
This returns a bitmask of output channels that are used by the motors
library.  This allows removing the chance of a do-set-servo interfering
with a motor or control surface used to control the vehicle.
2014-07-26 16:33:14 +09:00
Andrew Tridgell
b4a441620f AP_Notify: fixed example build 2014-07-25 18:38:15 +10:00
Andrew Tridgell
a6db247f82 GCS_Console: fixed example build 2014-07-25 17:55:22 +10:00
Andrew Tridgell
e67c468e2d DataFlash: fixed example build 2014-07-25 17:55:16 +10:00
Andrew Tridgell
7bf72d1c2b AP_RangeFinder: fixed example build 2014-07-25 17:55:11 +10:00
Andrew Tridgell
f2c636250b AP_Notify: fixed example build 2014-07-25 17:55:04 +10:00
Andrew Tridgell
6ea68b318e AP_Mount: fixed example build 2014-07-25 17:54:58 +10:00
Andrew Tridgell
d9f20c6785 AP_Motors: fixed example build 2014-07-25 17:54:51 +10:00
Andrew Tridgell
50f67dd57d AP_Mission: fixed example build 2014-07-25 17:54:45 +10:00
Andrew Tridgell
c1650eed7a AP_InertialNav: fixed example build 2014-07-25 17:54:37 +10:00
Andrew Tridgell
db1479b46b AP_GPS: fixed example build 2014-07-25 17:54:25 +10:00
Andrew Tridgell
93f2d81ff4 AP_BattMonitor: fixed example build 2014-07-25 17:54:19 +10:00
Andrew Tridgell
c1646fec73 AP_Airspeed: fixed example build 2014-07-25 17:54:11 +10:00
Andrew Tridgell
82d0666501 AP_AHRS: fixed example build 2014-07-25 17:54:04 +10:00
Andrew Tridgell
7f7a0db2d3 AC_WPNav: fixed example build 2014-07-25 17:53:58 +10:00
Andrew Tridgell
f75318ee0a AC_Sprayer: fixed example build 2014-07-25 17:53:43 +10:00
Andrew Tridgell
2b3becd252 AC_Fence: fixed example build 2014-07-25 17:53:27 +10:00
Andrew Tridgell
6df2890fd8 AC_AttitudeControl: fixed example build 2014-07-25 17:52:53 +10:00
Andrew Tridgell
662276597a AP_InertialSensor: fixed example build 2014-07-25 17:52:14 +10:00
Andrew Tridgell
02dec5634f AP_HAL: fixed example builds 2014-07-25 17:52:01 +10:00
Andrew Tridgell
aa5940c378 AP_Math: fixed example build 2014-07-25 17:51:30 +10:00
Andrew Tridgell
0f7e78e418 Airspeed: fixed example to setup pin 2014-07-25 17:15:00 +10:00
Andrew Tridgell
ffd6fa1366 GCS_MAVLink: ignore alignment warnings in MAVLink headers 2014-07-25 17:14:48 +10:00
Randy Mackay
46e5fa2c0b Notify: APM2 arming buzzer to long tone
Arming tone is a solid 3 second tone so it is consistent with Pixhawk
arming tone
2014-07-25 13:09:04 +09:00
Andrew Tridgell
37b357f282 AP_Terrain: prevent valgrind error when terrain not available 2014-07-25 13:44:36 +10:00
Andrew Tridgell
bb31a45596 AP_Terrain: expand parameter docs 2014-07-25 13:18:48 +10:00
Andrew Tridgell
e578044661 GCS_MAVLink: added missing generated MAVLink headers 2014-07-25 13:09:31 +10:00
Andrew Tridgell
ab9785d3ad AP_Terrain: added current_height to TERRAIN_REPORT
and send TERRAIN_REPORT even when downloading TERRAIN_DATA
2014-07-25 11:40:56 +10:00
Andrew Tridgell
383070b9c0 AP_NavEKF: ensure get_position() fills in flags 2014-07-25 11:40:26 +10:00
Andrew Tridgell
6a275372dd AP_AHRS: ensure get_position() fills in flags 2014-07-25 11:40:16 +10:00
Andrew Tridgell
8a838e6b3d GCS_MAVLink: regenerate headers 2014-07-25 11:40:01 +10:00
Andrew Tridgell
4e39f97d7a GCS_MAVLink: merged with upstream 2014-07-25 11:39:48 +10:00
Andrew Tridgell
c4047f6f11 AP_Terrain: rename find_grid() to find_grid_cache()
thanks Randy!
2014-07-25 09:52:20 +10:00
Andrew Tridgell
1fcf35333f AP_Terrain: fixed init order and init more vars
thanks to Randy for spotting this
2014-07-25 09:45:47 +10:00
Andrew Tridgell
679b32b76c AP_Terrain: make parameter variables private 2014-07-25 09:45:28 +10:00
Andrew Tridgell
34cbaa6f17 AP_Mission: added support for MAV_FRAME_GLOBAL_TERRAIN_ALT 2014-07-25 08:33:44 +10:00
Andrew Tridgell
3faafc9644 AP_Terrain: replace HAVE_AP_TERRAIN with AP_TERRAIN_AVAILABLE 2014-07-25 07:59:48 +10:00
Andrew Tridgell
ce60bf8d3f AP_Terrain: removed incorrect ASSERT 2014-07-25 07:56:33 +10:00
Andrew Tridgell
7bc6561f2a AP_Terrain: fixed comment on function 2014-07-25 07:56:22 +10:00
Andrew Tridgell
b8b235c33c GCS_MAVLink: regenerate MAVLink headers 2014-07-24 21:50:20 +10:00
Andrew Tridgell
c32595e6ed AP_Terrain: added status() interface for reporting 2014-07-24 21:50:19 +10:00
Andrew Tridgell
e2e41d5da7 AP_Terrain: added location_to_relative_home() function 2014-07-24 21:50:19 +10:00
Andrew Tridgell
8a48f06d18 AP_Common: added terrain_alt flag to Location
signifies that the altitude is a above terrain altitude
2014-07-24 21:50:19 +10:00
Andrew Tridgell
5e2077185b AP_Terrain: fixed cm conversion error 2014-07-24 21:50:19 +10:00
Andrew Tridgell
18974363d5 AP_Terrain: added some helper functions
this adds easier to use helper functions for terrain handling
2014-07-24 21:50:19 +10:00
Andrew Tridgell
8ea2133c4b AP_Terrain: provide more height_*() convenience functions
these provide functions that are more convenient for the vehicle code
to use
2014-07-24 21:50:19 +10:00
Andrew Tridgell
db506b76fa AP_Terrain: split up code into separate cpp files
this should make it a bit easier to review
2014-07-24 21:50:19 +10:00
Andrew Tridgell
6b53f473d9 GCS_MAVLink: added a new TERRAIN_ALT frame type for missions 2014-07-24 21:50:18 +10:00
Andrew Tridgell
2d9637c156 AP_Terrain: re-arrange disk IO code
add some comments explaining split between IO thread and main code
2014-07-24 21:46:07 +10:00
Andrew Tridgell
ee04c7de96 AP_Terrain: hold home location as a special location
this ensures home altitude is always available
2014-07-24 21:46:06 +10:00
Andrew Tridgell
0a3aa23619 AP_Terrain: fixed build on APM2 2014-07-24 21:46:06 +10:00
Andrew Tridgell
2f0279659a AP_Terrain: prevent disk blocks getting stuck
we need to match first on the expected state to ensure we don't get an
invalid block
2014-07-24 21:46:06 +10:00
Andrew Tridgell
28d6e39c4c AP_Terrain: added checking of block CRCs on disk
this allows us to cope with SD card data corruption
2014-07-24 21:46:06 +10:00
Andrew Tridgell
a458f1bf5f AP_Baro: minor improvements to Baro HIL code health check 2014-07-24 21:46:06 +10:00
Andrew Tridgell
0df2dd9092 GCS_MAVLink: added TERRAIN_CHECK and TERRAIN_REPORT messages 2014-07-24 21:45:57 +10:00
Andrew Tridgell
eeb4ad56bc AP_Terrain: added checking and reporting messages
this allows the GCS to check the status of the terrain system
2014-07-24 21:45:56 +10:00
Andrew Tridgell
9f76f0276f AP_Terrain: added disk IO for terrain data 2014-07-24 21:45:56 +10:00
Andrew Tridgell
63b5811a7c AP_HAL: added HAL_BOARD_TERRAIN_DIRECTORY 2014-07-24 21:45:56 +10:00
Andrew Tridgell
09214680fe AP_Terrain: request grids around current grid
this ensures we have grids ahead of time
2014-07-24 21:45:56 +10:00
Andrew Tridgell
18e09c2f3e AP_Terrain: added debug code 2014-07-24 21:45:56 +10:00
Andrew Tridgell
09518d2d91 AP_Terrain: added mavlink transport of terrain data 2014-07-24 21:45:46 +10:00
Andrew Tridgell
e23ee34d95 GCS_MAVLink: added MSG_TERRAIN 2014-07-24 21:45:46 +10:00
Andrew Tridgell
1ecd4b7fb2 GCS_MAVLink: updated terrain messages 2014-07-24 21:45:46 +10:00
Andrew Tridgell
3020d91dcd GCS_MAVLink: keep a bitmap of what mavlink channels are active
- this will allow for looping over active channels in libraries
- expose active channel mask
2014-07-24 21:45:46 +10:00
Andrew Tridgell
1d42eda4da AP_Terrain: started on update() logic 2014-07-24 21:45:46 +10:00
Andrew Tridgell
a7eb2ac28c AP_Terrain: implement height_amsl() 2014-07-24 21:45:46 +10:00
Andrew Tridgell
f26bbb6ddb GCS_MAVLink: added terrain mavlink messages 2014-07-24 21:45:46 +10:00
Andrew Tridgell
ee7fc984f0 AP_Terrain: initial structure 2014-07-24 21:44:50 +10:00
Andrew Tridgell
8ef9aa0300 GCS_MAVLink: rebuild MAVLink headers 2014-07-24 21:40:16 +10:00
Andrew Tridgell
3d2460bd42 XML: resolved conflicts in MAV_CMD_ enum
this moves a couple of commands to be MAV_CMD_DO_ commands, after
discussions with Lorenz and Randy
2014-07-24 21:40:16 +10:00
Andrew Tridgell
feaf9751cc AP_Mission: removed use of MAV_CMD_NAV_VELOCITY and MAV_CMD_NAV_GUIDED 2014-07-24 21:38:31 +10:00
Andrew Tridgell
0f24c43b0c GCS_MAVLink: merged latest changes from upstream 2014-07-24 21:38:31 +10:00
akdslr
2c86f5df94 AP_RangeFinder: Updated RFIND_test example to not use Auto and added more device details 2014-07-24 14:41:55 +10:00
akdslr
a1861125e6 AP_RangeFinder_PulsedLightLRF: Modified to do a 2 byte transfer for the distance read 2014-07-24 14:41:54 +10:00
akdslr
b08e3d0ee4 AP_RangeFinder_PX4: Added the destructor to close the file descriptor 2014-07-24 14:41:54 +10:00
akdslr
54d0db863b AP_RangeFinder: Changed sonar to rangefinder in the parameter descriptions 2014-07-24 14:41:54 +10:00
akdslr
8c6718fe2d AP_RangeFinder: Removed the use of type Auto 2014-07-24 14:41:54 +10:00
Emile Castelnuovo
1092447360 AP_Compass_VRBrain: add support for two compasses 2014-07-23 20:51:12 +09:00
Emile Castelnuovo
4deafffb3e AP_Compass: VRBRAIN corrected function definition
Add support for two compasses.
2014-07-23 20:47:19 +09:00
Randy Mackay
f24960f4c0 AP_Notify: add EKF failure warning 2014-07-22 23:13:27 +09:00
Randy Mackay
a6c29ba1c3 Compass_PX4: get_primary made public 2014-07-22 22:01:23 +09:00
Randy Mackay
c16672a529 Compass_VRBrain: get_primary made public 2014-07-22 22:01:22 +09:00
Randy Mackay
d291594d7c Compass: get_primary method made public 2014-07-22 22:01:09 +09:00
Randy Mackay
1f579563e6 Compass: set_motor_compensation takes instance as first parameter
Also get_motor_compensation uses primary compass
2014-07-22 21:59:04 +09:00
Andrew Tridgell
c45f1961f6 AP_RangeFinder: removed old test code 2014-07-21 09:39:48 +10:00
Andrew Tridgell
fe92ef5c32 AP_RangeFinder: added an example program 2014-07-21 09:39:12 +10:00
Andrew Tridgell
3474da6c97 AP_Param: added a method for example programs to set parameters in objects 2014-07-21 09:37:41 +10:00
Andrew Tridgell
79f453dfd3 AP_InertialSensor: use LSM9DSO_AM device 2014-07-19 13:23:54 +10:00
Andrew Tridgell
03e8e5f2b9 HAL_Linux: setup for all 6 SPI devices for PXF cape 2014-07-19 13:23:37 +10:00
Andrew Tridgell
9b23921626 AP_HAL: added LSM9DSO_G SPI device 2014-07-19 13:22:24 +10:00
Andrew Tridgell
05f5d91709 HAL_Linux: fixed BusTest build 2014-07-19 12:22:06 +10:00
Randy Mackay
517732a34d AP_Motors: add get_throttle_out accessor 2014-07-18 11:39:27 +09:00
Randy Mackay
c2f8571f37 AC_AttControl: FF and accel limiting off by default
Also adjust parameter ranges used by GCSs
2014-07-17 16:22:32 +09:00
Randy Mackay
eebd32f306 AC_AttControl: remove duplicate rate_ef_desired to resolve compiler warning 2014-07-16 21:50:31 +09:00
Randy Mackay
0a46afa6c4 AC_PID: init members to reduce compiler warnings 2014-07-16 17:46:14 +09:00
lthall
fb55658c91 Copter: Acro use same error limit in all three axis 2014-07-16 17:46:13 +09:00
lthall
2889f5abc4 AC_AttControl: Fix feedforward behavior 2014-07-16 17:46:06 +09:00
Randy Mackay
581838b271 AC_AttControl: initialise _acro_angle_switch
Resolves a compiler warning
2014-07-16 15:11:12 +09:00
Randy Mackay
6baedbda1d AP_InertialSensor: add empty virtual destructor 2014-07-16 14:56:56 +09:00
Randy Mackay
d23b685023 AP_AHRS: add empty virtual destructor 2014-07-16 14:56:54 +09:00
Randy Mackay
83a84c7b90 AC_AttControl: add empty virtual destructor
This resolves pixhawk bricking and reduces one compiler warning
2014-07-16 14:56:52 +09:00
Jonathan Challinger
6e66cf43cb AC_AttitudeControl: Use bias-corrected angular rates instead of raw gyro measurements 2014-07-16 14:40:56 +09:00
Randy Mackay
a09f7b9198 AP_InertialSensor_MPU6k: init members to reduce compiler warnings 2014-07-16 14:40:55 +09:00
Randy Mackay
c5a03ea18e AP_InertialSensor: init members to reduce compiler warnings 2014-07-16 14:40:53 +09:00
Randy Mackay
d530fe1806 Camera: remove unused reference to hal
Resolves one compiler warning
2014-07-16 14:40:52 +09:00
Randy Mackay
4cf7f01694 AP_Airspeed: init members to reduce compiler warnings 2014-07-16 14:40:50 +09:00
Randy Mackay
4c76c77239 AP_Airspeed: use 'no break' to resolve compiler warning re switch 2014-07-16 14:40:49 +09:00
Randy Mackay
10588d6d36 AC_Sprayer: append f to floating point constants
Reduces some compiler warnings
2014-07-16 14:40:47 +09:00
Randy Mackay
6f60ce3d6e Inav_EKF: init member and remove hal reference to reduce compiler warnings 2014-07-16 14:40:39 +09:00
Randy Mackay
e27ff75a71 AP_InertialNav: remove virtual qualifier from error_count 2014-07-16 14:38:50 +09:00
Randy Mackay
0c0521a555 AC_Fence: append f to floating point constants 2014-07-16 14:38:48 +09:00
Randy Mackay
9e2cd93b2d AP_InertialNav: init members to reduce compiler warnings 2014-07-16 14:38:46 +09:00
Randy Mackay
1e888e5c34 AP_InertialNav: append f to floating point constants
Reduces some compiler warnings
2014-07-16 14:38:43 +09:00
Randy Mackay
70568225a6 AC_PosControl: init members to resolve compiler warnings 2014-07-16 14:38:40 +09:00
Randy Mackay
9233bbab14 AC_PosControl: cast fabs to float to resolve compiler warnings 2014-07-16 14:38:38 +09:00
Randy Mackay
52d5109a6c AC_Circle: initialise members to reduce compiler warnings 2014-07-16 14:38:34 +09:00
Randy Mackay
76507a9e67 AC_AttControlHeli: remove hal declaration to clear compiler warning 2014-07-16 14:38:32 +09:00
Randy Mackay
5128991a84 AC_AttControlHeli: cast fabs to float to resolve compiler warning 2014-07-16 14:38:29 +09:00
Randy Mackay
1f2e38ed28 AHRS: initalise members to reduce compiler warnings 2014-07-16 14:38:26 +09:00
Randy Mackay
0f7178e447 AC_AttControl: cast fabs to float to resolve compiler warning 2014-07-16 14:38:20 +09:00
Randy Mackay
47801a6c4d Compass: bug fix to init of device id
Also init members to reduce compiler warnings
2014-07-16 14:29:10 +09:00
LukeMike
85fc72c57c AP_InertialSensor: VRBRAIN added 3th inertial sensor 2014-07-15 20:42:15 +10:00
LukeMike
dd1cab3ab8 HAL_VRBRAIN: updated analog drivers and scheduler driver to latest official version 2014-07-15 20:42:11 +10:00
Andrew Tridgell
9e921719ca HAL_Linux: added bus scanning test 2014-07-15 19:06:11 +10:00
Andrew Tridgell
bcc8768358 HAL_Linux: fixed a build warning 2014-07-15 13:56:50 +10:00
Andrew Tridgell
1b85b12738 HAL_Linux: made I2C driver more portable
this uses a typeof() to cope with different kernel data types for I2C
messages
2014-07-15 13:56:50 +10:00