In a scenario where an aircraft is flying between waypoints that are far apart (>1000m), I assume that the aircraft should converge to follow the line between the two points based on the modified L1 navigation guidance algorithm described in the docs. We are finding that our aircraft converges towards the line but often will remain offset with an xtrack error of anywhere up to approximately 3m. In the case of flying a grid, we find that this offset is roughly the same in magnitude and direction regardless of the direction we are flying (i.e. the aircraft will usually have to an offset to the left or right of the flight path for the whole flight). I would expect the integrator in the NAVL1 controller to reduce this error when flying large distances between waypoints but we do not see this.
My suspicion is that we will have to tune NAVL1_PERIOD, NAVL1_DAMPING and NAVL1_XTRACK_I parameters together. My current thinking is that we perform the initial L1 controller tuning (as per the docs) and then increase NAVL1_XTRACK_I until we induce some oscillation and then back it off a little. I also see on GitHub that there is an issue regarding this type of offset error with the L1 controller which might be related (https://github.com/ArduPilot/ardupilot/pull/101#issuecomment-720003883).
Interestingly, I seem to be able to counteract the track error offset by trimming the aircraft every flight over a long line. Once the aircraft is trimmed it usually remains on track for that flight. However, I would expect the integrator in the controller to take care of this and I feel that trimming the plane to account for the xtrack error is not a proper solution to the problem.
So my questions are as follows:
- How should we aim to reduce the constant xtrack error?
- Is there a recommended procedure for tuning the “advanced” NAVL1 parameters in conjunction with the other NAVL1 parameters to reduce xtrack error?