get-diagnostics

wayland/gps/get-diagnostics

Retrieve data that can help diagnose problems with streaming data from the GPS.
get-diagnostics
@/get-diagnostics
Retrieve data that can help diagnose problems with streaming data from the GPS.
GPS@/gps-device
A gps-device.
UPDpulse
Update.
get-diagnostics
GPS
UPD
nChar
nSent
passChk
failChk
Done
Donepulse
Pulse on read.
failChknumber
Failed checksum. The number of sentences of all types that failed the checksum test.
passChknumber
Passed checksum. The number of sentences of all types that passed the checksum test.
nSentnumber
The number of $GPRMC or $GPGGA sentences that had a fix.
nCharnumber
The total number of characters received from the GPS.
To use the node in your project you should have the wayland/gps library installed. Use the “File → Add Library” menu item in XOD IDE if you don’t have it yet. See Using libraries for more info.

C++ implementation

#pragma XOD evaluate_on_pin disable
#pragma XOD evaluate_on_pin enable input_UPD

node {

    void evaluate(Context ctx) {
        if (!isInputDirty<input_UPD>(ctx))
            return;

        auto gps = getValue<input_GPS>(ctx);

        emitValue<output_nChar>(ctx, gps->charsProcessed());
        emitValue<output_nSent>(ctx, gps->sentencesWithFix());
        emitValue<output_passChk>(ctx, gps->passedChecksum());
        emitValue<output_failChk>(ctx, gps->failedChecksum());
        emitValue<output_Done>(ctx, 1);

    }
}