Improves boundary recording and simulator lockout - #1209
Conversation
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>
There was a problem hiding this comment.
💡 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".
|
@codex please review |
There was a problem hiding this comment.
💡 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".
| // 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) |
There was a problem hiding this comment.
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.
5a38d83 to
333a402
Compare
Addresses artifacts in boundary recording and enhances simulator stability.
Boundary Recording Improvements:
TrimDrivenOvershootto intelligently remove excess path by:RemoveSelfIntersectionsto prevent discarding valid boundaries if the cleanup process results in a disproportionately small or degenerate polygon.Simulator Safety & Lockout:
isSimDisabledLocked) that permanently disables the simulator for the remainder of the session once it's turned off (either manually or by the system).