Andrew Tridgell
e4d28b12e5
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.
13 years ago
Andrew Tridgell
3a41ad8e7c
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
13 years ago
Andrew Tridgell
c387edd74c
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
13 years ago
Andrew Tridgell
06c8763881
Filter: added 5 point average float filter
13 years ago
Jonathan Challinger
d230690b7b
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
13 years ago
Andrew Tridgell
d4c8041c51
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
13 years ago
Andrew Tridgell
4d08f75292
AHRS: update for new _fly_forward flag
13 years ago
Andrew Tridgell
0f5c22bd8e
AHRS: implement Bills new drift correction algorithm
...
this is an initial implementation of this paper:
http://gentlenav.googlecode.com/files/RollPitchDriftCompensation.pdf
13 years ago
Andrew Tridgell
52d77407d4
AHRS: added GPS support to AHRS test
13 years ago
Andrew Tridgell
37db5247cd
GPS: added velocity and acceleration components
...
used by AHRS for acceleration correction
13 years ago
Andrew Tridgell
fe865bc1dc
Math: added comment
13 years ago
Andrew Tridgell
c30b0d85a3
Math: moved more template functions to the .cpp files
...
save a bit more code space for larger functions
13 years ago
rmackay9
068fe64b9b
ArduCopter HIL: changed calls to setHIL to send in time as a uint32_t (it was a float)
13 years ago
Jason Short
7b9583453b
Added a crude Lead Filter. Needs some fine tuning, lag specification, scaling. Works great on 4hz GPS such as Mtek.
13 years ago
Amilcar Lucas
78ccb9d37f
Add linebreaks to increase readability.
13 years ago
Amilcar Lucas
b072a59843
Improve parameters descriptive text
13 years ago
Amilcar Lucas
594cedd324
Documentation improvements, no functional changes (only comments)
13 years ago
Amilcar Lucas
f4e9587aca
Move local temp variables to the stack it saves 1952 bytes
...
Add function comments
Only use _ on class member variables
Only point to a 3D GPS point if GPS has a fix
Implement MAV_MOUNT_MODE_MAVLINK_TARGETING
13 years ago
Wingspinner
d09ac5899b
Added support for channel curves (and expo) to AP_RC_Channel class. Also updated AP_RC_Channel example/test to demonstrate and test new functionality
13 years ago
Wingspinner
b699c77323
Added support for channel curves (and expo) to AP_RC_Channel class. Also updated AP_RC_Channel example/test to demonstrate and test new functionality
13 years ago
Andrew Tridgell
a851c53de4
GPS: need pgmspace.h for _write_progstr_block()
13 years ago
Andrew Tridgell
70f18289c5
GPS: fixed auto-config of UBlox setup with no UBX messages
...
if a UBlox is configured for NMEA only, with no UBX messages at all
then it would never trigger the GPS_AUTO detection. This adds a UBX
config message to the init strings that enables the NAV_SOL message
13 years ago
Andrew Tridgell
1fe297ab63
FastSerial: added tx_pending() method
...
this allows the caller to wait for the tx buffer to drain
13 years ago
Amilcar Lucas
1906e06b69
Added camera trigger functionality
13 years ago
Amilcar Lucas
a32b7c200b
Add "3 axis camera stabilization" and "point camera to 3D point" functionality
...
Patch by Gregory Fletcher and reviewed by me
13 years ago
Amilcar Lucas
5ffd489d87
Spellcheck
13 years ago
rmackay9
1e38b0d535
AP_GPS_NMEA: fix from Roberto Navoni to improve NMEA accuracy
13 years ago
Andrew Tridgell
f9560ef093
GPS: use the new nav_setting in a couple of the sample sketches
13 years ago
Andrew Tridgell
33a2ad7e07
GPS: add stub settings for nav_setting in the other GPS drivers
...
only Ublox supports nav_setting so far
13 years ago
Andrew Tridgell
514be604a5
GPS: added auto-configuration of UBlox GPS
...
the Ublox will now auto-configure for 5Hz with just the messages we
want. It also supports setting the navigation engine type
13 years ago
Andrew Tridgell
9c1ce9e1c5
FastSerial: avoid buffer re-allocation on re-open if possible
...
we commonly re-open serial ports a lot in the AUTO GPS driver
13 years ago
Andrew Tridgell
cf4e56457b
SITL: map() is a C++ function, so needs to be in C++ part of the header
...
this fixes the ACM build
13 years ago
Andrew Tridgell
cbf477addd
GPS: added debug code to the main GPS class
13 years ago
Andrew Tridgell
a8bfc5d8e9
GPS: re-open the serial port with a 256 byte serial receive buffer
...
this ensures all GPS parsers have a 256 byte buffer available
13 years ago
Andrew Tridgell
296e651b30
GPS: fixed the UBLOX parser to handle unknown messages
...
the parser was broken in several ways:
1) when it received an unknown message it didn't update the ck_a and ck_b fields, so it
thought the message had a bad checksum, which meant it got out of protocol sync
2) the read() method would return false if the last message from the GPS was of an unknown type.
So we relied on the last msg always being one that we understand and want
3) the parser considered any valid UBLOX message to be 'new data', whereas we only actually get
a new fix when we get box a new position and velned message
4) the total message size per update is more than 128 bytes, but the serial port was opened
with only a 128 byte buffer, so we got corruption regularly
13 years ago
Andrew Tridgell
9c2ba2e814
GPS: tidy up the auto gps test
13 years ago
Robert Lefebvre
238a1ced2c
TradHeli adding ramp up time to Ch8 Throttle Pass-through.
13 years ago
Robert Lefebvre
df17ff3bc1
AP_MotorsHeli Syntax correction.
13 years ago
Andrew Tridgell
25c17a5425
re-enable the AP_Mount build
13 years ago
Andrew Tridgell
0f0cbce22f
GPS: fixed a race condition in the ublox driver
...
the status update comes as a separate message from the lat/lon
13 years ago
Andrew Tridgell
012fc35314
mavlink: fixed build with uart resend
13 years ago
Andrew Tridgell
b6467cb1fa
MAVLink: updates to mavlink headers to fix mavlink 1.0 issues
13 years ago
Andrew Tridgell
d8919731ee
Mavlink: fixed library build for MAVLink 1.0
13 years ago
Andrew Tridgell
ec1abbf987
SITL: fixed SITL build with mavlink10
13 years ago
Andrew Tridgell
60f8d09506
mavlink10: fixed MAV_VAR -> MAVLINK_TYPE
13 years ago
Andrew Tridgell
bccfb08c55
MAVLink: updated to latest upstream mavlink
...
this includes no significant changes
13 years ago
Jason Short
73e23aab2a
GPS time set to unsigned int32
13 years ago
rmackay9
5c9dc00ae2
AP_Baro: fixed comment to clarify that every-other call updates temperature or pressure
13 years ago
rmackay9
dcdeae412e
ArduCopter: Another attempt at fixing the lat/lon printing bug in which small negative lattitudes or longitudes were appearing as positives.
...
Fixed in both ArduCopter Log.pde and the GPS Auto test sketch
13 years ago
rmackay9
173ae33627
ArduCopter Desktop Build: added definition of "map" to wiring.h and included WMath.cpp to fix SITL build failures.
...
All real work on this issue done by Michael Oborne.
13 years ago