get-precision

wayland/gps/get-precision

Read horizontal dilution of precision (HDOP). HDOP provides a measure of accuracy in 2-D position (i.e. Latitude and Longitude).
get-precision
@/get-precision
Read horizontal dilution of precision (HDOP). HDOP provides a measure of accuracy in 2-D position (i.e. Latitude and Longitude).
GPS@/gps-device
A gps-device.
UPDpulse
Update.
get-precision
GPS
UPD
HDOP
Done
Donepulse
Pulse on successful read. Will only pulse if HDOP valid.
HDOPnumber
Horizontal dilution of precision.
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);

        if (gps->hdop.isValid()){
            emitValue<output_HDOP>(ctx, gps->hdop.hdop());
            emitValue<output_Done>(ctx, 1);
        }
    }
}