Jonathan Challinger
0eac5a5c8f
AC_PrecLand: remove zero terms from math
2016-07-04 16:57:06 +09:00
Jonathan Challinger
b5e80148c6
AC_WPNav: remove shift_loiter_target
2016-07-04 16:57:06 +09:00
Jonathan Challinger
f74e162451
AC_PrecLand: redo math, simplify interface
2016-07-04 16:57:06 +09:00
Randy Mackay
4bedc57cbe
DataFlash: rename SBFE's Long field to Lng
...
This naming is consistent with the other GPS messages
2016-07-04 11:17:14 +09:00
Randy Mackay
032e834849
Dataflash: log rally points
2016-07-04 11:17:09 +09:00
Andrew Tridgell
11975223dd
AP_Motors: added H_RSC_POWER_NEGC and H_RSC_SLEWRATE
...
this gives more control over throttle for petrol
helis. H_RSC_POWER_NEGC allows for a asymmetric V-curve, which allows
for less power being put into the head when landing or when sitting on
the ground. That can lead to significantly less vibration and chance
of ground oscillation. A heli not being flown with aerobatics does not
need to use high throttle at negative collective pitch.
The H_RSC_SLEWRATE allows for a maximum throttle slew rate to be
set. Some petrol motors can cut if the throttle is moved too
quickly. We had this happen at a height of 6m when switching from
ALT_HOLD to STABILIZE mode. It also lowers the chance of the blades
skewing in their holders with the sudden change of power when the heli
is disarmed. In general it is a bad idea to do instantaneous large
movements of a IC engine throttle.
2016-07-03 18:29:05 +10:00
Andrew Tridgell
918c41b1e4
AP_BoardConfig: fixed IMU_TARGTEMP index
2016-07-03 12:54:27 +10:00
Andrew Tridgell
3377714300
RC_Channel: fixed typo
2016-07-01 15:35:55 +10:00
Andrew Tridgell
a331542958
GCS_MAVLink: fixed typo
2016-07-01 15:35:49 +10:00
Andrew Tridgell
4dcff15603
DataFlash: fixed typo
2016-07-01 15:35:45 +10:00
Andrew Tridgell
50958bc026
AP_RangeFinder: fixed typo
2016-07-01 15:35:39 +10:00
Andrew Tridgell
1f2216982d
AP_Mount: fixed typo
2016-07-01 15:35:34 +10:00
Andrew Tridgell
bc7488e2f2
AP_Motors: fixed typos
2016-07-01 15:35:29 +10:00
Andrew Tridgell
cb858d2c99
AP_InertialSensor: fixed typo
2016-07-01 15:35:22 +10:00
Andrew Tridgell
081df44d92
HAL_QURT: fixed typo
2016-07-01 15:35:15 +10:00
Andrew Tridgell
6e065b3fe2
AP_HAL: fixed typo
2016-07-01 15:35:07 +10:00
Andrew Tridgell
86ceee4a53
AC_WPNav: fixed typo
2016-07-01 15:34:56 +10:00
Andrew Tridgell
45c72eb442
AP_BoardConfig: added BRD_IMU_TARGTEMP
...
set target temperature for IMU
2016-07-01 15:29:52 +10:00
Andrew Tridgell
834acaffee
AP_InertialSensor: provide IMU temperature to HAL for all boards
2016-07-01 15:29:52 +10:00
Andrew Tridgell
7c2e4d0419
HAL_PX4: implement IMU heater in hal.util for Pixhawk2
2016-07-01 15:29:52 +10:00
Andrew Tridgell
461c159b22
HAL_Linux: use set_imu_target_temp() API
2016-07-01 15:29:52 +10:00
Andrew Tridgell
8617db89dc
AP_HAL: added hal.util->set_imu_target_temp() API
2016-07-01 15:29:52 +10:00
Leonard Hall
fe68fe65e2
AP_Motors: Single and Coax fix flap gains
2016-07-01 12:45:14 +09:00
Andrew Tridgell
fc9283964a
HAL_SITL: fixed segv on cygwin
2016-06-30 20:45:03 +10:00
Andrew Tridgell
82f131667d
SITL: added flaps control in XPlane
2016-06-30 20:26:00 +10:00
Andrew Tridgell
934d2b6ae4
RC_Channel: added setup_failsafe_trim_mask()
2016-06-30 16:46:57 +10:00
Andrew Tridgell
a071fa3921
AP_Param: display defaults path on startup
2016-06-30 14:16:52 +10:00
Andrew Tridgell
beb3591f67
HAL_Linux: improved help output and errors for udp and bcast
2016-06-28 21:01:45 +10:00
Andrew Tridgell
72b5cecdb2
HAL_Linux: added udpin support to HAL_Linux
...
useful for setting up ardupilot as a mavlink UDP listener
2016-06-28 21:01:43 +10:00
Paul Riseborough
4a8689aa97
AP_NavEKF2: remove duplicate if statements from mag fusion
2016-06-28 14:20:13 +10:00
Paul Riseborough
e117bedf6a
AP_NavEKF2: Adjust output observer tuning
...
Use more accurate method by default.
Reduce overshoot on quaternion tracking
2016-06-28 14:20:13 +10:00
Paul Riseborough
5c59922574
AP_NavEKF2: Fix bug that could publish bad compass offsets
...
Magnetometer bias states will subject to larger errors early in flight before flight motion makes the offsets observable and the state variances reduce.
Adds a check on state variances.
Replaces the parameter check with a check of the actual filter fusion method being used.
2016-06-28 14:20:13 +10:00
Paul Riseborough
165335b9e3
AP_NavEKF2: Improve ability to tune magnetic field learning
...
Allow different process noise to be set for body (sensor bias) and earth field states.
This allows a stable magnetometer bias estimate to be available at end of flight whilst still allowing for external magnetic anomalies during landing.
Adjust default values to give stable mag bias learning and fast learning of external anomalies.
2016-06-28 14:20:12 +10:00
Paul Riseborough
6523481c76
AP_NavEKF2: Improve tracking accuracy of output predictor
...
Automatically use the highest gain consistent with a 5% overshoot to minimise RMS tracking errors.
Provide an alternative correction method for the position and velocity states that allows the user to specify the time-constant. This can be used to fine tune the output observer for for platform specific sensor errors and control loop sensitivity estimation noise.
2016-06-28 14:20:12 +10:00
Paul Riseborough
fe06606193
AP_NavEKF2: Ensure corrected IMU data used by EKF
...
Don't try to pop new IMU data from the buffer unless we have written data.
Correct IMU data as soon as it is popped from the buffer
2016-06-28 14:20:12 +10:00
Paul Riseborough
1400dc9d02
AP_NavEKF2: Add tuning parameters for magentic yaw fusion
...
Enable simple magnetic yaw fusion observation noise and innovation consistency check gate width to be tuned independantly.
2016-06-28 14:20:12 +10:00
Paul Riseborough
dc6836988c
AP_NavEKF2: Improve ground based magnetic anomaly protection for copter
...
The toilet bowling check during early flight has been removed. This check caused problems where bad compass calibration was the cause of the toilet bowling and resetting to the compass was a bad option. The handling of simultaneous failed mag and velocity innovations is already handled outside the EKF by the failsafe.
A check for yaw errors due to a ground based magnetic anomaly has been introduced.
The logic for in-flight yaw and magnetic field resets has been cleaned up and variable names improved.
2016-06-28 14:20:12 +10:00
Paul Riseborough
703f56908f
AP_NavEKF2: Correct comment
2016-06-28 14:20:12 +10:00
Paul Riseborough
26815ace7a
AP_NavEKF2: Remove redundant logic check
2016-06-28 14:20:12 +10:00
Jonathan Challinger
bd8c804ab5
AP_NavEKF2: correct comments
2016-06-28 14:20:12 +10:00
Jonathan Challinger
ebae95d7f6
AP_NavEKF2: apply corrections to new inertial data when using for output prediction
2016-06-28 14:20:11 +10:00
Jonathan Challinger
2f709dfe86
AP_NavEKF2: improve inertial prediction
2016-06-28 14:20:11 +10:00
Paul Riseborough
262c5fe56d
AP_NavEKF2: Make setter loop through all instances
...
For setters where a success boolean is returned, return false if any instance fails.
2016-06-28 14:20:11 +10:00
Jonathan Challinger
8baf064317
AP_NavEKF2: setTakeoffExpected and setTouchdownExpected loop through instances
2016-06-28 14:20:11 +10:00
Paul Riseborough
ec5c460584
AP_NavEKF2: Fix predicted nav reporting
...
Predicted nav should never be false if current nav is true
2016-06-28 14:20:11 +10:00
Jonathan Challinger
99f481e098
AP_NavEKF2: always calcGpsGoodForFlight
2016-06-28 14:20:11 +10:00
Jonathan Challinger
3382e09580
AP_NavEKF2: add height constraint during takeoff
2016-06-28 14:20:11 +10:00
Paul Riseborough
4bb46af861
AP_NavEKF2: Increase allowable gyro bias offset
2016-06-28 14:20:10 +10:00
Andrew Tridgell
af23a681e0
AP_BoardConfig: improved docs for BRD_SAFETYENABLE
2016-06-28 09:58:55 +10:00
Lucas De Marchi
1f96336f7c
Global: rename bus type enum entries
2016-06-27 17:51:41 -03:00
Gustavo Jose de Sousa
f6bebc96c0
AP_InertialSensor: INS_generic: remove unused includes
2016-06-27 17:22:43 -03:00
Gustavo Jose de Sousa
e85ac8b2c5
AP_InertialSensor: inform maximum gyro average difference
...
While at it, define GYRO_INIT_MAX_DIFF_DPS.
2016-06-27 17:22:43 -03:00
Gustavo Jose de Sousa
e6f62080f5
AP_InertialSensor: fix best_diff on gyro initialization
...
Without this patch, if accel_diff.length() > 0.2f and j == 0, then
best_diff[k] would be zero forever since diff_norm[k] >= 0 for any j.
2016-06-27 17:20:51 -03:00
Gustavo Jose de Sousa
de94392759
AP_InertialSensor: MPU9250: remove _bus_type field
...
Use _dev->bus_type instead.
2016-06-27 17:20:51 -03:00
Gustavo Jose de Sousa
83feb2e2ae
AP_InertialSensor: MPU9250: let Device handle read flag
...
There's no need to handle that in MPU9250 anymore.
2016-06-27 17:20:51 -03:00
Gustavo Jose de Sousa
1e99a7125c
AP_InertialSensor: MPU9250: remove _register_write_check()
...
That function isn't used in the code base and there should be a better way to
debug writes on registers.
2016-06-27 17:20:51 -03:00
Gustavo Jose de Sousa
a6e5eb9e14
AP_InertialSensor: MPU6000: remove _bus_type field
...
Use _dev->bus_type instead.
2016-06-27 17:20:51 -03:00
Gustavo Jose de Sousa
0718649c8b
AP_InertialSensor: MPU6000: let Device handle read flag
...
There's no need to handle that in MPU6000 anymore.
2016-06-27 17:20:51 -03:00
Gustavo Jose de Sousa
309fe4a88c
AP_InertialSensor: MPU6000: remove _register_write_check()
...
That function isn't used in the code base and there should be a better way to
debug writes on registers.
2016-06-27 17:20:51 -03:00
Gustavo Jose de Sousa
d35cf60ce1
AP_HAL_Linux: I2CDevice: use read flag in read_registers_multiple
...
Use the generic support in Device interface for read flag when we are
using read_registers_multiple() method.
2016-06-27 17:20:46 -03:00
Gustavo Jose de Sousa
66f1ad9ed0
AP_HAL: Device: add support for read flag
...
Many of our SPI and I2C sensors define the protocol of setting the most
significant bit of the register address in order to perform a read operation.
Thus, enable the use of a "read flag" that is ORed with the register's address.
Since this is an abstraction for general devices, it's a good idea to have zero
as the default value for that flag.
While at it, add documentation to read_registers().
2016-06-27 17:18:35 -03:00
Gustavo Jose de Sousa
b6a1d598e3
AP_HAL: Device: document write_register()
2016-06-27 17:18:35 -03:00
Gustavo Jose de Sousa
4693501d9d
AP_HAL: Device: add bus_type field
...
Sometimes it's necessary to know the type of bus to make some decisions where
AP_HAL::Device abstraction is used.
2016-06-27 17:18:35 -03:00
Michael du Breuil
c2da36d505
GCS_MAVLink: fix race condition when recieving last waypoint
...
only shows up when the waypoint is about to time out
2016-06-27 10:57:14 +10:00
Andrew Tridgell
689595080a
AP_Airspeed: ensure we have at least 10 samples for airspeed cal
...
thanks to Michael for pointing out this issue
2016-06-27 10:52:59 +10:00
Tom Pittenger
37f990bfad
AP_ADSB: allow param based VEHICLE list sizes, 1 to 100.
2016-06-26 11:03:33 -07:00
Lucas De Marchi
b70b9ed8d1
AP_HAL_Linux: fix warning on 64b printf
...
../../libraries/AP_HAL_Linux/Perf.cpp: In member function ‘void Linux::Perf::_debug_counters()’:
../../libraries/AP_HAL_Linux/Perf.cpp:85:36: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 4 has type ‘uint64_t {aka long unsigned int}’ [-Wformat=]
c.name, c.count);
^
2016-06-25 12:05:55 -03:00
Daniel Ricketts
865aad7598
AC_Avoid: add support for stopping at polygon fence
2016-06-25 15:55:55 +09:00
Randy Mackay
26a6234a29
AC_Avoid: do not attempt to stop at circular fence if already breached
2016-06-25 15:55:55 +09:00
Randy Mackay
c6f9889a25
AC_Avoid: constify get_max_speed
...
Also get_stopping_distance and get_margin
2016-06-25 15:55:55 +09:00
Randy Mackay
5153c3d195
AC_Fence: merge with add polygon support
2016-06-25 15:55:55 +09:00
Randy Mackay
d91805edbf
AC_Fence: add support for polygon fences
2016-06-25 15:55:55 +09:00
Randy Mackay
f0bb1ac1d2
AC_Fence: AC_Polygon_loader loads points from eeprom
...
Thanks to Peter Barker for his work to library-ify Plane's geofence which was the basis for this work.
2016-06-25 15:55:55 +09:00
Daniel Ricketts
249d95b413
AP_Math: add Polygon_outside and Polygon_complete functions
2016-06-25 15:55:55 +09:00
Leonard Hall
80bda572ba
AC_AttutudeControl: Yaw shift fix
2016-06-24 18:15:48 +09:00
Leonard Hall
a5bb3c206e
Dataflash: Log rate to degrees
2016-06-24 17:17:16 +09:00
Leonard Hall
8737f6b62d
AC_AttitudeControl: enhanced quaternion attitude controller
2016-06-24 17:17:11 +09:00
Leonard Hall
117ae89505
AC_AttitudeControl: increase SLEW_YAW default to 60deg/sec
2016-06-24 16:24:17 +09:00
Leonard Hall
e0eecd56b2
AP_Math: use is_zero and float constants
2016-06-24 16:16:34 +09:00
Leonard Hall
7f933140c7
AP_Math: small formatting fix to quaternion rotation_matrix
...
No functional change
2016-06-24 16:16:33 +09:00
Leonard Hall
8afd29cc85
AP_Math: add quaternion::rotation_matrix_norm
2016-06-24 16:16:28 +09:00
Randy Mackay
a1548405c1
AC_AttitudeControlHeli: fix althold lean angle max
2016-06-24 15:03:59 +09:00
Andrew Tridgell
1f29b51dd6
AP_Vehicle: moved roll_limit_cd into AP_Vehicle
...
will be used by APM_Control
2016-06-24 11:39:21 +10:00
Andrew Tridgell
8a03b3ba22
APM_Control: reduce elevator when past LIM_ROLL_CD
...
this reduces elevator control when rolled over hard in fixed
wing. Using the elevator when on the side just caused earth frame yaw
and is counter productive. It can also prevent some aircraft from
recovering from inverted flight.
2016-06-24 11:28:18 +10:00
Andrew Tridgell
a6e927d434
SITL: default gyro cal off in XPlane and FlightAxis
...
pointless doing cal on these backends
2016-06-24 10:32:52 +10:00
Gustavo Jose de Sousa
f9cb760691
AP_Mount: use ARRAY_SUBSCRIPT instead of bytes field
...
That fixed compilation issues and seems more semantically correct. Using array
of length 0 fails compilation because of -Werror=array-bounds in GCC 6.1.
2016-06-23 21:02:05 -03:00
Gustavo Jose de Sousa
174cefa8a5
AP_GPS: use ARRAY_SUBSCRIPT instead of bytes field
...
That fixed compilation issues and seems more semantically correct. Using array
of length 0 fails compilation because of -Werror=array-bounds in GCC 6.1.
2016-06-23 21:02:05 -03:00
Lucas De Marchi
1962acad49
AP_Common: simplify ARRAY_SUBSCRIPT macro
...
Add DEFINE prefix, since this macro is defining these operators and
remove the parameter since we will always use it to access a
union/struct as a byte array.
2016-06-23 21:02:05 -03:00
Gustavo Jose de Sousa
5154369e9d
AP_Common: define the ARRAY_SUBSCRIPT macro
2016-06-23 21:02:05 -03:00
Lucas De Marchi
4a18108600
AP_HAL_Linux: rename min, max and avg fields
...
These were probably named otherwise in order not to conflict with
min/max macros from math.h. We don't have this problem anymore.
2016-06-23 19:08:14 -03:00
Lucas De Marchi
b8e3e549c7
AP_HAL_Linux: Perf: add debug method
...
Test code for integration with another thread to pull data from internal
perf counters. Since we are using the timer thread here, there's no
retry mechanism and we only print that data can be corrupted.
2016-06-23 19:08:14 -03:00
Lucas De Marchi
1727418dc9
AP_HAL_Linux: Perf: make lttng use internal fields
...
Instead of creating a new object Perf_Lttng copying the necessaries
fields, just make a tighter integration with the internal perf counters
and re-use the same fields.
2016-06-23 19:06:30 -03:00
Lucas De Marchi
619ce23799
AP_HAL_Linux: Perf: rework integration with other tools
...
The idea is to leave the internal perf enabled all the time, like it is
in PX4, and then allow the integration with lttng on top. Next step
would be to runtime enable/disable only the perf counters we are
interested in.
This also changes the structure so it's easy to allow another thread to
pull data from the Perf object. A rw lock protects from addition of new
counters and an atomic unsigned int allows other threads to do a
lockless copy of the data.
In order for this to work the allocation was changed to use a single
memory pool instead of returning a calloc'ed data for each perf counter.
Since most of our counters are of ' elapsed' type, don't bother using a
smaller struct for the 'count' type
2016-06-23 19:06:30 -03:00
Lucas De Marchi
b687473174
AP_HAL_Linux: ignore unused result on panic
...
There's not much we can do if the write() call inside a panic function
failed. Just ignore the failure.
2016-06-23 18:34:01 -03:00
Lucas De Marchi
8a58c06adb
AP_Common: add macro to ignore unused result
...
In some cases we want to call functions annotated with
warn_unused_result but we know it's safe to ignore the return value.
Prefixing with (void) used to work, but it doesn't do anymore on all
versions of gcc and clang.
See: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66425
This solution is a mix of the solutions provided in the above bug report
and the one provided by Gustavo Sousa at
https://github.com/ArduPilot/ardupilot/pull/4277#issuecomment-224957375
2016-06-23 18:34:01 -03:00
Francisco Ferreira
ac90527da5
AP_Common: change check from GCC version to glibc version (and Cygwin)
2016-06-23 18:19:54 +10:00
Patrick J.P
eb44d75ed8
AP_HAL: Remove trailing spaces from AP_HAL_Namespace.h
2016-06-22 16:03:30 -03:00
Randy Mackay
a427768087
AC_Avoidance: reduce maximum acceleration to 1m/s/s
...
This makes the vehicle slow very gently as it approaches the edge of the fence
2016-06-22 11:38:15 +09:00
Daniel Ricketts
8a6aa24525
AC_WPNav: use AC_Avoidance to stop at fence during Loiter
2016-06-22 11:38:15 +09:00
Daniel Ricketts
ff7bc7c0cb
AC_Avoidance: add library to stop at circular fence
2016-06-22 11:38:15 +09:00
Daniel Ricketts
e60710332b
AC_Fence: add accessors to return radius and safety margin
2016-06-22 11:38:15 +09:00
Andrew Tridgell
d1b28aaed9
AC_AttitudeControl: fixed factor of 1000 error in init_takeoff
2016-06-22 11:48:43 +10:00
Lucas De Marchi
39d4fa2cf8
Revert changes to cmath according to gcc version
...
Revert these commits:
"AP_Common: gcc 4.9.2 behaves differently from 4.9.3"
"AP_Common: this workaround for missing/cmath is also needed for gcc 4.9.3"
This breaks the build for PX4. The change is related to the libc, not
the compiler version. We have an workaround there based on compiler
version just because it's usual to have a more recent libc version when
you have a recent compiler.
2016-06-21 13:54:41 -03:00
Lucas De Marchi
9738be0ed6
AP_HAL: remove tabs and trailing whitespaces
2016-06-21 13:09:00 -03:00
Lucas De Marchi
ab66e3a69a
AP_HAL_Linux: Perf: simplify function to get current time
2016-06-21 13:09:00 -03:00
Pierre Kancir
a8e5ff93b5
AP_Math: Correct missing declaration warning
2016-06-21 12:17:46 -03:00
Lucas De Marchi
1d9d0a40db
AP_HAL_Linux: GPIO: reduce macro and variable scopes
...
Also change the coding style in a few places.
2016-06-21 12:16:32 -03:00
Lucas De Marchi
4f14b9b7e2
AP_HAL_Linux: ToneAlarm_Raspilot: add fixme comment
2016-06-21 12:16:32 -03:00
Lucas De Marchi
e122b2b651
AP_HAL: GPIO: remove unused functions
...
These functions are not used by any HAL, so remove them.
2016-06-21 12:16:32 -03:00
Lucas De Marchi
0bb86ae498
AP_HAL_Linux: GPIO_RPI: remove unused functions
...
These functions to use pins as pwm are never used in the codebase, so
remove them.
2016-06-21 12:16:32 -03:00
Andrew Tridgell
2108127712
AP_Common: gcc 4.9.2 behaves differently from 4.9.3
...
tested 4.9.3 on cygwin, 4.9.2 on ubuntu
I do hope that it doesn't depend on the OS
2016-06-21 21:34:54 +10:00
Andrew Tridgell
224c714c83
AP_Common: this workaround for missing/cmath is also needed for gcc 4.9.3
...
tested on cygwin with 4.9.3
2016-06-21 19:19:09 +10:00
Peter Barker
309ac53806
SITL: correct adsb initialisation
...
Parameters have not yet been initialised in _sitl_setup, so move
should-run checks into update
2016-06-20 18:16:34 -07:00
Andrew Tridgell
569443231a
SITL: improved altitude data in XPlane
2016-06-20 12:52:13 +10:00
Andrew Tridgell
51fff00871
SITL: report data and frame rates in XPlane
...
and avoid time going backwards if possible
2016-06-20 12:52:13 +10:00
Andrew Tridgell
b7395ee74b
SITL: fixed sign of magnetic inclination
2016-06-20 11:17:36 +10:00
Andrew Tridgell
5b7b799046
SITL: fixed mag field in JSBSim and last_letter
2016-06-20 11:07:51 +10:00
Leonard Hall
ba2382c409
AP_MotorsCoax: Fix servo 3 and 4 feed through sign
2016-06-20 09:45:17 +09:00
Andrew Tridgell
16595d2f3b
SITL: auto-set AHRS_EKF_TYPE to 10 for XPlane and FlightAxis
2016-06-20 08:38:53 +10:00
Tom Pittenger
746e2211e9
AP_ADSB: remove extra include
2016-06-19 11:24:31 -07:00
Tom Pittenger
4fe94bdea3
GCS_MAVLink: add ADSB_streamrate
2016-06-19 11:24:30 -07:00
Tom Pittenger
4cd1721bf9
AP_ADSB: add ADSB_streamrate
2016-06-19 11:24:29 -07:00
Tom Pittenger
3a38e29b39
GCS_MAVLink: do not auto-forward ADSB_VEHICLE packets
2016-06-19 11:24:29 -07:00
Andrew Tridgell
2db2486b3a
AP_AHRS: send zero EKF_STATUS_REPORT with EKF type 10
2016-06-19 22:02:25 +10:00
Andrew Tridgell
2f88c24f49
SITL: added debug showing UDP ports for XPlane
2016-06-19 21:18:19 +10:00
Andrew Tridgell
ec5534bd6a
SITL: explain the throttle_magic code for XPlane
2016-06-19 21:10:49 +10:00
Andrew Tridgell
f76a7e64ca
SITL: auto-select correct data fields from X-Plane10
2016-06-19 20:57:34 +10:00
Andrew Tridgell
acc76f80b0
HAL_SITL: added xplane support
2016-06-19 13:59:15 +10:00
Andrew Tridgell
4f99c17aae
SITL: added X-Plane 10 SITL backend
2016-06-19 13:59:15 +10:00
Andrew Tridgell
7a9b4c7572
AP_Motors: fixed motor load calculation
...
scale to 1.0 for max collective
2016-06-19 13:50:04 +10:00
Paul Riseborough
55b0bbd3f1
SITL: Add simulation of 3D earth magnetic field
...
Use an independant method to the flight code using tables that that can updated.
Data taken from NOAA online calculator using WMM data at 2016-6-16 date
2016-06-19 12:51:34 +10:00
Paul Riseborough
2cf5493b40
AP_HAL_SITL: Ensure simulated magnetic field is always used
2016-06-19 12:51:34 +10:00
Paul Riseborough
078284e2e2
SITL: Add magnetic field environment to simulation
...
Includes parameters enabling a ground level magnetic anomaly to be modelled.
TODO - add automatic setting of declination, inclination and field strength using WGS-84 position.
2016-06-19 12:51:34 +10:00
Randy Mackay
ec7c1ab0b0
AC_PosControl: comment fix to set_alt_max method
...
No functional change
2016-06-18 11:55:49 +09:00
Randy Mackay
e185bab775
AP_MotorsMulticopter: add HOVER_LEARN option to learn but not save
2016-06-18 11:55:49 +09:00
Randy Mackay
23f8227e36
AP_Motors: bug fix to save params on disarm
...
Previously was saving during arming as well as disarming.
Thanks to OXINARF for finding this!
2016-06-18 11:55:49 +09:00
Randy Mackay
a2ffd9ec7d
AP_MotorsMulticopter: fix comment for get_throttle_limit function
2016-06-18 11:55:49 +09:00
Leonard Hall
dcbb071c07
AC_PosControl: Move hover throttle calculation to AP_Motors
2016-06-18 11:55:49 +09:00
Randy Mackay
b27da7699e
AC_AttitudeControlMulti: get_throttle_avg_max made private
...
Also fixed up method's description
2016-06-18 11:55:49 +09:00
Randy Mackay
da946288a2
AC_AttitudeControl: rename throttle_ave_max to throttle_avg_max
2016-06-18 11:55:49 +09:00
Randy Mackay
570920c7d7
AC_AttitudeControlMulti: run control_monitor_update in rate_controller_run
2016-06-18 11:55:49 +09:00
Leonard Hall
1639e22b74
AC_AttitudeControl: set desired_vel for reporting purposes even when not used
2016-06-18 11:55:49 +09:00
Randy Mackay
558f29b95c
AC_AttitudeControl: control mixing made protected
2016-06-18 11:55:49 +09:00
Leonard Hall
9bd8878c8b
AC_AttitudeControlHeli: fix update_althold_lean_angle_max
2016-06-18 11:55:49 +09:00
Leonard Hall
096bdd67f8
AC_AttitudeControl: add ATC_ANG_LIM_TC parameter
...
This allow adjusting the reponse to limit lean angles to reduce altitude loss
2016-06-18 11:55:49 +09:00
Randy Mackay
dafc45eb26
AC_AttitudeControl: move get_althold_lean_angle_max to parent class
2016-06-18 11:55:49 +09:00
Leonard Hall
3d27ecca92
AC_AttitudeControl: add TC for Alt_Hold angle limit
2016-06-18 11:55:49 +09:00
Randy Mackay
7ff0fcb25d
AC_AttitudeControl: multicopter specific rate_controller_run
2016-06-18 11:55:49 +09:00
Randy Mackay
b7431b7d0c
AC_AttitudeControl: update throttle rpy mix on every iteration
2016-06-18 11:55:49 +09:00
Leonard Hall
ca2977decf
AC_AttitudeControl: set throttle vs attitude priority for flipped state
...
When performing a flip we want to allow throttle to go high to provide
maximum attitude control
2016-06-18 11:55:49 +09:00
Leonard Hall
1fb4c12cd0
AC_AttitudeControl: move in throttle vs attitude prioritisation
...
Previously this prioritisation of throttle vs attitude was done in the
AP_Motors library
2016-06-18 11:55:49 +09:00
Randy Mackay
0870ce9fc1
AC_AttitudeControl: remove get_throttle_boosted from parent class
...
This is only called from multicopters
2016-06-18 11:55:49 +09:00
Leonard Hall
25c77c154f
AC_AttitudeControl: rename get_boosted_throttle to get_throttle_boosted
2016-06-18 11:55:49 +09:00
Leonard Hall
35ef761deb
AC_AttitudeControl: Move set_throttle_out to _Multi and _Heli
2016-06-18 11:55:49 +09:00
Randy Mackay
a1b573ed0a
AP_Motors: rename throttle_ave_max to throttle_avg_max
2016-06-18 11:55:49 +09:00
Randy Mackay
ef106e4b0f
AP_Motors: spool_mode moved out of flags struction
...
No functional change
2016-06-18 11:55:49 +09:00
Leonard Hall
8fff32bde3
AP_MotorsSingle: fix stability patch use of throttle_hover
2016-06-18 11:55:49 +09:00
Leonard Hall
e0f9fc8e40
AP_MotorsSingle: rename rpy_scale, thrust_min_rpy variables
...
No functional change
2016-06-18 11:55:49 +09:00
Leonard Hall
da05902805
AP_MotorsCoax: fix stability patch use of throttle_hover
2016-06-18 11:55:49 +09:00
Leonard Hall
9bc866e771
AP_MotorsCoax: rename rpy_scale internal variable
...
No functional change
2016-06-18 11:55:49 +09:00
Leonard Hall
8bdb906b2b
AP_MotorsCoax: fixes negative thrust
2016-06-18 11:55:49 +09:00
Randy Mackay
71d1818103
AP_MotorsMulticopter: minor comment update
2016-06-18 11:55:49 +09:00
Randy Mackay
818965fa57
AP_MotorsMulticopter: output_to_motors and output_logic become protected
2016-06-18 11:55:49 +09:00
Leonard Hall
02881b59ff
AP_MotorsMulti: float constants
2016-06-18 11:55:49 +09:00
Randy Mackay
79a73a5c2f
AP_Motors: fix example sketch
...
No need to set throttle_mix nor throttle_min
2016-06-18 11:55:49 +09:00
Leonard Hall
bee6c29b89
AP_MotorsMulticopter: current limit keeps battery from sagging below BAT_VOLT_MIN
2016-06-18 11:55:49 +09:00
Leonard Hall
be25ac4acf
AP_MotorsMulticopter: Add current limit time constant variable
2016-06-18 11:55:49 +09:00
Leonard Hall
7e0e0ca874
AP_MotorsMulticopter: battery voltage compensation improvements
2016-06-18 11:55:49 +09:00
Leonard Hall
0ee7b00b0b
AP_MotorsMulticopter: rename _thrust_curve_min to spin_min
2016-06-18 11:55:49 +09:00
Leonard Hall
142a67bb6d
AP_MotorsMulticopter: minor comment change
2016-06-18 11:55:49 +09:00
Leonard Hall
5cace33ca5
AP_MotorsMulticopter: SPIN_MIN replaces min_throttle
2016-06-18 11:55:49 +09:00
Leonard Hall
2c811364d3
AP_MotorsMulticopter: SPIN_ARM param replaces SPIN_ARMED
2016-06-18 11:55:49 +09:00
Leonard Hall
488f90b39d
AP_Motors: add calc_spin_up_to_pwm to reduce repeated code
2016-06-18 11:55:49 +09:00
Randy Mackay
25778a24e2
AP_MotorsMulticopter: add HOVER_LEARN param
2016-06-18 11:55:49 +09:00
Leonard Hall
4f0db2bc36
AP_Motors: learned THST_HOVER replace THR_MID
...
This holds the estimated thrust required for the vehicle to hover
expressed as a number from 0 to 1. 0 will be equivalent to outputting
SPIN_MIN (which is a number from 0~1 but in the full output range) and 1 is equivalent to SPIN_MAX (also 0~1 but in the full output range)
2016-06-18 11:55:49 +09:00
Leonard Hall
5a8fc6283e
AP_Motors: replace throttle_rpy_mix with throttle_avg
...
AC_AttitudeControl now calculates throttle vs attitude control
prioritisation and simply provides overall maximum throttle (aka
throttle_avg) to the motors library
2016-06-18 11:55:49 +09:00
Michael du Breuil
4d964fbf2f
AP_BoardConfig: allow channels to be moved regardless of safety switch
2016-06-17 15:20:22 +10:00
Andrew Tridgell
63d0c040e4
AP_Scheduler: expose loop rate on all builds
...
as discussed with Randy
2016-06-17 15:02:28 +10:00
Andrew Tridgell
255bda9f9c
AP_Motors: allow setting of loop rate
...
this allows for SCHED_LOOP_RATE in copter
2016-06-17 15:01:18 +10:00
Andrew Tridgell
fb4cdafef8
AP_Scheduler: allow SCHED_LOOP_RATE for copter in SITL
...
very useful for slow simulation environment
2016-06-17 15:01:18 +10:00
Andrew Tridgell
e360c6117e
SITL: make SIM_* variables available to simulator backends directly
2016-06-17 08:36:13 +10:00
Grant Morphett
34fa2a39bd
AP_InertialSensor: Changing the default gyro filter from 10 to 4
...
This change is only for Rovers.
2016-06-16 14:37:55 +09:00
Tom Pittenger
1770f314ac
SITL: change SIM_ADSB default to -1 to default disabled to leave telem port available
2016-06-15 17:22:54 -07:00
Andrew Tridgell
027788f72b
SITL: fixed gimbal simulator for recent MAVLink2 changes
2016-06-16 10:17:28 +10:00
Andrew Tridgell
145ab1d626
SITL: fixed send of ADSB_Vehicle packets with recent MAVLink2 changes
2016-06-16 10:15:07 +10:00
Tom Pittenger
8036912173
AP_ADSB: clarified some minor logic
2016-06-14 21:05:44 -07:00
Tom Pittenger
0ed868d97b
SITL: compiler warning, comparing float to 0
2016-06-14 21:05:38 -07:00
Tom Pittenger
c3b241ca88
SITL: change ADSB_VEHICLE update rate to 1Hz instead of 2Hz to match PING behavior
2016-06-14 21:05:32 -07:00
Tom Pittenger
52fcc36249
AP_HAL_SITL: remove -A --adsb argument, feature is now always enabled controlled by param
2016-06-14 21:05:23 -07:00
Tom Pittenger
f2b5f5f4a5
AP_HAL_SITL: adsb is always enabled in the sim, controlled by param SIM_ADSB_COUNT
2016-06-14 21:03:30 -07:00
Tom Pittenger
95da4accfb
SITL: add SIM_ADSB_COUNT, RADIUS, ALT params
2016-06-14 21:00:39 -07:00
Tom Pittenger
ad81e56a64
AP_ADSB: allow buffer to add to the max, instead of one less than the max
2016-06-14 21:00:27 -07:00
Andrew Tridgell
120564f094
RC_Channel: set_radio() should not constrain values
...
caller is supplying direct PWM value. The MIN/MAX should not apply
2016-06-14 13:08:35 +10:00
Tom Pittenger
b4b0ec404c
GCS_MAVLink: flag a link as active if it ever sends a message
2016-06-13 18:25:26 -07:00
Andrew Tridgell
e070aeebe3
AC_AttitudeControl: added accessors for P and D RMS controller values
2016-06-10 17:48:31 +10:00
Andrew Tridgell
1c463e3f3b
AC_AttitudeControl: log rms P and D separately
...
as discussed with Leonard
2016-06-10 17:48:31 +10:00
Leonard Hall
b3fcab8044
AP_Motors: minor comment fix
2016-06-09 09:49:00 +09:00
dgrat
0b5ab7162d
AP_HAL_Linux: Changes in RPi version detection
...
If the RPi version detection fails, the standard version is now RPi2/3 instead of RPi1.
I think this is useful, because the RPi1 is not really supported (performance reasons).
2016-06-08 11:50:43 -03:00
dgrat
15a915edd3
AP_HAL_Linux: Simplification of the code
...
I applied the ArduPilot coding style guide and additionally simplified the code where possible.
2016-06-08 11:50:43 -03:00
masierra
8fc494cfcd
AP_AHRS_DCM: changed estimate to use prev values for dir & vel
2016-06-06 15:26:51 -07:00
Tom Pittenger
41c9cace68
AP_Mission: mavlink parsing should use check_lat/lng functions
2016-06-06 13:08:37 -07:00
Tom Pittenger
00aaa78757
AP_Math: add separate check_lat() and check_lng()
2016-06-06 13:02:56 -07:00
Michael du Breuil
fb07b8c4cc
Mission: fix bounds checking of MISSION_ITEM lat/lon
2016-06-06 10:08:45 -07:00
Andrew Tridgell
a06e46a84c
DataFlash: log 14 output channels in RCOU
...
unfortunately this means we need to shorten the column headers, but at
least this makes us consistent with RCIN
2016-06-06 15:14:28 +10:00
Andrew Tridgell
2239fd6a6e
AP_GPS: fixed hexdigit in NMEA detector
...
thanks to adorus for spotting this! See issue#4255
2016-06-06 07:36:31 +10:00
Andrew Tridgell
3969bde84a
AP_Math: fixed coverity warning in example
2016-06-05 07:20:46 +10:00
Andrew Tridgell
0166ab2038
HAL_SITL: check for SIM_RC_FAIL
2016-06-05 05:54:56 +10:00
Andrew Tridgell
4e3dd315cb
RC_Channel: fixed double channel assignment
...
this fixes RC_Channel_aux::set_aux_channel_default from assigning
k_heli_rsc twice, once at default channel and once at user designated
channel
2016-06-05 05:54:56 +10:00
Peter Barker
cb16d0b6c6
AP_Math: correct examples build on px4
2016-06-04 12:31:36 -03:00
Andrew Tridgell
be26988b93
AP_Tuning: don't warn of controller errors when disarmed
2016-06-04 19:20:45 +10:00
Andrew Tridgell
9e9a048016
SITL: make heli RPM rpm1 in FlightAxis
2016-06-04 18:33:36 +10:00
Andrew Tridgell
f58d837026
AP_Motors: fixed heli RSC output range and float conversion
...
adds H_RSC_PWM_MIN, H_RSC_PWM_MAX and H_RSC_PWM_REV
2016-06-04 18:33:36 +10:00
Tom Pittenger
a512e807dc
AP_HAL_PX4: disarm motors on reboot so ensure they are off during bootloader upload
2016-06-04 00:42:43 -07:00
Andrew Tridgell
79ffc28f68
SITL: fixed ground accel for helis in FlightAxis
...
fixes landing detection
2016-06-04 15:52:00 +10:00
Andrew Tridgell
7c227ac96c
SITL: debug code for logging raw SITL data
2016-06-04 14:21:21 +10:00
Andrew Tridgell
f6a7c1839a
SITL: use FlightAxis body accel
...
less noisy than rotating early accel
2016-06-04 14:20:55 +10:00
Andrew Tridgell
f6e42cb3e2
SITL: cope with restarting RealFlight while connected
2016-06-04 12:07:03 +10:00
Andrew Tridgell
9c13ac997e
SITL: use FlightAxis accel when not touching the ground
2016-06-04 11:34:57 +10:00
Andrew Tridgell
0b9fca6ef9
SITL: use quaternion attitude from FlightAxis
2016-06-04 11:04:15 +10:00
Tom Pittenger
5df2e57209
AP_HAL_SITL: do not compile terrain class when terrain is not disabled via compile flag
2016-06-03 11:07:36 -07:00
Tom Pittenger
8b405e26ea
GCS_MAVLink: battery2 current is in 10*mAh over mavlink
2016-06-02 16:59:29 -07:00
Tom Pittenger
a8c14e68da
AP_Tuning: compile warning: float to double on print
2016-06-02 16:59:27 -07:00
Tom Pittenger
d2c9b02ca5
AP_BattMonitor: remove voltage2() since we have voltage(x) available
2016-06-02 16:59:26 -07:00
Tom Pittenger
4e4bc0bee4
GCS_MAVLink: use voltage(x) instead of voltage2()
2016-06-02 16:59:23 -07:00
Tom Pittenger
a1564bd337
AP_BattMonitor: check actual battery instances instead of max possible instances
2016-06-02 16:59:21 -07:00
Tom Pittenger
8939c5308f
AP_Arming: check actual battery instances then max possible instances
2016-06-02 16:59:19 -07:00
Tom Pittenger
3ed2fafefa
DataFlash: Log new CUR2 entry for battery2 data
2016-06-02 16:59:16 -07:00
Tom Pittenger
43c7b4d518
DataFlash: do not log CURR.Throttle because it's already logged elsewhere
2016-06-02 16:59:07 -07:00
Tom Pittenger
7a397475af
DataFlash: log POWR.vcc and Vservo as float in volts instead of int16 mV
2016-06-02 16:59:05 -07:00
Tom Pittenger
608fbee867
GCS_MAVLink: send current2 over mavlink
2016-06-02 16:59:03 -07:00
Tom Pittenger
7b4c503052
AP_Math: use new check_latlng helper
2016-06-01 17:38:48 -07:00
Tom Pittenger
ce9ecf9f3d
AP_Math: added check_latlng helper
2016-06-01 17:38:48 -07:00
Tom Pittenger
64c2510be9
AC_AttitudeControl: fix compile warning float to double promotion in string conversion
2016-06-01 17:38:47 -07:00
Andrew Tridgell
b4bdfa2451
AC_AttitudeControl: return roll, pitch and yaw controller error separately
...
as discussed with Leonard
2016-06-01 17:18:58 +10:00
Grant Morphett
d56e2b6a39
APM_Control: Get steer rate using earth frame.
...
Rather then just using the standard z gyro by using the earth frame it
takes into account when a rover leans over in hard corners. My rover
leans 15 degrees no problem which is why this is needed.
2016-06-01 10:05:20 +09:00
Andrew Tridgell
b855c70139
GCS_MAVLink: don't route RADIO and RADIO_STATUS packets
...
they don't mean anything off the local link
2016-05-31 22:13:05 +10:00
Paul Riseborough
24d8cc62e2
AP_NavEKF2: rework yaw and magnetic heading reset logic
...
Splits in-flight yaw alignment completed status into separate yaw and magnetic field flags.
Reduce the number of places where decisions to perform a yaw and field reset are made.
Don't perform a reset unless there is is data in the buffer
Don't use 3-axis fusion if the field states still need to be reset.
When starting 3-axis fusion request a reset if not previously performed.
Ensure magnetometer and GPs heading resets are alwasy perfomred with data at teh correct time horizon.
2016-05-31 16:12:53 +10:00
Andrew Tridgell
a6cbc5d4a5
AP_AHRS: use EKF for groundspeed estimate if available
2016-05-31 15:56:25 +10:00
Leonard Hall
a16018f9fe
AP_Motors: Missed Single fix
2016-05-31 12:44:17 +10:00
Peter Barker
1e146256cc
GCS_MAVLink: move telemetry_delayed up into base class
2016-05-31 08:46:09 +10:00
Grant Morphett
944541b287
PID: Added PID_Info to class for PID logging
2016-05-31 08:44:52 +10:00
Andrew Tridgell
abe850c397
PID: fixed example build
2016-05-31 08:36:14 +10:00
Andrew Tridgell
38965f4617
DataFlash: fixed example build
2016-05-31 08:36:07 +10:00
Andrew Tridgell
04f87a452e
HAL_SITL: fixed tcp client mode
2016-05-30 16:42:28 +10:00
Peter Barker
e828525c94
GCS_MAVLink: adjust_rate_for_stream_trigger is no longer virtual
2016-05-29 21:24:41 +10:00
Peter Barker
43fed65f37
GCS_MAVLink: move adjust_rate_for_stream up
2016-05-29 19:38:49 +10:00
Andrew Tridgell
f4f0ae8c8b
SITL: auto-reconnect FlightAxis on reset button
2016-05-29 19:17:29 +10:00
Peter Barker
03ded35d7c
GCS_MAVLink: update routing example for mavlink namespacing
2016-05-29 16:21:21 +10:00
Peter Barker
56114dd37a
GCS_MAVLink: use subclasses in vehicle directories
...
Instead of the vehicles defining functions that are declared in the libraries directory, they will now create subclasses of GCS_MAVLINK
2016-05-29 16:21:20 +10:00
Leonard Hall
d67f83559c
AP_Motors: Single and Coax Fixes
2016-05-29 16:12:29 +10:00
Leonard Hall
e5bdf0a0a2
SITL: Single and Coax fixes
2016-05-29 16:12:13 +10:00
Andrew Tridgell
26ef71e130
AP_Notify: added tuning error tones
2016-05-28 17:33:30 +10:00
Andrew Tridgell
006aafab3f
AP_Tuning: added monitoring of controller output
2016-05-28 17:33:30 +10:00
Andrew Tridgell
6330060e49
AC_AttitudeControl: added monitoring of controller error
...
use RMS P+I+FF output. Thanks to Leonard for the suggestion
2016-05-28 17:33:30 +10:00
Andrew Tridgell
fdac1d26cc
AP_Tuning: added TUNE_MODE_REVERT parameter
2016-05-28 17:33:30 +10:00
Randy Mackay
72b86a3f99
AP_Motors: remove unused stabilizing flag
...
Also initialise some members to resolve converity warnings
2016-05-28 15:45:29 +09:00
Andrew Tridgell
7ec513668e
GCS_MAVLink: reserve some space when param fetch fails
...
this ensures we give some buffer space for parameter fetch when we are
low on buffer space
we reserve 100 bytes for 2 seconds after a param fetch fails due to
low buffer space
2016-05-28 15:08:46 +10:00
Andrew Tridgell
f02c8f732c
DataFlash: fixed BAR2 format for drift offset
2016-05-28 15:08:46 +10:00
Paul Riseborough
a94a19bd09
AP_NavEKF2: Fix bug causing continual yaw resets
2016-05-28 06:52:11 +10:00
Tom Pittenger
57d6ccc0dd
AP_HAL_PX4: skip the 100ms delay on first px4io safety_state async attempt
2016-05-27 11:30:50 -07:00
Tom Pittenger
d3ac1dc161
AP_HAL: defer calls to safety_state switch to queue an async attempt.
...
- this allows for auto-retries if the state does not set correctly
2016-05-27 21:34:40 +10:00
Tom Pittenger
67aaf7e226
AP_HAL_PX4: defer calls to safety_state switch to queue an async attempt.
...
- this allows for auto-retries if the state does not set correctly
2016-05-27 21:34:40 +10:00
Andrew Tridgell
97e2203e70
AP_NavEKF2: don't do 3D mag fusion on 2nd EKF2 core
...
this reduces the risk that mag fusion errors will badly affect
attitude estimation.
2016-05-27 21:27:06 +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
Paul Riseborough
de15928921
AP_NavEKF2: prevent potential arithmetic error in declination fusion
2016-05-27 09:00:41 +10:00
Paul Riseborough
722eb0d706
AP_NavEKF2: Fix bug for start of wind speed estimation
...
The commencement of airspeed fusion could cause pitch errors due to small variances and large innovations. This issue is addressed by the following changes:
1) The airspeed measurement is used to set wind states to a value that reduces initial innovations.
2) The wind state variances are set to values that better reflect the wind speed uncertainty
2016-05-27 09:00:41 +10:00
Paul Riseborough
ac329ec31c
AP_NavEKF2: use observation noise to set initial magnetic field variances
2016-05-27 09:00:41 +10:00
Paul Riseborough
830751c0ae
AP_NavEKF2: remove un-wanted functionality from mag and yaw reset
...
The function used to reset magnetic field states and yaw angle should not be used when there is no magnetometer. If it is incorrectly called without a magnetometer it should not change the attitude or field states.
2016-05-27 09:00:41 +10:00
Paul Riseborough
11c6ea7ef6
AP_NavEKF2: attitude co-variance reset for all post alignment yaw resets
...
Whenever the yaw angle is changed, the correlation with other state errors will be incorrect and the terms should be zeroed.
2016-05-27 09:00:41 +10:00
Paul Riseborough
cdd09df9ac
AP_NavEKF: Add function to zero attitude state co-variances
...
When changing the vehicle yaw angle, the correlation between the attitude errors and errors in other states is invalid so the corresponding co-variance terms need to be zeroed.
This needs to be done in more than one place.
2016-05-27 09:00:41 +10:00
Paul Riseborough
6d34ac5ceb
AP_NavEKF2: improve switch-over to use of mag field states
...
Set initial variances to measurement uncertainties
Always perform a field and yaw reset
2016-05-27 09:00:40 +10:00
Paul Riseborough
fe9ddfdfeb
AP_NavEKF2: remove code that prevents attitude updates after mag reset
...
This code assumes a vehicle is close to level and will not work for all vehicle types. It will be replaced by a different method.
2016-05-27 09:00:40 +10:00
Paul Riseborough
fe85c68344
AP_NavEKF2: move yaw reset for no compass case
...
Should not be in a function that performs reset on magnetic field states
2016-05-27 09:00:40 +10:00
Paul Riseborough
da0622827d
AP_NavEKF: update tuning defaults
...
Increase speed of scale factor learning
2016-05-27 09:00:40 +10:00
Andrew Tridgell
4c66e14563
SITL: fixed air resistance bug for heli, balloon and singlecopter
2016-05-26 20:38:20 +10:00
Randy Mackay
d26a9d4a22
SITL: fix compiler warning by defaulting frame_type
2016-05-26 17:03:28 +09:00
Andrew Tridgell
969b6ebea9
HAL_SITL: support coaxcopter in SITL
2016-05-26 17:09:22 +10:00
Andrew Tridgell
a2ed8fb313
AP_Motors: prevent negative thrust
...
this prevents a sqrt of a negative number
2016-05-26 17:09:11 +10:00
Andrew Tridgell
9f33ece3ef
SITL: support coax copter
2016-05-26 17:08:27 +10:00
Andrew Tridgell
6855899cbf
AP_Motors: fixed servo constructor for coax
2016-05-26 16:41:16 +10:00
Andrew Tridgell
4e5e301c4e
AP_Motors: fixed servo constructor for heli
2016-05-26 16:41:06 +10:00
Andrew Tridgell
a80e233836
HAL_SITL: added SingleCopter
2016-05-26 16:30:39 +10:00
Andrew Tridgell
8944d298ed
SITL: added SingleCopter simulator
2016-05-26 16:30:39 +10:00
Andrew Tridgell
f9fb098222
AP_Motors: fixed channel output for SingleCopter
2016-05-26 16:26:43 +10:00
Andrew Tridgell
163783fefd
AP_HAL: define CH_NONE
...
for servos not connected to a channel
2016-05-26 16:26:30 +10:00
Andrew Tridgell
65eb9ceb32
AP_Motors: expose min/max pwm
2016-05-26 14:33:57 +10:00
Andrew Tridgell
dda35a366c
HAL_PX4: prevent rate changes once oneshot is setup
...
this fixes a problem with small motor outputs at the start of a motor
test.
Thanks to Luis for reporting this.
2016-05-26 12:18:49 +10:00
Andrew Tridgell
a44b0e0011
AP_Motors: don't setup oneshot for a zero output mask
2016-05-26 12:18:49 +10:00
Andrew Tridgell
d90a2f7deb
DataFlash: added get_structures() API
...
used in Replay
2016-05-25 20:46:00 +10:00
Andrew Tridgell
ac8c4d9beb
AP_Mount: use zero length flexible arrays in unions
2016-05-25 19:55:49 +10:00
Andrew Tridgell
af116d238f
AP_GPS: use zero length flexible arrays
...
this works with gcc-6.1 and also works with asan. Hopefully it will
make coverity happy too.
2016-05-25 19:55:49 +10:00
Andrew Tridgell
ae3cb0557d
HAL_PX4: disable "Overtime in task" msg
...
this hasn't helped us find any bugs and it is very annoying with nsh
over MAVLink
2016-05-25 12:35:42 +10:00
Paul Riseborough
9eef97d108
AP_NavEKF2: use consistent parameter naming
...
M_NSE is a measurement noise
P_NSE is a observation noise
I_GATE is an innovation gate
This also ensures the new parameter values required to use the EKF2 will be enforced.
2016-05-25 12:06:04 +10:00
Fredrik Hedberg
75d5c87788
AP_Motors: Fix setpoint bug with 0~1 conversion in AP_MotorsHeli
2016-05-25 09:27:40 +09:00
Andrew Tridgell
1fd4cbffb2
DataFlash: update for changed AP_Airspeed API
2016-05-24 17:00:56 +10:00
Andrew Tridgell
4131b98f8c
AP_Airspeed: use non-blocking airspeed calibration
...
this prevents the EKF from being upset by a time jump
2016-05-24 17:00:56 +10:00
Andrew Tridgell
1581a5e354
AP_Param: fixed forced save of constructor override parameters
...
this fixes the problem where setting ATC_RAT_YAW_FILT to 20 in copter
didn't stick across reboots
2016-05-24 16:55:45 +10:00
Grant Morphett
52755c893d
Rover: Print message when running skid steering SITL
2016-05-24 12:24:53 +10:00
Randy Mackay
8d1f50e78f
AP_Motors: rename get_pwm_min to get_pwm_output_min
2016-05-24 10:00:25 +09:00
Randy Mackay
0c225cf498
AP_MotorsMulticopter: fix typo in comments
2016-05-24 10:00:25 +09:00
Randy Mackay
ff93524ba4
AP_Motors: rename MOT_THST_MAX to MOT_SPIN_MAX
...
Also renamed:
MOT_THST_BAT_MIN,MAX to MOT_BAT_VOLT_MIN,MAX
MOT_CURR_MAX to MOT_BAT_CURR_MAX
2016-05-24 10:00:25 +09:00
Randy Mackay
f1cbdbe914
AP_Motors: update some comments
2016-05-24 10:00:25 +09:00
Randy Mackay
49b14b3cb6
AP_Motors: add PWM_MIN, MAX
...
These parameters allow the motor PWM output range to be different from receiver's throttle input range
Also renamed throttle_pass_through to set_throttle_passthrough_for_esc_calibration and change the method's input to the 0 to 1 range instead of direct PWM value
2016-05-24 10:00:25 +09:00
Lucas De Marchi
bbe3a94175
AP_HAL: remove support for main without argc
...
This was only used by flymaple. Also add missing copyright notice to
header.
2016-05-23 21:49:45 -03:00
Lucas De Marchi
b067bce140
AP_InertialSensor: remove support for flymaple
2016-05-23 21:49:45 -03:00
Lucas De Marchi
346bdf5f8f
AP_HAL: remove support for flymaple
2016-05-23 21:49:45 -03:00
Lucas De Marchi
7703e5f1d1
AP_Common: remove support for flymaple
2016-05-23 21:49:45 -03:00
Lucas De Marchi
e448f161d2
AP_BattMonitor: remove support for flymaple
2016-05-23 21:49:45 -03:00
Lucas De Marchi
62f048c417
AP_Airspeed: remove support for flymaple
2016-05-23 21:49:45 -03:00
Lucas De Marchi
7503c1b6d4
AP_InertialSensor: update doc about used ids
2016-05-23 21:49:45 -03:00
Lucas De Marchi
01b9316114
AP_HAL_AVR: remove examples
...
These were committed by mistake after AP_HAL_AVR was removed.
2016-05-23 21:49:45 -03:00
Lucas De Marchi
dfde4a27e6
AP_HAL_FLYMAPLE: remove hal
...
This is untested and not being updated lately. We can support it on the
avr branch or add it back later when someone is willing to maintain it
in upstream.
2016-05-23 21:49:45 -03:00
Andrew Tridgell
64e105464d
GCS_MAVLink: fixed disabling of signing remotely
2016-05-24 07:25:54 +10:00
Lucas De Marchi
3457dbcdf8
AP_HAL_Linux: rename lttng define
...
Like others, use HAVE_ prefix and name it HAVE_LTTNG_UST to be the same
name as exported by pkg-config While at it remove wrong comment with
_HELLO_TP_H.
2016-05-23 12:06:42 -03:00
Andrew Tridgell
635a975486
HAL_SITL: use a smaller buffer for real SITL UARTs
...
better emulation of real hw
2016-05-23 23:41:02 +10:00
Andrew Tridgell
595d5c0002
AP_HAL: added set_size() to RingBuffer API
2016-05-23 23:41:02 +10:00
Andrew Tridgell
0bbddd38cf
GCS_MAVLink: fixed some places where packets are sent without space
...
we always need sufficient space for the packet in the send buffer
2016-05-23 23:41:01 +10:00
Lucas De Marchi
13722b8858
AP_HAL_Linux: support 16 RCInput channels on Navio2
2016-05-23 09:12:33 -03:00
Andrew Tridgell
5f7af390ec
AP_Common: a useful debug macro for SITL
2016-05-23 10:10:29 +10:00
Andrew Tridgell
ef210217dd
HAL_Linux: cope with MAVLink2 in UDP driver for packetising
2016-05-23 10:10:03 +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
Andrew Tridgell
273c80116a
GCS_MAVLink: added a wrapper for sending HEARTBEAT
...
will be used to cope with old radios with MAVLink2
2016-05-21 15:25:17 +10:00
Andrew Tridgell
2094cb2d88
RC_Channel: fixed example for MAVLink2
2016-05-21 15:25:17 +10:00
Andrew Tridgell
8899455ea3
GCS_MAVLink: use extended MEMINFO message
2016-05-21 15:25:17 +10:00
Andrew Tridgell
fde0652d81
DataFlash: use HAVE_PAYLOAD_SPACE()
2016-05-21 15:25:17 +10:00
Andrew Tridgell
cd1f43a6ce
GCS_MAVLink: use generated target_system and target_component offsets
2016-05-21 15:25:17 +10:00
Andrew Tridgell
018b1143d2
GCS_MAVLink: handle difference between SERIALn_PROTOCOL=1 and 2
2016-05-21 15:25:17 +10:00
Andrew Tridgell
78e9ef427e
AP_SerialManager: remove special case for console
...
and add get_mavlink_protocol() to allow selection of correct mavlink
protocol behaviour
2016-05-21 15:25:17 +10:00
Andrew Tridgell
b3f94184f2
GCS_MAVLink: always build with MAVLink2 headers
2016-05-21 15:25:16 +10:00
Andrew Tridgell
f377787444
AP_Mount: always build with MAVLink2 headers
2016-05-21 15:25:16 +10:00
Andrew Tridgell
94feae9eaf
AP_HAL_QURT: always build with MAVLink2 headers
2016-05-21 15:25:16 +10:00
Andrew Tridgell
6f7d6269a8
AP_HAL_Linux: always build with MAVLink2 headers
2016-05-21 15:25:16 +10:00
Andrew Tridgell
ef4d7e5618
GCS_MAVLink: fixed build with mavlink1
2016-05-21 15:25:15 +10:00
Andrew Tridgell
048fc8d39e
GCS_MAVLink: adjust for min_length mavlink2 API change
2016-05-21 15:25:15 +10:00
Andrew Tridgell
318ec69465
GCS_MAVLink: added periodic saving of signing key
...
thanks to Michael for noticing this was missing
2016-05-21 15:25:15 +10:00
Andrew Tridgell
40d1a23a13
AP_Terrain: use HAVE_PAYLOAD_SPACE()
2016-05-21 15:25:15 +10:00
Andrew Tridgell
ec62d8f4ca
AP_Mount: use HAVE_PAYLOAD_SPACE()
2016-05-21 15:25:14 +10:00
Andrew Tridgell
12c1d58511
GCS_MAVLink: cope with different packet overheads with signing
...
use common macros for determining if there is sufficient space to send
a packet
2016-05-21 15:25:14 +10:00
Andrew Tridgell
006b9728d0
GCS_MAVLink: updates for 24 bit msgid
2016-05-21 15:25:14 +10:00
Andrew Tridgell
a05679fb3b
GCS_MAVLink: fixed build after rebase
2016-05-21 15:25:14 +10:00
Andrew Tridgell
7aae93e3e0
GCS_MAVLink: fixed auto-switching to MAVLink2
2016-05-21 15:25:14 +10:00
Andrew Tridgell
4ba09671a4
GCS_MAVLink: support disabling signing with zero key
2016-05-21 15:25:13 +10:00
Andrew Tridgell
c96ed2b4c6
GCS_MAVLink: fixed calculation of GPS timestamp
2016-05-21 15:25:13 +10:00
Andrew Tridgell
970dbf3c8d
GCS_MAVLink: fixed build with MAVLink1
2016-05-21 15:25:13 +10:00
Andrew Tridgell
24eb6afbe9
GCS_MAVLink: provide signing streams and accept_unsigned callback
2016-05-21 15:25:13 +10:00
Andrew Tridgell
ed9a43ca46
GCS_MAVLink: support for mavlink2 signing operations
2016-05-21 15:25:12 +10:00
Andrew Tridgell
ca39ece6cb
StorageManager: added storage region for signing keys
2016-05-21 15:25:12 +10:00
Andrew Tridgell
8ea9e29fee
GCS_MAVLink: use a fixed signing key for testing
2016-05-21 15:25:12 +10:00
Andrew Tridgell
0ead0ab978
GCS_MAVLink: support mavlink2 build
2016-05-21 15:25:12 +10:00
Andrew Tridgell
0ef5d8995b
AP_Mount: support mavlink2 build
2016-05-21 15:25:12 +10:00
Andrew Tridgell
4eadab7a90
HAL_QURT: support mavlink2 build
2016-05-21 15:25:12 +10:00
Andrew Tridgell
31f8d26784
HAL_Linux: support mavlink2 build
2016-05-21 15:25:11 +10:00
Paul Riseborough
74121fdaeb
AP_NavEKF2: fix bug preventing in-flight alignment
2016-05-21 15:13:53 +10:00
Paul Riseborough
16cb7078cd
AP_NavEKF2: Fix misleading pre-flight status reporting
2016-05-21 15:13:53 +10:00
Paul Riseborough
38d61f5281
AP_NavEKF2: Update status reporting to handle no-magnetometer startup
2016-05-21 15:13:53 +10:00
Paul Riseborough
9aa3cdfaae
AP_NavEKF2: Update GPS yaw re-alignment function
...
Updates to support initial alignment without magnetometer
2016-05-21 15:13:53 +10:00
Paul Riseborough
e3c966661b
AP_NavEKF2: Remove unnecessary variance reset
...
This reset is unnecessary give that a synthetic yaw angle is fused at a low rate to prevent variances from becoming badly conditioned.
2016-05-21 15:13:53 +10:00
Paul Riseborough
1179c08473
AP_NavEKF2: Handle case where we are in-flight and haven't yet aligned the yaw
...
This happens if planes are flown without a compass
2016-05-21 15:13:53 +10:00
Paul Riseborough
581c1aa0d4
AP_NavEKF2: Adjust attitude variance values used after a heading reset
...
Because these errors are in body frame, a spherical error should be used to accommodate different orientations
2016-05-21 15:13:53 +10:00
Paul Riseborough
5ec8d523f6
AP_NavEKF: remove unwanted co-variance reset
...
The co-variance resets required following a velocity and position state reset is now performed in the stte reset function
2016-05-21 15:13:53 +10:00
Paul Riseborough
66e4d9d6e8
AP_NavEKF2: Reset co-variance values when doing a pos,vel,hgt reset
...
Ensures consistent behaviour after resets and reduces attitude disturbances
2016-05-21 15:13:52 +10:00
Paul Riseborough
cf8175a073
AP_NavEKF2: Allow immediate use of GPS in-flight for plane without compass
...
Planes operating without a compass must align the yaw to the GPS heading immediately after launch or takeoff and cannot wait for GPS accuracy checks.
2016-05-21 15:13:52 +10:00
Paul Riseborough
08de4e6d95
AP_NavEKF: Do not perform start-up yaw alignment if no compass
...
Yaw cannot be aligned until in-flight when there is sufficient GPS velocity.
2016-05-21 15:13:52 +10:00
Paul Riseborough
d2694fe5dc
AP_NavEKF2: Remove duplicate transition into GPS aiding
...
This decision is made in one place in setAidingMode()
2016-05-21 15:13:52 +10:00
Paul Riseborough
7201f7d2fd
AP_NavEKF2: fix comment
2016-05-21 15:13:52 +10:00
Paul Riseborough
64a8153b68
AP_NavEKF2: update function name
...
The primary purpose of this function is re-alignment
2016-05-21 15:13:52 +10:00
Paul Riseborough
addd213af0
AP_NavEKF2: reduce effect of acceleration on non-GPS mode attitude
2016-05-21 15:13:52 +10:00
Paul Riseborough
d33bbf8cc7
AP_NavEKF: remove debug code
2016-05-21 15:13:52 +10:00
Paul Riseborough
54213ad871
DataFlash: Improve reporting of normalised ekf2 magnetometer innovations
...
Report the maximum of the x,y,z axis
2016-05-21 15:13:52 +10:00
Paul Riseborough
a3b78e6231
AP_NavEKF2: update tuning defaults
2016-05-21 15:13:51 +10:00
Paul Riseborough
65f63341d7
AP_NavEKF2: Improve numerical error protection in optical flow fusion
...
Abort fusion of data if variances will become negative and publish the fault
2016-05-21 15:13:51 +10:00
Paul Riseborough
42da33593d
AP_NavEKF2: fix yaw fusion numerical health reporting
2016-05-21 15:13:51 +10:00
Paul Riseborough
6eb9d43507
AP_NavEKF2: add numerical error checking and isolation to mag decl fusion
2016-05-21 15:13:51 +10:00
Paul Riseborough
b325c5faeb
AP_NavEKF2: add error checking and isolation to mag heading fusion
2016-05-21 15:13:51 +10:00
Paul Riseborough
a0b1dc5325
AP_NavEKF2: add error checking and isolation to 3D amg fusion
2016-05-21 15:13:51 +10:00
Paul Riseborough
51a3df0319
AP_NavEKF2: Add error checking and isolation to pos vel fusion
2016-05-21 15:13:51 +10:00
Paul Riseborough
fcee82f9b2
DataFlash: extend ekf fault status reporting coverage
2016-05-21 15:13:51 +10:00
Paul Riseborough
597ec61673
AP_AHRS: extend ekf fault status reporting coverage
2016-05-21 15:13:50 +10:00
Paul Riseborough
d59d8cc6e3
AP_NavEKF: extend fusion fault reporting coverage
2016-05-21 15:13:50 +10:00
Paul Riseborough
71b589c89c
AP_NavEKF2: extend fusion fault reporting coverage
2016-05-21 15:13:50 +10:00
Paul Riseborough
0982bd0b2b
AP_NavEKF2: update parameter documentation
2016-05-21 15:13:50 +10:00
Paul Riseborough
46a2993a0d
AP_NavEKF: use intuitive units for imu bias process noise parameters
2016-05-21 15:13:50 +10:00
Paul Riseborough
8c374fd679
AP_NavEKF2: correct comments
2016-05-21 15:13:50 +10:00
Paul Riseborough
6be9eaa524
AP_NavEKF2: use receiver estimated accuracy
...
Adjust the GPS observation noise based on receiver accuracy output if available.
2016-05-21 15:13:50 +10:00
Paul Riseborough
dddc213836
AP_NavEKF2: Open up tuning limits
...
Done to assist tuning assessments
2016-05-21 15:13:50 +10:00
Paul Riseborough
cf05e110fc
AP_NavEKF2: fix scaling error in use of IMU noise parameters
...
Also remove process noise from state transition matrix where it was mistakenly left in after the derivation
2016-05-21 15:13:50 +10:00
Randy Mackay
2bafc36ded
AC_WPNav: support rangefinder for terrain following
2016-05-21 10:36:53 +09:00
Randy Mackay
4829dbb55d
AC_Fence: rename check_destination_within_fence and accept distances in meters
2016-05-21 09:56:12 +09:00
Saloni Jain
ff843448aa
AC_Fence: Added a new function to check whether the guided waypoint is within the fence
2016-05-21 09:56:12 +09:00
Gustavo Jose de Sousa
9a100afede
AP_HAL_Linux: Thread: add doc about rounding function
2016-05-20 16:31:15 -03:00
Lucas De Marchi
359417d544
AP_HAL_Linux: Thread: make sure pointer is aligned
...
Implementation of alloca() is very much architecture and compiler
dependent. Avoid the case in which it could return a non-aligned
pointer, which would mean Thread::_poison_stack() would do the wrong
thing.
2016-05-20 16:31:15 -03:00
Lucas De Marchi
7e49d0c53f
AP_HAL_Linux: Thread: fix alignment warning
...
../../libraries/AP_HAL_Linux/Thread.cpp: In member function ‘void Linux::Thread::_poison_stack()’:
../../libraries/AP_HAL_Linux/Thread.cpp:87:31: warning: cast from ‘uint8_t* {aka unsigned char*}’ to ‘uint32_t* {aka unsigned int*}’ increases required alignment of target type [-Wcast-align]
for (p = (uint32_t *) end; p > curr; p--) {
^
../../libraries/AP_HAL_Linux/Thread.cpp:93:31: warning: cast from ‘uint8_t* {aka unsigned char*}’ to ‘uint32_t* {aka unsigned int*}’ increases required alignment of target type [-Wcast-align]
for (p = (uint32_t *) end; p < curr; p++) {
^
../../libraries/AP_HAL_Linux/Thread.cpp:98:39: warning: cast from ‘uint8_t* {aka unsigned char*}’ to ‘uint32_t* {aka unsigned int*}’ increases required alignment of target type [-Wcast-align]
_stack_debug.start = (uint32_t *) begin;
^
../../libraries/AP_HAL_Linux/Thread.cpp:99:37: warning: cast from ‘uint8_t* {aka unsigned char*}’ to ‘uint32_t* {aka unsigned int*}’ increases required alignment of target type [-Wcast-align]
_stack_debug.end = (uint32_t *) end;
^
2016-05-20 16:31:15 -03:00
Lucas De Marchi
18af4da690
AP_HAL_Linux: Thread: fix warning regarding shadow member
...
../../libraries/AP_HAL_Linux/Thread.cpp: In member function ‘void Linux::Thread::_poison_stack()’:
../../libraries/AP_HAL_Linux/Thread.cpp:63:20: warning: declaration of ‘start’ shadows a member of 'this' [-Wshadow]
uint8_t *end, *start, *curr;
^
2016-05-20 16:31:15 -03:00
Tom Pittenger
684ac12dd6
AC_WPNav: fix compile when using AP_TERRAIN_AVAILABLE 0
2016-05-20 12:29:19 -07:00
Tom Pittenger
f085666032
AP_Common: fix compile when using AP_TERRAIN_AVAILABLE 0
2016-05-20 12:28:46 -07:00
Leandro Pereira
3555e439a4
AP_HAL_Linux: Simplify I2C initialization in HAL_Linux_Class
2016-05-20 10:12:17 -03:00
Aaron Wang Shi
cb9cd9008a
AP_HAL_Linux: fix bhat spi device driver build error
2016-05-20 10:09:50 -03:00
Lucas De Marchi
035937ea7e
AP_GPS: add some safety checks to _parse_decimal_100()
2016-05-20 10:06:45 -03:00
Lucas De Marchi
994b2fc966
AP_GPS: add unit test for _parse_decimal_100()
2016-05-20 10:06:44 -03:00
Lucas De Marchi
fc6dd97e61
AP_GPS: make _parse_decimal_100() a static function
...
This allows to easily write tests for it as opposed to having to
construct the entire object.
2016-05-20 10:06:44 -03:00
Bert Regelink
7379d120e1
AP_GPS: fix _parse_decimal_100() with negative numbers
...
_parse_decimal_100() did not parse the fractional part for negative
numbers. Furthermore, use the third decimal (when present) for proper
rounding.
2016-05-20 10:06:44 -03:00
AndersonRayner
aaa8709194
AP_RPM: Added an example script
2016-05-19 19:01:03 -03:00
Vinicius Juvinski
ed2718a183
AP_Notify: Buzzer: change pin 11(P8_31) to pin 12(P8_32)
...
Avoid boot conflict during power on.
2016-05-19 17:22:27 -03:00
Randy Mackay
54731a139f
AP_Mission: rename starts_with_takeoff_cmd
2016-05-19 19:43:22 +09:00
Niti Rohilla
9ec0000691
AP_Mission: add check_takeoff_cmd
...
This checks that the first command in the mission is a takeoff command which helps avoid mission setup errors in which users forget to start a mission with a takeoff command
2016-05-19 19:43:17 +09:00
Niti Rohilla
d771017c25
AP_Mission: support MAV_CMD_NAV_DELAY command
2016-05-19 16:16:02 +09:00
Randy Mackay
67620f312d
AP_HAL: fix comment for get_time_utc
2016-05-19 16:05:29 +09:00
Niti Rohilla
faec752801
AP_HAL: add get_system_clock_utc functions to Util
2016-05-19 16:05:26 +09:00
Andrew Tridgell
4080c6091d
AP_NavEKF2: fixed an assumption that _ahrs->get_compass() always works
...
if MAG_ENABLE=0 in plane there is no compass
2016-05-19 14:16:40 +10:00
Lucas De Marchi
71e10c9132
AP_HAL_Linux: fix include order
...
Sort include alphabetically and make them in order:
Main header
system headers
library headers
local headers
While reordering, change a include of endian.h to our sparse-endian.h
which is more reliant to toolchain changes.
2016-05-18 23:05:56 -03:00
Lucas De Marchi
45c6b750f2
AP_HAL_Linux: remove ifdef checks for HAL_BOARD_LINUX
...
Everything inside libraries/AP_HAL_Linux is for Linux boards, there's
not need to add the ifdefs.
2016-05-18 23:05:56 -03:00
Lucas De Marchi
c4306de122
AP_Common: fix build on windows
...
The way the build was fixed for gcc >= 5.3 breaks the build for older
compiler versions on waf. Fix this by ifdef'ing for WAF_BUILD and
checking the compiler version.
2016-05-18 22:56:50 -03:00
Lucas De Marchi
9ccce2c980
AP_Compass: explicitely add compasses for erlebrain2, pxf and pxfmini
2016-05-18 18:24:14 -03:00
Lucas De Marchi
8372e74c0f
AP_Compass: simplify handling of sensors for Linux boards
...
In addition:
- bbbmini, navio and navio2 can force HMC5843 backend to
be external.
- there was a typo in the backend name that's now fixed:
AK8953 vs AK8963
2016-05-18 18:24:14 -03:00
Lucas De Marchi
1ddbafabdd
AP_Compass: add name field to internal compass drivers
2016-05-18 18:24:14 -03:00
Gustavo Jose de Sousa
ef61096e08
AP_Math: geodesic_grid tool: show triangle number for sections too
2016-05-18 13:28:52 -03:00
Gustavo Jose de Sousa
a6deb65d95
AP_Math: geodesic_grid tool: add option --section
2016-05-18 13:28:52 -03:00
Andrew Tridgell
f7ac6c8d86
AP_Compass: make internal compasses use a higher cal threshold
...
they tend to be a lot noisier
2016-05-18 16:32:32 +10:00
Tom Pittenger
d67b1edf10
AP_NavEKF2: (potential) compiler warning of float to double promotion
2016-05-17 20:30:51 -07:00
Tom Pittenger
3c6323dd82
AP_TECS: Log TEC2.LF as Aerodynamic Load Factor
2016-05-17 20:17:27 -07:00
Tom Pittenger
32d51e346d
DataFlash: optimize logging climbrate - call function one and reuse result
2016-05-17 18:59:14 -07:00
Tom Pittenger
ad11f3815b
AP_HAL_SITL: rename aspd variables to arspd
2016-05-17 16:36:14 -07:00
Tom Pittenger
c77a5e6764
SITL: rename aspd variables and params to arspd
2016-05-17 16:36:07 -07:00
Tom Pittenger
d55401aa18
AP_Tuning: fixed float->double promotion compiler warning
2016-05-17 16:32:10 -07:00
Tom Pittenger
ae91804aaa
AP_Arming: updated comment for z-axis accel threshold
2016-05-17 16:31:42 -07:00
Tom Pittenger
f9335e9d8c
AP_TECS: fixed float->double print warning
2016-05-17 15:58:03 -07:00
Lucas De Marchi
1ac712fa65
AP_Math: fix is_zero() after template conversion
2016-05-17 15:49:29 -07:00
Andrew Tridgell
7b47d54d6b
AP_Common: workaround for SITL on windows
2016-05-17 20:55:57 +10:00
Lucas De Marchi
fa6f2c6b67
AP_Math: fix some coding style mistakes
...
- fix alignement of &
- remove const from bool arguments
2016-05-16 19:08:36 -03:00
Gustavo Jose de Sousa
0c31354539
AP_Compass: implement completion mask
...
Fill the completion mask and send that through MAVLink while calibrating the
compass.
2016-05-16 19:08:36 -03:00
Gustavo Jose de Sousa
390b196eda
AP_Math: AP_GeodesicGrid: add notice for auto generated code
2016-05-16 19:08:36 -03:00
Gustavo Jose de Sousa
b3068baa11
AP_Math: add geodesic_grid toolset
...
That was used to aid development AP_GeodesicGrid and understanding its
concepts.
2016-05-16 19:08:36 -03:00
Gustavo Jose de Sousa
9d34b3b996
AP_Math: AP_GeodesicGrid: make all methods static
...
Since all members are.
2016-05-16 19:08:36 -03:00
Gustavo Jose de Sousa
3b05ec1157
AP_Math: make vectors and matrix constructors constexpr
...
That allows some object to be constructed at compile time.
2016-05-16 19:08:36 -03:00
Gustavo Jose de Sousa
77223a7fcb
AP_Math: AP_GeodesicGrid: make data static
...
That gives the change of storing that data in flash storage in some
architectures. That doesn't happen yet though, some extra changes are required
for that to happen.
2016-05-16 19:08:36 -03:00
Gustavo Jose de Sousa
fd2428db34
AP_Math: AP_GeodesicGrid: reduce number of _neighbor_umbrellas items
...
Only the first half is necessary. The values for the other half can be derived.
2016-05-16 19:08:36 -03:00
Gustavo Jose de Sousa
43d9e00ab7
AP_Math: AP_GeodesicGrid: use uint8_t for _neighbor_umbrellas
...
All integers there are limited to the range [0,20), so uint8_t is enough.
2016-05-16 19:08:36 -03:00
Gustavo Jose de Sousa
54889e4175
AP_Math: AP_GeodesicGrid: reduce number of inverses by half
...
We don't actually need all of them, since the second half is for the opposite
triangles. In that case we just need to negate the resulting vector when
changing basis.
2016-05-16 19:08:36 -03:00
Gustavo Jose de Sousa
f31161ecb6
AP_Math: AP_GeodesicGrid: remove triangles
...
There's no need to keep those triangles, since we just need the inverses.
2016-05-16 19:08:36 -03:00
Gustavo Jose de Sousa
b34c04a4f9
AP_Math: test_geodesic_grid: test also non-centroid vectors
2016-05-16 19:08:36 -03:00
Gustavo Jose de Sousa
8e8ab3af96
AP_Math: AP_GeodesicGrid: remove section_triangle() function
...
That function was only being used by the unit tests and the benchmark. In order
to remove memory usage, the triangles will be removed, since we don't actually
need to keep them in real situations. Thus, this patch removes that function
and copy those triangles to the test and benchmark.
2016-05-16 19:08:36 -03:00
Gustavo Jose de Sousa
c7eb46fae2
AP_Math: AP_GeodesicGrid: optimize _from_neighbor_umbrella()
...
This is the second optimization. With that we don't have to iterate over the
umbrella's components.
The table below summarizes the mean CPU time in ns from the brenchmark results
on an Intel(R) Core(TM) i7-3520M CPU @ 2.90GHz processor:
| Naive implementation | First Optimization | Second Optimization
------------------------------------------------------------------------
Min. | 26.0 | 28.00 | 26.0
1st Qu.| 78.0 | 48.75 | 39.0
Median | 132.0 | 57.00 | 41.0
Mean | 130.1 | 61.20 | 41.6
3rd Qu.| 182.2 | 76.00 | 47.0
Max. | 234.0 | 98.00 | 54.0
2016-05-16 19:08:36 -03:00
Gustavo Jose de Sousa
eb90ef23a1
AP_Math: AP_GeodesicGrid: fix algorithm for null vector
...
If v is the null vector, then alpha * v is still the null vector for any alpha
as a real number. That means that the null vector doesn't cross any section.
2016-05-16 19:08:36 -03:00
Gustavo Jose de Sousa
c28c3265c8
AP_Math: AP_GeodesicGrid: optimize with neighbor umbrellas
...
This is a first optimization of the algorithm. The struct for the neighbor
umbrella has only one member, but new members will be added in the next
optimization.
The table below summarizes the mean CPU time in ns from the brenchmark results
on an Intel(R) Core(TM) i7-3520M CPU @ 2.90GHz processor:
Cases | Naive implementation | First Optimization
--------------------------------------------------
Min. | 26.0 | 28.00
1st Qu.| 78.0 | 48.75
Median | 132.0 | 57.00
Mean | 130.1 | 61.20
3rd Qu.| 182.2 | 76.00
Max. | 234.0 | 98.00
This optimization reduces the mean time for the worst case (Max. line) by more
than 50%.
2016-05-16 19:08:36 -03:00
Gustavo Jose de Sousa
0ff05b7af3
AP_Math: test_geodesic_grid: test triangles indexes
...
That helps figuring out which intermediate step failed the high level call.
2016-05-16 19:08:36 -03:00
Gustavo Jose de Sousa
4398e1e49b
AP_Math: AP_GeodesicGrid: change order of triangles
...
- Change the order of the icosahedron triangles so that there's a uniform way of
finding the opposite triangle. The order visually still makes sense.
- Change test to accommodate the order change.
2016-05-16 19:08:36 -03:00
Gustavo Jose de Sousa
ea412ad629
AP_Math: benchmark_geodesic_grid: add benchmark
...
That will help to benchmark improvements on the section search algorithm.
2016-05-16 19:08:36 -03:00
Gustavo Jose de Sousa
797a2da031
AP_Math: test_geodesic_grid: test when inclusive=true
2016-05-16 19:08:36 -03:00
Gustavo Jose de Sousa
b299261ad4
AP_Math: AP_GeodesicGrid: add first implementation
...
The search for the geodesic section is still naive in this version.
Additionally, add unit tests.
2016-05-16 19:08:35 -03:00
Gustavo Jose de Sousa
3f2ad764ca
AP_Math: Matrix3: add inverse() and invert() functions
...
Additionally, add unit tests.
2016-05-16 19:08:35 -03:00
Gustavo Jose de Sousa
06eea2838f
AP_Math: Matrix3: add det() function
...
Function to calculate determinant. Additionally, add unit tests.
2016-05-16 19:08:35 -03:00
Gustavo Jose de Sousa
26959f1448
AP_Math: define golden ratio constant
2016-05-16 19:08:35 -03:00
dgrat
f8540f1a80
AP_Compass: Do not use is_zero() for non-float types
2016-05-16 19:08:35 -03:00
dgrat
7ff8004f8f
AP_Math: Replace is_zero() with a template function
...
This function only makes sense for floating point types. However this
function was also used for ints.
2016-05-16 19:08:35 -03:00
Tom Pittenger
ebd993dabb
AP_Arming: updated z-axis accel threshold comment
2016-05-16 13:46:17 -07:00
Tom Pittenger
9073ac91ff
AP_Mission: 2of3 add loiter_xtrack option flag for post-loiter navigation via param4
...
0 to crosstrack from center of waypoint, 1 to crosstrack from tangent exit location
2016-05-16 11:50:54 -07:00
Tom Pittenger
02eeb2d4f0
AP_Common: 1of3 add loiter_xtrack option flag for post-loiter navigation
...
0 to crosstrack from center of waypoint, 1 to crosstrack from tangent exit location
2016-05-16 11:50:53 -07:00
Gustavo Jose de Sousa
2246343ec7
AP_HAL_SITL: pass signed value to abs()
...
Passing an unsigned value to abs() causes compilation error in gcc 6.1.1
(and doing that doesn't make sense too).
As a bonus, this patch fixes the code, since, for two unsigned integers
a and b, such that a > b, (a - b) without the casting to a signed
integer would produce garbage in the context of this patch. The type
int32_t is enough for the cases covered by this patch.
2016-05-16 15:04:22 -03:00
Lucas De Marchi
421b9ef54a
AP_Mount do not use flexible array in union
...
We actually don't want a flexible array in this union, but rather a way
to access it byte by byte. This fixes the build for gcc >= 6
In file included from ../../libraries/AP_GPS/AP_GPS_UBLOX.cpp:23:0:
../../libraries/AP_GPS/AP_GPS_UBLOX.h:387:23: error: flexible array member in union
uint8_t bytes[];
^
compilation terminated due to -Wfatal-errors.
In file included from ../../libraries/AP_Mount/AP_Mount.cpp:9:0:
../../libraries/AP_Mount/AP_Mount_Alexmos.h:291:23: error: flexible array member in union
uint8_t bytes[];
^
compilation terminated due to -Wfatal-errors.
2016-05-16 13:50:56 -03:00
Lucas De Marchi
39bd196481
AP_GPS: do not use flexible array in union
...
We actually don't want a flexible array in this union, but rather a way
to access it byte by byte. This fixes the build for gcc >= 6
In file included from ../../libraries/AP_GPS/AP_GPS.cpp:24:0:
../../libraries/AP_GPS/AP_GPS_ERB.h:93:23: error: flexible array member in union
uint8_t bytes[];
^
compilation terminated due to -Wfatal-errors.
In file included from ../../libraries/AP_GPS/AP_GPS_ERB.cpp:22:0:
../../libraries/AP_GPS/AP_GPS_ERB.h:93:23: error: flexible array member in union
uint8_t bytes[];
^
compilation terminated due to -Wfatal-errors.
In file included from ../../libraries/AP_GPS/AP_GPS_MTK.cpp:25:0:
../../libraries/AP_GPS/AP_GPS_MTK.h:75:23: error: flexible array member in union
uint8_t bytes[];
^
compilation terminated due to -Wfatal-errors.
In file included from ../../libraries/AP_GPS/AP_GPS_MTK19.cpp:26:0:
../../libraries/AP_GPS/AP_GPS_MTK.h:75:23: error: flexible array member in union
uint8_t bytes[];
^
compilation terminated due to -Wfatal-errors.
In file included from ../../libraries/AP_GPS/AP_GPS_SIRF.cpp:22:0:
../../libraries/AP_GPS/AP_GPS_SIRF.h:101:23: error: flexible array member in union
uint8_t bytes[];
^
compilation terminated due to -Wfatal-errors.
In file included from ../../libraries/AP_GPS/AP_GPS_UBLOX.cpp:23:0:
../../libraries/AP_GPS/AP_GPS_UBLOX.h:387:23: error: flexible array member in union
uint8_t bytes[];
^
compilation terminated due to -Wfatal-errors.
2016-05-16 13:50:39 -03:00
Gustavo Jose de Sousa
d615628367
AP_HAL_Linux: I2CDevice: add missing stdio.h include
...
This was probably being included by another header, but it's not on
gcc >= 6.1 and glibc 2.23.
2016-05-16 13:12:53 -03:00
Peter Barker
8d5ceda534
AP_HAL_SITL: ensure specified SITL model is found
...
Without this check we get a null pointer exception the first time we attempt
to use the model object
2016-05-16 13:04:15 -03:00
Andrew Tridgell
c6620b03b4
HAL_SITL: added --rtscts option to SITL
...
useful for radio testing
2016-05-16 16:51:26 +10:00
Rustom Jehangir
39fc17f384
DataFlash: Fix parameter description for param_parse.py
2016-05-16 11:09:31 +10:00
Andrew Tridgell
8571202199
AP_RPM: allow for low RPM measurements on PX4
...
this automatically adjusts the timer resolution to allow for low RPM
measurements on PX4
2016-05-14 18:05:13 +10:00
Tom Pittenger
38b7d7e1c6
DataFlash: log baro drift offset
2016-05-13 17:22:12 -07:00
Tom Pittenger
f1f58e2026
AP_Baro: created baro drift offset accessor
2016-05-13 17:22:11 -07:00
Tom Pittenger
f1186b8b5c
AP_Mission: store previous nav cmd id
2016-05-13 17:22:03 -07:00
Tom Pittenger
d900988a23
DataFlash: Log airspeed.Use
2016-05-13 17:22:02 -07:00
Jonathan Challinger
0281b948df
AP_Arming: loosen accelerometer consistency check on Z axis
...
Original author @jschall via 88f5d9f858
2016-05-13 17:16:12 -07:00
Tom Pittenger
d55050e5e3
AP_Baro: slow down the LPF for slewing to a new GND_ALT_OFFSET
...
Instead of a couple seconds, make it about 15sec. This makes TECS happy by not glitching the height demand as much. When applied too fast the TECS height demand causes a large single oscillation as it chases the filter lag.
2016-05-13 17:15:53 -07:00
Tom Pittenger
37ee3b44d2
AP_Baro: add accessor for baro drift
2016-05-13 17:15:41 -07:00
Tom Pittenger
2e1eef7cf0
AP_Airspeed: airspeed healthy should also check if enabled
2016-05-13 17:14:55 -07:00
Andrew Tridgell
e3107a7e10
AP_HAL: fixed optflow typos
2016-05-14 08:26:10 +10:00
Andrew Tridgell
1b7830c577
AP_SpdHgtControl: update for changed API
2016-05-14 08:26:10 +10:00
Andrew Tridgell
98a86bd205
AP_TECS: create TEC2 log message for detailed energy internals
2016-05-14 08:26:10 +10:00
Andrew Tridgell
ff97f52555
AP_TECS: removed log_tuning structure
2016-05-14 08:26:10 +10:00
Andrew Tridgell
bc911d15d1
AP_TECS: convert to using Log_Write
...
preparation for a TEC2 message
2016-05-14 08:26:10 +10:00
Andrew Tridgell
9a6ac77c64
AP_TECS: prevent large glitches in the specific energy integrator
...
this tries to prevent problems like in issue#4066, or at least
reducing the impact when it happens
2016-05-14 08:26:10 +10:00
Andrew Tridgell
c52451b01b
AP_TECS: rename some variables to make them clearer
2016-05-14 08:26:09 +10:00
Andrew Tridgell
e698d1f47e
AP_TECS: use 64 bit micros
...
prevent possible wrap if TECS is not run for a long time
2016-05-14 08:26:09 +10:00
Ricardo de Almeida Gonzaga
64d14356b9
AP_NavEKF2: Fix typos
2016-05-13 19:20:06 -03:00
Ricardo de Almeida Gonzaga
2f88e32657
AP_HAL_FLYMAPLE: Fix typos
2016-05-13 19:20:06 -03:00
Ricardo de Almeida Gonzaga
2236640f66
AP_HAL_Linux: Fix typos
2016-05-13 19:20:06 -03:00
Ricardo de Almeida Gonzaga
267a74ebb2
AP_NavEKF: Fix typos
2016-05-13 19:20:06 -03:00
Ricardo de Almeida Gonzaga
4047fb63fc
AP_GPS: Fix typos
2016-05-13 19:20:06 -03:00
Ricardo de Almeida Gonzaga
481e3a2af6
AP_Math: Fix typos
2016-05-13 19:20:06 -03:00
Ricardo de Almeida Gonzaga
00b1915034
AP_HAL_Empty: Fix typos
2016-05-13 19:20:06 -03:00
Ricardo de Almeida Gonzaga
892cc2ea6f
AP_HAL_PX4: Fix typos
2016-05-13 19:20:06 -03:00
Ricardo de Almeida Gonzaga
1efa4a4115
doc: Fix typos
2016-05-13 19:20:06 -03:00
Ricardo de Almeida Gonzaga
2bf9aa94ad
AP_AHRS: Fix typos
2016-05-13 19:20:06 -03:00
Ricardo de Almeida Gonzaga
2802775e7d
AP_Motors: Fix typos
2016-05-13 19:20:06 -03:00
Ricardo de Almeida Gonzaga
dfe38b61de
AP_Mission: Fix typos
2016-05-13 19:20:06 -03:00
Ricardo de Almeida Gonzaga
91e9dd10ba
AP_HAL_SITL: Fix typos
2016-05-13 19:20:06 -03:00
Ricardo de Almeida Gonzaga
eb418f54ee
AP_HAL: Fix typos
2016-05-13 19:20:06 -03:00
Ricardo de Almeida Gonzaga
aa4b66509f
AP_AccelCal: Fix typos
2016-05-13 19:20:06 -03:00
Ricardo de Almeida Gonzaga
fcbed13533
AP_Mount: Fix typos
2016-05-13 19:20:06 -03:00
Ricardo de Almeida Gonzaga
af13e2cca4
AP_Declination: Fix typos
2016-05-13 19:20:05 -03:00
Ricardo de Almeida Gonzaga
e6564c2efa
AP_BoardConfig: Fix typos
2016-05-13 19:20:05 -03:00
Ricardo de Almeida Gonzaga
2e58653983
AP_Compass: Fix typos
2016-05-13 19:20:05 -03:00