Skip to content

support for fix quality and fix mode#38

Open
slippyr4 wants to merge 2 commits intomikalhart:masterfrom
slippyr4:gga-fix-quality
Open

support for fix quality and fix mode#38
slippyr4 wants to merge 2 commits intomikalhart:masterfrom
slippyr4:gga-fix-quality

Conversation

@slippyr4
Copy link
Copy Markdown

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+)

add support for fix mode (RMC mikalhart#12) (NMEA 2.3+)
TD-er added a commit to TD-er/ESPEasy that referenced this pull request Dec 18, 2018
Applied this PR:
[support for fix quality and fix mode](mikalhart/TinyGPSPlus#38)
TD-er added a commit to TD-er/ESPEasy that referenced this pull request Dec 21, 2018
Applied this PR:
[support for fix quality and fix mode](mikalhart/TinyGPSPlus#38)
@iharshadec
Copy link
Copy Markdown

This is must needed feature but not sure why still not merged into main branch.

@mikalhart
Copy link
Copy Markdown
Owner

@slippyr4 Can you explain the 'store time in location' commit? To my eye this seems unrelated to 'support for fix quality and fix mode'.

@mikalhart
Copy link
Copy Markdown
Owner

mikalhart commented Nov 11, 2023

Good add. Will add to new version soon. (But without the new "Time" field in Location object... discuss?)

Comment thread src/TinyGPS++.h
{}
};

enum FixQuality { Invalid = 0, GPS = 1, DGPS = 2, PPS = 3, RTK = 4, FloatRTK = 5, Estimated = 6, Manual = 7, Simulated = 8 };
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

enum class allows stronger typechecking than the old C style: https://en.cppreference.com/w/cpp/language/enum

Comment thread src/TinyGPS++.h
double lat();
double lng();
FixQuality Quality() { updated = false; return fixQuality; }
FixMode Mode() { updated = false; return fixMode; }
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This should return an std::optional

Comment thread src/TinyGPS++.h
};

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'};
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Same. Consider an 'inivalid'.

Comment thread src/TinyGPS++.h
{}
};

enum FixQuality { Invalid = 0, GPS = 1, DGPS = 2, PPS = 3, RTK = 4, FloatRTK = 5, Estimated = 6, Manual = 7, Simulated = 8 };
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Consider enum class.

Comment thread src/TinyGPS++.h
};

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'};
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Same. Consider an Invalid member.
Should anything returning either of these also be a return of an std::optional?

@robertlipe
Copy link
Copy Markdown

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!

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.

4 participants