Commit Graph

14091 Commits

Author SHA1 Message Date
Andrew Tridgell
9bdb6838e6 HAL_PX4: cope with nested cork/push 2017-05-01 14:32:18 +10:00
Andrew Tridgell
9b297ef5a1 HAL_Linux: fixed nested cork/push
don't generate extra pulse sets if we nest
2017-05-01 14:32:18 +10:00
Andrew Tridgell
f257a869ac HAL_SITL: make cork/push safe to call nested 2017-05-01 14:32:18 +10:00
priseborough
2d4eee0cce AP_NavEKF2: documentation update 2017-05-01 14:24:55 +10:00
priseborough
4a898037e9 AP_NavEKF3: documentation update 2017-05-01 14:24:55 +10:00
Andrew Tridgell
a04aff7a7d AP_NavEKF3: added inter-EKF scheduling cooperation
this changes the stragegy for load levelling between EKF cores so it
works between EK2 and EK3, and with future estimators as well.

It allows us to run EK3 and EK2 at the same time with good scheduling
performance
2017-05-01 14:24:55 +10:00
Andrew Tridgell
2de8777669 AP_NavEKF2: added inter-EKF scheduling cooperation
this changes the stragegy for load levelling between EKF cores so it
works between EK2 and EK3, and with future estimators as well.

