Skip to content

isValid is always False #19

Description

@Subtle1rony

I am using the Portenta H7 with Portenta Cat. M1/NB IoT GNSS Shield, tying to run MicroNMEA_integration.ino example in the Arduino IDE. My GPS device is returning valid strings with data for $GPGGA and $GNRMC but it never sees them as valid.

Also I think the code gets stuck in this loop as the stream of nmea strings is continuous:

    while (GPS.available()) {
        char c = GPS.read();

        // process is true when a valid NMEA string has been processed
        nmeaProcessStatus = nmea.process(c); // this does periodically become 1
    }

I changed it to:

    while (GPS.available()  && !nmeaProcessStatus) {
        char c = GPS.read();
        // process is true when a valid NMEA string has been processed
        nmeaProcessStatus = nmea.process(c);
    }

Then it does break from the loop but these lines always return no for nmea.isValid()

        // Output GPS information from previous second
        Serial.print("Valid fix: ");
        Serial.println(nmea.isValid() ? "yes" : "no"); //this returns no

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions