Skip to content

Add documentation to GPSFix struct#25

Merged
rustyeddy merged 2 commits intogtu7from
copilot/sub-pr-16-629aed05-87f8-4fd7-9ae1-18a337955080
Jan 17, 2026
Merged

Add documentation to GPSFix struct#25
rustyeddy merged 2 commits intogtu7from
copilot/sub-pr-16-629aed05-87f8-4fd7-9ae1-18a337955080

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Jan 16, 2026

The exported GPSFix struct lacked documentation explaining field semantics, units, and valid values.

Changes:

  • Added godoc for GPSFix documenting:
    • Coordinate units (decimal degrees, meters above MSL)
    • Speed field differences (SpeedKnots vs SpeedMPS)
    • Status field values (A=Active/valid, V=Void/invalid)
    • Date format (DDMMYY)
    • Quality indicator meanings (fix quality codes, HDOP, satellite count)
// GPSFix represents a GPS position fix aggregated from NMEA sentences
// (typically GPGGA, GPRMC, and GPVTG). Fields are populated as data becomes
// available from the sensor.
//
// Position coordinates:
//   - Lat, Lon: decimal degrees (negative for South/West)
//   - AltMeters: altitude in meters above mean sea level
//
// Quality indicators:
//   - Quality: GPS fix quality (0=invalid, 1=GPS fix, 2=DGPS fix, etc.)
//   - HDOP: horizontal dilution of precision
//   - Satellites: number of satellites in view
//
// Motion data:
//   - SpeedKnots: ground speed in knots
//   - SpeedMPS: ground speed in meters per second
//   - CourseDeg: course over ground in degrees (0-360, true north)
//
// Status fields:
//   - Status: RMC status ("A" = Active/valid, "V" = Void/invalid)
//   - Date: UTC date in DDMMYY format
type GPSFix struct { ... }

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: rustyeddy <2903425+rustyeddy@users.noreply.github.com>
Copilot AI changed the title [WIP] Update Gtu7 sensor and serial drivers implementation based on feedback Add documentation to GPSFix struct Jan 16, 2026
Copilot AI requested a review from rustyeddy January 16, 2026 17:46
@rustyeddy rustyeddy marked this pull request as ready for review January 17, 2026 16:10
Copilot AI review requested due to automatic review settings January 17, 2026 16:11
@rustyeddy rustyeddy merged commit 541e0df into gtu7 Jan 17, 2026
2 checks passed
@rustyeddy rustyeddy deleted the copilot/sub-pr-16-629aed05-87f8-4fd7-9ae1-18a337955080 branch January 17, 2026 16:11
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds comprehensive godoc documentation to the exported GPSFix struct, which previously lacked documentation explaining its field semantics, units, and valid values.

Changes:

  • Added detailed godoc comment block explaining the GPSFix struct's purpose, field groupings (position coordinates, quality indicators, motion data, status fields), units, and value meanings
  • Removed inline comments for Status and Date fields as their explanations are now covered in the main struct documentation

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

3 participants