Merge "Change TOC and TOE to long" into tm-dev

This commit is contained in:
TreeHugger Robot
2022-02-19 01:01:40 +00:00
committed by Android (Google) Code Review
4 changed files with 25 additions and 22 deletions

View File

@@ -40,10 +40,10 @@ parcelable SatellitePvt {
android.hardware.gnss.SatelliteClockInfo satClockInfo;
double ionoDelayMeters;
double tropoDelayMeters;
int TOC;
int IODC;
int TOE;
int IODE;
long timeOfClockSeconds;
int issueOfDataClock;
long timeOfEphemerisSeconds;
int issueOfDataEphemeris;
android.hardware.gnss.SatellitePvt.SatelliteEphemerisSource ephemerisSource = android.hardware.gnss.SatellitePvt.SatelliteEphemerisSource.OTHER;
const int HAS_POSITION_VELOCITY_CLOCK_INFO = 1;
const int HAS_IONO = 2;

View File

@@ -76,12 +76,13 @@ parcelable SatellitePvt {
double tropoDelayMeters;
/**
* Time of Clock.
* Time of Clock in seconds.
*
* This is defined in GPS ICD200 documentation
* (e.g., https://www.gps.gov/technical/icwg/IS-GPS-200H.pdf).
* This value is defined in seconds since GPS epoch, regardless of the constellation.
*
* The value must not be encoded as in GPS ICD200 documentation.
*/
int TOC;
long timeOfClockSeconds;
/**
* Issue of Data, Clock.
@@ -91,15 +92,16 @@ parcelable SatellitePvt {
*
* The field must be set to 0 if it is not supported.
*/
int IODC;
int issueOfDataClock;
/**
* Time of Ephemeris.
* Time of Ephemeris in seconds.
*
* This is defined in GPS ICD200 documentation
* (e.g., https://www.gps.gov/technical/icwg/IS-GPS-200H.pdf).
* This value is defined in seconds since GPS epoch, regardless of the constellation.
*
* The value must not be encoded as in GPS ICD200 documentation.
*/
int TOE;
long timeOfEphemerisSeconds;
/**
* Issue of Data, Ephemeris.
@@ -109,7 +111,7 @@ parcelable SatellitePvt {
*
* The field must be set to 0 if it is not supported.
*/
int IODE;
int issueOfDataEphemeris;
/** Satellite's ephemeris source */
@VintfStability

View File

@@ -366,12 +366,13 @@ void CheckSatellitePvt(const SatellitePvt& satellitePvt, const int interfaceVers
ASSERT_TRUE(satellitePvt.tropoDelayMeters > 0 && satellitePvt.tropoDelayMeters < 100);
}
if (interfaceVersion >= 2) {
ASSERT_TRUE(satellitePvt.TOC >= 0 && satellitePvt.TOC <= 604784);
ASSERT_TRUE(satellitePvt.TOE >= 0 && satellitePvt.TOE <= 604784);
ASSERT_TRUE(satellitePvt.timeOfClockSeconds >= 0);
ASSERT_TRUE(satellitePvt.timeOfEphemerisSeconds >= 0);
// IODC has 10 bits
ASSERT_TRUE(satellitePvt.IODC >= 0 && satellitePvt.IODC <= 1023);
ASSERT_TRUE(satellitePvt.issueOfDataClock >= 0 && satellitePvt.issueOfDataClock <= 1023);
// IODE has 8 bits
ASSERT_TRUE(satellitePvt.IODE >= 0 && satellitePvt.IODE <= 255);
ASSERT_TRUE(satellitePvt.issueOfDataEphemeris >= 0 &&
satellitePvt.issueOfDataEphemeris <= 255);
}
}

View File

@@ -201,10 +201,10 @@ GnssData Utils::getMockMeasurement(const bool enableCorrVecOutputs) {
.tropoDelayMeters = 3.882265204404031,
.ephemerisSource =
SatellitePvt::SatelliteEphemerisSource::SERVER_LONG_TERM,
.TOC = 12345,
.IODC = 143,
.TOE = 9876,
.IODE = 48,
.timeOfClockSeconds = 12345,
.issueOfDataClock = 143,
.timeOfEphemerisSeconds = 9876,
.issueOfDataEphemeris = 48,
},
.correlationVectors = {}};