Merge "Update constellation types in measurement corrections"
This commit is contained in:
commit
c2a7122706
6 changed files with 67 additions and 18 deletions
|
@ -659,7 +659,7 @@ ba5ac712b2a656dc07c83ab4a7a2c2f3bee1bbcb752e8b8ffa9b672f3b5b0728 android.hardwar
|
|||
7913a11206a577b12ade86a7cf3f95c2639cb514d086673f279bf99238c9917e android.hardware.gnss@2.1::IGnssMeasurement
|
||||
0a16e5913e94d995cfcf959a1c6f10b0b8e9dfdb5f45ac6e7244711ddd740272 android.hardware.gnss@2.1::IGnssMeasurementCallback
|
||||
6670e7780803a8c696c6391fda5589a334b1b37dc7be9393792ed35035413633 android.hardware.gnss.measurement_corrections@1.1::IMeasurementCorrections
|
||||
a28d6c29a7e36976acffb018208e65b3496d9152d57d864038556cdd83b35744 android.hardware.gnss.measurement_corrections@1.1::types
|
||||
956c1576ca0d6f11b42980ef59052062836b6763fe973af6cb709da50787f710 android.hardware.gnss.measurement_corrections@1.1::types
|
||||
ce8dbe76eb9ee94b46ef98f725be992e760a5751073d4f4912484026541371f3 android.hardware.health@2.1::IHealth
|
||||
26f04510a0b57aba5167c5c0a7c2f077c2acbb98b81902a072517829fd9fd67f android.hardware.health@2.1::IHealthInfoCallback
|
||||
e2f8bc1868fd4a3fd587c172773ea5a8c2f5a3deaf7958394102ca455252b255 android.hardware.health@2.1::types
|
||||
|
|
|
@ -82,19 +82,20 @@ Return<bool> GnssMeasurementCorrections::setCorrections_1_1(
|
|||
static_cast<int>(corrections.v1_0.satCorrections.size()),
|
||||
corrections.hasEnvironmentBearing, corrections.environmentBearingDegrees,
|
||||
corrections.environmentBearingUncertaintyDegrees);
|
||||
for (auto singleSatCorrection : corrections.v1_0.satCorrections) {
|
||||
for (auto singleSatCorrection : corrections.satCorrections) {
|
||||
ALOGD("singleSatCorrection = flags: %d, constellation: %d, svid: %d, cfHz: %f, probLos: %f,"
|
||||
" epl: %f, eplUnc: %f",
|
||||
static_cast<int>(singleSatCorrection.singleSatCorrectionFlags),
|
||||
static_cast<int>(singleSatCorrection.v1_0.singleSatCorrectionFlags),
|
||||
static_cast<int>(singleSatCorrection.constellation),
|
||||
static_cast<int>(singleSatCorrection.svid), singleSatCorrection.carrierFrequencyHz,
|
||||
singleSatCorrection.probSatIsLos, singleSatCorrection.excessPathLengthMeters,
|
||||
singleSatCorrection.excessPathLengthUncertaintyMeters);
|
||||
static_cast<int>(singleSatCorrection.v1_0.svid),
|
||||
singleSatCorrection.v1_0.carrierFrequencyHz, singleSatCorrection.v1_0.probSatIsLos,
|
||||
singleSatCorrection.v1_0.excessPathLengthMeters,
|
||||
singleSatCorrection.v1_0.excessPathLengthUncertaintyMeters);
|
||||
ALOGD("reflecting plane = lat: %f, lng: %f, alt: %f, azm: %f",
|
||||
singleSatCorrection.reflectingPlane.latitudeDegrees,
|
||||
singleSatCorrection.reflectingPlane.longitudeDegrees,
|
||||
singleSatCorrection.reflectingPlane.altitudeMeters,
|
||||
singleSatCorrection.reflectingPlane.azimuthDegrees);
|
||||
singleSatCorrection.v1_0.reflectingPlane.latitudeDegrees,
|
||||
singleSatCorrection.v1_0.reflectingPlane.longitudeDegrees,
|
||||
singleSatCorrection.v1_0.reflectingPlane.altitudeMeters,
|
||||
singleSatCorrection.v1_0.reflectingPlane.azimuthDegrees);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
|
|
@ -22,7 +22,9 @@ namespace hardware {
|
|||
namespace gnss {
|
||||
namespace common {
|
||||
|
||||
using V1_0::GnssConstellationType;
|
||||
using GnssConstellationType_V1_0 = V1_0::GnssConstellationType;
|
||||
using GnssConstellationType_V2_0 = V2_0::GnssConstellationType;
|
||||
|
||||
using V1_0::GnssLocationFlags;
|
||||
|
||||
void Utils::checkLocation(const GnssLocation& location, bool check_speed,
|
||||
|
@ -100,12 +102,12 @@ const MeasurementCorrections_1_0 Utils::getMockMeasurementCorrections() {
|
|||
.azimuthDegrees = 203.0,
|
||||
};
|
||||
|
||||
SingleSatCorrection singleSatCorrection1 = {
|
||||
SingleSatCorrection_V1_0 singleSatCorrection1 = {
|
||||
.singleSatCorrectionFlags = GnssSingleSatCorrectionFlags::HAS_SAT_IS_LOS_PROBABILITY |
|
||||
GnssSingleSatCorrectionFlags::HAS_EXCESS_PATH_LENGTH |
|
||||
GnssSingleSatCorrectionFlags::HAS_EXCESS_PATH_LENGTH_UNC |
|
||||
GnssSingleSatCorrectionFlags::HAS_REFLECTING_PLANE,
|
||||
.constellation = GnssConstellationType::GPS,
|
||||
.constellation = GnssConstellationType_V1_0::GPS,
|
||||
.svid = 12,
|
||||
.carrierFrequencyHz = 1.59975e+09,
|
||||
.probSatIsLos = 0.50001,
|
||||
|
@ -113,11 +115,11 @@ const MeasurementCorrections_1_0 Utils::getMockMeasurementCorrections() {
|
|||
.excessPathLengthUncertaintyMeters = 25.5,
|
||||
.reflectingPlane = reflectingPlane,
|
||||
};
|
||||
SingleSatCorrection singleSatCorrection2 = {
|
||||
SingleSatCorrection_V1_0 singleSatCorrection2 = {
|
||||
.singleSatCorrectionFlags = GnssSingleSatCorrectionFlags::HAS_SAT_IS_LOS_PROBABILITY |
|
||||
GnssSingleSatCorrectionFlags::HAS_EXCESS_PATH_LENGTH |
|
||||
GnssSingleSatCorrectionFlags::HAS_EXCESS_PATH_LENGTH_UNC,
|
||||
.constellation = GnssConstellationType::GPS,
|
||||
.constellation = GnssConstellationType_V1_0::GPS,
|
||||
.svid = 9,
|
||||
.carrierFrequencyHz = 1.59975e+09,
|
||||
.probSatIsLos = 0.873,
|
||||
|
@ -125,8 +127,8 @@ const MeasurementCorrections_1_0 Utils::getMockMeasurementCorrections() {
|
|||
.excessPathLengthUncertaintyMeters = 10.0,
|
||||
};
|
||||
|
||||
hidl_vec<SingleSatCorrection> singleSatCorrections = {singleSatCorrection1,
|
||||
singleSatCorrection2};
|
||||
hidl_vec<SingleSatCorrection_V1_0> singleSatCorrections = {singleSatCorrection1,
|
||||
singleSatCorrection2};
|
||||
MeasurementCorrections_1_0 mockCorrections = {
|
||||
.latitudeDegrees = 37.4219999,
|
||||
.longitudeDegrees = -122.0840575,
|
||||
|
@ -142,11 +144,27 @@ const MeasurementCorrections_1_0 Utils::getMockMeasurementCorrections() {
|
|||
const MeasurementCorrections_1_1 Utils::getMockMeasurementCorrections_1_1() {
|
||||
MeasurementCorrections_1_0 mockCorrections_1_0 = getMockMeasurementCorrections();
|
||||
|
||||
SingleSatCorrection_V1_1 singleSatCorrection1 = {
|
||||
.v1_0 = mockCorrections_1_0.satCorrections[0],
|
||||
.constellation = GnssConstellationType_V2_0::IRNSS,
|
||||
};
|
||||
SingleSatCorrection_V1_1 singleSatCorrection2 = {
|
||||
.v1_0 = mockCorrections_1_0.satCorrections[1],
|
||||
.constellation = GnssConstellationType_V2_0::IRNSS,
|
||||
};
|
||||
|
||||
mockCorrections_1_0.satCorrections[0].constellation = GnssConstellationType_V1_0::UNKNOWN;
|
||||
mockCorrections_1_0.satCorrections[1].constellation = GnssConstellationType_V1_0::UNKNOWN;
|
||||
|
||||
hidl_vec<SingleSatCorrection_V1_1> singleSatCorrections = {singleSatCorrection1,
|
||||
singleSatCorrection2};
|
||||
|
||||
MeasurementCorrections_1_1 mockCorrections_1_1 = {
|
||||
.v1_0 = mockCorrections_1_0,
|
||||
.hasEnvironmentBearing = true,
|
||||
.environmentBearingDegrees = 45.0,
|
||||
.environmentBearingUncertaintyDegrees = 4.0,
|
||||
.satCorrections = singleSatCorrections,
|
||||
};
|
||||
return mockCorrections_1_1;
|
||||
}
|
||||
|
|
|
@ -29,6 +29,11 @@ using MeasurementCorrections_1_0 =
|
|||
using MeasurementCorrections_1_1 =
|
||||
android::hardware::gnss::measurement_corrections::V1_1::MeasurementCorrections;
|
||||
|
||||
using SingleSatCorrection_V1_0 =
|
||||
android::hardware::gnss::measurement_corrections::V1_0::SingleSatCorrection;
|
||||
using SingleSatCorrection_V1_1 =
|
||||
android::hardware::gnss::measurement_corrections::V1_1::SingleSatCorrection;
|
||||
|
||||
namespace android {
|
||||
namespace hardware {
|
||||
namespace gnss {
|
||||
|
|
|
@ -12,6 +12,7 @@ hidl_interface {
|
|||
],
|
||||
interfaces: [
|
||||
"android.hardware.gnss.measurement_corrections@1.0",
|
||||
"android.hardware.gnss@2.0",
|
||||
"android.hardware.gnss@1.0",
|
||||
"android.hidl.base@1.0",
|
||||
],
|
||||
|
|
|
@ -17,11 +17,14 @@
|
|||
package android.hardware.gnss.measurement_corrections@1.1;
|
||||
|
||||
import @1.0::MeasurementCorrections;
|
||||
import @1.0::SingleSatCorrection;
|
||||
import android.hardware.gnss@2.0::GnssConstellationType;
|
||||
|
||||
/**
|
||||
* A struct containing a set of measurement corrections for all used GNSS satellites at the location
|
||||
* specified by latitudeDegrees, longitudeDegrees, altitudeMeters and at the time of week specified
|
||||
* toaGpsNanosecondsOfWeek
|
||||
* toaGpsNanosecondsOfWeek. The v1_0.satCorrections field is deprecated and is no longer used by
|
||||
* framework.
|
||||
*/
|
||||
struct MeasurementCorrections {
|
||||
@1.0::MeasurementCorrections v1_0;
|
||||
|
@ -64,4 +67,25 @@ struct MeasurementCorrections {
|
|||
* before calling this method. The value is undefined if hasEnvironmentBearing is false.
|
||||
*/
|
||||
float environmentBearingUncertaintyDegrees;
|
||||
|
||||
/**
|
||||
* A set of SingleSatCorrection each containing measurement corrections for a satellite in view
|
||||
*/
|
||||
vec<SingleSatCorrection> satCorrections;
|
||||
};
|
||||
|
||||
/**
|
||||
* A struct with measurement corrections for a single visible satellites, updating the
|
||||
* GnssConstellationType to 2.0, which supports IRNSS. The v1_0.constellation is deprecated and is
|
||||
* no longer used by framework.
|
||||
*
|
||||
* The bit mask singleSatCorrectionFlags indicates which correction values are valid in the struct
|
||||
*/
|
||||
struct SingleSatCorrection {
|
||||
@1.0::SingleSatCorrection v1_0;
|
||||
|
||||
/**
|
||||
* Defines the constellation of the given satellite.
|
||||
*/
|
||||
GnssConstellationType constellation;
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue