Craig@3DR
1a3ed2d80b
AP_Compass: Corrected COMPASS_ORIENT Parameter Description
2013-06-26 19:14:24 -07:00
Randy Mackay
6cd18868c2
AirSpeed: fix example sketch compile error
2013-06-25 22:45:30 +09:00
Randy Mackay
20ed00dcc9
AP_InertialSensor: relax accel offset sanity check
2013-06-25 14:19:42 +09:00
Andrew Tridgell
7d42a0562d
AP_AHRS: cope better with large GPS yaw changes
...
this should cope better with bungee launches when using only GPS for
yaw.
2013-06-25 12:44:26 +10:00
Andrew Tridgell
169b5a30a5
AP_Camera: added CAM_TRIGG_DIST parameter
...
for triggering every N meters of GPS distance travelled
2013-06-25 12:44:26 +10:00
Andrew Tridgell
7902d57877
AP_Relay: added RELAY_PIN parameter
...
makes it easier to choose a pin
2013-06-24 22:39:18 +10:00
Paul Riseborough
2204b30e66
Plane: Added APM_Control integrator limits to table used to covert old PID values
2013-06-22 21:59:47 +10:00
Paul Riseborough
147856e73c
APM_Control: Added integrator limiting adjustable by an advanced user parameter
...
this is compatible with the old IMAX settings
2013-06-22 21:55:27 +10:00
Paul Riseborough
d8dab7b5c7
APM_Control: Pitch Control - Reduced the speed below which the integrator is locked
...
This is to allow for slow speed flare manoeuvres in FBW modes
2013-06-22 21:49:40 +10:00
Randy Mackay
aa2b10f044
AP_Baro: TEMP parameter comment fix
2013-06-18 11:28:36 +09:00
Randy Mackay
dde19c9585
WPNav: add acceleration parameter
...
WP_ACCEL added to allow user control of acceleration during missions.
Loiter acceleration made to be half of loiter max speed
2013-06-16 11:40:51 +09:00
Randy Mackay
272f0e5032
Copter: reduce twitch when entering CIRCLE mode
...
Set loiter target and prev iterations velocity when circle mode is
started
Start circling from projected stopping point
2013-06-15 18:18:30 +09:00
Andrew Tridgell
d7d87f827e
HAL_PX4: support voltage monitoring on multi-connector pin 5
2013-06-05 08:24:20 +10:00
Paul Riseborough
3ad35363be
Plane : APM_Control : Removed scaler incorrectly applied to the integrator path
2013-06-04 18:09:06 +10:00
Andrew Tridgell
f44f7308e8
AP_Param: we don't need to avoid writes in AP_Param now
...
now handled in the HAL
2013-06-04 14:02:49 +10:00
Andrew Tridgell
2316c3bd11
AP_HAL: make storage->write_block() take a const pointer
2013-06-04 14:02:13 +10:00
Andrew Tridgell
3c9d45d7d0
HAL_AVR: avoid writing bytes to EEPROM that are already correct
...
this speeds up writing of waypoint data, reducing latency
2013-06-04 13:33:41 +10:00
Andrew Tridgell
02252b5387
RC_Channel: removed reference to dip switches
2013-06-03 17:49:56 +10:00
Andrew Tridgell
aaaa5247e3
AP_AHRS: make it possible to setup board orientation at runtime
2013-06-03 16:52:28 +10:00
Andrew Tridgell
45b385cf81
AP_RCMapper: improved docs for RCMAP_*
2013-06-03 16:28:05 +10:00
Andrew Tridgell
c0058bbb03
RC_Channel: added output_trim() and read() functions
...
these make using rcmap in the plane code easier
2013-06-03 16:23:48 +10:00
Andrew Tridgell
033828aeb6
AP_Mount: make the code a bit easier to read
2013-06-03 16:23:48 +10:00
Andrew Tridgell
9076f6a1d0
AP_Mount: use RC_Channel::rc_channel() instead of rc_ch[]
2013-06-03 16:23:47 +10:00
Andrew Tridgell
0438952a8b
RC_Channel: removed global rc_ch[] array
...
hide it as a object static instead
2013-06-03 16:23:47 +10:00
Randy Mackay
e9594c8b80
RCMapper: simple mapping object for primary input channels
...
allows arbitrary mapping of first 4 channels
2013-06-03 16:23:47 +10:00
Andrew Tridgell
68adeb041d
AP_Airspeed: support ARSPD_PIN option for choosing source
...
this gives us support for arbitrary analog pins for the airspeed
sensor, plus support for the EagleTree airspeed driver on PX4
2013-06-03 11:51:09 +10:00
Andrew Tridgell
26b7de668a
AP_Param: fixed parameter save bug
...
This bug affected parameters where the defaults are overridden in the
object constructor. For example, a PID object may have a default value
for PID_D of 0.0, but have a constructor based default of 0.2. If the
user tries to set the value to exactly 0.0, then the set wouldn't happen,
as the value matches the value in the object default var_info[]
table.
This change ensures we force a save to eeprom if the value is changing
from the current value, regardless of the var_info[] default.
Thanks to Tom Coyle for finding this bug!
2013-06-02 14:49:34 +10:00
Andrew Tridgell
05889391e5
APM_Control: cope with zero integrator or tconst
...
if the user zeros the integrator tuning factor, we need to zero the
integrator
2013-06-01 22:29:38 +10:00
Andrew Tridgell
512d3d811d
APM_Control: neaten up code formatting
2013-06-01 22:29:38 +10:00
Randy Mackay
7a2afb7443
Copter Nav: add accessor for waypoint speed
2013-06-01 18:21:29 +09:00
Randy Mackay
8b87849acd
Math: add wrap_PI
2013-06-01 18:21:29 +09:00
Andrew Tridgell
c82caeeba1
HAL_AVR: configure analog inputs as INPUT without pullup
...
not all pins were defaulting to this, which led to some strange
readings on some devices. First noticed by Andi on a LM335 temperature
sensor
2013-06-01 12:19:02 +10:00
Randy Mackay
89bbf5844f
Copter WPNav: remove unused variable
2013-05-31 21:41:32 +09:00
Randy Mackay
8c4a7ec094
Copter WPNav: Leonard's improved speed fix
...
Also pass in althold gain from main code
2013-05-31 21:03:27 +09:00
Andrew Tridgell
14c8c1bdfc
APM_Control: tweak code layout and param descriptions
2013-05-31 17:24:55 +10:00
Randy Mackay
76028fc9d3
Copter Motors: use _min_throttle in output_test
2013-05-31 15:16:04 +09:00
Randy Mackay
28f2f87b26
Copter Motors: minor formatting change
2013-05-31 15:16:04 +09:00
Andrew Tridgell
f4efa92d3b
APM_Control: fixed parameter names
2013-05-31 15:31:25 +10:00
Andrew Tridgell
3e8af05d15
APM_Control: match parameter names with old PID controllers
...
this will make upgrading easier
2013-05-31 14:06:56 +10:00
Andrew Tridgell
53d3ce7d2c
APM_Control: fixed some documentation (old parameter names)
2013-05-31 07:58:29 +10:00
Andrew Tridgell
38e414db33
AP_Progmem: fixed type of strncmp_P()
2013-05-31 07:58:29 +10:00
Andrew Tridgell
ad2f6e1217
AP_Param: add support for converting between old and new parameters
...
this allows for a conversion table between old parameters and new
parameters, making firmware upgrades with moved parameters much easier
for users
2013-05-31 07:58:29 +10:00
Paul Riseborough
716c124f73
APM_control: Modified gain definitions for roll and pitch controllers so PID gains behave like previous servo PIDS
...
Gain definitions in roll and pitch controllers were updated previously
so that the old PID tuning values could be transferred across.
Updated tuning guide for revised gain definition.
2013-05-31 07:58:20 +10:00
Randy Mackay
a1926441da
Copter: use fast tan for accel to lean angle calcs
...
Committed on behalf of Leonard
2013-05-30 18:25:04 +09:00
Randy Mackay
d81b7b507d
Math: add Leonard's fast tan function
2013-05-30 18:24:32 +09:00
Randy Mackay
d203f0295b
Copter: bug fix for vertical speed during missions
2013-05-30 11:52:04 +09:00
Andrew Tridgell
3dcdc15201
AP_Navigation: fixed indent-tabs-mode
2013-05-30 09:54:53 +10:00
Andrew Tridgell
ac2db516b4
APM_PI: fixed indent-tabs-mode
2013-05-30 09:54:53 +10:00
Andrew Tridgell
941a2c483a
AP_LeadFilter: fixed indent-tabs-mode
2013-05-30 09:54:53 +10:00
Andrew Tridgell
86db955ac9
AP_L1_Control: fixed indent-tabs-mode
2013-05-30 09:54:53 +10:00
Andrew Tridgell
9da13f3775
AP_InertialNav: fixed indent-tabs-mode
2013-05-30 09:54:53 +10:00
Andrew Tridgell
e391c34d1e
AP_HAL_PX4: fixed indent-tabs-mode
2013-05-30 09:54:53 +10:00
Andrew Tridgell
e2eca3e273
AP_HAL_AVR_SITL: fixed indent-tabs-mode
2013-05-30 09:54:53 +10:00
Andrew Tridgell
82aec0ef6c
AP_Declination: fixed indent-tabs-mode
2013-05-30 09:54:53 +10:00
Andrew Tridgell
8f4d4465af
AP_Curve: fixed indent-tabs-mode
2013-05-30 09:54:53 +10:00
Andrew Tridgell
fb7ae8c764
AP_Camera: fixed indent-tabs-mode
2013-05-30 09:54:53 +10:00
Andrew Tridgell
e75253d019
AP_AHRS: fixed indent-tabs-mode
2013-05-30 09:54:53 +10:00
Andrew Tridgell
8c25a504c3
AC_PID: fixed indent-tabs-mode
2013-05-30 09:54:53 +10:00
Andrew Tridgell
918a3d46f5
AP_Buffer: fixed indent-tabs-mode
2013-05-30 09:53:15 +10:00
Andrew Tridgell
6c5718a63b
APM_Control: fixed indent-tabs-mode
2013-05-30 09:53:02 +10:00
Andrew Tridgell
933088b95a
AP_Common: fixed indent-tabs-mode
2013-05-30 09:52:38 +10:00
Andrew Tridgell
4007b7b1e9
AP_Compass: fixed indent-tabs-mode
2013-05-30 09:52:30 +10:00
Andrew Tridgell
edfebc1f29
AP_GPS: fixed indent-tabs-mode
2013-05-30 09:52:21 +10:00
Andrew Tridgell
c92069644d
AP_InertialSensor: fixed indent-tabs-mode
2013-05-30 09:52:12 +10:00
Andrew Tridgell
c28ef033a2
AP_Limits: fixed indent-tabs-mode
2013-05-30 09:52:00 +10:00
Andrew Tridgell
5024da2695
AP_Math: fixed indent-tabs-mode
2013-05-30 09:51:51 +10:00
Andrew Tridgell
5fdf6ff4f7
AP_Menu: fixed indent-tabs-mode
2013-05-30 09:51:43 +10:00
Andrew Tridgell
81f7ae9108
AP_Motors: fixed indent-tabs-mode
2013-05-30 09:51:34 +10:00
Andrew Tridgell
1cc02836a0
AP_Mount: fixed indent-tabs-mode
2013-05-30 09:51:24 +10:00
Andrew Tridgell
e69e4a5695
AP_RangeFinder: fixed indent-tabs-mode
2013-05-30 09:51:11 +10:00
Andrew Tridgell
91a60be758
GCS_MAVLink: fixed indent-tabs-mode
2013-05-30 09:50:57 +10:00
Andrew Tridgell
6862791d66
PID: fixed indent-tabs-mode
2013-05-30 09:50:37 +10:00
Andrew Tridgell
c96ac5edbb
RC_Channel: fixed indent-tabs-mode
2013-05-30 09:48:45 +10:00
Randy Mackay
4ce4b7aef9
OptFlow: minor commenting and format changes
2013-05-28 22:56:11 +09:00
Andrew Tridgell
15a84972d1
SITL: added SIM_MAG_ERROR parameter
...
this is a compass yaw error in degrees, used for testing navigation
with a bad compass
2013-05-27 13:37:34 +10:00
Randy Mackay
ec7ee47099
Copter: scaling stability patch
2013-05-27 11:21:31 +09:00
Randy Mackay
dbd6524f9f
Copter: WPNav consolidate acceleration #defines
2013-05-27 10:36:24 +09:00
Randy Mackay
e3dffb920b
Copter: initialise target vel in loiter
2013-05-25 14:07:04 +09:00
Randy Mackay
a474b97291
Copter: resolve compiler warning re unused vars
2013-05-25 13:32:15 +09:00
Randy Mackay
916f241fff
Copter: Leonard's improved Loiter
2013-05-24 23:45:03 +09:00
Andrew Tridgell
14628990e6
AP_AHRS: make wind estimation configurable
...
rover doesn't want it
2013-05-24 11:21:42 +10:00
Andrew Tridgell
807dbf9786
AP_InertialSensor: fixed a build warning
2013-05-24 11:21:42 +10:00
Randy Mackay
46d65150af
Copter: lengthen loiter stopping point
...
This will make stops less aggressive when entering loiter at very high
speeds (more 7.5m/s)
2013-05-22 17:35:20 +09:00
Randy Mackay
400c1bd7b7
Copter: smooth waypoint transitions
...
Speed of intermediate point is initialised and constrained based on
current speed vector vs direction to the next waypoint.
This means the copter does not slow if the previous segment and next
segment are in line and also the intermediate point is not advanced
towards the next waypoint if the copter is moving quickly in the
opposite direction.
2013-05-22 14:17:26 +09:00
Andrew Tridgell
59b6118a1d
AP_InertialSensor: fixed parameter markup
2013-05-21 17:02:13 +10:00
Randy Mackay
b27ddf0f63
AP_AHRS: add parameter descriptions
2013-05-21 15:39:03 +09:00
Randy Mackay
6a65a32de2
CopterMotors: add formatting info to top of files
2013-05-20 10:48:42 +09:00
Randy Mackay
5235f4cacd
Copter: allow Tri copters to init ESCs through APM/PX4
2013-05-19 17:28:39 +09:00
Randy Mackay
b914f9ba06
SITL: use SIM_ENGINE_MUL to simulate motor failure
2013-05-19 14:29:08 +09:00
Andrew Tridgell
c08c084191
AP_AHRS: added get_projected_position()
...
this is used to project the position forward by the GPS lag
2013-05-17 08:32:21 +10:00
Andrew Tridgell
2c149bac8e
HAL_PX4: added new arming ioctls
2013-05-16 16:43:38 +10:00
Randy Mackay
cb795ea536
WPNav: divide by zero checks
2013-05-15 11:51:26 +09:00
Randy Mackay
610edd8f9a
ACMotors: small formatting change
2013-05-14 19:01:53 +09:00
Randy Mackay
cd5795a4ac
ACMotors: make a few more functions non-virtual
...
Saves at least 22 bytes of RAM
2013-05-14 18:23:36 +09:00
Randy Mackay
ad00e0ee1e
ACMotors: make test_order uint_8
2013-05-14 18:03:34 +09:00
Randy Mackay
88893f4209
ACMotors: make a few functions non-virtual
2013-05-14 17:41:12 +09:00
Randy Mackay
bd07b1e57b
ACMotors: remove unused get_num_motors function
...
Saves about 4 bytes of RAM
2013-05-14 17:35:27 +09:00
Randy Mackay
5bb0582854
ACMotors: ESC Calibration only for enabled motors
2013-05-14 17:07:36 +09:00
Randy Mackay
33d1129904
Copter: remove unused TB_RATIO parameter
2013-05-14 16:56:55 +09:00
Randy Mackay
7a81c41689
AP_Motors: motor_enabled array to bool
...
Also increased the default MAX_THROTTLE from 850 to 1000 but this number
is always overwritten by the main code anyway so should have no
functional impact.
2013-05-14 16:05:22 +09:00
Andrew Tridgell
411e940342
DataFlash: prevent the dataflash erase problem
...
only allow writes to dataflash block devices once StartNewLog() has
been called
2013-05-14 16:31:45 +10:00
Andrew Tridgell
119ffb0fc0
SITL: fixed simulated airspeed value
2013-05-13 15:42:38 +10:00
Andrew Tridgell
a5b20b4dfc
AP_HAL: removed scaling factor on analog sources
...
these are not use anymore, as voltage_average() is used instead
2013-05-13 15:29:42 +10:00
Andrew Tridgell
48cfdac6f0
AP_ADC_AnalogSource: added voltage_average_ratiometric()
2013-05-13 15:13:59 +10:00
Andrew Tridgell
cec08be9cb
AP_Rangefinder: use ratiometric analog input for analog sonar
2013-05-13 15:13:43 +10:00
Andrew Tridgell
dfb98490f4
AP_Airspeed: use rationmetric analog input for airspeed sensor
2013-05-13 15:13:19 +10:00
Andrew Tridgell
589b8cdb58
AP_HAL: added voltage_average_ratiometric() call to AnalogIn
...
this is for ratiometric sensors such as the 3DR airspeed sensor and
the Maxbotix analog sonar
2013-05-13 15:12:43 +10:00
Andrew Tridgell
a17b85c661
AP_AHRS: use vectors for ground vector complimentary filter
2013-05-13 11:27:55 +10:00
Paul Riseborough
9f309a2aa6
AP_L1_Control: Remove potential nan errors
...
If WP A and B were the same or ground speed was exactly zero, then the
previous code would produce a nan output. Protection against these
two cases has been added.
If WP A and B are equal, we track directly to the target waypoint
2013-05-13 11:27:51 +10:00
Randy Mackay
55235630b6
Copter: bug fix for slow loiter repositioning
2013-05-12 14:51:02 +09:00
Andrew Tridgell
9bdbd6bfbd
MAVLink: update to latest common.xml from upstream
2013-05-11 21:07:27 +10:00
Randy Mackay
61288fcb90
WPNav: make get_stopping_point method public
2013-05-11 16:05:42 +09:00
Randy Mackay
80bd458f29
Compass: update parameter description
...
We do not want people modifying the COMPASS_MOTCT manually
2013-05-11 14:50:36 +09:00
Andrew Tridgell
172faeea26
HAL_PX4: moved rc.APM to new ROMFS directory
2013-05-10 06:16:54 +10:00
Andrew Tridgell
b3e21c6add
HAL_PX4: include visibility.h
...
needed for new nuttx structure
2013-05-10 06:16:53 +10:00
Andrew Tridgell
220e7b019c
SITL: use PACKED attribute in fdm structure
2013-05-09 20:10:31 +10:00
Andrew Tridgell
416fef73a8
AP_Param: use PACKED attribute in examples
2013-05-09 20:10:31 +10:00
Andrew Tridgell
ed918dc6bc
SITL: use PACKED attribute instead of pragma pack
2013-05-09 20:10:31 +10:00
Andrew Tridgell
06b6f4b04e
AP_GPS: use PACKED attribute instead of pragma pack
2013-05-09 20:10:31 +10:00
Andrew Tridgell
62b9a580e8
AP_Common: make PACKED depend on architecture
...
this will remove lots of warnings when building with arduino
2013-05-09 20:10:31 +10:00
Randy Mackay
ed5ddfd9db
WPNav: initialise desired roll, pitch
...
bug-fix to resolve 1/10th second twitch when loiter or waypoint
controller are first engaged
2013-05-09 18:32:02 +09:00
Andrew Tridgell
fefbeacf86
AP_InertialSensor: use SEVERITY_USER_RESPONSE for accel cal messages
...
thanks to the suggestion from Kevin
2013-05-09 09:28:25 +10:00
Andrew Tridgell
11bf6f40f7
GCS_MAVLink: moved gcs_severity to library header
2013-05-09 09:27:58 +10:00
Andrew Tridgell
9a87b3f3c1
AP_Compass: use const on more functions and remove old calculate_heading()
...
the calculate_heading() based on roll/pitch is not needed anywhere
2013-05-09 09:24:06 +10:00
Andrew Tridgell
f78de63a09
AP_Compass: more efficient calculate_heading() implementation
...
Thanks to piersh for this improvement. See
b5f0635455 (commitcomment-3171806)
2013-05-09 09:24:06 +10:00
Randy Mackay
9f735c8d03
WPNav: add fast waypoints flag
...
Waypoint is considered "reached" when the intermediate point reaches the
destination
2013-05-09 00:18:02 +09:00
Randy Mackay
4704b729c2
WPNav: reduce max acceleration to 2.5m/s
...
Also includes bug fix to ramp up of speed of intermediate point
2013-05-08 23:20:29 +09:00
Andrew Tridgell
095505129c
DataFlash: hopefully fixed cause of frequent dataflash erase
...
Wait for 0.1s after erase and before we start writing parameters to
the log
Pair-Programmed-With: Randy Mackay <rmackay9@yahoo.com>
2013-05-08 17:00:36 +10:00
Andrew Tridgell
7fdf1b6f78
DataFlash: fixed example build
2013-05-08 16:45:40 +10:00
Andrew Tridgell
8f57b72e3f
AP_InserialSensor: fixed example build
2013-05-08 16:45:31 +10:00
Andrew Tridgell
c3738ed344
AP_InertialNav: fixed example build
2013-05-08 16:45:21 +10:00
Andrew Tridgell
ed93f80ba9
AP_Baro: fixed example build
2013-05-08 16:45:07 +10:00
Andrew Tridgell
55d148abdd
AC_WPNav: fixed example build
2013-05-08 16:44:59 +10:00
Andrew Tridgell
56694fd9b1
AC_Fence: fixed example build
2013-05-08 16:44:50 +10:00
Andrew Tridgell
2ddeaa7f4d
AP_InertialSensor: show calibration offsets for success and failure
...
Pair-Programmed-With: Randy Mackay <rmackay9@yahoo.com>
2013-05-08 16:19:06 +10:00
Andrew Tridgell
f3f4b7205c
AP_InsertialSensor: added support for MAVLink user interaction
...
allows APM to ask user to print enter to continue via MAVLink messages
during accel calibration
2013-05-08 16:18:40 +10:00
Andrew Tridgell
4bc53acbda
SITL: support vsnprintf with %S on SITL
2013-05-08 16:17:36 +10:00
Andrew Tridgell
9cd0af1132
HAL_PX4: make PX4 snprintf support %S format
...
just maps it to %s for normal printf
2013-05-08 16:17:06 +10:00
Andrew Tridgell
223dfe4de5
AP_Rangefinder: added units for settle time
2013-05-08 14:21:32 +10:00
Randy Mackay
328d900647
WPNav: flexible loiter speed
...
Also includes bug fix to allow speeds > 10m/s during missions
2013-05-07 17:11:24 +09:00
Randy Mackay
1f8161b493
AC_WPNav: remove unnecessary speed constraint
2013-05-07 11:58:04 +09:00
priseborough
aee23361dd
APM_Control: Corrected typographical error in APM_Control/TuningGuide.txt
2013-05-07 11:00:57 +10:00
Andrew Tridgell
6f1cee6406
AP_AHRS: fixed position estimate with 2D fix or low satellite count
...
we should still use the GPS for position fixes when we have a low
number of satellites, but we should stop using it for velocity
estimates and attitude correction.
2013-05-07 10:52:14 +10:00
Andrew Tridgell
055da3c4b6
SITL: added SIM_GPS_NUMSATS parameter
...
this allows testing of the DCM code with less than 6 satellites
2013-05-07 10:38:36 +10:00
Randy Mackay
ceda7d26b0
AHRS: add correct_centrifugal and flags structure
2013-05-06 15:32:06 +09:00
Andrew Tridgell
46c6aa8a9a
APM_Control: tweak the parameter names
2013-05-05 21:51:09 +10:00
Andrew Tridgell
400777b059
APM_Control: support inverted flight in AP_PitchController
...
auto-reverse pitch control when inverted. This is useful not just for
inverted flight mode, but also for recovering from poor manual flight
Pair-Programmed-With: Paul Riseborough <p_riseborough@live.com.au>
2013-05-05 21:51:09 +10:00
Andrew Tridgell
604bfd0700
APM_Control: adjust recommended ranges
2013-05-05 21:51:09 +10:00
Andrew Tridgell
7af3c667a5
APM_Control: added roll controller parameter docs
2013-05-05 21:51:09 +10:00
Andrew Tridgell
52c3f8841f
APM_Control: added yaw parameter docs
2013-05-05 21:51:09 +10:00
Andrew Tridgell
b618d1d81f
APM_Control: added inline docs to pitch controller
2013-05-05 21:51:09 +10:00
Andrew Tridgell
6c6c0079ee
APM_Control: improved formatting of tuning guide
...
be a bit more web friendly
2013-05-05 21:51:09 +10:00
Andrew Tridgell
742df0ac05
APM_Control: rename to avoid spaces in filenames
2013-05-05 21:51:09 +10:00
Andrew Tridgell
23d9c31b0a
APM_Control: fixed build and merge errors
2013-05-05 21:51:08 +10:00
Paul Riseborough
10ecffce01
APM_Control: ROLL and PITCH controllers
...
These changes reduce height variation in turns and improve
robustness. the specific changes are:
1) Linked roll and pitch integrator protection to the final output
value so that if final output is on upper limit, the integrator is
prevented from increasing and vice-versa. This improves wind-up
protection.
2) Modified rate feedback in roll and pitch controllers to use body
rates rather than Euler or earth rates.
3) Changed the roll to pitch compensation to use measured roll angle
and estimated airspeed to calculate the component of turn rate
(assuming a level coordinated turn) around the pitch axis. This a
mathematically correct calculation and will work over a range of bank
angles and aircraft with minimal (if any) tuning required.
4) The integrator in the roll and pitch loop is clamped when the
estimated speed is below the minimum FBW speed
5) The noise filter in the pitch and roll loop has been changed to use
a FOH discretisation. This gives improved noise rejection and less
phase loss when compared to the previous filter that used a ZOH or
equivalent discretisation.
This has been flown on the rascal in the SITL and on a X-8 with
limited flight testing. Initial results have been encouraging with
reduced height variation in turns. Compare to standard PIDS, the
revised pitch and roll controllers allow the use of rate feedback
(effectively the same as the old D term) without beating the servos to
death. The bank angle compensation in the pitch loop works
effectively over a much larger range of bank angles and requires
minimal tuning compared to the old calculation.
YAW CONTROLLER
Currently testing the a 3-loop acceleration autopilot topology for the
yaw loop with feed forward yaw rate for turn compensation. This 3-loop
topology is commonly used in tactical skid to to turn missiles and is
easy to tune. The following block diagram shows the general signal
flow
Note that the acceleration measurement has to pass through an
integrator before it gets to the actuator. This is a important feature
as it eliminates problems of high frequency noise and potential
coupling with structural modes associated with direct feedback of
measured acceleration to actuator.
The high pass filter has been inserted to compensate for airspeed and
bank angle measurement errors which will cause steady state errors in
the calculation of the turn yaw rate.
The yaw controller flies SITL well, but hasn't been flight tested
yet. It can be configured either as a simple yaw damper, or the
acceleration and integral term can be turned on to allow feedback
control of lateral acceleration/sideslip.
TO DO:
Need to reduce number of tuning parameters and provide consistent
naming Need to provide guidance on tuning these loops with definitions
for all the gain terms. Need to check signs and units into and out of
lateral loops.
DESIGN DECISIONS PENDING:
1) Can we remove the noise filters? Provided the mpu6k noise filter is
running they are of limited benefit given the 25Hz Nyquist frequency
2) If we do remove them and rely on the mpu6k noise filter, what is
the apprporiate default cutoff frequency for plane use. 20Hz is
probably OK for most setups, but some noisy/high vibration setups
would require as low as 10Hz
3) The inverted flight logic looks like a crash waiting to
happen. It's problematic to test and even if implemented correctly
would still crash a plane with poor inverted flight capability. We
should either implement it properly and fully tested or delete it.
2013-05-05 21:51:08 +10:00
priseborough
205397d030
APM_Control: Modified calculation of bank compensation rate offset to prevent climb if speed > max fbw speed
...
The previous calculation constrained the speed used to calculate the
bank compensation rate offset between the min and max fbw speeds. This
would result in an unwanted climb if flown above the max fbw speed
(this could happen in fbw-a mode)
2013-05-05 21:51:08 +10:00
priseborough
e7736ed4e0
APM_Control: APM tuning guide.txt - Updated tuning instructions with numerical values for alternate method
2013-05-05 21:51:08 +10:00
Paul Riseborough
3034a9fab2
APM_Control: Added alternate tuning method for roll and pitch loops
...
The alternate tuning method for roll and pitch will give a better
results, but comes with more risk as it will result in a larger rate
feedback gain
2013-05-05 21:51:08 +10:00
priseborough
2c29186b03
APM_Control: APM tuning guide.txt - Minor editorial corrections
2013-05-05 21:51:08 +10:00
priseborough
d159d39037
APM_Control: APM tuning guide.txt - Added step by step tuning description.
2013-05-05 21:51:08 +10:00
priseborough
99f0fb6bd2
APM_Control : Removed 20Hz low-pass filters on rate gyro inputs.
...
These are not required due to MPU 6000 filtering.
2013-05-05 21:51:08 +10:00
priseborough
317b75f4cd
APM_Control: Added tuning guide readme
2013-05-05 21:51:08 +10:00
Andrew Tridgell
9654546b5a
AP_L1_Control: Cleaned up calculation of damping to reduce computations
...
also removed _cross2D, using math library instead
2013-05-05 21:51:08 +10:00
Randy Mackay
30faf87715
InertialNav: use AP_Math's longitude_scale
2013-05-05 14:32:25 +09:00
Randy Mackay
7c9d9b9800
AP_Math: use DEG_TO_RAD in longitude_scale
...
Also increased accuracy of RadiansToCentiDegrees although it is like the
compiler will throw away the extra digits anyway.
2013-05-05 14:31:24 +09:00
Andrew Tridgell
38fc0e61c6
AP_AHRS: optimise yaw drift correction
...
use new vector2 cross product, and factor out the z component of a dcm
mul_transpose() to reduce the number of floating point operations for
a yaw drift correction cycle
2013-05-05 13:51:45 +10:00
Andrew Tridgell
737f0305ef
AP_Math: implement vector2 cross product
...
useful in DCM for faster yaw correction
2013-05-05 13:47:51 +10:00
Andrew Tridgell
f4189e083b
AP_Math: added mulXY() for matrix3 and vector3
...
returns the XY components of the product
2013-05-05 13:47:23 +10:00
Randy Mackay
ee2daf25b6
AHRS: perf improvement by caching declination vector
2013-05-05 12:58:43 +10:00
Andrew Tridgell
943a1d8c8d
AP_AHRS: added AHRS_GPS_MINSATS option
...
if the number of visible satellites is below AHRS_GPS_MINSATS then
don't use the GPS for acceleration correction for attitude
2013-05-05 12:48:01 +10:00
Randy Mackay
c20eac7a70
AP_InertialNav: use standard LATLON_TO_CM, DEG_TO_RAD constants
2013-05-04 15:04:55 +09:00
Andrew Tridgell
99d21854f9
SITL: fixed drift rate limit in simulator
2013-05-04 15:16:35 +10:00
Andrew Tridgell
53ebcfeba5
SITL: fixed compass vector to be based on yaw not GPS heading
...
Many thanks to Randy for noticing this, and apologies for the wasted time!
2013-05-04 14:28:08 +10:00
Randy Mackay
1cfd5900a8
Copter: add support for H-quad frame
...
H-quads are like X quads but the motors spin in the opposite direction.
Having the motors reversed seems to help with yaw authority because of
the slight flex in bodies
2013-05-03 23:13:40 +09:00
Randy Mackay
647a93e78e
Copter: remove jerk when entering RTL or AUTO
...
Loiter target position was not being initialised properly.
Add a few more comments
2013-05-03 16:58:00 +09:00
Randy Mackay
bd75de6a22
AC_Fence: reduce to 150m radius and 100m high
...
100m high,
2013-05-03 14:57:37 +09:00
Andrew Tridgell
6cc9939891
AP_ADC: added dummy stop_pin and settle_time calls
2013-05-03 11:11:40 +10:00
Andrew Tridgell
0e66bac70b
AP_RangeFinder: removed special case for APM1
...
the airspeed port doesn't have enough power for the sonar anyway
2013-05-03 10:09:54 +10:00
Andrew Tridgell
244a10aeb6
HAL_SMACCM: fixed build for new AnalogIn API
2013-05-03 10:09:14 +10:00
Andrew Tridgell
9bc48c9894
HAL_PX4: fixed build with new AnalogIn API
...
pin settle times not actually implemented on PX4 yet
2013-05-03 10:09:02 +10:00
Andrew Tridgell
5ac493908c
SITL: fixed build with new AnalogIn API
2013-05-03 10:08:39 +10:00
Andrew Tridgell
09ca9d4283
AP_Rangefinder_analog: implement settle time and stop_pin
2013-05-03 09:45:19 +10:00
Andrew Tridgell
5d80a5619d
HAL_Empty: add new API functions
2013-05-03 09:45:19 +10:00
Andrew Tridgell
912ed2c97c
HAL_AVR: initialise settle time
2013-05-03 09:45:19 +10:00
Andrew Tridgell
e7a6b12ac1
HAL_AVR: support set_stop_pin() and set_settle_time() for analogin
...
useful for dual sonar support
2013-05-03 09:45:19 +10:00
Andrew Tridgell
0b6cfc7294
AP_HAL: added set_stop_pin() and set_settle_time() interfaces to analogin
...
this is for multiple sonars on one vehicle, to prevent them
interfering with each other
2013-05-03 09:45:19 +10:00
Andrew Tridgell
0242d50ad4
DataFlash: added Log_Write_Message()
...
useful for logging general messages
2013-05-03 09:18:14 +10:00
Andrew Tridgell
ccd38e58a1
HAL_PX4: fixed the scaling on the analog pins
2013-05-02 21:40:15 +10:00
Andrew Tridgell
500497f5fa
AP_HAL: update AnalogIn test to show the first 16 pins
2013-05-02 21:31:55 +10:00
Andrew Tridgell
c90d44c121
AP_Compass_HIL: fixed indentation
2013-05-02 21:31:17 +10:00
Andrew Tridgell
26bf636541
AP_Baro: fixed a build warning
2013-05-02 21:31:04 +10:00
Andrew Tridgell
65183887e5
SITL: use new baro setHIL method
2013-05-02 15:27:27 +10:00
Andrew Tridgell
90cf1b0386
AP_ADC: removed unused setHIL method
2013-05-02 15:27:16 +10:00
Andrew Tridgell
7cec3caf19
AP_Baro: cleaned up setHIL method
...
move pressure calculation into library
2013-05-02 15:26:38 +10:00
Andrew Tridgell
c6c1fce2f1
AP_Baro: removed HIL constructor
...
this wasn't calling the parent class
2013-05-02 15:16:52 +10:00
Andrew Tridgell
811c2ccc11
libraries: fixes for AP_Baro_HIL
2013-05-02 15:09:05 +10:00
Andrew Tridgell
2d089174cd
AP_Baro: rename AP_Baro_BMP085_HIL to AP_Baro_HIL
...
there is nothing specific to the BMP085 in it
2013-05-02 15:08:42 +10:00
Andrew Tridgell
a09c53a3ea
SITL: use new HIL compass API
2013-05-02 15:01:47 +10:00
Andrew Tridgell
f72dd560cb
AP_Compass: fixed the HIL sensors compass
...
this sets up good compass values for HIL sensors
2013-05-02 14:59:33 +10:00
Andrew Tridgell
86027f6e0f
AP_Compass: fixed PX4 build
2013-05-02 13:00:52 +10:00
Andrew Tridgell
af50b652f8
AP_Compass: removed old orientation defines
...
we now use the rotations in libraries/AP_Math/rotations.h
2013-05-02 12:48:14 +10:00
Andrew Tridgell
261eb6d841
AP_Declination: fixed example build
2013-05-02 12:48:14 +10:00
Andrew Tridgell
54b826a583
AP_AHRS: update for new compass API
2013-05-02 12:48:14 +10:00
Andrew Tridgell
217f34e155
AP_Compass: added COMPASS_ORIENT parameter, to support external compasses
...
this allows the user to configure the compass for any orientation
supported by our rotation library
2013-05-02 12:48:14 +10:00
Andrew Tridgell
ba83950fc4
libraries: replace constrain() with constrain_float()
...
this makes the type much more obvious. Thanks to Tobias for the
suggestion.
2013-05-02 10:25:40 +10:00
Andrew Tridgell
813e767efb
AP_Param: use const refs in a few more places
...
reduces code size by a couple of hundred bytes
2013-05-02 10:18:36 +10:00
Randy Mackay
4fcb189c97
GCS_MAVLink: typo in message definition
2013-05-01 17:07:18 +09:00
Randy Mackay
2d17688363
AC_Fence: add backup fence
...
Also includes fixes from code review with Tridge
2013-05-01 17:05:04 +09:00
Andrew Tridgell
0fce0eb488
AP_Compass_PX4: fixed handling of a saturated compass
...
a saturated compass is now marked unhealthy, rather than causing the
code to spin waiting for a valid sample. This fixes a problem with
strong magnets causing the main flight loop to stop
2013-05-01 08:54:53 +10:00
Andrew Tridgell
d7ec985029
AP_Baro_PX4: fixed baro driver to run at full rate
...
we were skipping samples due to a timer handling bug. It now checks
for new samples at 100Hz
2013-05-01 08:54:53 +10:00
Randy Mackay
ad01aeee44
Copter: increase max loiter overshoot to 8.12m
2013-04-30 18:07:48 +09:00
Randy Mackay
8122a32114
InertialNav: reduce XY TC to 2.5 (was 3)
...
More objective testing is required to arrive at the ideal number but 2.5
seem better than 3.0 at reducing "toiletbowling" and anecdotal evidence
does not show much downside.
2013-04-30 12:52:28 +09:00
Randy Mackay
c139134192
Copter: increase max loiter speed to 7.5m/s
2013-04-30 12:49:19 +09:00
Randy Mackay
6c081c3def
AC_WPNav: slow acceleration of intermediate point
2013-04-30 10:20:23 +09:00
Randy Mackay
00146ca97d
AP_HAL: fix another RCInput compile error
2013-04-29 21:27:16 +09:00
Randy Mackay
e7122b85ed
AP_HAL: example compile error fix
2013-04-29 17:47:04 +09:00
Randy Mackay
bbbd90c430
AP_HAL: rename RCInput's valid() fn to valid_channels
2013-04-29 15:05:53 +09:00
Randy Mackay
a28c6df611
RCInput: allow ppmsum of less than 8 channels
2013-04-29 14:35:59 +09:00
Andrew Tridgell
c067fa2660
L1_Control: make NAVL1_DAMPING docs clearer
2013-04-29 14:24:34 +10:00
Andrew Tridgell
786e4cf705
AP_GPS: added last_message_time_ms() API
...
used to help GPS logging
2013-04-28 14:53:02 +10:00
Andrew Tridgell
f5d062d5ba
AP_GPS: move byte swapping code to cpp
2013-04-28 14:51:37 +10:00
priseborough
84ed37938d
Plane : AP_L1_Control : Replaced division by constants with multiplies and adjusted default L1 period to 25 seconds
2013-04-28 14:47:59 +10:00
Andrew Tridgell
f5d6fb6216
AP_AHRS: added _kp gain reduction for catapult launch
...
this should reduce the tendency of aircraft to nose down hard on
initial launch at high g
2013-04-28 14:47:59 +10:00
Randy Mackay
9910d6d1cd
AC_Fence: first implemenation of library
2013-04-27 11:14:05 +09:00
Andrew Tridgell
b71f36ee34
RC_Channel: support 8 auxillary RC channels
...
needed for full 12 channel support on PX4
2013-04-25 20:10:53 +10:00
Andrew Tridgell
ec1678db83
HAL_PX4: setup for 12 output channels
...
moved telemetry port to /dev/ttyS2 to free PWM outputs on FMU
2013-04-25 20:10:53 +10:00
Andrew Tridgell
709615159a
HAL_PX4: support 12 output channels with PX4IO
...
first 8 on IO board, next 4 on FMU outputs
2013-04-25 20:10:53 +10:00
Andrew Tridgell
3b0250b414
AP_HAL: define RC_12
...
we have 12 channels on PX4FMU+PX4IO
2013-04-25 20:10:53 +10:00
Randy Mackay
cb5f8826f8
Copter: Leonard's fix for trapezoidal frame
...
We need to allow yaw_factors to be floats in the add_motor method
2013-04-25 17:52:19 +09:00
Randy Mackay
1a7cffefe6
TradHeli: change coll_out to int16_t
...
was incorrectly defined as an AP_Int16 parameter
2013-04-24 11:32:26 +09:00
Randy Mackay
7f79398989
AP_Limits: fixed return of AP_Int8 parameters from object
...
we should return the base type, not the parameter, or callers could
use set on the result
2013-04-23 23:13:54 +10:00
Andrew Tridgell
3659b532be
AP_Common: added BIT_IS_SET() macro
...
makes bit mask testing safer on PX4
Pair-Programmed-With: Randy Mackay <rmackay9@yahoo.com>
2013-04-23 23:05:02 +10:00
Andrew Tridgell
709a277c7f
DataFlash: chamged FMT message to include labels
...
this makes it easier for MP to parse and display
2013-04-23 19:46:22 +10:00
Andrew Tridgell
9ef34943af
DataFlash: change log extension to *.bin
2013-04-23 15:03:10 +10:00
Andrew Tridgell
fd2cd0d1c2
DCM: fixed formatting
2013-04-23 08:57:44 +10:00
jschall
610069e729
DCM: fixed airspeed bug
...
we incorrectly went via the wind estimate when we had a working airspeed sensor
2013-04-23 08:57:44 +10:00
Randy Mackay
42bca90676
INS: add calibrated check
...
Checks is the scaling vector has been updated. Required for pre-arm
checks for ArduCopter
2013-04-22 23:55:53 +09:00
Andrew Tridgell
2c05030fb1
AP_Motors: use the right constrain() function
2013-04-22 13:26:49 +10:00
Andrew Tridgell
014c9376e7
AP_AHRS: use const references where possible
2013-04-22 13:26:49 +10:00
Andrew Tridgell
dcc3873056
AP_Buffer: remove bool return from add() method
2013-04-22 13:26:49 +10:00
Andrew Tridgell
26fa5c40f1
Compass: use const references for some functions
2013-04-22 13:26:49 +10:00
Andrew Tridgell
1849aca0e9
AP_InertialNav: optimise some multiplies
2013-04-22 13:26:49 +10:00
Andrew Tridgell
01a4fabf9e
AP_Param: make things a bit more efficient
2013-04-22 12:21:59 +10:00
Andrew Tridgell
3d325043b0
AP_InertialNav: make some more functions const
2013-04-22 12:21:58 +10:00
Andrew Tridgell
08c57c2587
AP_InertialNav: reduce number of multiplies
2013-04-22 12:21:58 +10:00
Andrew Tridgell
bad478134d
AP_Buffer: instantiate as a .cpp file, and optimise for const usage
2013-04-22 12:21:58 +10:00
Andrew Tridgell
ad40ba57be
AC_WPNav: optimise to reduce memory copies
...
save a few cycles
Pair-Programmed-With: Randy Mackay <rmackay9@yahoo.com>
2013-04-22 12:21:58 +10:00
Andrew Tridgell
5f1bd1a452
HAL_AVR: constrain Vcc used in voltage_average()
...
this ensures a bad Vcc reading doesn't throw off analog inputs too
much
2013-04-22 11:36:00 +10:00
Andrew Tridgell
c437900a49
AP_Scheduler: added SCHED_DEBUG=2
...
used to show overruns and slips
2013-04-21 23:46:35 +10:00
Randy Mackay
2fc25da4c3
Copter: Leonard's fix for get_loiter_accel_to_lean_angle
2013-04-21 16:27:50 +09:00
Andrew Tridgell
844e1b9ef9
DataFlash: added support for printing flight mode as a string
...
makes analysing logs easier.
Pair-Programmed-With: Randy
2013-04-20 15:17:49 +10:00
Andrew Tridgell
c3abdaf308
AP_GPS: removed duplicate print_latlon()
2013-04-20 13:57:59 +10:00
Andrew Tridgell
b5ae588341
DataFlash_File: fixed creation of 0.log
2013-04-20 13:52:37 +10:00
Andrew Tridgell
735d60c493
DataFlash: convert example sketch to new API
2013-04-20 13:52:37 +10:00
Andrew Tridgell
62f190ed15
DataFlash: simplify code now that copter is converted
...
no longer need as many public functions
2013-04-20 13:52:37 +10:00
Andrew Tridgell
cf0c8331c2
DataFlash: use print_latlon()
2013-04-20 13:52:36 +10:00
Andrew Tridgell
e1f9297551
AP_Math: move print_latlon() to location.cpp
2013-04-20 13:52:36 +10:00
Andrew Tridgell
c29d870497
DataFlash: dump the format of logs at the start of the log
2013-04-20 13:52:36 +10:00
Andrew Tridgell
916e8d0992
DataFlash: new dataflash logging system
...
this allows us to remove the display functions in the vehicle code,
and also allows us to store the format of a log file in the log. It
also stores the parameters used in a flight, rather than the
parameters set at the time the log is dumped
2013-04-20 13:52:36 +10:00
Andrew Tridgell
17d7f1fbe5
AP_InertialSensor: make some interfaces const
2013-04-20 13:52:36 +10:00
Andrew Tridgell
4fe5ce8a09
AP_Common: added a define for PACKED
...
neater than a pragma
2013-04-20 13:52:36 +10:00
Andrew Tridgell
8d727614b4
AP_GPS: make status() const
2013-04-20 13:52:36 +10:00
Andrew Tridgell
9171d5587d
AP_Param: make it easier to show the value of a parameter
2013-04-20 13:52:36 +10:00
Andrew Tridgell
7ad293e270
AP_AHRS: made a few methods const
2013-04-20 13:52:36 +10:00
Randy Mackay
1c046fa49f
AC_WPNav: increase max descent speed to 1.5m/s
2013-04-18 22:32:00 +09:00
Randy Mackay
ed298363f4
AC_WPNav: remove unnecessary limit in leash calc
2013-04-18 22:31:44 +09:00
Randy Mackay
764853bd56
AC_WPNav: add climb and descent params, dynamic leash length
2013-04-18 14:51:01 +09:00
Randy Mackay
effd5b0da7
AC_WPNav: improved comments
...
Made SPEEDZ a parameter although it's not yet used
2013-04-18 11:17:41 +09:00
Andrew Tridgell
fa493a0fb3
AP_Param: added ops needed for ArduCopter build
2013-04-18 11:12:46 +10:00
tobias
fbe7daa477
AP_Param: fixed assignment handling and const
...
this fixes radio_min = radio_max = radio_trim = 0; in RC_Channel
2013-04-18 10:52:40 +10:00
Andrew Tridgell
02bd24cf57
AP_Scheduler: fixed _last_run initialisation
...
another valgrind bug
2013-04-17 23:02:13 +10:00
Andrew Tridgell
0a25d6220a
AP_InertialNav: initialise _gps_last_time
...
found with valgrind
2013-04-17 23:02:13 +10:00
Andrew Tridgell
b3ec5187f2
AP_GPS: fixed uninitialied variable bugs found with valgrind
2013-04-17 23:02:13 +10:00
Randy Mackay
a656b619f5
AP_Motors: remove auto_armed
...
redundant flag that was already held in the main code which is where it
belongs.
2013-04-17 21:28:42 +09:00
Andrew Tridgell
68051f3ea6
AP_Menu: fixed crash bug in strtok_r() handling
...
on PX4 this causes a hard fault in CLI menus
2013-04-17 22:20:00 +10:00
Andrew Tridgell
af7381e9e0
AP_HAL: added register_io_process()
...
this is used to register a low priority IO task. Used for file IO in
DataFlash_File.cpp
2013-04-17 21:33:50 +10:00
Andrew Tridgell
5df4796b9a
RangeFinder: fixed a warning
2013-04-17 21:33:08 +10:00
Andrew Tridgell
da5a5ea368
DataFlash: added file based 'dataflash' logging
2013-04-17 21:32:53 +10:00
Andrew Tridgell
9d3b32bd27
SITL: change default wind speed to zero
...
makes starting SITL easier for new users
2013-04-17 11:39:43 +10:00
Randy Mackay
b8974dec99
Copter: compass learn off by default
2013-04-16 18:47:39 +09:00
Janne Mäntyharju
7a04fe9915
AP_Baro: Fixed build for APM2 Beta hardware
2013-04-16 11:24:38 +10:00
Randy Mackay
8046fe2cf3
AC_WPNav: increase max accel to 8m/s/s
2013-04-15 21:57:56 +09:00
Randy Mackay
8fe3e689f4
Copter: add WPNAV log message
2013-04-15 21:54:29 +09:00
Randy Mackay
b48864e1ad
Copter: allow CH6 tuning of compass declination
2013-04-15 21:50:44 +09:00
priseborough
9ff0888a17
AP_L1_Control : Fixed potential divide by zero in Nu1 angle calculation
2013-04-15 21:11:30 +10:00
Andrew Tridgell
97bfd16bd1
L1_Control: constrain the roll to handle floating point errors
2013-04-15 14:29:39 +10:00
Andrew Tridgell
83dc7dbc92
AP_Math: handle NaN in constrain(), returning average
...
this makes it less likely a NaN will propogate
2013-04-15 14:28:51 +10:00
Andrew Tridgell
b69481f74d
AP_InertialNav: fixed build of example
2013-04-15 14:09:38 +10:00
Andrew Tridgell
571c48b9d5
L1_Control: cleanup some unused code and variables
2013-04-15 10:52:32 +10:00
priseborough
a423d102e0
Plane : AP_L1_Control : Fix wrong way turn behaviour on loiter entry
2013-04-15 10:52:32 +10:00
Andrew Tridgell
d01d754ba8
HAL_PX4: if we have lost RC input then set channel 3 to 900
...
this allows failsafe to kick in
2013-04-15 10:52:32 +10:00
Andrew Tridgell
181f7368a3
AP_L1_Control: change turn_distance() to be min of wp_radius and L1 distance
...
this gives less surprising behaviour for users
2013-04-15 10:52:32 +10:00
Andrew Tridgell
a4d25f5a82
AHRS: removed AHRS_BARO_USE option
...
this option has caused users too much trouble. The vertical velocity
is too noisy from the baro
2013-04-15 10:52:31 +10:00
Andrew Tridgell
87b0fb05ce
AHRS: changed default RP and YAW gain to 0.3
...
this reduces the impact of hard acceleration on takeoff, and reduces
the impact of GPS lag
Note that this doesn't affect copters, as they override to 0.1
2013-04-15 10:52:31 +10:00
Randy Mackay
0eab3e87b2
AC_WPNav: use prev wp as origin for next wp
2013-04-14 18:27:39 +09:00
Randy Mackay
0351c2ae33
AC_WPNav: allow setting of horizontal velocity
...
Also added accessor function for waypoint radius parameter
2013-04-14 13:24:14 +09:00
Randy Mackay
252e98ec57
AC_WPNav: use global gravity constant
2013-04-14 10:39:32 +09:00
Randy Mackay
0ac3762bdd
AC_WPNav: fix compiler warning
2013-04-14 10:39:26 +09:00
Randy Mackay
9d7d174995
AC_WPNAV: check distance to waypoint within library
...
bug fix for loiter using lat/lon position instead of NED position when
calculating desired velocity towards target
2013-04-14 10:39:21 +09:00
Randy Mackay
35001619f0
AC_WPNav: stop track_desired from moving backwards
2013-04-14 10:39:19 +09:00
Randy Mackay
c6b68c7843
AC_WPNav: Leonard's 3d leash calculator
2013-04-14 10:39:08 +09:00
Randy Mackay
74e1c2e660
AC_WPNav: advance track fixes
2013-04-14 10:39:05 +09:00
Randy Mackay
bc87118062
AC_WPNav: add get_target_alt method
2013-04-14 10:39:00 +09:00
Randy Mackay
6dbcbdcb43
AC_WPNav: limit max loiter position error
...
move interpretation of pilot input to wpnav lib
2013-04-14 10:38:58 +09:00
Randy Mackay
31838b2865
AC_WPNAV: change loiter controllers to use floats
...
in particular get_loiter_pos_lat_lon and get_loiter_accel_lat_lon
2013-04-14 10:38:56 +09:00
Randy Mackay
0ccdce1b22
AC_WPNav: Leonard's ff loiter and 3d wp nav
2013-04-14 10:38:43 +09:00
Randy Mackay
926c404994
AC_WPNav: Leonard's loiter target smoothing
2013-04-14 10:38:39 +09:00
Randy Mackay
f82ce449d7
AC_WPNav: add angle limits and set from AC's throttle controller
2013-04-14 10:38:34 +09:00
Randy Mackay
afd2f82768
AC_WPNav: bug fix for track covered being 2D
...
Replaced abs and fabs with fabsf
Added get_destination method
2013-04-14 10:38:32 +09:00
Randy Mackay
8ec7fd1c9c
AC_WPNav: add set_loiter_target to use velocity
...
Target can be set in front of the copter to reduce the bounce back to
the position where loiter was engaged.
2013-04-14 10:38:25 +09:00
Randy Mackay
fc972e2d42
InertialNav: add get_velocity method
2013-04-14 10:38:23 +09:00
Randy Mackay
3bfcc3b8d0
AC_WPNav: replace get_target_alt with get_destination_alt
2013-04-14 10:38:13 +09:00
Randy Mackay
c40080e76a
AC_WPNav: added set_target_alt
2013-04-14 10:38:04 +09:00
Randy Mackay
60060d8184
AC_WPNav: add get_target_alt
...
Required because waypoint controller will be modified to control
altitude
2013-04-14 10:37:58 +09:00
Randy Mackay
0d70ba1030
AC_WPNav: bug fix to dt calculation
2013-04-14 10:37:51 +09:00
Randy Mackay
39bc3800c9
AC_WPNav: add distance and bearing to target methods
2013-04-14 10:34:50 +09:00
Randy Mackay
b92c4097d2
AC_WPNav: first implementation
2013-04-14 10:34:47 +09:00
Andrew Tridgell
76e20150e9
AP_InertialSensor: ensure parent class is initialised in instance classes
2013-04-12 14:30:35 +10:00
Andrew Tridgell
a5c3051929
AP_GPS: fixed initialisation error in uBlox driver
...
found with valgrind
2013-04-12 14:25:46 +10:00
Andrew Tridgell
dca597cda1
L1_Control: added a comment on speed of the L1 control code
2013-04-12 12:58:20 +10:00
Brandon Jones
a3c2851120
AP_L1_Control: Addition of library for geometry calculations required for L1 Control.
...
1) Explicit control of tracking loop period and damping which removes previous
variation in period with speed and fixed damping ratio
2) Explicit control of track capture angle (now set to 45 degrees by default)
3) Removal of restriction on loiter radius being greater than L1 distance
The circle(loiter) control is a L1 and PD hybrid utilising L1 for waypoint capture and PD control for circle tracking.
Pair-Programmed-With: Paul Riseborough <p_riseborough@live.com.au>
Pair-Programmed-With: Andrew Tridgell <tridge@samba.org>
2013-04-12 12:48:09 +10:00
priseborough
b63d0969b7
AP_AHRS: Addition of a first order complementary filter to AP_AHRS::groundspeed_vector
...
Addition of a complementary filter to estimation of the ground velocity vector for use by the L1-nav
2013-04-12 12:48:09 +10:00
Andrew Tridgell
05ecb8d8fa
AP_AHRS: fixed functions that need to be virtual
...
functions overridden in a child class need to be marked virtual, or
you get the parent class function
2013-04-12 12:48:08 +10:00
Andrew Tridgell
ee81b0f729
AP_AHRS: added wind_correct_bearing() and groundspeed_vector()
...
these are very useful for navigation libraries
2013-04-12 12:48:08 +10:00
Andrew Tridgell
43c3c60de2
AP_Math: moved a lot of vector templates to cpp from .h
...
this reduces the code size quite a lot on AVR
2013-04-12 12:48:08 +10:00
Andrew Tridgell
78eb12a4ac
AP_Math: added RadiansToCentiDegrees and RADIUS_OF_EARTH
2013-04-12 12:48:08 +10:00
Andrew Tridgell
8b119934ea
AP_Math: fixed grammar error
2013-04-12 12:48:08 +10:00
Andrew Tridgell
2d29a6a7be
AP_Math: added Vector2f.angle()
...
useful for calculating the vector in polar coordinates
2013-04-12 12:48:08 +10:00
Andrew Tridgell
f6aacdc768
AP_Navigation: added a navigation controller class
...
the new L1 controller will be a instance of this class. Other
navigation controllers can be added as additional instances
Pair-Programmed-With: Paul Riseborough <p_riseborough@live.com.au>
2013-04-12 12:48:08 +10:00
Randy Mackay
cdb532a594
Copter: bug fix for loiter target
2013-04-11 18:24:20 +09:00
Randy Mackay
86fe79a662
INS: updated MPU6K_FILTER parameter description
2013-04-10 00:14:53 +09:00
tobias
217b8d7a59
cleanup: use const for struct Location pointers and references
...
this allows the compiler to generate more efficient code
2013-04-09 12:10:32 +10:00
Stange Szilard
6516bffbb6
AP_Camera: enable relay off in all builds
2013-04-09 11:38:30 +10:00
Andrew Tridgell
8d992ae615
InertialSensor: added OilPan INS example
2013-04-08 07:07:25 +10:00
Randy Mackay
af13f6795c
INS: switch to global definition of GRAVITY_MSS
...
saves 4 bytes of RAM
2013-04-05 22:57:46 +09:00
Randy Mackay
777c6a308e
AP_InertialNav: use shared GRAVITY_MSS constant
2013-04-05 11:48:41 +09:00
foobarbecue
c07702f46d
Update AP_MotorsOctaQuad.cpp
...
There were two "4"s in the motor test order values. Presumably a typo.
2013-04-05 11:22:56 +09:00
Randy Mackay
739e3c2b9a
Copter: adjust trapezoidal motor mixing
2013-04-04 21:46:11 +09:00
Randy Mackay
e32cbd827b
Copter: replace quad trapezoid frame with V
...
Also update motor mixing
2013-04-03 22:14:29 +09:00
Randy Mackay
5bf55a9523
OpticalFlow: switch order of sin_yaw, cos_yaw
2013-04-02 15:49:31 +09:00
Andrew Tridgell
5667f5d817
AP_ADC: fixed APM1 HIL_SENSORS Ch6() return
2013-04-02 13:20:08 +11:00
Andrew Tridgell
310a5a6be1
DataFlash: don't try to write if no card inserted
2013-04-02 13:08:38 +11:00
Andrew Tridgell
6123ea2dac
PID: added get_pid_4500()
...
this is a version of get_pid() that returns an int16_t constrained to
-4500 to 4500. This will prevent overflow errors for large PID gains
in ArduPlane and Rover
2013-04-01 22:17:04 +11:00
Randy Mackay
6816c45c39
InertialNav: reduce Z-axis time constant to 5
2013-04-01 11:51:12 +09:00
Michael Oborne
541fa13291
cleanup comments
2013-03-31 17:14:54 +08:00
Michael Oborne
2160bf135d
fix sitl segfault in hil
2013-03-31 16:39:15 +08:00
Michael Oborne
87292e0a4a
Init hil accel with gravity
2013-03-31 16:38:48 +08:00
Randy Mackay
39ba406957
Copter: add trapezoid frame type
...
We still need to properly define the motor mixing for the trapezoid
frame in AP_MotorsQuad.cpp
2013-03-31 12:41:02 +09:00
Andrew Tridgell
a093926b04
Revert "RC_Channel: removed pwm_out variable from RC_Channel"
...
This reverts commit 8e4a003d8d
.
It is used by MotorsMatrix
2013-03-29 22:36:29 +11:00
Andrew Tridgell
8e4a003d8d
RC_Channel: removed pwm_out variable from RC_Channel
...
saves 16 bytes
2013-03-29 19:32:52 +11:00
Andrew Tridgell
896fd52aa1
AP_AHRS: fixed functions that need to be virtual
...
functions overridden in a child class need to be marked virtual, or
you get the parent class function
2013-03-29 18:35:10 +11:00
Andrew Tridgell
8459da202c
AP_AHRS: prevents compass flyaways for plane and rover
...
this switches to the GPS for yaw if the compass has dragged us off by
more than 45 degrees from the GPS heading, and the wind speed is less
than 80% of the ground speed.
2013-03-29 13:48:25 +11:00
Andrew Tridgell
091b474a1d
AP_Math: added wrap_360_cd() and wrap_180_cd()
...
moved from per-vehicle code
2013-03-29 13:13:37 +11:00
Andrew Tridgell
0ffc7dab6b
SITL: added GPS speed down to SITL state
2013-03-28 10:29:12 +11:00
Randy Mackay
93f7e61b66
UBLOX GPS: fix MSG_SOL typo
...
"status" was used instead of "solution"
2013-03-27 11:42:05 +09:00
Randy Mackay
27309a553f
GPS: fixes after review
...
Ensure 3D fix before returning velocity_down
UBLOX: restore check of fix_status as part of determining 2D or 3D fix
SIRF: add missing brackets on fix type check
2013-03-27 11:41:54 +09:00
Randy Mackay
24044dc0c4
AHRS: add support for GPS fix type 2D
2013-03-27 11:41:43 +09:00
Randy Mackay
d7454bb09e
GPS: add 2D fix type
2013-03-27 11:41:39 +09:00
Andrew Tridgell
eb6c66af7e
AP_HAL: added gpio->analogPinToDigitalPin() API
2013-03-22 12:31:14 +11:00
Andrew Tridgell
a6b21443c4
HAL_AVR: fixed null termination of vsnprintf()
2013-03-22 11:53:24 +11:00
Andrew Tridgell
91bbf914f7
RangeFinder: added SONAR_ENABLE boolean to analog sonar object
2013-03-22 07:52:51 +11:00
Andrew Tridgell
7e58bde826
GCS_MAVLink: added comm_is_idle() function
...
this will make CLI detection more reliable
2013-03-21 21:55:12 +11:00
Andrew Tridgell
6ddb99a50b
HAL_PX4: create APM/boot.log on SD card
...
useful for debugging
2013-03-21 15:05:21 +11:00
Andrew Tridgell
cc932973d6
HAL_PX4: remove the need for the fmu_only flag file
2013-03-21 15:05:21 +11:00
Andrew Tridgell
3f6eb87f23
AP_GPS: fixed uBlox Debug() macro
2013-03-20 15:42:07 +11:00
Andrew Tridgell
8766e86091
HAL_PX4: fixed blocking bulk writes to UARTs
...
this fixes a problem with uBlox initialisation on PX4
2013-03-20 15:41:52 +11:00
Andrew Tridgell
14911eff6c
HAL_PX4: added a (disabled) trick for handling blocking ttyACM0
...
this doesn't work yet, but is worth having for debugging
2013-03-20 11:20:43 +11:00
Randy Mackay
38e81adae0
InertialNav: remove unnecessary "virtual" from function definitions
...
This saves about 30bytes of RAM
2013-03-19 17:51:16 +09:00
Andrew Tridgell
93fc9c48e5
HAL_PX4: fixed startup bug in fmu_only mode
2013-03-19 07:57:13 +11:00
Christopher Hrabia
744f610409
RangeFinder_I2C: fixed bug with interchanged min max values
...
- add usage of mode-filter and min-max constrain, similar to MaxsonarXL
2013-03-18 14:28:31 +09:00
Christopher Hrabia
9760cdf2d7
Compass: corrected space
2013-03-18 14:27:49 +09:00
Andrew Tridgell
ba8ba36af4
HAL_AVR: fixed build.Examples in autotest
2013-03-18 14:01:21 +11:00
Andrew Tridgell
ac69a531d3
HAL_PX4: workaround problem with APM file on SD card
...
this works around file redirection bug from earlier firmwares
2013-03-18 13:12:17 +11:00
Andrew Tridgell
551950c573
GPS_UBLOX: fixed auto-config of baudrate
...
this fixes the setting of the baudrate on a uBlox that is configured
for 9600. It fixes the NMEA message to have a \r\n, plus sends the
NAV_SOL rate config before the NMEA baudrate config message.
This fixes issue #159
2013-03-17 17:52:48 +11:00
Randy Mackay
c9571ad543
InertialNav: remove 3sec limit on position est after losing GPS
2013-03-16 18:15:59 +09:00
Andrew Tridgell
6a1aad30f1
HAL_PX4: auto-create APM directory on SD card
2013-03-16 19:47:09 +11:00
Andrew Tridgell
7681f3b639
AP_HAL: update AnalogIn example to show voltages not raw values
2013-03-15 08:39:22 +11:00
Andrew Tridgell
c1c967f3bf
DataFlash: fixed test sketch build and run
2013-03-15 07:30:40 +11:00
Andrew Tridgell
a7541e9ad3
DataFlash: report log number when starting a new log
...
helps with test sketch
2013-03-15 07:30:23 +11:00
Andrew Tridgell
ba8d830754
DataFlash: start to fix example build
2013-03-11 13:02:08 +11:00
John Arne Birkeland
9487eb6c1b
Examples: Improved compatibility with Mission Planner serial terminal (CLI)
2013-03-09 15:02:56 +11:00
Andrew Tridgell
26fedc543c
AP_Mount: fixed scaling of the joystick speed to give better control
...
thanks to Chris Miser for reporting this problem
2013-03-08 14:39:32 +11:00
Andrew Tridgell
00e905b025
AP_Airspeed: use new voltage_average() API in Airspeed driver
2013-03-08 10:01:15 +11:00
Andrew Tridgell
bf1944a36d
AP_ADC_AnalogSource: fixed reference scaling for APM1 Ch6 ADC
...
it is not referenced to Vcc
2013-03-08 09:06:40 +11:00
Andrew Tridgell
2fc922a251
AP_Rangefinder: use voltage_average() interface for generic analog rangefinder
2013-03-08 08:27:18 +11:00
Andrew Tridgell
ce46f2f871
AP_ADC: fixed scaling factor for voltage on APM1 Ch6 ADC
2013-03-08 08:26:54 +11:00
Randy Mackay
b8d492b504
Compass: current based compensation added
2013-03-03 23:02:12 +09:00
Andrew Tridgell
16270ccc47
HAL_AVR_SITL: fixed windows build
2013-03-03 22:22:19 +11:00
Andrew Tridgell
3e2cb92c71
AP_ADC_AnalogSource: added voltage_average() interface
2013-03-03 16:16:01 +11:00
Andrew Tridgell
b1c27407a2
AP_HAL: added voltage_average() interface to AnalogIn
...
returns voltage in Volts, using averaged reading over samples.
Where possible this should be auto-scaled against a known reference
voltage
2013-03-03 16:16:01 +11:00
Randy Mackay
e113eb526b
Compass: add get_motor_compensation
...
Remove redundant set_motor_compensation call
2013-03-02 17:53:03 +09:00
Andrew Tridgell
987cdaf3e1
DataFlash: make it safe to do DataFlash logging from timers
...
this uses a non-blocking semaphore take if we are in a timer
process. Useful for logging failsafe events
2013-03-02 17:42:06 +11:00
Randy Mackay
bfb29ce22b
Compass: remove virtual functions to save RAM
2013-03-02 00:07:32 +09:00
Randy Mackay
886725291c
Compass: enable motor compensation for 1280
...
Expand motor compenstion vector's range limit
2013-03-02 00:03:29 +09:00
Randy Mackay
8093c98cd3
Compass: add motor compensation to HIL library
2013-03-02 00:03:24 +09:00
Randy Mackay
d8515ff85e
Compass: basic compensation for motor interference
2013-03-02 00:03:16 +09:00
John Arne Birkeland
fc566096de
AVR HAL: RCJitterTest example
...
Used to test jitter on the PPM R/C input system.
2013-03-01 23:38:30 +09:00
Randy Mackay
318a831b57
INS: set default filter to 20hz for APM2.x and PX4
2013-03-01 19:35:34 +09:00
Andrew Tridgell
cbdeb20dad
MAVLink: rebuilt with new RANGEFINDER message
2013-03-01 12:01:31 +11:00
Andrew Tridgell
44768c911f
MAVLink: added RANGEFINDER message
2013-03-01 11:59:40 +11:00