diydrones/ardupilot — pull request #1717 by priseborough (2015-01-01 06:16:58+00:00)
Title: EKF Updates and Bugfixes

These updates address the following issues:

1) The code calculating the EKF solution status summary was hard to follow and had a parenthesis error in the calculation of the absolute position status which had the potential to casue a reporting error under some combinations of inputs. Functional change in reporting status under some input combinations.
https://github.com/priseborough/ardupilot/commit/6bb09c9bd14170f1704b0daa2be8f20072104cc5

2) Enumerated variables with clear names have been used instead of numeric types to describe the position and velocity aiding status of the filter. this makes the code easier to read and maintain. No functional change.
https://github.com/priseborough/ardupilot/commit/22bef6e6df3853039ef62a39d81f1eabe983aada

3) The declaration of non user tunable parameters was inconsistent. some were declared using AP param types, others using standard types. some were initialised in the constructor and others were initialised by function call. Allnon user adjustable parameters are now declared as const types and values set in the header file. All variables are now initialised by function call to enable an in-flight reset to be used later if required.
https://github.com/priseborough/ardupilot/commit/6920109d0e57304d91788fd99027fe4a463cc25b

4) The decision to enter constant velocity dead reckoning mode and leave it during optical flow operation was done in two separate places, making it harder to follow and increasing the changes of a coding error during subsequent modifications.
https://github.com/priseborough/ardupilot/commit/e48708bd2b802127d90ada0226fa9538bd230f42

5) Miscellaneous compiler warning messages have been eliminated
https://github.com/priseborough/ardupilot/commit/1f44364564a1fff9078cd65020e4acf8e84f0b61

6) A number of delay and timeout time variables wer using singed integer values. These have been changed to unsigned types for consistency.
https://github.com/priseborough/ardupilot/commit/7f29c524d33a50be04b8aa5b6c113c0cb76bde65

7) Constant position and constant velocity mode should never be enabled at the same time. there was one place in code where this condition was not being explicitly enforced.
https://github.com/priseborough/ardupilot/commit/fd606e69497b0656fe5b26de66df56fc40bfa040

These changes have been flight tested on Copter for both normal GPS, no GPS and optical flow only modes of operation.