It allows us to run EK3 and EK2 at the same time with good scheduling
performance
2017-05-01 14:24:55 +10:00
Andrew Tridgell
e62fdad12c AP_InertialSensor: added get_last_update_usec()
this will be used by the inter-EKF scheduling changes
2017-05-01 14:24:55 +10:00
Andrew Tridgell
e78f55ef9b AP_AHRS: change order of EK2/EK3 update
if EK3 is our primary estimator when we want to run the EK3 update
first, so it gets time priority for inter-EKF scheduling.
2017-05-01 14:24:55 +10:00
Andrew Tridgell
4c36c77db1 AP_BoardConfig: split setup of safety switch init init_safety()
this allows it to be called late, so that servo outputs are fully
setup before the safety is disabled when BRD_SAFETYENABLE=0
2017-04-30 21:47:04 +10:00
Randy Mackay
b1bd3f0364 AC_WPNav: yaw points along leash 2017-04-29 11:47:51 +09:00
priseborough
8ead9d6b19 DataFlash: Add logging of average EKF time step min/max 2017-04-29 11:03:44 +10:00
priseborough
0bf50fd56f AP_NavEKF3: Add monitoring of average EKF time step 2017-04-29 11:03:44 +10:00
priseborough
e48f46c98b AP_NavEKF2: Add monitoring of average EKF time step 2017-04-29 11:03:44 +10:00
priseborough
7d777485d8 AP_NavEKF: Add monitoring of average EKF time step 2017-04-29 11:03:44 +10:00
priseborough
3ce81967ae AP_NavEKF3: Improve calculation and use of average EKF time step 2017-04-29 11:03:44 +10:00
priseborough
7abf9997e6 AP_NavEKF3: Correctly initialise dtIMUavg time step and apply LPF 2017-04-29 11:03:44 +10:00
Andrew Tridgell
4ce0a8e24e GCS_MAVLink: time limit GCS update() calls
and add performance counters
2017-04-28 16:09:12 -07:00
priseborough
1301b9797a AP_NavEKF3: Fix solution validity reporting bug
Fixes bug that causes relative position status to report as false when using optical flow and using range finder as the primary height sensor.
2017-04-28 17:19:23 +01:00
priseborough
082f429da3 AP_NavEKF2: Fix solution validity reporting bug
Fixes bug that causes relative position status to report as false when using optical flow and using range finder as the primary height sensor.
2017-04-28 17:19:23 +01:00
Leonard Hall
62c123bb08 AC_WPNav: correct straight line waypoint leash calculation
The former calculation was not correctly using the 3D leash
2017-04-28 17:58:34 +09:00
Andrew Tridgell
d4e6720b01 AP_BattMonitor: added BATT_VOLT_TIMEO
this is useful for aircraft with very low C batteries, to prevent a low
voltage failsafe on takeoff. For long endurance aircraft low C batteries
are often used, and the voltage sags a lot on takeoff, but it fine for
the rest of the flight
2017-04-28 17:40:18 +10:00
Andrew Tridgell
0ccb3a7688 DataFlash: added logging of timing statistics 2017-04-28 17:19:39 +10:00
Andrew Tridgell
adb281cd4e AP_NavEKF3: added timing statistics logging 2017-04-28 17:19:39 +10:00
Andrew Tridgell
ee5c032f27 AP_NavEKF2: added recording of timing statistics 2017-04-28 17:19:39 +10:00
Andrew Tridgell
ae3df89d17 AP_NavEKF: added ekf_timing structure 2017-04-28 17:19:39 +10:00
Leonard Hall
ba011eef78 AC_WPNav: init z-axis feed-foward to correct stopping point calcs 2017-04-28 09:10:02 +09:00
Randy Mackay
3a397584a1 AC_PosControl: z-axis stopping point up to 3m above vehicle
Stopping point while descending remains at 2m for safety
2017-04-28 09:10:02 +09:00
Leonard Hall
6e92f74ca0 AC_PosControl: add clear_desired_velocity_ff_z method 2017-04-28 09:10:02 +09:00
Michael du Breuil
22ab8de4d2 AP_BattMonitor: SMBus: Fetch pack capacity 2017-04-28 00:36:10 +01:00
Michael du Breuil
f919c409bb AP_BattMonitor: Remove redundant state copy
Every backend stored a instance reference, which wasn't used in most locations
which is redundant given that the state already tracks the instance for us as
well.
2017-04-28 00:36:10 +01:00
Michael du Breuil
3ab3face9b AP_BattMonitor: SMBus: Read serial number 2017-04-28 00:36:10 +01:00
Francisco Ferreira
7dca7933fa AP_HAL_PX4: fix UAVCAN armed state to depend on safety switch 2017-04-27 14:04:56 +01:00
Francisco Ferreira
965eda69f3 AP_HAL_PX4: remove left-overs of legacy UAVCAN support 2017-04-27 13:32:43 +01:00
Andrew Tridgell
ca4cde9770 HAL_PX4: fixed safety switch light pattern
this was broken by the recent CAN merge. My fault for not checking it
carefully. We have to publish the armed state so the fmu driver on
pixracer can update the light
2017-04-27 13:32:43 +01:00
priseborough
596b20eb07 AP_NavEKF2: close perf counter when doing early return 2017-04-27 20:14:21 +10:00
priseborough
88469ce80c AP_NavEKF2: Reset covariance if bad mag fusion update 2017-04-27 20:14:21 +10:00
priseborough
f208986d43 AP_NavEKF3: Reset covariance if bad mag fusion update 2017-04-27 20:14:21 +10:00
Andrew Tridgell
18b66f9eed AP_NavEKF3: fixed reset of coviariance matrix 2017-04-27 18:33:25 +10:00
Andrew Tridgell
d799bacd7d AP_NavEKF2: fixed reset of coviariance matrix 2017-04-27 18:33:25 +10:00
Randy Mackay
e2cf836734 AC_WPNav: add get_stopping_point
returns 3D stopping point, simply re-uses pos_controller methods
2017-04-27 14:36:22 +09:00
Randy Mackay
e96332d346 AC_WPNav: reduce spline to straight twitch 2017-04-27 11:21:33 +09:00
Pierre Kancir
f8d6b5fc9c AP_HAL_SITL: Allow to use a second type of gps for all type 2017-04-26 18:34:56 +01:00
karthik.desai
44d84fca15 AP_Beacon: Added Marvelmind Beacon class
Code cleanup, adhering to Ardupilot code style
Marvelmind code fixes
formatting fixes including replacing camel case with underscore
replaced puts with ::printf
removed unused debug and counter

