Lucas De Marchi
c9fbf7b722
global: use static method to construct AP_NavEKF3
2017-09-26 03:01:21 +01:00
Lucas De Marchi
e2fe36357a
global: use static method to construct AP_NavEKF2
2017-09-26 03:01:21 +01:00
Lucas De Marchi
69b6d95cb2
global: use static method to construct AP_Board_Config{,_CAN}
2017-09-26 03:01:21 +01:00
Lucas De Marchi
72fd2d6f05
global: use static method to construct AP_SerialManager
2017-09-26 03:01:21 +01:00
Lucas De Marchi
40fd1b346c
global: remove rangefinder from AP_AHRS_NavEKF
...
AP_AHRS_NavEKF doesn't use the rangefinder, it just delegates the
calls to the right estimator.
For libraries/AP_AHRS/examples/AHRS_Test/AHRS_Test.cpp the initialization
order has also been modified to match the order on vehicles. It's more
correct since it passes a reference when EKF2/EKF3 are already
constructed, while thos constructors use a pointer. Ideally these
should be moved to an init() method though, or use a get_instance().
2017-09-26 03:01:21 +01:00
Lucas De Marchi
9027a55696
global: use static method to construct RangeFinder
2017-09-26 03:01:21 +01:00
Lucas De Marchi
8094482f21
global: use static method to construct AP_GPS
2017-09-26 03:01:21 +01:00
Lucas De Marchi
87b30b4552
global: use static method to construct AP_InertialSensor
2017-09-26 03:01:21 +01:00
Lucas De Marchi
c1a957fbf3
global: use static method to construct Compass
2017-09-26 03:01:21 +01:00
Lucas De Marchi
91feec0e14
global: use static method to construct AP_Baro
2017-09-26 03:01:21 +01:00
Peter Barker
97b6ca218b
AP_AHRS: send ekf status reports even when EKF inactive
2017-09-06 10:50:49 +10:00
chobits
d6845a911a
AP_AHRS: fix get_relative_position_NE_home calcalation
2017-08-19 10:23:24 +09:00
Randy Mackay
1ddf38869a
AP_AHRS: set AP_Notify gps_glitching flag
2017-07-27 14:16:23 +09:00
Peter Barker
3e0ed6deae
AP_AHRS: Use GCS_Dummy GCS singleton
2017-07-07 16:18:37 +01:00
Peter Barker
12b4f2c4b6
AP_AHRS: correct example
2017-06-29 15:43:38 +01:00
priseborough
fa5534502a
AP_AHRS: Update to match AP_GPS interface change
2017-06-21 11:44:45 +01:00
Andrew Tridgell
770f697cfc
AP_AHRS: added set/get for flying state
...
this allows the vehicle code to set the likely flying state, which can
be used by EKF to trigger changes which should only happen when flying
(such as mag alignment)
2017-06-20 09:44:44 +10:00
priseborough
a3483d0d34
AP_AHRS: Update for compatibility with EKF interface change
2017-06-14 12:44:41 +01:00
Randy Mackay
3e130273a9
AP_AHRS: do not fallback to DCM if EKF can provide relative position
2017-06-14 09:12:20 +09:00
Matt
6354ca7096
AP_AHRS: Set the new gps_fusion notify flag
...
Uses EKF filter state to set the new gps_fusion notify flag. This allows
the GCS and notify devices to specifically be notified if the GPS is or
is not usable.
2017-06-06 10:38:42 +09:00
Dr.-Ing. Amilcar Do Carmo Lucas
98a43cc4b5
AP_AHRS: Use SI units conventions in parameter units
...
Follow the rules from:
http://physics.nist.gov/cuu/Units/units.html
http://physics.nist.gov/cuu/Units/outside.html
and
http://physics.nist.gov/cuu/Units/checklist.html
one further constrain is that only printable (7bit) ASCII characters are allowed
2017-05-17 18:07:25 +10:00
Andrew Tridgell
b6568b1c7e
AP_AHRS: support set_origin and get_origin for EKF 10
2017-05-08 13:38:10 +10:00
Andrew Tridgell
d9223165c7
AP_AHRS: fixed get_accel_ef_blended() for SITL EKF 10
2017-05-07 09:10:44 +10:00
Andrew Tridgell
28030dd85c
AP_AHRS: use SIM_ODOM_ENABLE to enable visual odom in SITL
2017-05-01 15:06:46 +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
Randy Mackay
0af9433c8e
AP_AHRS: add set_origin
2017-04-22 10:37:31 +09:00
Eugene Shamaev
5c080ce875
AP_AHRS: calculation and reporting of AOA and SSA
2017-04-19 20:48:42 +10: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
Andrew Tridgell
6b6ad6ddf2
AP_AHRS: fixed wrap of yaw in AHRS_View
2017-04-17 12:15:19 +10:00
Andrew Tridgell
5758532326
AP_AHRS: make AHRS2 quaternion available
2017-04-16 14:01:36 +10:00
Pierre Kancir
fede727d38
AP_AHRS: example fix travis warning
...
missing function declaration
implicit cast
some style fix
2017-04-13 19:56:16 +01:00
Michael du Breuil
33d0fa3e82
AP_AHRS: Fix an index out of bounds
...
Coverity 137817, getPrimaryCoreIMUIndex() can return -1, which is then invalid to pass to get_delta_velocity_dt
2017-04-06 08:44:57 +10:00
Andrew Tridgell
a11dca5229
AP_AHRS: added optional skip_ins_update to AHRS::update()
...
avoid the ins update if already done in copter fast_loop()
2017-04-03 13:04:11 +09:00
Andrew Tridgell
5f02b7eddb
AP_AHRS: added get_error_rp and get_error_yaw to AHRS_View
2017-03-31 11:30:44 +11:00
Randy Mackay
d3aca5544e
AP_AHRS: get_gyro_latest returns latest rates from IMU with drift correction
...
Pulling the gyro values from the IMU allows our rate controllers to run before the EKF
2017-03-03 13:14:28 +11:00
Randy Mackay
a74833a04a
AP_AHRS: fix example sketch
2017-02-27 15:18:13 +09:00
Peter Barker
e744460ff5
AP_AHRS: mark many functions as override
...
Also take the opportunity to remove void parameter
2017-02-24 21:13:08 +11:00
Peter Barker
6ee4045878
AP_AHRS: mark new relative position functions override
2017-02-24 21:13:08 +11:00
Peter Barker
35f876f853
AP_AHRS: examples: correct AHRS_Test
...
This is required so gcs() returns an object
2017-02-24 21:13:08 +11:00
Peter Barker
4ed7fb154f
AP_AHRS: supply missing get_relative_position_D_home
...
Simply returns the baro altitude (like EKF does if it lacks
position)
2017-02-24 21:13:08 +11:00
Peter Barker
24647fb2b0
AP_AHRS: make get_relative_position_D_home pure virtual
...
Having a void function with a return parameter that isn't
filled in by the base class function seems like a bad idea
2017-02-24 21:13:08 +11:00
Jacob Walser
8c87868b5c
AP_AHRS: Add submarine vehicle class
2017-02-21 11:26:14 +11:00
Peter Barker
1217256898
AP_AHRS: correct infinite recursion in AP_AHRS_View
2017-02-21 09:03:03 +11:00
Andrew Tridgell
7845181f4b
AP_AHRS: fixes for changes in AP_AHRS API from Michael
2017-02-18 17:26:43 +11:00
Andrew Tridgell
c62c64d27b
AP_AHRS: added support for AP_AHRS_View
2017-02-18 17:26:43 +11:00
Andrew Tridgell
1345bf8737
AC_AttitudeControl: added support for AP_AHRS_View
...
this allows for tailsitters with a different attitude view
2017-02-18 17:26:43 +11:00
Michael du Breuil
3274f1dbb1
AP_AHRS: Split all NED methods into a collection of NED relative to home vs origin
2017-02-13 09:23:14 +11:00
priseborough
93aa40a9e0
AP_AHRS: Fix EKF3 gyro bias reporting and improve code clarity
2017-02-08 19:11:08 +00:00
priseborough
e2757c17c8
AP_AHRS_NavEKF: fix ekf variable naming and initialisation
2017-01-27 16:57:42 +09:00
Andrew Tridgell
33a84624c6
AP_AHRS: use const reference
...
save a bit of stack and CPU
2017-01-23 21:36:34 +11:00
Julien Beraud
d2afa1cac8
AP_AHRS_NavEKF: Push gyro bias for optical flow
...
Push gyro bias for optical flow usage only if there is an optical
flow declared in the HAL
2017-01-23 21:23:16 +11:00
Andrew Tridgell
09c969477f
AP_AHRS: fixed fallback to DCM for get_position
...
this fixes dead-reckoning on fixed wing on GPS loss, and fallback to
DCM on loss of EKF position in fixed wing
This was broken by the EKF3 merge
2017-01-22 13:40:46 +11:00
mirkix
d2431dafd0
AP_AHRS: fix description
2017-01-17 18:55:46 +00:00
Dr.-Ing. Amilcar Do Carmo Lucas
8419045aea
Spell in comments
2017-01-06 10:57:39 -08:00
Andrew Tridgell
7a5ee29b6e
AP_AHRS: fixed a build warning
2016-12-31 08:53:16 +11:00
Andrew Tridgell
ad518f0cc7
AP_AHRS: fixed EKF type 10 EKF nav scaler return
2016-12-29 18:43:32 +11:00
murata
4c320373eb
AP_AHRS: Change indentation.
...
AP_AHRS: Delete inserted message "no break"
2016-12-24 11:30:37 +09:00
Andrew Tridgell
22fd2025de
AP_AHRS: fixed EKF type 10
2016-12-21 10:52:12 +11:00
Peter Barker
802206baed
AP_AHRS: remove use of uninitialised value
2016-12-19 19:51:16 -08:00
Andrew Tridgell
0870e02584
AP_AHRS: fixed example build
2016-12-19 08:07:13 +11:00
priseborough
33a7c682a3
AP_AHRS: Add EKF3 and remove EKF1
2016-12-19 08:07:10 +11:00
Andrew Tridgell
ab05472e0e
AP_AHRS: added EKF3 for EKF experimentation
...
Conflicts:
libraries/AP_AHRS/AP_AHRS_NavEKF.cpp
2016-12-18 10:28:04 +11:00
jinchengde@gmail.com
efd0f0b832
modify NavEKF2 for AHRS Test
2016-12-05 17:10:23 -08:00
priseborough
b4961971e0
AP_AHRS: add beacon object to ahrs
2016-11-30 17:56:42 +09:00
Randy Mackay
c615bac1cd
AP_AHRS: add getLastPosDownReset accessor
2016-11-24 19:57:53 +09:00
murata
c808ee2f49
Global: To nullptr from NULL.
...
RC_Channel: To nullptr from NULL.
AC_Fence: To nullptr from NULL.
AC_Avoidance: To nullptr from NULL.
AC_PrecLand: To nullptr from NULL.
DataFlash: To nullptr from NULL.
SITL: To nullptr from NULL.
GCS_MAVLink: To nullptr from NULL.
DataFlash: To nullptr from NULL.
AP_Compass: To nullptr from NULL.
Global: To nullptr from NULL.
Global: To nullptr from NULL.
2016-11-02 16:04:47 -02:00
Peter Barker
9a8d3d6e7c
AP_AHRS: add missing parameter metadata
2016-10-27 09:15:03 -07:00
Andrew Tridgell
772209b3f3
AP_AHRS: make posOffset a const reference
2016-10-27 15:45:24 +11:00
priseborough
6069c37b19
AP_AHRS: add position offset to optical flow interface
2016-10-27 14:54:42 +11:00
Mathieu OTHACEHE
152edf7189
Global: remove mode line from headers
...
Using a global .dir-locals.el file is a better alternative than
reincluding the same emacs header in every file of the project.
2016-10-24 09:42:01 -02:00
Jonathan Challinger
25a14fe0dc
AP_AHRS: add interface to retrieve corrected delta velocities in NED frame
2016-10-14 10:45:58 +09:00
Jonathan Challinger
e20687fbce
AP_AHRS: cache trim rotation
2016-10-13 10:02:14 +11:00
Jonathan Challinger
5ff78b8e47
AP_AHRS: fix rotation of acceleration into earth frame
2016-10-13 10:02:13 +11:00
Jonathan Challinger
a03fa2d3cf
AP_AHRS: use exact matrix for trim rotations
2016-10-13 10:02:13 +11:00
Lucas De Marchi
ae53920e5b
build: don't build examples with old build system
...
We currently check examples are buildable with waf which doesn't need
the libraries to be specified in a make.inc file. Having the makefiles
there is misleading since people try to build and realize the build is
broken.
2016-10-11 13:03:08 +11:00
Andy Little
0d113b265c
Examples: fix examples for px4
...
The change to use AP_BoardConfig messed up the examples. Here are some
updated but there are plenty more to do.
2016-10-04 12:50:47 -03:00
floaledm
27e977289a
AP_AHRS: add the get_variances method found in AP_AHRS_NavEKF to AP_AHRS
2016-09-27 09:20:32 -07:00
Andrew Tridgell
334db0a1a5
AP_AHRS: added get_primary_accel_index() and get_primary_gyro_index()
2016-09-05 12:56:36 +10:00
Andrew Tridgell
c62fc336cb
AP_AHRS: use current EKF2 IMU core in gyro estimate
...
The EKF2 implementation uses one IMU per EKF2 core. When reporting the
gyro estimate, accel_ef estimate and gyro bias estimate we need to use
the values associated with the current IMU index being used by the
current EKF2 core. Otherwise we will have an inconsistency between the
gyro estimate and attitude estimate
This affects all multi-IMU systems using EKF2
2016-09-05 12:54:53 +10:00
Andrew Tridgell
bf1e0e1536
AP_AHRS: fixed EKF GPS arming check for fixed wing
...
when in a quadplane mode we set fly_forward to zero. We need to ensure
the GPS checks for EKF health are applied when doing arming checks, so
we use the checks always when disarmed
2016-09-02 11:12:19 +10:00
LukeMike
d8cc2668cb
VRBRAIN / AP_AHRS_NavEKF: set AP_AHRS_WITH_EKF1 to 1 only for VR Brain 5.4
2016-08-07 20:31:51 +10:00
Peter Barker
78fa23440c
AP_AHRS: remove use of uninitialised variable
...
clang told us:
../../libraries/AP_AHRS/AP_AHRS_NavEKF.cpp:695:35: fatal error: variable 'posD' is used uninitialized whenever '&&' condition is false [-Wsometimes-uninitialized]
2016-07-20 00:06:49 -03:00
priseborough
01ce3e7f1e
AP_AHRS: fix documentation errors
2016-07-19 12:16:49 +10:00
priseborough
5454f76702
AP_AHRS: Add separate interfaces for local horizontal and vertical position
2016-07-19 12:16:49 +10:00
Andrew Tridgell
e82468a529
AP_AHRS: avoid ifdef for AP_MODULE_SUPPORTED
2016-07-14 13:39:47 +10:00
Andrew Tridgell
36181b78de
AP_AHRS: fixed build for px4
2016-07-14 13:39:46 +10:00
Andrew Tridgell
15a01eefb1
AP_AHRS: added AHRS_update hook
2016-07-14 13:39:46 +10:00
Andrew Tridgell
2db2486b3a
AP_AHRS: send zero EKF_STATUS_REPORT with EKF type 10
2016-06-19 22:02:25 +10:00
masierra
8fc494cfcd
AP_AHRS_DCM: changed estimate to use prev values for dir & vel
2016-06-06 15:26:51 -07:00
Andrew Tridgell
a6cbc5d4a5
AP_AHRS: use EKF for groundspeed estimate if available
2016-05-31 15:56:25 +10:00
Andrew Tridgell
d17e3b17bf
AP_AHRS: special handling for flying fixed wing with no compass
...
we need to accept EKF having no absolute position and velocity before
takeoff with no compass
2016-05-27 10:18:53 +10:00
Andrew Tridgell
8486d4ab5e
AP_AHRS: disable EKF1 on all PX4v1 and PX4v2 boards
...
we're out of space in copter now too
2016-05-21 15:25:18 +10:00
Paul Riseborough
597ec61673
AP_AHRS: extend ekf fault status reporting coverage
2016-05-21 15:13:50 +10:00
Ricardo de Almeida Gonzaga
2bf9aa94ad
AP_AHRS: Fix typos
2016-05-13 19:20:06 -03:00
dgrat
6d3b491c02
AP_Math: Replace is_equal with a type safe template function
...
It makes sense to consider also other floating point types.
2016-05-10 11:41:26 -03:00
dgrat
41661f815f
AP_Math: Replace the pythagorous* functions with a variadic template
...
The new function can deal with a variable number of function parameters.
Additionally, I renamed the functions to norm(), because this is the
standard name used in several other projects.
2016-05-10 11:41:26 -03:00
Andrew Tridgell
73d3797a7e
AP_AHRS: finish implementing have_ekf_logging()
2016-05-07 18:27:20 +10:00
Andrew Tridgell
795080742e
AP_AHRS: added have_ekf_logging() API
2016-05-07 18:27:19 +10:00
Andrew Tridgell
07060051cf
AP_AHRS: added API for forcing EKF to start
...
used by Replay to sync start times
2016-05-07 18:27:18 +10:00
Andrew Tridgell
664ce5c16e
AP_AHRS: don't use disabled gyro in rate controllers
...
obey INS_USE* parameters in gyro estimate
2016-05-01 22:16:06 +10:00
Randy Mackay
4419b3c617
AHRS_NavEKF: fix get_position by using ekf origin
...
The EKF's getPosNED returns a vertical position relative to the EKF origin but previously this function was using it as if it was relative to ahrs's home
2016-04-21 11:23:07 +10:00
Jonathan Challinger
6a5f1c0bec
AP_AHRS_NavEKF: reflect changes to getMagOffsets
2016-04-21 09:53:03 +10:00
Jonathan Challinger
18240107f0
AP_AHRS_NavEKF: add getGpsGlitchStatus
2016-04-14 12:24:04 +09:00
Andrew Tridgell
9db618c73c
AP_AHRS: disable EKF1 for plane
...
we are running too close to the 1MByte limit for pixhawk. This
recovers nearly 100kbyte of flash
2016-04-04 11:08:03 +10:00
Lucas De Marchi
e0153faa85
AP_AHRS: replace header guard with pragma once
2016-03-16 18:40:40 +11:00
Andrew Tridgell
d0b67ce007
AP_AHRS: allow for EKF without GPS on plane in VTOL modes
...
this allows for testing quadplanes indoors
2016-03-05 08:58:08 +11:00
Lucas De Marchi
0ccd2de12b
AP_AHRS: fix use of undefined macro
...
../../libraries/AP_AHRS/examples/AHRS_Test/AHRS_Test.cpp:63:5: warning: "WITH_GPS" is not defined [-Wundef]
#if WITH_GPS
^
g_gps was not even declared so remove it.
2016-02-19 12:35:20 -02:00
Jonathan Challinger
cbf2309023
AP_AHRS: add get_mag_field_NED and get_mag_field_correction
2016-01-23 10:35:36 +09:00
Gustavo Jose de Sousa
c2e3f05dbf
waf: ardupilotwaf: prefix build context methods with ap_
...
It helps to distinguish between things from waf and things from ardupilotwaf.
2016-01-22 20:10:29 -02:00
Gustavo Jose de Sousa
3d22490397
waf: examples: use methods from bld instead of ardupilotwaf
2016-01-22 20:10:29 -02:00
Gustavo Jose de Sousa
d281067bcc
waf: make example binaries be placed in 'examples' dir
...
This commit makes examples' wscripts use ardupilotwaf.example() instead of
ardupilot.program().
2016-01-15 16:46:41 -02:00
Randy Mackay
f6b909d0a5
AHRS_NavEKF: resolve compiler warning re signed vs unsigned comparison
2016-01-07 12:31:47 +09:00
Andrew Tridgell
f8b52c6a67
AP_AHRS: try to start EKF2 slightly before EKF2
...
this gives priority to EKF2 on memory
2016-01-07 08:34:32 +11:00
Andrew Tridgell
ea823a818c
AP_AHRS: enable EKF2 by default in AHRS
2016-01-05 16:42:01 +11:00
Jonathan Challinger
5cb7331095
AP_AHRS: fix example build
2015-12-29 10:46:35 -08:00
Jonathan Challinger
a2999ece54
AP_AHRS_NavEKF: add setTakeoffExpected, setTouchdownExpected
2015-12-28 13:51:24 +09:00
Lucas De Marchi
a096703b06
Global: don't link with AP_Progmem
...
AP_Progmem is not used anymore.
2015-12-27 15:58:12 -02:00
Andrew Tridgell
6a5c5969fa
AP_AHRS: fixed example build
2015-12-27 14:57:32 +09:00
Jonathan Challinger
6682b27456
AP_AHRS: rename get_dcm_matrix to get_rotation_body_to_ned
2015-12-18 18:08:37 +11:00
Julien BERAUD
924a94633d
AP_AHRS: Fix build
...
Due to interdependancy between optical flow and AHRS, it is not possible
to include full class definition which rely on each other
2015-12-18 17:56:06 +11:00
Lucas De Marchi
2b26a2eebe
AP_AHRS: remove unused AP_ADC_AnalogSource
2015-12-03 13:32:42 +11:00
Caio Marcelo de Oliveira Filho
6e7b73610d
waf: add waf support
2015-12-03 07:54:30 +11:00
Andrew Tridgell
1e8c391024
AP_AHRS: fixed float exception on start in SITL
...
zero DCM matrix
2015-12-01 15:19:45 +11:00
Andrew Tridgell
b3e6129fd4
AP_AHRS: added EKF type 10 for SITL
...
this bypasses all attitude and position estimators and uses the SITL
state directly. It can be used for when the SITL backend cannot
provide perfect sensor data
2015-11-22 17:30:28 +11:00
Andrew Tridgell
7b38f2185f
AP_AHRS: use the right DCM matrix for right EKF
...
this fixes a bug where the EKF2 DCM matrix would be used for
get_dcm_matrix() when EKF1 was active
2015-11-20 18:34:08 +11:00
Caio Marcelo de Oliveira Filho
3a17c858e3
AP_AHRS: use millis/micros/panic functions
2015-11-20 12:29:00 +09:00
Caio Marcelo de Oliveira Filho
4ea45b8df1
AP_AHRS_NavEKF: use millis/micros/panic functions
2015-11-20 12:28:53 +09:00
Caio Marcelo de Oliveira Filho
55e61538b3
AP_AHRS_DCM: use millis/micros/panic functions
2015-11-20 12:28:45 +09:00
Andrew Tridgell
8f4ce7f20b
build: removed all nocore.inoflag files
...
these were APM2 specific
2015-11-16 08:05:17 +11:00
Paul Riseborough
803817821d
AP_AHRS: Support changes to EKF2 interfaces that specify the instance
...
An instance of -1 is specified which causes data for the primary instance to be returned.
2015-11-08 15:37:28 +11:00
Lucas De Marchi
dd784189a1
AP_AHRS: remove comment about avr-libc
2015-11-04 12:14:16 +11:00
Lucas De Marchi
da86e29c27
AP_AHRS: remove check for AVR CPUs
...
Remove the checks for HAL_CPU_CLASS > HAL_CPU_CLASS_16 and
HAL_CPU_CLASS >= HAL_CPU_CLASS_75. Corresponding dead code will be
removed on separate commits.
2015-11-04 12:14:14 +11:00
Lucas De Marchi
124937ab61
AP_AHRS: remove checks for HAL_BOARD_APM2 and HAL_BOARD_APM1
2015-11-04 12:14:11 +11:00
Paul Riseborough
7ed36d8e65
AP_AHRS: Enable pre-flight GPS check status reporting for EKF2
2015-11-02 14:12:17 +11:00
Lucas De Marchi
20c6ffc5e3
Replace use of UARTDriver::printf_P() with UARTDriver::printf()
...
This also starts to show warnings on places that were already using
wrong printf format strings.
2015-10-30 14:35:25 +09:00
Lucas De Marchi
831d8acca5
Remove use of PROGMEM
...
Now variables don't have to be declared with PROGMEM anymore, so remove
them. This was automated with:
git grep -l -z PROGMEM | xargs -0 sed -i 's/ PROGMEM / /g'
git grep -l -z PROGMEM | xargs -0 sed -i 's/PROGMEM//g'
The 2 commands were done so we don't leave behind spurious spaces.
AVR-specific places were not changed.
2015-10-30 14:35:16 +09:00
Lucas De Marchi
2c38e31c93
Remove use of PSTR
...
The PSTR is already define as a NOP for all supported platforms. It's
only needed for AVR so here we remove all the uses throughout the
codebase.
This was automated with a simple python script so it also converts
places which spans to multiple lines, removing the matching parentheses.
AVR-specific places were not changed.
2015-10-30 14:35:04 +09:00
Randy Mackay
4e959ef6f9
AP_AHRS: constify getLastPosNorthEastReset
...
Also constify getLastVelNortEastReset
2015-10-30 12:24:13 +09:00
Randy Mackay
7c20577ee0
AP_AHRS: constify getLastYawResetAngle
2015-10-30 12:24:10 +09:00
Paul Riseborough
f67f6b01f4
AP_AHRS: Publish the EKF position and velocity reset deltas
2015-10-30 12:24:05 +09:00
Caio Marcelo de Oliveira Filho
f7c73fbb13
AP_AHRS: remove AHRS_EKF_USE_ALWAYS define
...
This option now is passed when instantiating the code in ArduCopter, so
selecting the default value at compile time is not necessary anymore.
The motivation is to move vehicle specifc code out of the general
libraries. This patch shouldn't change behavior.
2015-10-21 11:01:11 +11:00
Caio Marcelo de Oliveira Filho
9d2e3157fe
AP_AHRS: add a runtime flag for always using EKF
...
The AHRS_EKF_USE_ALWAYS define is used to force EKF to be always
used. It is defined only for building ArduCopter. Change it to be a
runtime flag. Keep its default value still based on the original define,
once the Copter uses it the define will be removed.
The motivation is to move vehicle specifc code out of the general
libraries. This patch shouldn't change behavior.
2015-10-21 11:01:10 +11:00
Caio Marcelo de Oliveira Filho
e87db31149
AP_AHRS: remove unused define
...
AHRS_EKF_USE_DEFAULT is not used since commit
7ba45444a2
"AP_AHRS: added selection of
EKF type using AHRS_EKF_TYPE".
2015-10-21 11:01:10 +11:00
Caio Marcelo de Oliveira Filho
9b73fcb6f8
AP_AHRS: remove unnecessary includes in the example
2015-10-21 09:16:11 +11:00
Caio Marcelo de Oliveira Filho
ec52df991c
build: compile only the HAL files needed by the board
...
Instead of requiring every program to specify the HAL related modules,
let the build system do it (in practice everything we compiled depended
on HAL anyway). This allow including only the necessary files in the
compilation.
2015-10-21 09:16:07 +11:00
Caio Marcelo de Oliveira Filho
2e464a53c2
AP_HAL: make code not depend on concrete HAL implementations
...
The switching between different AP_HAL was happening by giving different
definitions of AP_HAL_BOARD_DRIVER, and the programs would use it to
instantiate.
A program or library code would have to explicitly include (and depend)
on the concrete implementation of the HAL, even when using it only via
interface.
The proposed change move this dependency to be link time. There is a
AP_HAL::get_HAL() function that is used by the client code. Each
implementation of HAL provides its own definition of this function,
returning the appropriate concrete instance.
Since this replaces the job of AP_HAL_BOARD_DRIVER, the definition was
removed.
The static variables for PX4 and VRBRAIN were named differently to avoid
shadowing the extern symbol 'hal'.
2015-10-21 09:16:07 +11:00
Andrew Tridgell
79d85f7e10
AP_AHRS: wait for up to 10 samples to get a valid accel vector
...
the initial accel vectors can be invalid
2015-10-21 09:09:11 +11:00
Andrew Tridgell
eac91430a2
AP_AHRS: update _dcm_attitude() on reset()
...
this prevents the roll/pitch being overwritten by the AHRS_NavEKF
update code on next update
2015-10-21 08:58:30 +11:00
Jonathan Challinger
c35605fa04
AP_AHRS_DCM: align tilt during initialization
2015-10-21 08:34:02 +11:00