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