Removed useless library includes.
Corrected spellings.
Update the last_update_ms so healthy() doesn't break.
2017-04-26 11:59:20 +09:00
Pierre Kancir
f0f7ca2386 SITL: State constrain rover motor input between 1000 and 2000 2017-04-26 10:38:01 +10:00
Andrew Tridgell
1e69508322 SITL: added a vectored tilt tricopter quadplane 2017-04-24 16:54:41 +10:00
Andrew Tridgell
61fbaf0db7 SRV_Channel: added elevon and vtail functions
these allow for trimming and limit setting per channel, plus allow for
more than one set of elevon or vtail
2017-04-24 16:26:08 +10:00
Michael du Breuil
d91f89d24b AP_GPS: Remove stale ublox config files
These configurations no longer (and haven't for quite awhile) matched the
desired command set or baud rates, loading them will still require the GPS
driver to tweak settings, or have AUTO_CONFIG turned off, which is a less
safe configuration.
2017-04-23 21:15:58 +01:00
Peter Barker
1ba59b446c AP_GPS: log ublox sw and hw versions on dataflash log start
This burns 41 bytes of RAM for each u-Blox GPS.
2017-04-23 21:04:17 +01:00
Peter Barker
b7baca8d43 AP_GPS: move GPS type announcements into backend
See #4584
2017-04-23 21:04:17 +01:00
Peter Barker
c46ea73426 AP_GPS: rename QURTGPS to QURT 2017-04-23 21:04:15 +01:00
Peter Barker
2354a0ec5a AP_GPS: ability to log GPS detection state to dataflash 2017-04-23 21:03:23 +01:00
Peter Barker
94a5e94ec9 AP_GPS: canonicalise statustext messages
Use "GPS %d" prefix, where %d is instance+1, to correspond
with parameters
2017-04-23 09:09:30 +10:00
Peter Barker
4334a92ac9 AP_GPS: remove unimplemented method declarations 2017-04-23 09:08:30 +10:00
Peter Barker
608d6d0a5f DataFlash: implement a printf-like Log_Write_MessageF method 2017-04-23 09:08:30 +10:00
karthik.desai
28a6ca7d75 Dataflash: add AP_Beacon logging 2017-04-22 10:54:59 +09:00
Randy Mackay
b255c7b370 AP_NavEKF: add setOrigin 2017-04-22 10:37:31 +09:00
Randy Mackay
0af9433c8e AP_AHRS: add set_origin 2017-04-22 10:37:31 +09:00
Jacob Walser
96f503d9d1 AP_Baro: Fix GND_EXT_BUS @Values formatting 2017-04-21 21:11:40 +01:00
Michael du Breuil
e0d49e6d84 AP_BattMonitor: Use a unified SMBus temperature interface 2017-04-21 00:38:41 +01:00
Michael du Breuil
9c3b97347a AP_BattMonitor: Unify read_word interface 2017-04-21 00:38:41 +01:00
Michael du Breuil
3319c3ccdc AP_BattMonitor: Use a common PEC helper 2017-04-21 00:38:41 +01:00
Randy Mackay
35a965ebc5 AC_Avoidance: add configurable margin
vehicle will attempt to stop MARGIN meters from objects in GPS modes
2017-04-20 18:11:43 +09:00
Randy Mackay
3ad5c3775e AP_Proximity: rename get_distances to get_horizontal_distances
Also fix existing bug in return
2017-04-20 18:11:43 +09:00
Randy Mackay
09e3d6b7f0 AP_Proximity_MAV: healthy if either horiz or vert positions received 2017-04-20 18:11:43 +09:00
Pierre Kancir
327ac07d54 AP_HAL_SITL: gps correct glitchs 2017-04-19 17:44:29 +01:00
Florent Martel
949aa4d9ca AP_Frsky_Telem: replace VDOP with extra GPS status bits
This removes VDOP (not really that useful) and replaces two of those
bits with GPS status info that now allows to differentiate between 3D
fix, DGPS, RTK Float, and RTK Fixed. This is written to maximize
backwards compatibility (by not shifting any other bits of the
gps_status variable)
2017-04-19 17:43:17 +01:00
Eugene Shamaev
fb8f4f8cd1 AP_UAVCAN: ESC numbering correction 2017-04-19 14:28:48 +01:00
Michael du Breuil
a96772e46e AP_BattMonitor: get Solo battery voltage from sum of cell voltages
Minimizes the number of transactions on the bus, and reduces the amount of noise we have to consider
2017-04-19 14:17:24 +01:00
Michael du Breuil
3b6d348241 DataFlash: Log battery temperature and cell voltages 2017-04-19 14:17:24 +01:00
Michael du Breuil
341ac701d1 GCS_MAVLink: report temperature information to the battery status report 2017-04-19 14:17:24 +01:00
Michael du Breuil
9cb0d8f99b GCS_MAVlink: Add battery cell backend 2017-04-19 14:17:24 +01:00
Michael du Breuil
8f24d211ce AP_BattMonitor: Solo add support for temperature and cells
Also fixs a buffer overflow when reading the ManufacturerData
2017-04-19 14:17:24 +01:00
Michael du Breuil
043b93d643 AP_BattMonitor: Maxell support temperature 2017-04-19 14:17:24 +01:00
Michael du Breuil
de02bd52ed AP_BattMonitor: SMBus_Maxell request voltages 2017-04-19 14:17:24 +01:00
Michael du Breuil
121ebebfef AP_BattMonitor: Add temperature interface 2017-04-19 14:17:24 +01:00
Michael du Breuil
e39ae6d48c AP_BattMonitor: Add cell monitoring 2017-04-19 14:17:24 +01:00
Eugene Shamaev
c9f413da38 GCS_MAVLink: AOA, SSA message 2017-04-19 20:48:42 +10:00
Eugene Shamaev
a144e79a50 DataFlash: logging of AOA and SSA 2017-04-19 20:48:42 +10:00
Eugene Shamaev
5c080ce875 AP_AHRS: calculation and reporting of AOA and SSA 2017-04-19 20:48:42 +10:00
Lucas De Marchi
915f10dc8a AP_HAL: SPIDevice: prefer nullptr for pointer 2017-04-19 01:36:58 -07:00
Vinicius Juvinski
c3d5aaa21c AP_Notify: add AP_BoardLED support for BBBMini 2017-04-19 01:33:50 -07:00
Vinicius Juvinski
203073e543 AP_HAL: add LEDs for BBBMini
Use pins P8.9, P8.10 and P8.11
2017-04-19 01:33:35 -07:00
Lucas De Marchi
875538ccb5 AP_HAL_Linux: examples: small fixes to BusTest
- Fix char allocation
  - Fix coding style
  - Fix accessing dev->bus_type(): it's a function
2017-04-19 01:13:40 -07:00
hiro2233
0d1d430600 AP_HAL_Linux:examples: Example to test device bus with the new APM API. 2017-04-19 01:05:12 -07:00
hiro2233
be06c1e8ed AP_HAL_Linux:SPIDevice: Add functions to get possible spi registered device 2017-04-19 01:05:12 -07:00
hiro2233
1a8fa6ac5a AP_HAL:SPIDevice: Added functions for spi registered device. 2017-04-19 01:05:12 -07:00
Lucas De Marchi
16c1bc1b0e AP_HAL_Linux: Util: fix coding style for pointers 2017-04-19 00:19:40 -07:00
Lucas De Marchi
9aa2a3938c AP_HAL_Linux: Util: make get_custom_log_directory const override final
While at it, add final and override to mark this as being the overriden
final implementation of this method.

Thanks to Phillip Khandeliants (@khandeliants) for reporting.
2017-04-19 00:19:22 -07:00
Peter Barker
18d8f9ba9d AP_HAL: make get_custom_log_directory const 2017-04-19 00:11:49 -07:00
Lucas De Marchi
008e631147 AP_HAL_Linux: Util: fix overriden function signature
While at it, add final and override to mark this as being the overriden
final implementation of this method.

Thanks to Phillip Khandeliants (@khandeliants) for reporting.
2017-04-18 23:57:54 -07:00
Lucas De Marchi
6f952fe3dd AP_HAL_Linux: fix checking wrong value for pthread function
Thanks to Phillip Khandeliants (@khandeliants) for reporting.
2017-04-18 23:57:54 -07:00
Peter Barker
9324d8e251 Dataflash: emit io thread warnings much less frequently 2017-04-19 12:33:18 +09:00
Randy Mackay
0644314499 DataFlash: add visual odometry sensor logging 2017-04-19 11:04:40 +09:00
priseborough
d2c89443df DataFlash: add logging for EKF body frame odometry fusion 2017-04-19 11:04:40 +09:00
priseborough
90cd46f4d7 AP_AHRS: simulate body frame odometry sensor 2017-04-19 11:04:40 +09:00
priseborough
3b82f60b08 AP_AHRS: add interface for use of visual odometry data 2017-04-19 11:04:40 +09:00
priseborough
fb7104f4e3 AP_NavEKF3: add fusion method for body frame odometry data 2017-04-19 11:04:40 +09:00
Randy Mackay
595d37ec70 AP_VisualOdom: class accepts deltas from visual odom camera 2017-04-19 11:04:40 +09:00
Michael du Breuil
9c6fc1f122 AP_Landing: Correct deepstall param doc strings 2017-04-18 18:51:32 -07:00