ckgt / NemaTode

C++ 11 NMEA Parser and GPS Interface
Other
135 stars 79 forks source link

GN*** sentences not recognized #4

Open MaelysB opened 6 years ago

MaelysB commented 6 years ago

Hello,

Even though this is not really a big issue, I would like to point out that the code is not suitable for GN or GL sentences.

I tried to adapt it, and make it work for all prefixes of NMEA sentences but I did not succeed.

Has anyone made an attempt at this before ?

Thank you.

octavmatu commented 5 years ago

First of all, I really like the implementation using C++11 features! Thanks to the devs and kudos for sharing this!

Now, main point - I have also ran into this issue.

Basically, with a new uBlox GNSS, the library outputs constant (lat,lon)=(0,0), although sentences are marked as valid (as in, they pass the checksum test)

Any way to fix/bypass the issue ???

octavmatu commented 5 years ago

Looking through the implementation, my impression is that a quick fix to the issue consists in adding sentence handlers, as in the following manner _parser.setSentenceHandler("GNGGA", [this](const NMEASentence &nmea) { this->read_GPGGA(nmea); }); ..and similar for GNRMC, GNVTG, etc.

Can anyone please confirm?

ckgt commented 5 years ago

Thanks octavmatu. You are correct, you can add a sentence overload by using setSentenceHandler.

Just make sure you read the documentation for that sentence so you read the parameters correctly and update the fix object properly.

I remember someone adding GN* sentences in a fork. I'll have to find that and do a pull.

jaxcorona commented 3 years ago

I apologize for my ignorance but I had a question about how exactly this code works. I am new to Github and using the gps dongle so I am just trying to make sense of everything.

From my understanding is that this code does not read directly from a usb gps dongle rather from a string that the user has to input. Is this correct? If so, I am still confused about syntax. When I run demo_simple I receive a message that says "No satellite info in almanac." Assuming the user has to input a string in the form "GNGAA...." when and where would I input that string?

If this code does accept info straight from the gps dongle, how would I make that work? Where would I have to specify the port the dongle is connected to?

If this code does not accept into straight from a gps dongle, can anyone recommend a C script that reads from the gps dongle? or does anyone have any suggestions as to how I should modify the code to do this?

Thank you in advance.