Commit Graph

24599 Commits

Author SHA1 Message Date
priseborough b40016db62 AP_NavEKF2: Fix documentation errors 2016-10-27 14:54:43 +11:00
priseborough 54a431a51d AP_InertialSensor: Update position offset parameter documentation
Notify users of the potential for velocity noise when using larger offset values..
Specific advice in terms of values has not been provided because it is highly dependent on Gyro noise levels.
2016-10-27 14:54:43 +11:00
priseborough 13ca62b1c7 AP_NavEKF2: Correct velocity and position outputs for IMU offset
This can improve position hold performance where it is not practical to have the IMU located at the centroid.
Although this enables the effect of IMU position offsets to be corrected, users will still need to be instructed to place the IMU as close to the vehicle c.g. as practical as correcting for large offsets makes the velocity estimates noisy.
2016-10-27 14:54:43 +11:00
priseborough 21dcf42c27 AP_NavEKF2: Add missing documentation 2016-10-27 14:54:43 +11:00
priseborough 8922861359 AP_NavEKF2: Correct optical flow data for sensor position offset
Correction requires the body rates averaged across the flow sensor sampling interval. This data has been added to the sensor buffer.
The body rate data from the flow sensor driver does not contain the Z component, so an equivalent value sampled from the navigation IMU has been used instead.
The variable omegaAcrossFlowTime has been moved out of the class and into the only function that uses it.
2016-10-27 14:54:43 +11:00
priseborough 16f021c466 AP_NavEKF2: Correct range finder data for body frame position offset 2016-10-27 14:54:43 +11:00
priseborough e884e9cc6e AP_NavEKF2: Correct GPS data for antenna body frame offset 2016-10-27 14:54:43 +11:00
priseborough 064a106808 AP_NavEKF2: Get IMU accelerometer body position offset data 2016-10-27 14:54:42 +11:00
priseborough 397033b7c3 AP_NavEKF2: Add flow sensor body position offset to data buffer 2016-10-27 14:54:42 +11:00
priseborough 92c086b40e AP_NavEKF2: Add rangefinder body position offset to data buffer 2016-10-27 14:54:42 +11:00
priseborough 3148ad4623 AP_NavEKF2: Add GPS antenna position offset data to data buffer 2016-10-27 14:54:42 +11:00
priseborough 72db2ebd81 Plane: Add compensation for optical flow sensor body position offset 2016-10-27 14:54:42 +11:00
priseborough 209e364190 Copter: Add body position offset to optical flow interface 2016-10-27 14:54:42 +11:00
priseborough fd905c23e1 AP_NavEKF2: Add body position offset to optical flow interface 2016-10-27 14:54:42 +11:00
priseborough 8160eca47e AP_NavEKF: update flow sensor interface
Adds a position offset which is not used by the backend
2016-10-27 14:54:42 +11:00
priseborough 6069c37b19 AP_AHRS: add position offset to optical flow interface 2016-10-27 14:54:42 +11:00
priseborough 9c7ab639a1 AP_OpticalFlow: Add parameters for flow sensor position offset 2016-10-27 14:54:41 +11:00
priseborough 24f9e7365d AP_RangeFinder: Add parameters defining sensor position offset 2016-10-27 14:54:41 +11:00
priseborough 6db93d8a21 AP_InertialSensor: Add parameters defining accelerometer position offset 2016-10-27 14:54:41 +11:00
priseborough b51c9dea6c AP_GPS: Add parameters defining antenna offset in body frame 2016-10-27 14:54:41 +11:00
expntly 0d1e50b50b Plane: fix typo, check wp_nav is initialized 2016-10-27 14:39:50 +11:00
Murilo Belluzzo a91da2e803 DataFlash: Change ::bufferspace_available return type
from 'uint16_t' to 'uint32_t' to avoid overflow (possible in at least
two implementations: Block and File).
2016-10-27 14:24:11 +11:00
Murilo Belluzzo 3f1896b9b7 RingBuffer: Remove 'old style' version 2016-10-27 14:24:10 +11:00
Murilo Belluzzo c112e1c889 DataFlash: Make use of ByteBuffer class
This patch replaces the 'old style' ringbuffer by the ByteBuffer class.
An effort was made to keep the exchange as close as possible from a
drop-in replacement to minimize the risk of introducing bugs.

Although the exchange opens opportunities for improvement and
simplification of this class.
2016-10-27 14:24:10 +11:00
Lucas De Marchi 80cf1207b7 AP_HAL_VRBRAIN: UARTDriver: fix writting with failures
When the buffer wraps and we do it in 2 steps, we can't actually do the
second part if it fails or if we wrote less bytes than we intended,
otherwise we will corrupt the data being sent.
2016-10-27 14:23:43 +11:00
Lucas De Marchi 68fc08fe52 AP_HAL_VRBRAIN: fix resetting TX buffer
We can't give the TX buffer 16 bytes more since next time begin() is
called it will compare the buffer size to the value the caller is trying
to set.  In this case we would free and alloc the buffer again each time
begin was called.
2016-10-27 14:23:43 +11:00
Murilo Belluzzo e8bfcf02a0 VRBRAIN UARTDriver: Make use of ByteBuffer class
This patch replaces the 'old style' ringbuffer by the ByteBuffer class.
An effort was made to keep the exchange as close as possible from a
drop-in replacement to minimize the risk of introducing bugs.

Although the exchange opens opportunities for improvement and
simplification of this class.

