Loading gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/SatellitePvt.aidl +4 −0 Original line number Diff line number Diff line Loading @@ -34,9 +34,13 @@ package android.hardware.gnss; @VintfStability parcelable SatellitePvt { int flags; android.hardware.gnss.SatellitePositionEcef satPosEcef; android.hardware.gnss.SatelliteVelocityEcef satVelEcef; android.hardware.gnss.SatelliteClockInfo satClockInfo; double ionoDelayMeters; double tropoDelayMeters; const int HAS_POSITION_VELOCITY_CLOCK_INFO = 1; const int HAS_IONO = 2; const int HAS_TROPO = 4; } gnss/aidl/android/hardware/gnss/SatellitePvt.aidl +30 −2 Original line number Diff line number Diff line Loading @@ -16,9 +16,9 @@ package android.hardware.gnss; import android.hardware.gnss.SatelliteClockInfo; import android.hardware.gnss.SatellitePositionEcef; import android.hardware.gnss.SatelliteVelocityEcef; import android.hardware.gnss.SatelliteClockInfo; /** * Contains estimates of the satellite position, velocity and time in the Loading @@ -26,6 +26,34 @@ import android.hardware.gnss.SatelliteClockInfo; */ @VintfStability parcelable SatellitePvt { /** * Bit mask indicating valid satellite position, velocity and clock info fields are * stored in the SatellitePvt. */ const int HAS_POSITION_VELOCITY_CLOCK_INFO = 1 << 0; /** * Bit mask indicating a valid iono delay field is stored in the SatellitePvt. */ const int HAS_IONO = 1 << 1; /** * Bit mask indicating a valid tropo delay field is stored in the SatellitePvt. */ const int HAS_TROPO = 1 << 2; /** * A bitfield of flags indicating the validity of the fields in this SatellitePvt. * The bit masks are defined in the constants with prefix HAS_* * * Fields for which there is no corresponding flag must be filled in with a valid value. * For convenience, these are marked as mandatory. * * Others fields may have invalid information in them, if not marked as valid by the * corresponding bit in flags. */ int flags; /** * Satellite position in WGS84 ECEF. See comments of * SatellitePositionEcef for units. Loading gnss/aidl/vts/gnss_hal_test_cases.cpp +34 −16 Original line number Diff line number Diff line Loading @@ -38,6 +38,7 @@ using android::hardware::gnss::IGnssMeasurementInterface; using android::hardware::gnss::IGnssPowerIndication; using android::hardware::gnss::IGnssPsds; using android::hardware::gnss::PsdsType; using android::hardware::gnss::SatellitePvt; using GnssConstellationTypeAidl = android::hardware::gnss::GnssConstellationType; Loading Loading @@ -128,8 +129,9 @@ TEST_P(GnssHalTest, TestGnssMeasurementExtension) { GnssMeasurement::HAS_SATELLITE_PVT | GnssMeasurement::HAS_CORRELATION_VECTOR)); if ((measurement.flags & GnssMeasurement::HAS_SATELLITE_PVT) && (has_capability_satpvt == true)) { if (measurement.flags & GnssMeasurement::HAS_SATELLITE_PVT && has_capability_satpvt == true) { if (measurement.satellitePvt.flags & SatellitePvt::HAS_POSITION_VELOCITY_CLOCK_INFO) { ASSERT_TRUE(measurement.satellitePvt.satPosEcef.posXMeters >= -43000000 && measurement.satellitePvt.satPosEcef.posXMeters <= 43000000); ASSERT_TRUE(measurement.satellitePvt.satPosEcef.posYMeters >= -43000000 && Loading @@ -144,6 +146,22 @@ TEST_P(GnssHalTest, TestGnssMeasurementExtension) { ASSERT_TRUE(measurement.satellitePvt.satVelEcef.velZMps >= -4000 && measurement.satellitePvt.satVelEcef.velZMps <= 4000); ASSERT_TRUE(measurement.satellitePvt.satVelEcef.ureRateMps > 0); ASSERT_TRUE( measurement.satellitePvt.satClockInfo.satHardwareCodeBiasMeters > -17.869 && measurement.satellitePvt.satClockInfo.satHardwareCodeBiasMeters < 17.729); ASSERT_TRUE(measurement.satellitePvt.satClockInfo.satTimeCorrectionMeters > -3e6 && measurement.satellitePvt.satClockInfo.satTimeCorrectionMeters < 3e6); ASSERT_TRUE(measurement.satellitePvt.satClockInfo.satClkDriftMps > -1.117 && measurement.satellitePvt.satClockInfo.satClkDriftMps < 1.117); } if (measurement.satellitePvt.flags & SatellitePvt::HAS_IONO) { ASSERT_TRUE(measurement.satellitePvt.ionoDelayMeters > 0 && measurement.satellitePvt.ionoDelayMeters < 100); } if (measurement.satellitePvt.flags & SatellitePvt::HAS_TROPO) { ASSERT_TRUE(measurement.satellitePvt.tropoDelayMeters > 0 && measurement.satellitePvt.tropoDelayMeters < 100); } } if (kIsCorrelationVectorSupported && Loading gnss/common/utils/default/Utils.cpp +4 −1 Original line number Diff line number Diff line Loading @@ -31,6 +31,7 @@ using aidl::android::hardware::gnss::GnssData; using aidl::android::hardware::gnss::GnssMeasurement; using aidl::android::hardware::gnss::IGnss; using aidl::android::hardware::gnss::IGnssMeasurementCallback; using aidl::android::hardware::gnss::SatellitePvt; using GnssSvFlags = V1_0::IGnssCallback::GnssSvFlags; using GnssMeasurementFlagsV1_0 = V1_0::IGnssMeasurementCallback::GnssMeasurementFlags; Loading Loading @@ -175,7 +176,9 @@ GnssData Utils::getMockMeasurement(const bool enableCorrVecOutputs) { .fullInterSignalBiasUncertaintyNs = 792.0, .satelliteInterSignalBiasNs = 233.9, .satelliteInterSignalBiasUncertaintyNs = 921.2, .satellitePvt = {.satPosEcef = {.posXMeters = 10442993.1153328, .satellitePvt = {.flags = SatellitePvt::HAS_POSITION_VELOCITY_CLOCK_INFO | SatellitePvt::HAS_IONO | SatellitePvt::HAS_TROPO, .satPosEcef = {.posXMeters = 10442993.1153328, .posYMeters = -19926932.8051666, .posZMeters = -12034295.0216203, .ureMeters = 1000.2345678}, Loading Loading
gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/SatellitePvt.aidl +4 −0 Original line number Diff line number Diff line Loading @@ -34,9 +34,13 @@ package android.hardware.gnss; @VintfStability parcelable SatellitePvt { int flags; android.hardware.gnss.SatellitePositionEcef satPosEcef; android.hardware.gnss.SatelliteVelocityEcef satVelEcef; android.hardware.gnss.SatelliteClockInfo satClockInfo; double ionoDelayMeters; double tropoDelayMeters; const int HAS_POSITION_VELOCITY_CLOCK_INFO = 1; const int HAS_IONO = 2; const int HAS_TROPO = 4; }
gnss/aidl/android/hardware/gnss/SatellitePvt.aidl +30 −2 Original line number Diff line number Diff line Loading @@ -16,9 +16,9 @@ package android.hardware.gnss; import android.hardware.gnss.SatelliteClockInfo; import android.hardware.gnss.SatellitePositionEcef; import android.hardware.gnss.SatelliteVelocityEcef; import android.hardware.gnss.SatelliteClockInfo; /** * Contains estimates of the satellite position, velocity and time in the Loading @@ -26,6 +26,34 @@ import android.hardware.gnss.SatelliteClockInfo; */ @VintfStability parcelable SatellitePvt { /** * Bit mask indicating valid satellite position, velocity and clock info fields are * stored in the SatellitePvt. */ const int HAS_POSITION_VELOCITY_CLOCK_INFO = 1 << 0; /** * Bit mask indicating a valid iono delay field is stored in the SatellitePvt. */ const int HAS_IONO = 1 << 1; /** * Bit mask indicating a valid tropo delay field is stored in the SatellitePvt. */ const int HAS_TROPO = 1 << 2; /** * A bitfield of flags indicating the validity of the fields in this SatellitePvt. * The bit masks are defined in the constants with prefix HAS_* * * Fields for which there is no corresponding flag must be filled in with a valid value. * For convenience, these are marked as mandatory. * * Others fields may have invalid information in them, if not marked as valid by the * corresponding bit in flags. */ int flags; /** * Satellite position in WGS84 ECEF. See comments of * SatellitePositionEcef for units. Loading
gnss/aidl/vts/gnss_hal_test_cases.cpp +34 −16 Original line number Diff line number Diff line Loading @@ -38,6 +38,7 @@ using android::hardware::gnss::IGnssMeasurementInterface; using android::hardware::gnss::IGnssPowerIndication; using android::hardware::gnss::IGnssPsds; using android::hardware::gnss::PsdsType; using android::hardware::gnss::SatellitePvt; using GnssConstellationTypeAidl = android::hardware::gnss::GnssConstellationType; Loading Loading @@ -128,8 +129,9 @@ TEST_P(GnssHalTest, TestGnssMeasurementExtension) { GnssMeasurement::HAS_SATELLITE_PVT | GnssMeasurement::HAS_CORRELATION_VECTOR)); if ((measurement.flags & GnssMeasurement::HAS_SATELLITE_PVT) && (has_capability_satpvt == true)) { if (measurement.flags & GnssMeasurement::HAS_SATELLITE_PVT && has_capability_satpvt == true) { if (measurement.satellitePvt.flags & SatellitePvt::HAS_POSITION_VELOCITY_CLOCK_INFO) { ASSERT_TRUE(measurement.satellitePvt.satPosEcef.posXMeters >= -43000000 && measurement.satellitePvt.satPosEcef.posXMeters <= 43000000); ASSERT_TRUE(measurement.satellitePvt.satPosEcef.posYMeters >= -43000000 && Loading @@ -144,6 +146,22 @@ TEST_P(GnssHalTest, TestGnssMeasurementExtension) { ASSERT_TRUE(measurement.satellitePvt.satVelEcef.velZMps >= -4000 && measurement.satellitePvt.satVelEcef.velZMps <= 4000); ASSERT_TRUE(measurement.satellitePvt.satVelEcef.ureRateMps > 0); ASSERT_TRUE( measurement.satellitePvt.satClockInfo.satHardwareCodeBiasMeters > -17.869 && measurement.satellitePvt.satClockInfo.satHardwareCodeBiasMeters < 17.729); ASSERT_TRUE(measurement.satellitePvt.satClockInfo.satTimeCorrectionMeters > -3e6 && measurement.satellitePvt.satClockInfo.satTimeCorrectionMeters < 3e6); ASSERT_TRUE(measurement.satellitePvt.satClockInfo.satClkDriftMps > -1.117 && measurement.satellitePvt.satClockInfo.satClkDriftMps < 1.117); } if (measurement.satellitePvt.flags & SatellitePvt::HAS_IONO) { ASSERT_TRUE(measurement.satellitePvt.ionoDelayMeters > 0 && measurement.satellitePvt.ionoDelayMeters < 100); } if (measurement.satellitePvt.flags & SatellitePvt::HAS_TROPO) { ASSERT_TRUE(measurement.satellitePvt.tropoDelayMeters > 0 && measurement.satellitePvt.tropoDelayMeters < 100); } } if (kIsCorrelationVectorSupported && Loading
gnss/common/utils/default/Utils.cpp +4 −1 Original line number Diff line number Diff line Loading @@ -31,6 +31,7 @@ using aidl::android::hardware::gnss::GnssData; using aidl::android::hardware::gnss::GnssMeasurement; using aidl::android::hardware::gnss::IGnss; using aidl::android::hardware::gnss::IGnssMeasurementCallback; using aidl::android::hardware::gnss::SatellitePvt; using GnssSvFlags = V1_0::IGnssCallback::GnssSvFlags; using GnssMeasurementFlagsV1_0 = V1_0::IGnssMeasurementCallback::GnssMeasurementFlags; Loading Loading @@ -175,7 +176,9 @@ GnssData Utils::getMockMeasurement(const bool enableCorrVecOutputs) { .fullInterSignalBiasUncertaintyNs = 792.0, .satelliteInterSignalBiasNs = 233.9, .satelliteInterSignalBiasUncertaintyNs = 921.2, .satellitePvt = {.satPosEcef = {.posXMeters = 10442993.1153328, .satellitePvt = {.flags = SatellitePvt::HAS_POSITION_VELOCITY_CLOCK_INFO | SatellitePvt::HAS_IONO | SatellitePvt::HAS_TROPO, .satPosEcef = {.posXMeters = 10442993.1153328, .posYMeters = -19926932.8051666, .posZMeters = -12034295.0216203, .ureMeters = 1000.2345678}, Loading