Skip to content

checkUblox VS getPVT #243

@Sepmai84

Description

@Sepmai84

Hi! Could you tell me what the difference is between the following operations?

The two programs start similarly, both with this:

#include <SparkFun_u-blox_GNSS_Arduino_Library.h>
SFE_UBLOX_GNSS myGNSS;
void setup() {
    Serial1.begin(9600);
    myGNSS.begin(Serial1);
    myGNSS.setAutoPVT(true); 
    myGNSS.setNavigationFrequency(10); // 10 Hz
}

In the first case, I just use myGNSS.checkUblox();

void loop() {
    myGNSS.checkUblox(); 
    if (myGNSS.getFixType() > 2) {
        float lat = myGNSS.getLatitude() 
        float lon = myGNSS.getLongitude() 
       }
}

In the second example, I add myGNSS.getPVT()

void loop() {
    myGNSS.checkUblox(); 
    if ((myGNSS.getPVT())&(myGNSS.getFixType() > 2)) {
        float lat = myGNSS.getLatitude() 
        float lon = myGNSS.getLongitude()
       }
}

Is there any difference between the two versions? Which one should be used, or perhaps supplemented?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions