sanders: gps: update to LA.UM.7.6.r1-02000-89xx.0 tag
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* Copyright (c) 2017, The Linux Foundation. All rights reserved.
|
||||
/* Copyright (c) 2017-2018, The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are
|
||||
@@ -32,9 +32,13 @@
|
||||
namespace android {
|
||||
namespace hardware {
|
||||
namespace gnss {
|
||||
namespace V1_0 {
|
||||
namespace V1_1 {
|
||||
namespace implementation {
|
||||
|
||||
using ::android::hardware::gnss::V1_0::GnssLocation;
|
||||
using ::android::hardware::gnss::V1_0::GnssConstellationType;
|
||||
using ::android::hardware::gnss::V1_0::GnssLocationFlags;
|
||||
|
||||
void convertGnssLocation(Location& in, GnssLocation& out)
|
||||
{
|
||||
memset(&out, 0, sizeof(GnssLocation));
|
||||
@@ -63,7 +67,38 @@ void convertGnssLocation(Location& in, GnssLocation& out)
|
||||
out.verticalAccuracyMeters = in.verticalAccuracy;
|
||||
out.speedAccuracyMetersPerSecond = in.speedAccuracy;
|
||||
out.bearingAccuracyDegrees = in.bearingAccuracy;
|
||||
out.timestamp = static_cast<GnssUtcTime>(in.timestamp);
|
||||
out.timestamp = static_cast<V1_0::GnssUtcTime>(in.timestamp);
|
||||
}
|
||||
|
||||
void convertGnssLocation(const GnssLocation& in, Location& out)
|
||||
{
|
||||
memset(&out, 0, sizeof(out));
|
||||
if (in.gnssLocationFlags & GnssLocationFlags::HAS_LAT_LONG)
|
||||
out.flags |= LOCATION_HAS_LAT_LONG_BIT;
|
||||
if (in.gnssLocationFlags & GnssLocationFlags::HAS_ALTITUDE)
|
||||
out.flags |= LOCATION_HAS_ALTITUDE_BIT;
|
||||
if (in.gnssLocationFlags & GnssLocationFlags::HAS_SPEED)
|
||||
out.flags |= LOCATION_HAS_SPEED_BIT;
|
||||
if (in.gnssLocationFlags & GnssLocationFlags::HAS_BEARING)
|
||||
out.flags |= LOCATION_HAS_BEARING_BIT;
|
||||
if (in.gnssLocationFlags & GnssLocationFlags::HAS_HORIZONTAL_ACCURACY)
|
||||
out.flags |= LOCATION_HAS_ACCURACY_BIT;
|
||||
if (in.gnssLocationFlags & GnssLocationFlags::HAS_VERTICAL_ACCURACY)
|
||||
out.flags |= LOCATION_HAS_VERTICAL_ACCURACY_BIT;
|
||||
if (in.gnssLocationFlags & GnssLocationFlags::HAS_SPEED_ACCURACY)
|
||||
out.flags |= LOCATION_HAS_SPEED_ACCURACY_BIT;
|
||||
if (in.gnssLocationFlags & GnssLocationFlags::HAS_BEARING_ACCURACY)
|
||||
out.flags |= LOCATION_HAS_BEARING_ACCURACY_BIT;
|
||||
out.latitude = in.latitudeDegrees;
|
||||
out.longitude = in.longitudeDegrees;
|
||||
out.altitude = in.altitudeMeters;
|
||||
out.speed = in.speedMetersPerSec;
|
||||
out.bearing = in.bearingDegrees;
|
||||
out.accuracy = in.horizontalAccuracyMeters;
|
||||
out.verticalAccuracy = in.verticalAccuracyMeters;
|
||||
out.speedAccuracy = in.speedAccuracyMetersPerSecond;
|
||||
out.bearingAccuracy = in.bearingAccuracyDegrees;
|
||||
out.timestamp = static_cast<uint64_t>(in.timestamp);
|
||||
}
|
||||
|
||||
void convertGnssConstellationType(GnssSvType& in, GnssConstellationType& out)
|
||||
@@ -147,7 +182,7 @@ void convertGnssEphemerisHealth(GnssEphemerisHealth& in, GnssDebug::SatelliteEph
|
||||
}
|
||||
|
||||
} // namespace implementation
|
||||
} // namespace V1_0
|
||||
} // namespace V1_1
|
||||
} // namespace gnss
|
||||
} // namespace hardware
|
||||
} // namespace android
|
||||
|
||||
Reference in New Issue
Block a user