Hello. I’m a college student who’s planning on doing a research project on the ArduPilot code. The idea is to improve the handling of a multicopter so that it will resist drifting from its position either naturally or when blown by wind. And this is meant to be beyond the precision of the GPS (so moving, say, a foot from its original position would be considered significant drift).
This means the extended kalman filter code is very interesting to me. The project actually started a year ago and got put on hold. We were originally going to implement a kalman filter for the sensor data, but now that we have started the project back up it seems we got scooped. Instead, we’re going to try to improve the EKF code, as well as anything else to improve the multicopter’s resistance to drifting.
So, I have a few questions regarding the EKF code:
[ul]
[li]Is there any reason why there are two EKFs? I see one in libraries/AP_NavEKF and the other in libraries/AP_NavEKF2. Would there be any consequences of removing one of them or combining the two?[/li]
[li]Is there any need to optimize the EKF code? There are a couple things that make me feel as if it could be, such as over 200 class member variables in libraries/AP_NavEKF/AP_NavEKF.h which seem like they should be function-local variables instead inside the .cpp file, blocks of code like AP_NavEKF.cpp:2842-2872, and the simple fact that AP_NavEKF.cpp is 5433 lines long. AP_NavEKF2_core.cpp isn’t much better.[/li]
[li]Does anybody have any specific improvements that the EKF code needs?[/li]
[li]Unrelated to the EKF code, where are the values that are output to the motors calculated from the RC controls and sensor data? I haven’t been able to find that part of the arducopter code.[/li][/ul]