Commit Graph

4622 Commits

Author SHA1 Message Date
Andrew Tridgell
90cd04def3 AP_NavEKF: fixed build for non-Linux 2014-02-15 05:27:53 +11:00
Andrew Tridgell
0b71618f4f AP_NavEKF: use vectorN to make indexes safe 2014-02-15 05:27:53 +11:00
Andrew Tridgell
e972acbc9f AP_NavEKF: removed delay callback 2014-02-15 05:27:53 +11:00
Andrew Tridgell
8f16647a0c AP_NavEKF: added write_flot valgrind functions 2014-02-15 05:27:53 +11:00
Andrew Tridgell
a8ddd51355 AP_NavEKF: added pause to gnuplot scripts 2014-02-15 05:27:53 +11:00
Andrew Tridgell
4298625daf AP_NavEKF: added convenient plotting scripts 2014-02-15 05:27:53 +11:00
Paul Riseborough
fca1090694 AP_NavEKF: debug updates 2014-02-15 05:27:53 +11:00
Andrew Tridgell
95f51123d7 AP_NavEKF: added plot.dat output 2014-02-15 05:27:53 +11:00
Andrew Tridgell
050b0fb9f1 AP_NavEKF: fixed compass declination, baro cal and time shift
now runs much faster
2014-02-15 05:27:53 +11:00
Andrew Tridgell
776cedf368 AP_NavEKF: try running EKF on log data 2014-02-15 05:27:52 +11:00
Andrew Tridgell
ffce1f64cc AP_NavEKF: added euler angle functions 2014-02-15 05:27:52 +11:00
Andrew Tridgell
977ad4bbf6 AP_NavEKF: added dataflash log reader
this gives log playback into HIL
2014-02-15 05:27:52 +11:00
Andrew Tridgell
f3dfde2025 AP_NavEKF: initial test sketch for NavEKF 2014-02-15 05:27:52 +11:00
Paul Riseborough
361bb5b18f AP_NavEKF: Updated comments in header file 2014-02-15 05:27:52 +11:00
Paul Riseborough
00df068967 AP_NavEKF: Explicitly defined numerical constants as single precision using f suffix 2014-02-15 05:27:52 +11:00
Andrew Tridgell
eb505eef91 AP_NavEKF: fixed build for APM environment 2014-02-15 05:27:52 +11:00
Paul Riseborough
0dd5463e77 AP_NavEKF : Changed file and variable names 2014-02-15 05:27:52 +11:00
Paul Riseborough
1e993d2ef5 AP_NavEKF: Added constructor for measurements 2014-02-15 05:27:52 +11:00
Paul Riseborough
4a7f81e50a AP_NavEKF: Corrected height update timeout error 2014-02-15 05:27:51 +11:00
Paul Riseborough
0f3ebb8e31 AP_NavEKF: Updated measurement fusion control 2014-02-15 05:27:51 +11:00
Paul Riseborough
c557bd7df5 AP_NavEKF: Updated GPS input processing 2014-02-15 05:27:51 +11:00
Paul Riseborough
1d4b040c67 AP_NavEKF: Inertial Navigation Code - 24 State EKF
initial version converted from matlab
2014-02-15 05:27:51 +11:00
Andrew Tridgell
03cc777991 AP_Airspeed: added last_update_ms() interface 2014-02-15 05:27:51 +11:00
Andrew Tridgell
e7cf07dfb7 DataFlash: added Columns column to FMT 2014-02-15 05:27:51 +11:00
Andrew Tridgell
1e0f3f5398 AP_Math: make to_euler() const 2014-02-15 05:27:51 +11:00
Andrew Tridgell
90c41981ac AP_Math: added quaternion normalization 2014-02-15 05:27:51 +11:00
Randy Mackay
9e31f0b985 AC_WPNav: use PosControl accessor
Saves 2bytes of RAM
2014-02-15 05:27:50 +11:00
Randy Mackay
78c12eaebf AC_PosControl: get_pos_xy_kP accessor method 2014-02-15 05:27:50 +11:00
Randy Mackay
8d6eb1eceb MotorsMatrix: motor_to_channel_map moved to progmem 2014-02-15 05:27:50 +11:00
Randy Mackay
134289af38 TradHeli: motor_to_channel_map moved to progmem 2014-02-15 05:27:50 +11:00
Randy Mackay
1bee56877c CoaxCopter: motor_to_channel_map moved to progmem 2014-02-15 05:27:50 +11:00
Randy Mackay
3fad8e3630 SingleCopter: motor_to_channel_map moved to progmem 2014-02-15 05:27:50 +11:00
Randy Mackay
0edf039155 AP_MotorsTri: motor_to_channel_map moved to progmem 2014-02-15 05:27:50 +11:00
Randy Mackay
96d433c63e AP_Motors: motor_to_channel_map moved to progmem 2014-02-15 05:27:50 +11:00
Randy Mackay
8baf5ebf4a AC_AttControlHeli: use motor accessors to set roll, pitch, yaw, thr 2014-02-15 05:27:49 +11:00
Randy Mackay
f216cffb77 AC_AttControl: use motor accessors to set roll, pitch, yaw, thr
Saves 8bytes of RAM
2014-02-15 05:27:49 +11:00
Randy Mackay
415e48de19 TriCopter: use refs for all RC_Channels 2014-02-15 05:27:49 +11:00
Randy Mackay
01d30271d8 SingleCopter: use refs for all RC_Channels 2014-02-15 05:27:49 +11:00
Randy Mackay
18d3907928 TradHeli: use refs for all RC_Channels 2014-02-15 05:27:49 +11:00
Randy Mackay
cf1d6854b9 AP_MotorsMatrix: use ref for roll, pitch, yaw, thr channels 2014-02-15 05:27:49 +11:00
Randy Mackay
2f4fe3e192 AP_Motors: accessors to set roll, pitch, yaw, throttle
This saves 16bytes of RAM and slightly reduces the dependence upon the
RC_Channel class as the interface.
2014-02-15 05:27:49 +11:00
Randy Mackay
98224db1e4 AC_AttControl: Leaonard's rate feedforward
Also saves 24bytes of RAM
2014-02-15 05:27:49 +11:00
Randy Mackay
2c6470f87b AP_MotorsMatrix: remove unused _num_motors
Saves 1 byte of RAM
2014-02-15 05:27:49 +11:00
Randy Mackay
32a0992985 MatrixMotors: motor_out array made local 2014-02-15 05:27:48 +11:00
Randy Mackay
2f3fc3a3ce Single: remove use of motor_out array
Also allow fins to move when throttle at zero
2014-02-15 05:27:48 +11:00
Randy Mackay
a036009524 AP_MotorsTri: motor_out array made local 2014-02-15 05:27:48 +11:00
Randy Mackay
83321b8786 AP_Motors: remove motor_out array
Saves 16bytes of RAM
2014-02-15 05:27:48 +11:00
Randy Mackay
5f89e9e746 AC_AttControl: bug fix to yaw rate limit 2014-02-15 05:27:48 +11:00
Randy Mackay
d76180d605 AC_AttControl: use trig values from ahrs 2014-02-15 05:27:48 +11:00
Randy Mackay
8b8d6a8e01 AC_PosControl: use trig values from ahrs 2014-02-15 05:27:48 +11:00
Randy Mackay
598a1b1f43 AC_Circle: use trig values from ahrs 2014-02-15 05:27:48 +11:00
Randy Mackay
64cfcb2308 AC_WPNav: use trig values from ahrs 2014-02-15 05:27:48 +11:00
Randy Mackay
082c5021ee AC_AttControlHeli: add comments 2014-02-15 05:27:47 +11:00
Randy Mackay
17177adccf AC_Circle: remove debug comment 2014-02-15 05:27:46 +11:00
Randy Mackay
37cfbc9ad5 AP_Math: float versions of wrap_360 and wrap_180 2014-02-15 05:27:45 +11:00
Randy Mackay
a7504faa7d TradHeli: empty angle_boost for trad heli 2014-02-15 05:27:44 +11:00
Randy Mackay
80ec61f217 TradHeli: make accessor methods const 2014-02-15 05:27:43 +11:00
Randy Mackay
48a0917670 Copter: make motors armed call const 2014-02-15 05:27:43 +11:00
Randy Mackay
eda376c7f6 AC_AttControl: init_targets() clears body frame angle errors
This should ensure that we don't get sudden jerks when entering acro
mode
2014-02-15 05:27:43 +11:00
Randy Mackay
2643ee9724 AC_AttControl_Heli: adjust for new slew_yaw param 2014-02-15 05:27:43 +11:00
Randy Mackay
2db24659d0 AC_AttControl: add slew_yaw 2014-02-15 05:27:42 +11:00
Randy Mackay
959f5ec3b2 AC_AttControl: tradheli add RATE_RP_MAX 2014-02-15 05:27:42 +11:00
Randy Mackay
2dae0d68c5 AC_AttControl: add RATE_RP_MAX, RATE_Y_MAX params
These replace the ANGLE_RATE_MAX parameter from the main code
2014-02-15 05:27:42 +11:00
Randy Mackay
c2efb91ece AC_AttControl: trad heli angle boost 2014-02-15 05:27:42 +11:00
Randy Mackay
ebbff24a04 AC_AttControl: trad heli yaw 2014-02-15 05:27:42 +11:00
Randy Mackay
4f738ffdba AC_AttControl: add trad heli support 2014-02-15 05:27:42 +11:00
Randy Mackay
551836c49d AC_PosControl: make some methods const 2014-02-15 05:27:40 +11:00
Randy Mackay
a2b017abd2 AC_AttControl: add rateef_rpy
rateef_rpy takes earth frame rates and applies them to the earth frame
angle targets and then converts them to body frame rates
2014-02-15 05:27:40 +11:00
Randy Mackay
468be05867 AC_AttControl: make ahrs, ins objects const 2014-02-15 05:27:40 +11:00
Randy Mackay
864f64b61a AC_Circle: circle control library 2014-02-15 05:27:40 +11:00
Randy Mackay
35ef9c73d1 AC_Sprayer: minor comment fix 2014-02-15 05:27:40 +11:00
Randy Mackay
4c02212404 AC_Fence: minor comment fix 2014-02-15 05:27:39 +11:00
Randy Mackay
d4e4620159 AC_WPNav: remove unused PID references 2014-02-15 05:27:39 +11:00
Randy Mackay
26b257c8ba AC_AttControl: alternative get_stopping_point_z 2014-02-15 05:27:39 +11:00
Randy Mackay
fc427967ae AC_WPNav: set wp origin to horiz and vert stopping point
Also bug fix to set pos_control's down speed as a negative number
2014-02-15 05:27:39 +11:00
Randy Mackay
1b8791a142 AC_PosControl: remove debug 2014-02-15 05:27:39 +11:00
Randy Mackay
4cd45e2edf AC_WPNav: remove debug 2014-02-15 05:27:38 +11:00
Randy Mackay
4003b4da9b AC_AttControl: leonard's body frame rate controller 2014-02-15 05:27:38 +11:00
Randy Mackay
171203370f AC_PosControl: add accessor for speed_up and down 2014-02-15 05:27:37 +11:00
Randy Mackay
1596d83d02 AC_WPNav: move leashes to AC_PosControl 2014-02-15 05:27:37 +11:00
Randy Mackay
de34359808 AC_PosControl: recalculate leash when speed or accel modified 2014-02-15 05:27:37 +11:00
Randy Mackay
ba3ba9e157 AC_AttControl: bug fix for yaw target handling 2014-02-15 05:27:37 +11:00
Randy Mackay
0d4ba04e75 AC_WPNav: make advance_wp_target private 2014-02-15 05:27:37 +11:00
Randy Mackay
80ae3dca2e AC_PosControl: remove debug 2014-02-15 05:27:36 +11:00
Randy Mackay
b9ae3ce2ff AC_PosControl: fixed example sketch 2014-02-15 05:27:36 +11:00
Randy Mackay
0c8cbba644 AC_WPNav: remove xy pos controller 2014-02-15 05:27:36 +11:00
Randy Mackay
9fe4d883d0 AC_AttControl: accessor for lean angle max 2014-02-15 05:27:35 +11:00
Randy Mackay
bbcf8cc84c AC_PosControl: add horizontal pos control 2014-02-15 05:27:35 +11:00
Randy Mackay
2984e492df AC_WPNav: add reference to AC_PosControl
Also remove requirement to pass in inertial nav position and velocity to
init_loiter method
2014-02-15 05:27:35 +11:00
Randy Mackay
0e0a15f4a8 AC_AttControl: add high level angle controllers 2014-02-15 05:27:35 +11:00
Randy Mackay
3ce1c0a9d5 AC_PosControl: add get_alt_error method 2014-02-15 05:27:34 +11:00
Randy Mackay
a0298aee29 AP_Motors: expose throttle min and max 2014-02-15 05:27:34 +11:00
Randy Mackay
89b7e6b1c8 AC_AttControl: implement angle_boost 2014-02-15 05:27:34 +11:00
Randy Mackay
8988b48ad8 AC_PosControl: add init take-off 2014-02-15 05:27:34 +11:00
Randy Mackay
dcac124105 AC_PosControl: add throttle controller 2014-02-15 05:27:33 +11:00
Randy Mackay
05bb943a69 AC_AttControl: first draft of PosControl class 2014-02-15 05:27:33 +11:00
Randy Mackay
b7565affcd INS: add support for 400hz for PX4 2014-02-15 05:27:33 +11:00
Randy Mackay
0521806cc6 AP_Vehicle: add multicopter parameters 2014-02-15 05:27:32 +11:00
Randy Mackay
715c8eaf02 AC_AttitudeControl: first draft of library 2014-02-15 05:27:32 +11:00
Andrew Tridgell
d853d65b84 AP_Airspeed: added ARSPD_TUBE_ORDER parameter
This allows for either order of tube connection by default, but the
order can be specified if need be
2014-02-15 05:12:15 +11:00
Andrew Tridgell
bea0a46410 AP_HAL: added servorail_voltage and power_status_flags() API on AnalogIn 2014-02-15 05:00:09 +11:00
Andrew Tridgell
ce43e674fe DataFlash: added power status logging 2014-02-15 05:00:09 +11:00
Andrew Tridgell
87355127ca GCS_MAVLink: added send_power_status() 2014-02-15 05:00:09 +11:00
Andrew Tridgell
8797f38038 GCS_MAVLink: regenerate MAVLink headers 2014-02-15 05:00:08 +11:00
Andrew Tridgell
0cbd5a2ef0 GCS_MAVLink: added POWER_STATUS message 2014-02-15 05:00:08 +11:00
Andrew Tridgell
63910bf8cd DataFlash: work around a NuttX bug
the seek offset of files can get badly mucked up when it crosses
cluster boundaries. We need to fix this in NuttX, but meanwhile this
works around the bug. It seems that doing a lseek(fd, 0, SEEK_CUR)
fixes the seek offset in the file.

The bug seems to first happen at an offset of 315392. It also
doesn't happen every time - it is more likely to happen on the first
log download after booting
2014-02-15 05:00:08 +11:00
Andrew Tridgell
0aebc18b3f GCS_MAVLink: return early from log send if no log data to send 2014-02-14 21:51:00 +11:00
Andrew Tridgell
1497c33178 GCS_MAVLink: run a bit faster on serial ports with flow control
with flow control we can afford to push the radio a bit harder
2014-02-14 21:51:00 +11:00
Andrew Tridgell
7c1b9b344f AP_HAL: added get_flow_control() API 2014-02-14 21:51:00 +11:00
Andrew Tridgell
81c5edbdb5 GCS_MAVLink: fixed a log download bug for repeated downloads
we were not resetting the offset to 0 correctly
2014-02-14 21:50:59 +11:00
Andrew Tridgell
dcd7f9d26d AP_Airspeed: use raw (signed) airspeed
this allows us to detect when the user has the ports the wrong way
around, and mark the sensor unhealthy
2014-02-14 21:50:59 +11:00
Andrew Tridgell
1849db7074 AP_HAL: added board_voltage AnalogIn method
this makes it easier to get the board voltage from any library,
without having to allocate another analog channel object
2014-02-14 21:25:38 +11:00
Andrew Tridgell
4e2e685d7a HAL_PX4: better fix for IFLOW on all ports
the tcsetattr() call fails to apply the baudrate if the port has no
RTS pin and we ask for IFLOW. So just make a separate call.
2014-02-12 17:47:23 +11:00
Andrew Tridgell
b2cdd39a99 HAL_PX4: don't enable IFLOW on ports without flow control
this should have been harmless, but breaks the GPS on Pixhawk. This
disables it until we work out why.
2014-02-12 17:32:07 +11:00
Andrew Tridgell
35791e1f05 AP_Airspeed: fixed get_temperature on PX4 2014-02-12 13:46:15 +11:00
Andrew Tridgell
ccb7dc640d AP_HAL: fixed a build warning 2014-02-12 10:51:58 +11:00
Andrew Tridgell
c93794999e HAL_PX4: remove an old conditional define 2014-02-11 15:58:25 +11:00
Andrew Tridgell
8095eb0bee AP_BoardConfig: added BRD_SAFETYENABLE option
this allows the safety switch to be disabled on startup
2014-02-11 15:58:25 +11:00
Andrew Tridgell
439a075b30 AP_HAL: added force_safety_off rcoutput function
this forces the safety switch off, enabling PWM on the IO board
2014-02-11 15:58:25 +11:00
Dan Neault
262d384025 Coax: Yaw fix
Was using _rc_yaw servo_out instead of pwm_out to modify motors.
Corrected and less touchy in Yaw
2014-02-11 11:05:02 +09:00
Andrew Tridgell
fce464597a AP_BoardConfig: PX4v1 does not have hw flow control on UART5 2014-02-11 12:11:26 +11:00
Andrew Tridgell
1b5d5dd8c4 AP_BoardConfig: set flow control to AUTO by default 2014-02-11 12:11:26 +11:00
Andrew Tridgell
c5c1d1358a HAL_PX4: added automatic hardware flow control detection
this allows us to detect if hardware flow control is not available and
automatically disable it
2014-02-11 12:11:26 +11:00
Randy Mackay
a0369b85d1 LowPassFilter: make methods non-virtual
No classes inherit from this class so no need for set_cutoff_frequency,
set_time_constant and reset(T) to be declared virtual.  Saves 6 bytes of
RAM.
2014-02-10 20:47:05 +09:00
Randy Mackay
38222d65e9 DerivativeFilter: update and slope non-virtual
No classes inherit from DerivativeFilter so no need to be virtual.
Saves 4bytes of RAM.
2014-02-10 20:47:02 +09:00
Randy Mackay
4040be9990 FilterWithBuffer: make get_sample non-virtual
virtual added to apply() and reset() declaration inline with base class.
This should have no impact on memory usage or functionality
2014-02-10 20:47:00 +09:00
Randy Mackay
6cee33b6fd AP_Curve: remove virtual from method declarations 2014-02-10 17:28:11 +09:00
Randy Mackay
4c38999ca6 Maxsonar Test: remove raw from output to user 2014-02-10 15:00:08 +09:00
Randy Mackay
e1fabadd3c MaxsonarI2C: read method returns int16_t 2014-02-10 14:59:46 +09:00
Randy Mackay
ab22d11110 MaxsonarRFinder: convert_raw returns int16_t 2014-02-10 14:59:27 +09:00
Randy Mackay
32820b4260 PulsedLightRFinder: read method returns int16_t 2014-02-10 14:58:27 +09:00
Randy Mackay
bf3fa8b99b RangeFinder: remove raw_value from SharpGP2Y 2014-02-10 14:57:17 +09:00
Randy Mackay
8d54e50897 RangeFinder: remove raw_value, orientation variables
This saves 10bytes of RAM
2014-02-10 14:56:52 +09:00
Randy Mackay
d19b566d97 OptFlow: remove unused variables
Saves 24bytes RAM by removing several static variables that were used
only for internal calculations
2014-02-10 13:53:49 +09:00
Andrew Tridgell
b907263685 AP_BoardConfig: added BRD_SER1_RTSCTS and BRD_SER2_RTSCTS
used to enable flow control on telemetry ports
2014-02-10 12:57:19 +11:00
Andrew Tridgell
3e637ac5d9 AP_HAL: added enable_flow_control() option in AP_HAL 2014-02-10 12:54:50 +11:00
Randy Mackay
c9415a08f1 AC_WPNav: use ahrs trig values 2014-02-08 18:16:47 +09:00
Randy Mackay
98d667c916 AHRS_HIL: call update_trig 2014-02-08 18:16:44 +09:00
Randy Mackay
6946d68318 AHRS_DCM: call update_trig 2014-02-08 18:16:42 +09:00
Randy Mackay
3dc6ea682c AHRS: add update_trig
Calculates helper trig values including cos_roll, cos_pitch
2014-02-08 18:16:39 +09:00
Andrew Tridgell
a95a3142e0 AP_InertialSensor: use fixed size arrays
apparently helps SITL build on MacOS
2014-02-08 19:32:26 +11:00
Bill Bonney
82ea5926a8 OptFlow: update function added to fix compiler error 2014-02-08 11:53:04 +09:00
Randy Mackay
14409ee20f Copter: disable aux channels used for motors 2014-02-07 22:04:27 +09:00
Randy Mackay
7c25247c87 Copter: disable aux channel 7 for SingleCopter
Move servo range setup to AP_MotorsSingle
2014-02-07 22:04:26 +09:00
Randy Mackay
9b594dc5e1 Copter: disable aux channel ch7 for Tri 2014-02-07 22:04:24 +09:00
Randy Mackay
1426078cdb TradHeli: disable aux channels 7 and 8 2014-02-07 22:04:23 +09:00
Paul Riseborough
bc311542ab AP_TECS : Fixed bug preventing accel launch detection when not using AS sensor 2014-02-07 19:20:54 +11:00
Dneault
5213ec4aa6 Coax: servos to ch1, ch2, motors to ch3, ch4 2014-02-07 12:36:19 +09:00
Randy Mackay
f60d94c4ab Coax: remove unused servo3, servo4
Removed commented out code
2014-02-07 12:36:06 +09:00
Dneault
f48e106271 Copter: add coax heli support
Motors should be attached to RCOutputs 1 and 2, Flaps should be connected
to RC outputs 3 and 4
2014-02-07 12:36:04 +09:00