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

Commit b6a50f07 authored by Wyatt Riley's avatar Wyatt Riley
Browse files

Clearer GnssDebug text output

Bug: 33089503
Test: Builds, runs, more readable on device
Change-Id: I64b844538c26ce457ae066f5be084a80cf37bb7c
parent 3ac00cad
Loading
Loading
Loading
Loading
+15 −14
Original line number Diff line number Diff line
@@ -38,6 +38,7 @@
#include <pthread.h>
#include <string.h>
#include <cinttypes>
#include <iomanip>

static jobject mCallbacksObj = NULL;

@@ -1692,25 +1693,25 @@ static jstring android_location_GnssLocationProvider_get_internal_state(JNIEnv*
                          << " satellites:: " << std::endl;
        }

        internalState << "constellation: 1=GPS, 2=SBAS, 3=GLO, 4=QZSS, 5=BDS, 6=GAL; "
                      << "ephemerisType: 0=Eph, 1=Alm, 2=?; "
                      << "ephemerisSource: 0=Demod, 1=Supl, 2=Server, 3=?; "
                      << "ephemerisHealth: 0=Good, 1=Bad, 2=?" << std::endl;
        internalState << "constell: 1=GPS, 2=SBAS, 3=GLO, 4=QZSS, 5=BDS, 6=GAL; "
                      << "ephType: 0=Eph, 1=Alm, 2=Unk; "
                      << "ephSource: 0=Demod, 1=Supl, 2=Server, 3=Unk; "
                      << "ephHealth: 0=Good, 1=Bad, 2=Unk" << std::endl;
        for (size_t i = 0; i < data.satelliteDataArray.size(); i++) {
            internalState << "svid: " << data.satelliteDataArray[i].svid
                          << ", constellation: "
            internalState << "constell: "
                          << static_cast<uint32_t>(data.satelliteDataArray[i].constellation)
                          << ", ephemerisType: "
                          << ", svid: " << std::setw(3) << data.satelliteDataArray[i].svid
                          << ", serverPredAvail: "
                          << data.satelliteDataArray[i].serverPredictionIsAvailable
                          << ", serverPredAgeSec: " << std::setw(7)
                          << data.satelliteDataArray[i].serverPredictionAgeSeconds
                          << ", ephType: "
                          << static_cast<uint32_t>(data.satelliteDataArray[i].ephemerisType)
                          << ", ephemerisSource: "
                          << ", ephSource: "
                          << static_cast<uint32_t>(data.satelliteDataArray[i].ephemerisSource)
                          << ", ephemerisHealth: "
                          << ", ephHealth: "
                          << static_cast<uint32_t>(data.satelliteDataArray[i].ephemerisHealth)
                          << ", serverPredictionIsAvailable: "
                          << data.satelliteDataArray[i].serverPredictionIsAvailable
                          << ", serverPredictionAgeSeconds: "
                          << data.satelliteDataArray[i].serverPredictionAgeSeconds
                          << ", ephemerisAgeSeconds: "
                          << ", ephAgeSec: " << std::setw(7)
                          << data.satelliteDataArray[i].ephemerisAgeSeconds << std::endl;
        }
    }