Commit Graph

5084 Commits

Author SHA1 Message Date
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
Andrew Tridgell
9fd3d15026 Filter: added 5 point average float filter 2012-06-27 16:01:50 +10:00
Jonathan Challinger
1ff9461bfb AHRS: brought DCM more inline with Bill's implementation
omega_I applied continuously. _ki larger. Stop integrating when _omega.length()>20

The key change was the scaling of ge to ensure the error is not
quadratic
2012-06-27 16:01:49 +10:00
Andrew Tridgell
4a91c267d7 APM: set_centripetal() is now set_fly_forward()
this controls more than just centripetal correction
2012-06-27 16:01:49 +10:00
Andrew Tridgell
d71e82191f ACM: enable GPS in AHRS for ArduCopter
this is an experiment in centripetal correction for multicopters
2012-06-27 16:01:49 +10:00
Andrew Tridgell
73faaddc1b AHRS: first successful version of Bills new drift correction system
This makes 3 major changes:

 1) fixes the scaling of the yaw drift correction term to fix the time
 constant

 2) don't integrate the mag vector over multiple readings

 3) accumulate omega_I changes over 15 seconds before applying, to try
 to prevent omega_I picking up short term responses
2012-06-27 16:01:49 +10:00
Andrew Tridgell
0399aa9480 AHRS: update for new _fly_forward flag 2012-06-27 16:01:49 +10:00
Andrew Tridgell
2600afe18a AHRS: implement Bills new drift correction algorithm
this is an initial implementation of this paper:

  http://gentlenav.googlecode.com/files/RollPitchDriftCompensation.pdf
2012-06-27 16:01:49 +10:00
Andrew Tridgell
5316a45c20 AHRS: added GPS support to AHRS test 2012-06-27 16:01:49 +10:00
Andrew Tridgell
19954f30e5 GPS: added velocity and acceleration components
used by AHRS for acceleration correction
2012-06-27 16:01:49 +10:00
Andrew Tridgell
2b352d2b5c Math: added comment 2012-06-27 16:01:49 +10:00
Andrew Tridgell
f23cebc808 Math: moved more template functions to the .cpp files
save a bit more code space for larger functions
2012-06-27 16:01:49 +10:00
Michael Oborne
93e8bee44e firmware build 2012-06-27 08:00:18 +08:00
Jason Short
57e4fabb57 Attitude.pde: Turned off boost_p for nav_throttle based on Testing feedback from Marco. 2012-06-26 10:39:42 -07:00
Jason Short
3fcd3100cc Added user editable define for Super simple radius 2012-06-26 10:38:46 -07:00
rmackay9
74d37a3713 ArduPlane HIL: fixed bug so g_gps->setHil calls send time as a uint32_t (was sending a float but was cast back to an uint32_t resulting in a meaningless time that never changed). 2012-06-26 22:59:24 +09:00
rmackay9
c034e38cbd ArduCopter HIL: changed calls to setHIL to send in time as a uint32_t (it was a float) 2012-06-26 22:50:17 +09:00
Jason Short
91cde15c27 Attitude.pde - Added small boost to alt hold for takeoff. 2012-06-25 23:12:19 -07:00
Jason Short
711bbeb6f3 GCS_Mavlink.pde : mav_nav only used in legacy Mavlink. 2012-06-25 23:08:25 -07:00
Jason Short
4a85c40f03 Added Toy Mode control 2012-06-25 23:08:25 -07:00
Jason Short
03879d9113 Added Toy Mode defines 2012-06-25 23:08:25 -07:00
Jason Short
4872880134 Arducopter.pde : Added Approach mode, added "Toy" mode fun code I'm playing with.
Added landing code to make landing happen closer to home loc
Added check for distance to Loiter WP before overriding a new Loiter position.
Moved calc_loiter_pitch_roll() to 50 hz.
removed the nav_bearing var - not used with new crosstrack.
2012-06-25 23:08:25 -07:00
Jason Short
efc74a87aa commands.pde: fixed unit error for distance check 2012-06-25 23:06:28 -07:00
Jason Short
7a5347fb1f Config.h : New Gains based on testing, new Crosstrack gain. from 1.0 to .2 because of new algorithm 2012-06-25 23:06:28 -07:00
Jason Short
81c684664b GCS Mavlink.pde: change reference to nav_bearing to target_bearing. 2012-06-25 23:06:28 -07:00
Jason Short
50b3ef66a7 Navigation.pde : removed old cross tracking from Arduplane. Added new 2D cross tracking. Added use of GPS velocity when above 1.5m/s 2012-06-25 23:06:28 -07:00
Jason Short
2fdbbb87f2 inertia.pde: WIP don't fly with inertia enabled until FN. 2012-06-25 23:06:28 -07:00
Jason Short
900f169c44 Log.pde: removed nav_bearing reference and replaced with target_bearing ref 2012-06-25 23:06:28 -07:00
Andreas M. Antonopoulos
678b12af25 AC2.6: Fix battery calculation and scaling bug for MAV1.0, now same as ArduPlane
http://code.google.com/p/arducopter/issues/detail?id=430
2012-06-24 17:01:25 -07:00
Robert Lefebvre
7eae382a22 Open up constraint on Rate Yaw Output for all copters. 2012-06-22 10:06:01 -04:00
Jason Short
abb6eb2471 Added a crude Lead Filter. Needs some fine tuning, lag specification, scaling. Works great on 4hz GPS such as Mtek. 2012-06-21 11:14:20 -07:00
Jean-Louis Naudin
94ccdea145 APMrover 2.20b: minor update for HIL mode with the new lib
Signed-off-by: Jean-Louis Naudin <jlnaudin@gmail.com>
2012-06-21 08:10:33 +02:00