feat: center map and dynamic radius - #65
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Enhances the BreadcrumbTrail map overlay to provide better context for live GPS fixes by visualizing accuracy, surfacing additional fix metadata, and improving map navigation via re-centering.
Changes:
- Derives and stores a
covarianceRadius(2σ) and optionalaltitudefrom incoming/gps/fixmessages. - Renders a red accuracy
Circlearound the latest fix and displays altitude/accuracy in the info panel. - Adds initial auto-recenter on first fix and a user-triggered “Re-center” button.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/components/panels/MapView.tsx | Minor export formatting cleanup. |
| src/components/BreadCrumbTrail.tsx | Adds covariance-derived accuracy radius, accuracy circle rendering, altitude/accuracy display, and re-centering behavior. |
Suppressed comments (2)
src/components/BreadCrumbTrail.tsx:8
leafletis imported asLbut never used in this file, which will typically fail lint/TS checks and increases bundle size. Remove the unused import (or use it if needed).
import ROSLIB from 'roslib';
import L from 'leaflet'
src/components/BreadCrumbTrail.tsx:74
clearBreadcrumbsclears state but does not resethasRecenteredRef, so after clicking Clear the next “first fix” will not auto-recenter even though the UI is effectively starting over. Reset the ref when clearing so the initial auto-recenter behavior remains consistent.
const clearBreadcrumbs = () => {
setBreadcrumbs([]);
setLastFix(null);
};
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
codeflight1
approved these changes
Aug 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request enhances the
BreadcrumbTrailcomponent to improve the visualization and accuracy of breadcrumb data on the map. The main updates include displaying the GPS covariance as a red accuracy circle, showing altitude and accuracy information, and adding a re-center functionality. These changes provide users with more precise location context and better map interaction.Breadcrumb accuracy visualization:
Breadcrumbtype now includescovarianceRadius(derived from GPS covariance data) and optionalaltitude, both extracted from incoming/fixmessages. [1] [2] [3]Circleis rendered around the latest fix to visualize location accuracy (2σ radius) on the map.User interface improvements:
These enhancements make the breadcrumb trail more informative and interactive for users monitoring live GPS data.