support for fix quality and fix mode#38
Conversation
add support for fix mode (RMC mikalhart#12) (NMEA 2.3+)
Applied this PR: [support for fix quality and fix mode](mikalhart/TinyGPSPlus#38)
Applied this PR: [support for fix quality and fix mode](mikalhart/TinyGPSPlus#38)
|
This is must needed feature but not sure why still not merged into main branch. |
|
@slippyr4 Can you explain the 'store time in location' commit? To my eye this seems unrelated to 'support for fix quality and fix mode'. |
|
Good add. Will add to new version soon. (But without the new "Time" field in Location object... discuss?) |
| {} | ||
| }; | ||
|
|
||
| enum FixQuality { Invalid = 0, GPS = 1, DGPS = 2, PPS = 3, RTK = 4, FloatRTK = 5, Estimated = 6, Manual = 7, Simulated = 8 }; |
There was a problem hiding this comment.
enum class allows stronger typechecking than the old C style: https://en.cppreference.com/w/cpp/language/enum
| double lat(); | ||
| double lng(); | ||
| FixQuality Quality() { updated = false; return fixQuality; } | ||
| FixMode Mode() { updated = false; return fixMode; } |
There was a problem hiding this comment.
This should return an std::optional
| }; | ||
|
|
||
| enum FixQuality { Invalid = 0, GPS = 1, DGPS = 2, PPS = 3, RTK = 4, FloatRTK = 5, Estimated = 6, Manual = 7, Simulated = 8 }; | ||
| enum FixMode { N = 'N', A = 'A', D = 'D', E = 'E'}; |
| {} | ||
| }; | ||
|
|
||
| enum FixQuality { Invalid = 0, GPS = 1, DGPS = 2, PPS = 3, RTK = 4, FloatRTK = 5, Estimated = 6, Manual = 7, Simulated = 8 }; |
| }; | ||
|
|
||
| enum FixQuality { Invalid = 0, GPS = 1, DGPS = 2, PPS = 3, RTK = 4, FloatRTK = 5, Estimated = 6, Manual = 7, Simulated = 8 }; | ||
| enum FixMode { N = 'N', A = 'A', D = 'D', E = 'E'}; |
There was a problem hiding this comment.
Same. Consider an Invalid member.
Should anything returning either of these also be a return of an std::optional?
|
I like the direction here, but just a few quality issues from the peanut gallery. Even though I'm not a reviewer here, thanx for making free software better! |
I think these belong inside the core API rather than only via use of custom; the lib as it stands is lacking in built in support for assessing fix quality.
add support for fix quality (GGA #6)
add support for fix mode (RMC #12) (NMEA 2.3+)