Servers by jDrones

Issue with constant XTrack error

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:

  1. How should we aim to reduce the constant xtrack error?
  2. Is there a recommended procedure for tuning the “advanced” NAVL1 parameters in conjunction with the other NAVL1 parameters to reduce xtrack error?

I am experiencing the same. It is especially problematic during landing as it never lands within the 15m wide runway unless I manually help with the rudder.
Moreover, if I look at my logs I see NTUN.XT (xtrack error) of around 6-10m but NTUN.XTi (xtrack integrator) is always 0 regardless of the value of NAVL1_XTRACK_I.
This has happened to me in all my logs, with two different autopilot hardware and with all versions of Plane since 3.8 to 4.0.7 (my current version)
What are we missing here?

I’m also seeing this issue with a rover in a very recent (March 16, 2021) version of the master branch.

In my case, I need 2cm accuracy and typically get close to that except for this occasional navigation offset. In those cases, the rover still tracks the offset line with high accuracy (~2cm) but the mere presence of the offset can lead to collisions with obstacles that are >2cm from the desired track. I’ve seen the offset be as large as 60cm but it is typically closer to +/-10cm.

I’m fairly new to ArduPilot but would be very interested in techniques for debugging this issue since there doesn’t seem to be much interest in the larger ArduPilot community.

FYI, you might be interested in ArduPilot issue #2650: https://github.com/ArduPilot/ardupilot/issues/2650

Servers by jDrones