UBports Robot Logo UBports Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Experiments on getting location using the satStat app in Waydroid

    Scheduled Pinned Locked Moved Fairphone 5
    10 Posts 2 Posters 180 Views 1 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
      Reply
      • Reply as topic
      Log in to reply
      This topic has been deleted. Only users with topic management privileges can see it.
      • W Offline
        wgarcia
        last edited by wgarcia

        Answering @Vlad-Nirky in a new topic, this was out of topic in the request for FP5 features:

        @wgarcia
        If you are using waydroid, could you make this test. (as you report very long >time to fix gps postion)
        Disable GPS (and move somewhere else).
        Launch waydroid.
        Run (after install) satStat.Settings reload AGPS.
        Enable GPS.
        Look at the connection time in waydroid and in UT.

        I did some experiments with my FP5. This is what I tried:

        I installed satStat from Fdroid in Waydroid. I opened and checked settings. There is an option for Agps, but only to choose Wifi, Ethernet, VPN, ... , I left that all unchosen. I saw another menu entry, not in Settings but at the top level, side by side with Settings, which says something like "Get location from Agps" but could not find anything about reload. So the experiments I did was clicking on that menu entry. I tried this:

        1. Restart phone
        2. Disable location in UT
        3. Open Waydroid.
        4. Open satStat and click on "Get location from Agps"
        5. Reenable location in UT
        6. Open an app in Waydroid requiring location (in my case "Mapmyrun").

        It got position in approximately 1 minute.

        The I repeated this but with an app in UT:

        1. Restart phone
        2. Disable location in UT
        3. Open Waydroid.
        4. Open satStat and click on "Get location from Agps"
        5. Reenable location in UT
        6. Open Unav in UT

        Unav got location in about 5 to 6 minutes.

        These experiments were done both in the same open space (within the city, with some high buildings around).

        Vlad NirkyV 1 Reply Last reply Reply Quote 0
        • Vlad NirkyV Offline
          Vlad Nirky @wgarcia
          last edited by Vlad Nirky

          @wgarcia
          Thank you very much for the test.
          Sorry for going off-topic.
          Interesting...
          I can't explain this difference between the hosted system (Waydroid) and my host system (UT).
          In my french system i have this menu.
          a61e7719-777d-4f43-b252-0f2118ae0652-image.png

          W 1 Reply Last reply Reply Quote 0
          • W Offline
            wgarcia @Vlad Nirky
            last edited by

            @Vlad-Nirky I press on "Recharger ..."

            But I have to amend very much my first tests. I tested this several times after my first tests and the results were worse and more in line with the usual lag of getting a position.

            This morning I went out jogging and after following the above sequence I couldn't get any position at all. I went through places with tall buildings on both sides but also through open spaces.

            I doubt very much that waydroid can get any Agps result in these devices. As far as I understand, Agps gets information from cell towers, and waydroid does not see any cell signal to do that.

            Having said this, I have to say that I have also a Volla Phone 22, and that one gets position immediately in waydroid, even under a ceiling. I don't know what is going on there, but it looks very different from what I see in the FP5.

            Vlad NirkyV 1 Reply Last reply Reply Quote 0
            • Vlad NirkyV Offline
              Vlad Nirky @wgarcia
              last edited by Vlad Nirky

              @wgarcia
              Thanks again.
              Interresting too.
              I guess the first time aGPS uses WIFI or mobile data to get informations from internet.

              1. Traditional (standalone) GPS:
                A GPS receiver (such as in a smartphone) picks up signals from at least four satellites to triangulate its position. This can take anywhere from a few seconds to a few minutes, especially during a cold start, because it must:

              Download the ephemeris (the exact position of each satellite)

              Estimate its approximate position

              1. With aGPS:
                aGPS improves this process by downloading this data via the network, instead of waiting for it to arrive slowly from the satellites.

              It can use:

              📶 The cellular network (GSM antennas)

              🌐 An Internet connection (Wi-Fi, mobile data)

              aGPS provides:

              The approximate position of the phone (via the antenna)

              The exact time

              Satellite ephemeris via dedicated servers

              W 1 Reply Last reply Reply Quote 0
              • W Offline
                wgarcia @Vlad Nirky
                last edited by wgarcia

                @Vlad-Nirky Thanks, very informative.

                But waydroid does not have any WIFI access or mobile data. There is something that fakes WIFI, the LineageOS thinks that the network is being accessed through WIFI and not through the bridge with the UT host, but it doesn't seem to be working for me in the waydroid/LineageOS being used currently in the FP5 ( I think 13). And I doubt that even with the fake WIFI working, this will help Agps to get anything.

                Vlad NirkyV 1 Reply Last reply Reply Quote 0
                • Vlad NirkyV Offline
                  Vlad Nirky @wgarcia
                  last edited by

                  @wgarcia
                  Maybe the wifi is only the path to access datas (satellite ephemeris), so it could work through the bridge.
                  My tests seem to show a significant improvement in connection time.
                  But it's hard to be certain (there could be persistence or caches).

                  W 1 Reply Last reply Reply Quote 0
                  • W Offline
                    wgarcia @Vlad Nirky
                    last edited by

                    @Vlad-Nirky Worth keep testing.

                    In the Settings section of satStat, in the section that says something like "Updating from AGPS", do you have anything marked? There is: WIFI, BLUETOOTH, ETHERNET, VPN

                    Vlad NirkyV 1 Reply Last reply Reply Quote 0
                    • Vlad NirkyV Offline
                      Vlad Nirky @wgarcia
                      last edited by Vlad Nirky

                      @wgarcia
                      No... All unchecked.
                      And, more strange, in UT GPS is off and in waydroid in two seconds it locates me at the right place.
                      In UT, uNav says waiting for GPS and GPS toolkit says noFix.
                      Really confusing.
                      Any chance that satStat could access directly to hardware???
                      95348d8d-e568-455a-8cb3-d27599b55b0c-image.png
                      Sorry for my belgian cow english...

                      Vlad NirkyV 1 Reply Last reply Reply Quote 0
                      • Vlad NirkyV Offline
                        Vlad Nirky @Vlad Nirky
                        last edited by Vlad Nirky

                        Next try, during the dog walk, i have kept UT GPS off (UNav can't determine the location) and follow my postion on the satStat map. It has been precisely updated.
                        So waydroid can use the phone GPS even if UT says it's off.
                        Is UT GPS switch off only a logical switch that prevents app to use it?
                        This could explain a part of battery consumption.
                        Is the satStat app in waydroid access hardware directly and use it as if it was on Android?

                        Vlad NirkyV 1 Reply Last reply Reply Quote 0
                        • Vlad NirkyV Offline
                          Vlad Nirky @Vlad Nirky
                          last edited by Vlad Nirky

                          Another test I did tonight.
                          The GPS on UT was disabled 60 km from here.
                          Waydroid satStat shows the correct position.
                          I launched GPS Toolkit on UT.
                          I enabled the GPS.
                          It found the correct position in less than two seconds.
                          Perhaps it depends on the device.
                          Mine is Redmi Note 9 Pro running Focal

                          1 Reply Last reply Reply Quote 0
                          • First post
                            Last post