Change TOC and TOE to long

Change TOC and TOE definition to
1. long
2. time in seconds since GPS epoch, regardless of constellation
3. must not be encoded
4. rename to timeOfClockSeconds and timeOfEphemerisSeconds

Bug: 219575003
Test: on device
Change-Id: Icb75a3397d3bf41c91e2a19bbec8a95a97100a07
diff --git a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/SatellitePvt.aidl b/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/SatellitePvt.aidl
index 21a2520..dc875fa 100644
--- a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/SatellitePvt.aidl
+++ b/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/SatellitePvt.aidl
@@ -40,10 +40,10 @@
   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;
diff --git a/gnss/aidl/android/hardware/gnss/SatellitePvt.aidl b/gnss/aidl/android/hardware/gnss/SatellitePvt.aidl
index e79249d..d9f767a 100644
--- a/gnss/aidl/android/hardware/gnss/SatellitePvt.aidl
+++ b/gnss/aidl/android/hardware/gnss/SatellitePvt.aidl
@@ -76,12 +76,13 @@
     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 @@
      *
      * 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 @@
      *
      * The field must be set to 0 if it is not supported.
      */
-    int IODE;
+    int issueOfDataEphemeris;
 
     /** Satellite's ephemeris source */
     @VintfStability
diff --git a/gnss/aidl/vts/gnss_hal_test_cases.cpp b/gnss/aidl/vts/gnss_hal_test_cases.cpp
index 365f9d3..54946fb 100644
--- a/gnss/aidl/vts/gnss_hal_test_cases.cpp
+++ b/gnss/aidl/vts/gnss_hal_test_cases.cpp
@@ -366,12 +366,13 @@
         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);
     }
 }
 
diff --git a/gnss/common/utils/default/Utils.cpp b/gnss/common/utils/default/Utils.cpp
index a519d3a..4de49f3 100644
--- a/gnss/common/utils/default/Utils.cpp
+++ b/gnss/common/utils/default/Utils.cpp
@@ -201,10 +201,10 @@
                             .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 = {}};