Skip to content

Grid Survey Pattern Generator, Quickly See Heading and RTH Icons along with new Keyboard Navigation - #2593

Closed
GenCodeInc wants to merge 16 commits into
iNavFlight:maintenance-10.xfrom
GenCodeInc:feature/grid-pattern
Closed

Grid Survey Pattern Generator, Quickly See Heading and RTH Icons along with new Keyboard Navigation#2593
GenCodeInc wants to merge 16 commits into
iNavFlight:maintenance-10.xfrom
GenCodeInc:feature/grid-pattern

Conversation

@GenCodeInc

@GenCodeInc GenCodeInc commented Mar 15, 2026

Copy link
Copy Markdown

Add a lawnmower/grid survey pattern generator that allows users to define a polygon area on the map and automatically generate survey waypoints within it.

Features:

  • Grid survey button in Action Menu with polygon drawing interaction
  • Sidebar settings card with line spacing, altitude, speed, sweep angle, overshoot, and End with RTH checkbox
  • Live auto-preview: polygon outline, dashed survey path, and numbered waypoint dots update as parameters change
  • Lawnmower pattern algorithm with configurable sweep angle and overshoot
  • RTH waypoint automatically appended when End with RTH is checked
  • Waypoint count display with remaining capacity
  • Ctrl+G keyboard shortcut to activate grid draw mode
  • Full i18n support for all UI strings

Draw complex surveys in seconds
image

Preview and Edit Before you generate the survey,
image

Generate mission with clear makings on where the RTH will activate
image

Create large surveys with multiple POI in seconds
image

Clearly see RTH and Heading Settings
image

These missions can be made in seconds.

Add a lawnmower/grid survey pattern generator that allows users to
define a polygon area on the map and automatically generate survey
waypoints within it.

Features:
- Grid survey button in Action Menu with polygon drawing interaction
- Sidebar settings card with line spacing, altitude, speed, sweep angle,
  overshoot, and End with RTH checkbox
- Live auto-preview: polygon outline, dashed survey path, and numbered
  waypoint dots update as parameters change
- Lawnmower pattern algorithm with configurable sweep angle and overshoot
- RTH waypoint automatically appended when End with RTH is checked
- Waypoint count display with remaining capacity
- Ctrl+G keyboard shortcut to activate grid draw mode
- Full i18n support for all UI strings
@GenCodeInc

Copy link
Copy Markdown
Author

@b14ckyy I think people will like this survey option. If you have any issues let me know.

@GenCodeInc

Copy link
Copy Markdown
Author

I dont own an inav plane so someone may want to test in a safe location or with the simulator on a fixed wing and vtol.

image image

@b14ckyy b14ckyy added the New Feature Entirely new feature or major feature change label Mar 15, 2026
- Arrow keys (Left/Right) navigate between waypoints with card transition
- Delete key removes selected waypoint with confirmation dialog
- Auto-select previous waypoint after deletion
- Auto-select WP1 after grid survey generation
- Show 'Add WP' tooltip with crosshair when hovering flight path lines
- Green RTH marker at last waypoint position for all missions
- Ctrl+G keyboard shortcut for grid polygon draw
@GenCodeInc GenCodeInc changed the title Add grid survey pattern generator to Mission Control Grid Survey Pattern Generator with Keyboard Navigation Mar 15, 2026
@GenCodeInc

GenCodeInc commented Mar 15, 2026

Copy link
Copy Markdown
Author

@b14ckyy

Use the arrow keys its fun!! ;)

You can now use your keyboard to step thru the waypoints using arrow right and left, you can also use your delete key to delete a waypoint, this makes checking the waypoints faster than ever.

I also added a small RTH tag to clearly let the operator know that the last point will initiate a RTH as it was not visible before unless you clicked on the waypoint, I think these are great additions to inav. Hope you guys like them.

Oh yea and a +add waypoint when hovering over the line so its clear that option is available to the planner.

image image

@b14ckyy

b14ckyy commented Mar 15, 2026

Copy link
Copy Markdown
Collaborator

Man you are on fire! I love it. Great addition. Lets tag that into the 9.1 Target here already. The other PR we will check. Great work.

@b14ckyy b14ckyy added this to the 9.1 milestone Mar 15, 2026
@GenCodeInc

Copy link
Copy Markdown
Author

Man you are on fire! I love it. Great addition. Lets tag that into the 9.1 Target here already. The other PR we will check. Great work.

Thanks just give me credit somewhere when 9.1 if you can, so I can brag at the office ;)

@b14ckyy

b14ckyy commented Mar 15, 2026

Copy link
Copy Markdown
Collaborator

With so big (visible) feature changes you will certainly be named in the "Highlights of this version" section :D

- SET_HEAD waypoints show black circle with white arrow pointing in heading direction
- Heading degree label displayed below the marker
- Heading marker and RTH marker render above flight path lines (zIndex: 99)
@GenCodeInc GenCodeInc changed the title Grid Survey Pattern Generator with Keyboard Navigation Grid Survey Pattern Generator, Quickly See Heading and RTH Icons along with new Keyboard Navigation Mar 17, 2026
@GenCodeInc

GenCodeInc commented Mar 17, 2026

Copy link
Copy Markdown
Author

