inav icon indicating copy to clipboard operation
inav copied to clipboard

[Alt-Hold/Pos-Hold/RTH/WayPoint] Use Sqrt Controller inverse to calculate stopping point (target position) XYZ (Horizontal and Vertical)

Open JulioCesarMatias opened this issue 2 years ago • 2 comments

This PR is a continuation of this other old PR >> https://github.com/iNavFlight/inav/pull/7305

Change:

  • Instead of just using velocity to calculate the stopping point, the algorithm now uses horizontal and vertical acceleration configured by two new parameters (nav_manual_accel_xy and nav_auto_accel_xy) added to settings.yaml, and thus making them configurable through the CLI..

sorry for the long title

JulioCesarMatias avatar Jun 14 '22 01:06 JulioCesarMatias

just waiting for @Jetrell tests, or if I can test

JulioCesarMatias avatar Jun 14 '22 21:06 JulioCesarMatias

I have talked with Julio Cesar, and the results are promising. The below statements were made after the parameters were tuned on my test quad.

When operating with the nav_manual_accel_xy parameter in Poshold. Set to 210.

  • It performed considerably better than 5.0, with Attitude mode active... It stopped faster and felt locked-in, on both the pitch and roll horizontal axis.
  • While with Cruise mode active.. It performed a little better than with 5.0. But this limitation is due to iNav's inconsistent and conflicting INS data, that occurs under more complex stopping conditions.

When operating with the nav_auto_accel_xy parameter in RTH. (not tested in WP mode). Set to 340.

  • While using this side of the feature. The math was not able to perform its requirement, due to the limitations of iNav's base throttle speed control method.

I have mention before, that iNav uses a passive navigation speed control for MC use. This unfortunately means it can only raise the navigation throttle about 4% higher than the hover throttle, as part of its operation. This combine with the nav_mc_bank_angle and any prevailing winds, passively drives speed accumulation. And determines if the MC will make it to max_auto_speed. This unfortunately works against nav_auto_accel_xy when any wind is present.. Not to mention its affect on RTH and WP navigation with the present code too, in a head wind.

@DzikuVx Although nav_manual_accel_xy does perform better. An feels very locked in, and a little robotic. While reducing the setting parameters does not make it smoother.. It makes it feel more uncertain.. Julio Cesar and I realize that harder and more abrupt stopping may not suit all MC users.. What is your view on some what abrupt stopping performance?

Jetrell avatar Jun 16 '22 06:06 Jetrell