Skip to content

rtksvr send_nmea: send the single solution status#842

Merged
rtklibexplorer merged 1 commit into
rtklibexplorer:mainfrom
ourairquality:rtksvr-nmea-status
May 18, 2026
Merged

rtksvr send_nmea: send the single solution status#842
rtklibexplorer merged 1 commit into
rtklibexplorer:mainfrom
ourairquality:rtksvr-nmea-status

Conversation

@ourairquality
Copy link
Copy Markdown

When sending a nmea single solution back to a base, include the solutions status rather than always SOLQ_SINGLE and also include the number of satellites used in the solution and the reference station id.

When sending a nmea single solution back to a base, include the
solutions status rather than always SOLQ_SINGLE and also include the
number of satellites used in the solution and the reference station id.
@rtklibexplorer
Copy link
Copy Markdown
Owner

I've started using Claude AI to help with the reviews, especially parts of the code I'm less familiar with. It had a couple of minor concerns. Do you think these are valid?

  1. nmeareq==1 loses SOLQ_SINGLE — the old code explicitly set sol_nmea.stat=SOLQ_SINGLE inside the lat-lon-hgt branch; the new code leaves stat at 0 (SOLQ_NONE). Some NTRIP casters require quality≥1 in the GGA and may reject the connection in this mode.

  2. ns=0 floor removed for nmeareq==2 and ==3 — the old sol_nmea.ns=10 was set before the if/else and acted as a floor for all modes. Now nmeareq==2 and ==3 use svr->rtk.sol.ns directly, which can be 0 early in convergence. The comment on that line ("Some servers don't like when ns = 0") suggests this was intentional protection. Consider sol_nmea.ns = svr->rtk.sol.ns > 0 ? svr->rtk.sol.ns : 10 for those modes.

@ourairquality
Copy link
Copy Markdown
Author

I've started using Claude AI to help with the reviews, especially parts of the code I'm less familiar with. It had a couple of minor concerns. Do you think these are valid?

  1. nmeareq==1 loses SOLQ_SINGLE — the old code explicitly set sol_nmea.stat=SOLQ_SINGLE inside the lat-lon-hgt branch; the new code leaves stat at 0 (SOLQ_NONE). Some NTRIP casters require quality≥1 in the GGA and may reject the connection in this mode.

Not seeing where sol_nmea.stat=SOLQ_SINGLE is lost in that path, it's seems to still be there.

  1. ns=0 floor removed for nmeareq==2 and ==3 — the old sol_nmea.ns=10 was set before the if/else and acted as a floor for all modes. Now nmeareq==2 and ==3 use svr->rtk.sol.ns directly, which can be 0 early in convergence. The comment on that line ("Some servers don't like when ns = 0") suggests this was intentional protection. Consider sol_nmea.ns = svr->rtk.sol.ns > 0 ? svr->rtk.sol.ns : 10 for those modes.

These are paths with a solution and a solution is only possible with ns>0, and if it did get here with a solution based on no satellites then it would be appropriate for the consumer to discard the position - the change is intentional.

@rtklibexplorer rtklibexplorer merged commit 6ee94c1 into rtklibexplorer:main May 18, 2026
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