Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1bf9910b authored by Hridya Valsaraju's avatar Hridya Valsaraju
Browse files

Add GnssLocationFlag enum

Enum created using constants from gps.h that was missed during
original conversion.

Bug: 31974439
Test: mm
Change-Id: I5ce7bd25c5fac9860ac352f8bc873feddfb31062
parent 7037fdbf
Loading
Loading
Loading
Loading
+15 −3
Original line number Diff line number Diff line
@@ -37,11 +37,24 @@ enum GnssConstellationType : uint8_t {
    GALILEO = 6,
};

/** Bit mask to indicate which values are valid in a GnssLocation object. */
enum GnssLocationFlags : uint16_t {
    /** GnssLocation has valid latitude and longitude. */
    HAS_LAT_LONG = 0x0001,
    /** GnssLocation has valid altitude. */
    HAS_ALTITUDE = 0x0002,
    /** GnssLocation has valid speed. */
    HAS_SPEED    = 0x0004,
    /** GnssLocation has valid bearing. */
    HAS_BEARING  = 0x0008,
    /** GnssLocation has valid accuracy. */
    HAS_ACCURACY = 0x0010
};

/* Represents a location. */
struct GnssLocation {
    /* Contains GnssLocationFlags bits. */
    // TODO bitfield?
    uint16_t gnssLocationFlags;
    bitfield<GnssLocationFlags> gnssLocationFlags;

    /* Represents latitude in degrees. */
    double latitudeDegrees;
@@ -65,5 +78,4 @@ struct GnssLocation {

    /* Timestamp for the location fix. */
    GnssUtcTime timestamp;

};