Skip to content

Add lsf2positions command to export vehicle positions at 1-second intervals#1

Draft
Copilot wants to merge 5 commits intomainfrom
copilot/add-vehicle-position-export-command
Draft

Add lsf2positions command to export vehicle positions at 1-second intervals#1
Copilot wants to merge 5 commits intomainfrom
copilot/add-vehicle-position-export-command

Conversation

Copy link

Copilot AI commented Jan 14, 2026

Exports vehicle positions from EstimatedState messages in LSF log files, computing actual WGS-84 coordinates by translating reference lat/lon by north/east offsets.

Changes

  • New command: cmd/lsf2positions/main.go

    • Filters EstimatedState messages (MGID 350) to 1-second intervals
    • Converts lat/lon from radians to degrees
    • Applies WGS-84 offset translation: deltaLat = x / R, deltaLon = y / (R * cos(lat))
    • Exports CSV: timestamp, latitude_deg, longitude_deg, depth_m, altitude_m
  • Build integration: Added to dist.sh for cross-platform builds

  • Documentation: Added usage example to README

Usage

go run cmd/lsf2positions/main.go -lsf Data.lsf -out positions.csv

Output:

timestamp,latitude_deg,longitude_deg,depth_m,altitude_m
1234567890.123,41.18567123,-8.70456789,2.50,45.30
1234567891.234,41.18568456,-8.70455123,2.52,45.28
Original prompt

Create a new command that exports the positions of the vehicle at 1 second separation. You can use EstimatedState but take into account that you must compute the location by translating wgs84 lat and longitude by the offsets (x, y, z) that correspond to (north, east, down in meters). See other commands that already exist for inspiration. Lat and lon are in radians in EstimatedState (must convert to degrees). Final result shall be in degrees and meters (depth, altitude)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 4 commits January 14, 2026 23:17
… intervals

Co-authored-by: zepinto <1562009+zepinto@users.noreply.github.com>
Co-authored-by: zepinto <1562009+zepinto@users.noreply.github.com>
Co-authored-by: zepinto <1562009+zepinto@users.noreply.github.com>
…ations

Co-authored-by: zepinto <1562009+zepinto@users.noreply.github.com>
Copilot AI changed the title [WIP] Add command to export vehicle positions at 1 second intervals Add lsf2positions command to export vehicle positions at 1-second intervals Jan 14, 2026
Copilot AI requested a review from zepinto January 14, 2026 23:22
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.

2 participants