While at it, just like in the write case, explain why we are stopping.
2016-10-27 14:23:43 +11:00
Lucas De Marchi 4df627693d AP_HAL_PX4: UARTDriver: fix writting with failures
When the buffer wraps and we do it in 2 steps, we can't actually do the
second part if it fails or if we wrote less bytes than we intended,
otherwise we will corrupt the data being sent.

While at it, just like in the write case, explain why we are stopping.
2016-10-27 14:23:43 +11:00
Lucas De Marchi 4346f1dd83 AP_HAL_PX4: fix resetting TX buffer
We can't give the TX buffer 16 bytes more since next time begin() is
called it will compare the buffer size to the value the caller is trying
to set.  In this case we would free and alloc the buffer again each time
begin was called.
2016-10-27 14:23:43 +11:00
Murilo Belluzzo c7a65a026c AP_HAL_PX4: UARTDriver: Make use of ByteBuffer class
This patch replaces the 'old style' ringbuffer by the ByteBuffer class.
An effort was made to keep the exchange as close as possible from a
drop-in replacement to minimize the risk of introducing bugs.

Although the exchange opens opportunities for improvement and
simplification of this class.
2016-10-27 14:23:43 +11:00
Lucas De Marchi 26650049c0 AP_HAL_Linux: UARTDriver: fix writting/reading with failures
When the buffer wraps and we do it in 2 steps, we can't actually do the
second part if it fails or if we wrote less bytes than we intended,
otherwise we will corrupt the data being sent.
2016-10-27 14:23:42 +11:00
Murilo Belluzzo ce81c45f80 AP_HAL_Linux: UARTDriver: Make use of ByteBuffer class
This patch replaces the 'old style' ringbuffer by the ByteBuffer class.
An effort was made to keep the exchange as close as possible from a
drop-in replacement to minimize the risk of introducing bugs.

Although the exchange opens opportunities for improvement and
simplification of this class.
2016-10-27 14:23:42 +11:00
Murilo Belluzzo 8526b25654 RingBuffer: Add a faster method to read a single byte 2016-10-27 14:23:42 +11:00
Michael du Breuil 4e86ef9b47 Tracker: Allow compass to manage buffer space for MAG_CAL 2016-10-27 14:04:34 +11:00
Michael du Breuil b5684e7eb4 Rover: Allow compass to manage buffer space for MAG_CAL 2016-10-27 14:04:34 +11:00
Michael du Breuil 790ddeb04e Copter: Use the compass calibrator autoreboot behaviour
(fixes a chance of not saving the second compass)
2016-10-27 14:04:33 +11:00
Michael du Breuil fd24e944b8 Plane: Allow compass calibrator to manage size of buffer 2016-10-27 14:04:33 +11:00
Michael du Breuil deec4ec6af Compass: Rework compass calibrator
Summary of significant changes:
  -Autsave doesn't depend on STREAM_EXTRA3
  -Don't risk only saving one compass on copter if CAL_ALWAYS_REBOOT is set
  -Only calibrate compasses that are both health and marked for use (there was a inconsistency in handling the mask)
  -Fix incorrect failure reporting on DO_ACCEPT_MAG_CAL with a mask of 0 if a channel was specifically not started
  -Fix not starting the buzzer if the delay is set to 0 seconds
  -Always send MAG_CAL_REPORT until its acknowledged
  -Correct the field in MAG_CAL_REPORT for autosave to indicate if the compass had actually been saved, rather then being scheduled to be saved
  -Remmove unused public interfaces
2016-10-27 14:04:33 +11:00
Randy Mackay 964ddfb0d2 SITL: increase speed of yaw in copter sitl
This should resolve the SITL failures caused by the recent change to add
yaw expo to all manual flight modes
2016-10-27 10:44:44 +09:00
floaledm 6869dace08 AP_Frsky_Telem: moved msg queueing of fw string 2016-10-26 09:49:30 -07:00
floaledm 56432f04d3 AP_Frsky_Telem: fixed airspeed; now same as VFR_HUD 2016-10-26 09:36:22 -07:00
Mathieu OTHACEHE 5e42800b5e Disco: add LED support
Use RGBLed generic implementation to support Disco LED.
2016-10-26 11:56:11 -03:00
Leonard Hall 42672de606 AC_PosControl: set Alt_Hold filter for PID not just D
We normally don't use the D term here so setting the filter for PID not
just D lets us smooth the throttle response.
2016-10-26 21:00:43 +09:00
Leonard Hall 0523570c5f Copter: reduce dead zone for roll, pitch and yaw input 2016-10-26 21:00:32 +09:00
Leonard Hall 53486a5725 Copter: increase Autotune test time out for large copters 2016-10-26 21:00:23 +09:00
Leonard Hall 0a6714f4ae Copter: rename variable ROLL_PITCH_YAW_INPUT_MAX
No functional change
2016-10-26 20:59:43 +09:00
Leonard Hall 2698f14d39 Copter: apply yaw expo to all modes 2016-10-26 20:59:33 +09:00
Andrew Tridgell 160df59c79 PX4Firmware: submodule update
fixed BRD_SAFETY_MASK on copter for IO
2016-10-26 13:03:04 +11:00
Francisco Ferreira 5a7f9a38fe DataFlash: fix RCIN and RCOU structure types 2016-10-26 10:10:19 +09:00
murata 762a66c9e5 AP_GPS_SBF: Adjust the initial value of HDOP 2016-10-26 09:54:59 +11:00