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

Commit 6564ff8b authored by Yu-Han Yang's avatar Yu-Han Yang Committed by Android (Google) Code Review
Browse files

Merge "Add ExcessPathInfo (hardware/interfaces)" into tm-dev

parents 004558c9 f5bd7c05
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -38,5 +38,5 @@ parcelable ReflectingPlane {
  double latitudeDegrees;
  double longitudeDegrees;
  double altitudeMeters;
  double azimuthDegrees;
  double reflectingPlaneAzimuthDegrees;
}
+19 −6
Original line number Diff line number Diff line
@@ -40,11 +40,24 @@ parcelable SingleSatCorrection {
  int svid;
  long carrierFrequencyHz;
  float probSatIsLos;
  float combinedExcessPathLengthMeters;
  float combinedExcessPathLengthUncertaintyMeters;
  float combinedAttenuationDb;
  android.hardware.gnss.measurement_corrections.SingleSatCorrection.ExcessPathInfo[] excessPathInfos;
  const int SINGLE_SAT_CORRECTION_HAS_SAT_IS_LOS_PROBABILITY = 1;
  const int SINGLE_SAT_CORRECTION_HAS_COMBINED_EXCESS_PATH_LENGTH = 2;
  const int SINGLE_SAT_CORRECTION_HAS_COMBINED_EXCESS_PATH_LENGTH_UNC = 4;
  const int SINGLE_SAT_CORRECTION_HAS_COMBINED_ATTENUATION = 16;
  @VintfStability
  parcelable ExcessPathInfo {
    int excessPathInfoFlags;
    float excessPathLengthMeters;
    float excessPathLengthUncertaintyMeters;
    android.hardware.gnss.measurement_corrections.ReflectingPlane reflectingPlane;
  const int SINGLE_SAT_CORRECTION_HAS_SAT_IS_LOS_PROBABILITY = 1;
  const int SINGLE_SAT_CORRECTION_HAS_EXCESS_PATH_LENGTH = 2;
  const int SINGLE_SAT_CORRECTION_HAS_EXCESS_PATH_LENGTH_UNC = 4;
  const int SINGLE_SAT_CORRECTION_HAS_REFLECTING_PLANE = 8;
    float attenuationDb;
    const int EXCESS_PATH_INFO_HAS_EXCESS_PATH_LENGTH = 1;
    const int EXCESS_PATH_INFO_HAS_EXCESS_PATH_LENGTH_UNC = 2;
    const int EXCESS_PATH_INFO_HAS_REFLECTING_PLANE = 4;
    const int EXCESS_PATH_INFO_HAS_ATTENUATION = 8;
  }
}
+1 −1
Original line number Diff line number Diff line
@@ -41,5 +41,5 @@ parcelable ReflectingPlane {
    double altitudeMeters;

    /** Represents azimuth clockwise from north of the reflecting plane in degrees. */
    double azimuthDegrees;
    double reflectingPlaneAzimuthDegrees;
}
+71 −18
Original line number Diff line number Diff line
@@ -29,14 +29,14 @@ import android.hardware.gnss.measurement_corrections.ReflectingPlane;
@VintfStability
parcelable SingleSatCorrection {
    /** Bit mask to indicate which values are valid in a SingleSatCorrection object. */
    /** GnssSingleSatCorrectionFlags has valid satellite-is-line-of-sight-probability field. */
    /** GnssSingleSatCorrectionFlags has valid probSatIsLos field. */
    const int SINGLE_SAT_CORRECTION_HAS_SAT_IS_LOS_PROBABILITY = 0x0001;
    /** GnssSingleSatCorrectionFlags has valid Excess Path Length field. */
    const int SINGLE_SAT_CORRECTION_HAS_EXCESS_PATH_LENGTH = 0x0002;
    /** GnssSingleSatCorrectionFlags has valid Excess Path Length Uncertainty field. */
    const int SINGLE_SAT_CORRECTION_HAS_EXCESS_PATH_LENGTH_UNC = 0x0004;
    /** GnssSingleSatCorrectionFlags has valid Reflecting Plane field. */
    const int SINGLE_SAT_CORRECTION_HAS_REFLECTING_PLANE = 0x0008;
    /** GnssSingleSatCorrectionFlags has valid combinedExcessPathLengthMeters field. */
    const int SINGLE_SAT_CORRECTION_HAS_COMBINED_EXCESS_PATH_LENGTH = 0x0002;
    /** GnssSingleSatCorrectionFlags has valid combinedExcessPathLengthUncertaintyMeters field. */
    const int SINGLE_SAT_CORRECTION_HAS_COMBINED_EXCESS_PATH_LENGTH_UNC = 0x0004;
    /** GnssSingleSatCorrectionFlags has valid combinedAttenuationDb field. */
    const int SINGLE_SAT_CORRECTION_HAS_COMBINED_ATTENUATION = 0x0010;

    /** Contains GnssSingleSatCorrectionFlags bits. */
    int singleSatCorrectionFlags;
@@ -67,21 +67,74 @@ parcelable SingleSatCorrection {
    float probSatIsLos;

    /**
     * Excess path length to be subtracted from pseudorange before using it in calculating location.
     * Combined excess path length to be subtracted from pseudorange before using it in
     * calculating location.
     *
     * Note this value is NOT to be used to adjust the GnsseasurementCallback outputs.
     * The value is computed by correlating the individual paths and picking the delay at the
     * highest peak.
     *
     * Note this value is NOT to be used to adjust the GnssMeasurementCallback outputs.
     */
    float combinedExcessPathLengthMeters;

    /**
     * Error estimate (1-sigma) for the Excess path length estimate.
     *
     * The value is computed by combining the individual excessPathLengthUncertaintyMeters values
     * into a single value for this satellite.
     */
    float combinedExcessPathLengthUncertaintyMeters;

    /**
     * Combined expected reduction of signal strength for this satellite in non-negative dB.
     */
    float combinedAttenuationDb;

    /**
     * A struct for the info of an excess path caused by reflection.
     */
    @VintfStability
    parcelable ExcessPathInfo {
        /** ExcessPathInfo has valid Excess Path Length field. */
        const int EXCESS_PATH_INFO_HAS_EXCESS_PATH_LENGTH = 0x0001;
        /** ExcessPathInfo has valid Excess Path Length Uncertainty field. */
        const int EXCESS_PATH_INFO_HAS_EXCESS_PATH_LENGTH_UNC = 0x0002;
        /** ExcessPathInfo has valid Reflecting Plane field. */
        const int EXCESS_PATH_INFO_HAS_REFLECTING_PLANE = 0x0004;
        /** ExcessPathInfo has valid Attenuation field. */
        const int EXCESS_PATH_INFO_HAS_ATTENUATION = 0x0008;

        /** Contains flag bits to indicate which fields exist in the ExcessPathInfo object. */
        int excessPathInfoFlags;

        /**
         * Excess path length to be subtracted from pseudorange before using it in calculating
         * location.
         *
         * Note this value is NOT to be used to adjust the GnssMeasurementCallback outputs.
         */
        float excessPathLengthMeters;

    /** Error estimate (1-sigma) for the Excess path length estimate */
        /** Error estimate (1-sigma) for the Excess path length estimate. */
        float excessPathLengthUncertaintyMeters;

        /**
     * Defines the reflecting plane characteristics such as location and azimuth
         * Defines the reflecting plane characteristics such as location and azimuth.
         *
         * The value is only valid if HAS_REFLECTING_PLANE flag is set. An invalid reflecting plane
         * means either reflection planes serving is not supported or the satellite signal has gone
         * through multiple reflections.
         */
        ReflectingPlane reflectingPlane;

        /**
         * The expected reduction of signal strength of this path in non-negative dB.
         */
        float attenuationDb;
    }

    /**
     * A list of excess path info.
     */
    ExcessPathInfo[] excessPathInfos;
}
+18 −8
Original line number Diff line number Diff line
@@ -37,16 +37,26 @@ ndk::ScopedAStatus MeasurementCorrectionsInterface::setCorrections(
          static_cast<int>(corrections.satCorrections.size()));
    for (auto singleSatCorrection : corrections.satCorrections) {
        ALOGD("singleSatCorrection = flags: %d, constellation: %d, svid: %d"
              ", cfHz: %" PRId64 ", probLos: %f, epl: %f, eplUnc: %f",
              ", cfHz: %" PRId64
              ", probLos: %f, combinedEpl: %f, combinedEplUnc: %f, combinedAttenuation: %f"
              ", excessPathInfos.size: %d",
              singleSatCorrection.singleSatCorrectionFlags, singleSatCorrection.constellation,
              singleSatCorrection.svid, singleSatCorrection.carrierFrequencyHz,
              singleSatCorrection.probSatIsLos, singleSatCorrection.excessPathLengthMeters,
              singleSatCorrection.excessPathLengthUncertaintyMeters);
              singleSatCorrection.probSatIsLos, singleSatCorrection.combinedExcessPathLengthMeters,
              singleSatCorrection.combinedExcessPathLengthUncertaintyMeters,
              singleSatCorrection.combinedAttenuationDb,
              static_cast<int>(singleSatCorrection.excessPathInfos.size()));

        for (auto excessPathInfo : singleSatCorrection.excessPathInfos) {
            ALOGD("excessPathInfo = epl: %f, eplUnc: %f, attenuation: %f",
                  excessPathInfo.excessPathLengthMeters,
                  excessPathInfo.excessPathLengthUncertaintyMeters, excessPathInfo.attenuationDb);
            ALOGD("reflecting plane = lat: %f, lng: %f, alt: %f, azm: %f",
              singleSatCorrection.reflectingPlane.latitudeDegrees,
              singleSatCorrection.reflectingPlane.longitudeDegrees,
              singleSatCorrection.reflectingPlane.altitudeMeters,
              singleSatCorrection.reflectingPlane.azimuthDegrees);
                  excessPathInfo.reflectingPlane.latitudeDegrees,
                  excessPathInfo.reflectingPlane.longitudeDegrees,
                  excessPathInfo.reflectingPlane.altitudeMeters,
                  excessPathInfo.reflectingPlane.reflectingPlaneAzimuthDegrees);
        }
    }
    return ndk::ScopedAStatus::ok();
}
Loading