iNavFlight / inav

INAV: Navigation-enabled flight control software
https://inavflight.github.io
GNU General Public License v3.0
3.15k stars 1.48k forks source link

Waypoint Jump Command does not work properly #10275

Open b14ckyy opened 2 months ago

b14ckyy commented 2 months ago

Current Behavior

in Some WP Mission constellations, the Jump-Command points at the wrong waypoint. Does not happen with every mission but seems to be related on the specific WP numbers or repeats.

Steps to Reproduce

  1. Create a waypoint mission with these waypoint types in this order: image
  2. WP 4 has a JUMP to WP 2 with a 2x repeat
  3. Run the mission
    • After WP 4 is reached, crafts jumps to WP 3 instead of WP 2

Expected behavior

Craft follows mission as set up.

Suggested solution(s)

Not sure yet

Additional context

I had other constellations like a Jump from 5 to 2 with a 3x repeat and that worked just fine.

WP Loop test.zip


stronnag commented 2 months ago

Please post the mission file

b14ckyy commented 2 months ago

@stronnag Mission file uploaded

I could not test with 7.1.2 for some reason I have a 1s delay between the simulator and sensor inputs. Something is not right there. All fine with 8.0 though.

Nhomisz commented 1 week ago

This is three missions each with three waypoints. Roughly the same coordinates for WP1-3 with JUMP to WP1 only difference is in iterations which is 0, 1 and 2. In all missions after WP3 the plane is directed to WP2 instead. Can it simply be a coding numbering error for the user interface that WP1 should actually be WP0?

Running INAV 7.1.2 on a SpeedyBee F405 Wing Mini and made missions both with the configurator and SpeedyBee app. Also in SpeedyBee app I can't enter "-1" for iteration only 0 and up.

Mission Control Waypoints [wp]

wp 4 valid

wp 0 1 598258854 177833712 5000 30 0 0 0 wp 1 1 598217054 177830134 5000 30 0 0 0 wp 2 1 598236371 177915520 5000 30 0 0 0 wp 3 6 0 0 0 0 2 0 165 wp 4 1 598259623 177832027 5000 30 0 0 0 wp 5 1 598219055 177833373 5000 30 0 0 0 wp 6 1 598234977 177914032 5000 30 0 0 0 wp 7 6 0 0 0 0 1 0 165 wp 8 1 598260144 177831634 5000 30 0 0 0 wp 9 1 598216385 177832266 5000 30 0 0 0 wp 10 1 598235689 177923294 5000 30 0 0 0 wp 11 6 0 0 0 0 2 0 165

stronnag commented 1 week ago

The mission definition is fine. This is a (fairly) recent bug in mission loading / mission initiation I would expect.

image