Skip to content

Improves boundary recording and simulator lockout - #1209

Closed
richardklasens wants to merge 4 commits into
developfrom
bugfix/boundary-overlap-artifact
Closed

Improves boundary recording and simulator lockout#1209
richardklasens wants to merge 4 commits into
developfrom
bugfix/boundary-overlap-artifact

Conversation

@richardklasens

Copy link
Copy Markdown
Contributor

Addresses artifacts in boundary recording and enhances simulator stability.

Boundary Recording Improvements:

  • Prevents boundary overlap artifacts when an operator drives past the start point.
  • Introduces TrimDrivenOvershoot to intelligently remove excess path by:
    • Stripping trailing points that loop straight back to the start.
    • Resolving angled overshoots by finding intersections and retaining the enclosed loop.
  • Enhances RemoveSelfIntersections to prevent discarding valid boundaries if the cleanup process results in a disproportionately small or degenerate polygon.

Simulator Safety & Lockout:

  • Fixes simulator coordinates from potentially leaking into live GNSS fixes, which could cause erratic position jumps.
  • Implements a "sticky lock" (isSimDisabledLocked) that permanently disables the simulator for the remainder of the session once it's turned off (either manually or by the system).
  • Ensures the simulator cannot be accidentally re-enabled and that its timer and fix quality spoofing mechanisms are completely halted when locked off, preventing interference with live data.

richardklasens and others added 2 commits May 20, 2026 01:20
Once DisableSim runs in a session (live fix arrived), it now stays off
permanently via a sticky isSimDisabledLocked flag. Prevents rogue
timerSim ticks from overwriting pn.fix with stale sim.CurrentLatLon
(e.g. ~7000km away when sim defaults to Alberta), which also triggered
the fixQuality cycler in GUI.Designer.cs to override live RTK quality
and cascade into the RTK-alarm autosteer auto-disable loop.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e58cd7e82b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread SourceCode/GPS/Forms/Controls.Designer.cs
@richardklasens

Copy link
Copy Markdown
Contributor Author

@codex please review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5a38d83730

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread SourceCode/GPS/Classes/CFenceLine.cs Outdated
// Never discard a valid boundary. If cleanup collapsed it to a tiny
// fraction of the input, it latched onto a degenerate intersection and
// would leave only an artifact - restore the original instead.
if (fenceLine.Count < 3 || fenceLine.Count < originalCount / 4)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve valid cleanup results for large loops

When a self-intersecting boundary contains an unwanted loop holding more than 75% of its sampled points, RemoveSelfIntersections() can legitimately produce a valid polygon with fewer than one quarter of the original points, but this condition restores the self-intersecting input. This affects every default CalculateFenceArea() caller, including KML/ISOXML imports and map-drawn boundaries, whose callers ignore the false return and continue calculating area and building turn lines from the invalid polygon. Limit this fallback to the driven-overshoot flow or determine validity geometrically rather than from the point-count ratio.

Useful? React with 👍 / 👎.

The `GeoConverter` incorrectly evaluated `metersPerDegreeLon` at the origin latitude, causing a systematic east-axis shear during WGS84 coordinate round-trip conversions. Switching to `LocalPlane` ensures `metersPerDegreeLon` is evaluated at the point's own latitude, providing accurate transformations and eliminating the distortion.
@richardklasens
richardklasens force-pushed the bugfix/boundary-overlap-artifact branch from 5a38d83 to 333a402 Compare August 13, 2026 06:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant