Commit Graph

4665 Commits

Author SHA1 Message Date
Andrew Tridgell 0313d106a0 ArduBoat: removed use of analogRead() 2012-07-01 15:09:39 +10:00
Andrew Tridgell 2bd5cd3b9a AnalogSource: added some example code 2012-07-01 15:01:05 +10:00
Andrew Tridgell 0341e0e5f0 SITL: added support for new analog source
removed analogRead() to prevent people using it
2012-07-01 15:01:05 +10:00
Andrew Tridgell e791cad9ef AnalogSource: convert analogRead() calls to the new API
this should give us much better analog values, plus save a bunch of
CPU time
2012-07-01 15:01:05 +10:00
Andrew Tridgell 2046e396a2 AnalogSource: make the Arduino AnalogSource interrupt driven
this fixes several problems with reading analog sources:

 - we were getting poor values because we didn't wait long enough for
   an analog source to settle

 - we wasted a lot of CPU cycles waiting for conversions

 - we were not taking averages over many samples, which we did with
   the old AP_ADC driver on the APM1
2012-07-01 15:01:05 +10:00
rmackay9 9624f8c179 ArduCopter: updated STABILIZE_ROLL_I to 0.01 (was 0.1) as instructed by Marco 2012-06-30 19:26:14 +09:00
Jason Short 60cdbe771c Circle_WP distance check fix 2012-06-29 21:20:28 -07:00
Jason Short d448ea23e6 Commands.pde: increased bad WP distance check 2012-06-29 21:20:28 -07:00
Jason Short d893cde785 navigation.pde : Added a drag/velocity prediction filter for improved I term wind correction. 2012-06-29 21:20:28 -07:00
Jason Short 59181eab3d System.pde: Toy mode details for set_mode() 2012-06-29 21:20:28 -07:00
Jason Short 7178da3538 GCS_Mavlink: added notes to #if malink10 2012-06-29 21:20:28 -07:00
Jason Short 49243bc206 defines.h: Toy Mode defines for flight modes 2012-06-29 21:20:28 -07:00
Jason Short 40e0d88d12 Config.h: Optimizing Nav gains 2012-06-29 21:20:28 -07:00
Jason Short bcf6c03157 Attitude.pde: Toy mode logic 2012-06-29 21:20:27 -07:00
Jason Short 146a4b021f Arducopter.pde: Added Toy mode refinements 2012-06-29 21:20:27 -07:00
Jason Short eb06320559 Params: Added toy_yate_rate 2012-06-29 21:20:27 -07:00
Jason Short 57b75736ce Added Toy mode to navigation 2012-06-29 21:20:27 -07:00
Jason Short c830ab6ded Aeducopter.pde: Toy mode updates 2012-06-29 21:20:27 -07:00
Adam M Rivera d399143498 commands_process.pde: Bug fix 427. By default, the copter would land after an AUTO mission. Updated to check for valid approach altitude at end of mission. 2012-06-29 21:41:56 -05:00
Andrew Tridgell b5aa821071 AHRS: include the P terms in get_gyro()
this makes it more useful for navigation controllers
2012-06-29 21:54:09 +10:00
Andrew Tridgell 02b9ea4dfe MPU6k: removed an unused variable 2012-06-29 21:54:09 +10:00
Andrew Tridgell 1cb96e14a9 SITL: enable the SIM_* parameters in ArduCopter and ArduPlane 2012-06-29 15:10:52 +10:00
Andrew Tridgell 117bae9585 SITL: added SITL class for controlling simulation
this holds mavlink settable parameters for controlling sensor noise
levels
2012-06-29 15:10:51 +10:00
Andrew Tridgell 37494dda2b AHRS: don't add the P terms in _omega
this can lead feedback via the _P_gain()
2012-06-29 15:10:51 +10:00
Adam M Rivera 44ce8fc4bc ArduCopter: Loiter Timer should have been set when the approach altitude was set. Previously, land had to be enabled before auto approach would work. 2012-06-28 20:34:53 -05:00
Andrew Tridgell 21ae2957fb AHRS: disable barometer for vertical acceleration
this seems to have been the cause of the 'flips' seen by Marco and
others. Testing by Craig and Alan shows that the flips are gone when
the barometric acceleration is removed.

It looks like a 5 point average filter is not enough to keep the
vertical acceleteration noise low. With high noise in the z axes, the
x and y axes are scaled back when the ge vector is normalised.
2012-06-28 11:12:49 +10:00
Andrew Tridgell e531061caa AHRS: re-instate new DCM drift correction code
This reverts commit 078489638d47fbaffde7c51249e36b5a8fc4ef9d.
2012-06-28 11:09:22 +10:00
Pat Hickey 2d71a2affc Autotest: use mktemp instead of tempfile
* tempfile has been deprecated in favor of mktemp on debian, not available
  on fedora
2012-06-27 14:28:22 -07:00
Michael Oborne 4e7fe5ec5c APM Planner 1.1.94
Fix Issue 668 - typo
Fix issue 666 - now defaults to mav 1.0 planner
Fix Issue 665 - mavlink 1.0 is now default
Fix Issue 663 - increase timeout from 6 seconds to 12 seconds
Fix Issue 662 - now reads sat count for mav 1.0
Partial Issue 654 - added current to status, hud still wip
Fix Issue 648 - add validation to value
Fix Issue 638 - add delay
Fix Issue 636 - check for version.txt in app directory
Fix config panel null bug
Add more Ardurover config options
Add Exceptions handling to video format selection
Add FORMAT_VERSION to param file ignore list
Fix NOTE param file line
Add APMRover hidden firmware upload (control-R) on firmware screen.
fix possible speach engine exception
add dataflashlog for apmrover
2012-06-27 20:46:17 +08:00
Michael Oborne f86f5dc025 firmware build 2012-06-27 19:10:43 +08:00
Andrew Tridgell 8600ad8d7f AHRS: revert to the old drift correction algorithm
we need to work out why Craigs quad flipped today before we enable
this new drift correction
2012-06-27 18:16:41 +10:00
Andrew Tridgell 70bfacc350 SITL: removed an unused variable 2012-06-27 16:01:50 +10:00
Andrew Tridgell 57579e494b Barometer: fixed airstart for APM
we need to re-load the ground pressure and temperature from eeprom on
and airstart
2012-06-27 16:01:50 +10:00
Andrew Tridgell ce016b5ae8 AHRS: include P term in omega
thanks to Jon for suggesting this
2012-06-27 16:01:50 +10:00
Andrew Tridgell 0fa1f29cf3 AHRS: implement spin rate limits
this follows the method that Bill developed in his fastRotations
paper. We've demonstrated that this is indeed needed in APM, as we
were able to produce the 'dizzy' effects in both the ArduPlane and
ArduCopter simulator
2012-06-27 16:01:50 +10:00
Andrew Tridgell 3ffecc18d8 AHRS: cope with copters with no compass
if a copter doesn't have a compass, we can't use the GPS for gyro
drift correction
2012-06-27 16:01:50 +10:00
Andrew Tridgell 69512ea0ea Rover: a rover moves along its X axis
this allows a rover to work without a compass for yaw control
2012-06-27 16:01:50 +10:00
Andrew Tridgell 3458962184 GPS: test the more modern MTK16 2012-06-27 16:01:50 +10:00
Andrew Tridgell 426006d98f SITL: fixed GPS heading in simulated UBlox
longitude scale does not apply to velocity->heading conversions
2012-06-27 16:01:50 +10:00
Andrew Tridgell 20c1baf585 SITL: changes UBlox simulation to 5Hz
this matches the real UBlox driver
2012-06-27 16:01:50 +10:00
Andrew Tridgell 624fdda89c autotest: switch to full accel modelling in multicopter simulation
the new AHRS code should allow for centripetal compensation in
multicopters
2012-06-27 16:01:50 +10:00
Andrew Tridgell 69e68783d3 ArduTracker: update for new compass interface 2012-06-27 16:01:50 +10:00
Andrew Tridgell d497d0a0a1 Rover: updates for new compass interface 2012-06-27 16:01:50 +10:00
Andrew Tridgell 7883c4a545 ACM: ArduCopter updates for new compass interface 2012-06-27 16:01:50 +10:00
Andrew Tridgell 44b7d94b1c APM: ArduPlane updates for new compass interface 2012-06-27 16:01:50 +10:00
Andrew Tridgell d9583ae5eb Compass: remove the need to call calculate() on the compass object
the new AHRS code doesn't use calculate() and the compass.heading
attribute. Instead it works on the raw magnetometer vector. This
change removes the internal calculate state from the compass object
and instead adds calculate_heading() for use by older code that
doesn't go via AHRS.

This significantly reduces the calculation involved in compass updates

The null offsets enable/disable code is also removed, as it is not
needed now that compass offsets are not linked to the AHRS state.
2012-06-27 16:01:50 +10:00
Andrew Tridgell 5370f9c411 AHRS: normalize the ge vector in drift correction, and use barometer
The normalisation ensures the error term scales uniformly with
different accelerations.

The barometer is used for vertical acceleration estimation
2012-06-27 16:01:50 +10:00
Andrew Tridgell 7eb150a2f0 ACM: adapt the ArduCopter code for new barometer interface 2012-06-27 16:01:50 +10:00
Andrew Tridgell 4fda89beb7 APM: update for new barometer interface
the barometer can now calibrate and return altitude values.

A 0.3 low pass filter is used on altitude to match the previous code
2012-06-27 16:01:50 +10:00
Andrew Tridgell 53e950531e Baro: added get_altitude() and get_climb_rate() interfaces
this allows the barometer driver to calibrate and return altitude and
climb rate values. This will be used by the AHRS drift correction code
for vertical velocity

The climb rate uses a 5 point average filter
2012-06-27 16:01:50 +10:00