sanders: gps: update to LA.UM.7.6.r1-02000-89xx.0 tag

This commit is contained in:
therootlord
2018-09-12 13:45:48 -03:00
parent 8a6b5c05e7
commit 0a41b9dc1a
150 changed files with 4794 additions and 4130 deletions

View File

@@ -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