With so big (visible) feature changes you will certainly be named in the "Highlights of this version" section :D

@b14ckyy

Heading now shows a small compass so you know where the drone will point to without clicking on every waypoint.
image

GenCodeInc added 7 commits March 16, 2026 19:42
- SET_HEAD shows black circle with white directional dot (pure geometry, no text rotation)
- RTH and heading markers aligned with WP pin center via MARKER_ICON_OFFSET_X/Y
- Both marker circles same size (radius 10)
- Offset constants adjustable: MARKER_ICON_OFFSET_Y=12, MARKER_ICON_OFFSET_X=-2
@sonarqubecloud

Copy link
Copy Markdown

@Jetrell

Jetrell commented Apr 6, 2026

Copy link
Copy Markdown
Collaborator

I dont own an inav plane so someone may want to test in a safe location or with the simulator on a fixed wing and vtol.

@GenCodeInc Nice feature. Saves time when setting up a survey .
It appears to write the mission fine.

The main limitation to account for using a fixedwing aircraft, is the default LINE SPACING.
25m is too tight to make two right angle turns within that distance.. It ended up being a hairpin turn in my case.

Due to fixedwing turn accuracy being determined a lot by the airplanes speed. And that not being slower than 60km/h for most airplanes.
User don't always adjust the default settings to start with. So It might be beneficial to set the default Line Spacing to a more practical 100m. And if the user is flying with a multicopter; or an airplane that can fly much slower, they could reduce the Line Spacing to suit their requirements.

@sensei-hacker

sensei-hacker commented May 27, 2026

Copy link
Copy Markdown
Member

The main limitation to account for using a fixedwing aircraft, is the default LINE SPACING.
25m is too tight to make two right angle turns within that distance.. It ended up being a hairpin turn in my case.

Due to fixedwing turn accuracy being determined a lot by the airplanes speed. And that not being slower than 60km/h for most airplanes.
User don't always adjust the default settings to start with. So It might be beneficial to set the default Line > Spacing to a more practical 100m.

Agreed. Defaults should be safe. At 50 MPH - 80 km/h, a double-rate turn has a diameter of 212 meters.
At 25 MPH - 40 km/h, 106 meters.
(A standard rate turn would be twice that, but RC aircraft can generally handle a double-rate turn safely.)

Also perhaps interesting, at 100 meters altitude, a 90 degree fov camera will cover a 200 meter strip of ground.
Or, at 50 meters it will cover 100 meter strip.

If one wanted closer spacing with safe turns, one could use an interlace pattern. Fly rows 1, 3, 5, 7 ... then at the end go back and cover the even numbers.

@sonarqubecloud

Copy link
Copy Markdown

@GenCodeInc

Copy link
Copy Markdown
Author

The main limitation to account for using a fixedwing aircraft, is the default LINE SPACING.
25m is too tight to make two right angle turns within that distance.. It ended up being a hairpin turn in my case.

Due to fixedwing turn accuracy being determined a lot by the airplanes speed. And that not being slower than 60km/h for most airplanes.
User don't always adjust the default settings to start with. So It might be beneficial to set the default Line > Spacing to a more practical 100m.

Agreed. Defaults should be safe. At 50 MPH - 80 km/h, a double-rate turn has a diameter of 212 meters. At 25 MPH - 40 km/h, 106 meters. (A standard rate turn would be twice that, but RC aircraft can generally handle a double-rate turn safely.)

Also perhaps interesting, at 100 meters altitude, a 90 degree fov camera will cover a 200 meter strip of ground. Or, at 50 meters it will cover 100 meter strip.

If one wanted closer spacing with safe turns, one could use an interlace pattern. Fly rows 1, 3, 5, 7 ... then at the end go back and cover the even numbers.

I changed it to 100 meters for the default

@sensei-hacker

Copy link
Copy Markdown
Member

I think this is close to ready for merge?

At 4186, is this correct?:

spacing: Number.parseFloat($('#gridSpacing').val()) || 25,

Also I see "missionGridPreview" in messages.json; is that used somewhere?

@sonarqubecloud

Copy link
Copy Markdown

@GenCodeInc

GenCodeInc commented Jul 21, 2026

Copy link
Copy Markdown
Author

I think this is close to ready for merge?

At 4186, is this correct?:

spacing: Number.parseFloat($('#gridSpacing').val()) || 25,

Also I see "missionGridPreview" in messages.json; is that used somewhere?

@sensei-hacker

Sorry for the delay I just noticed this today,

I’ve updated the grid survey patch:

changed the fallback for #gridSpacing to 100 when the input is invalid
removed the unused missionGridPreview locale key
The branch is pushed and the existing PR #2593 is up to date.

yes its ready to merge

@GenCodeInc

Copy link
Copy Markdown
Author

@b14ckyy @sensei-hacker This should be good to merge now.

@sensei-hacker

Copy link
Copy Markdown
Member

To resolve the merge conflicts, I opened #2698

Qodo had some questions, though.

@sensei-hacker

Copy link
Copy Markdown
Member

Closing — this PR had a merge conflict against maintenance-10.x. The developer resolved it and opened it as #2698 (couldn't push directly to this branch, got a 403), which carries the same milestone/label. Please continue any further discussion there. Thanks for the great feature work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

New Feature Entirely new feature or major feature change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants