Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include ismock data in the logs #589

Closed
tarquinwj opened this issue May 11, 2022 · 1 comment
Closed

Include ismock data in the logs #589

tarquinwj opened this issue May 11, 2022 · 1 comment
Milestone

Comments

@tarquinwj
Copy link

tarquinwj commented May 11, 2022

I use a device that outputs mocked location data (Trimble Catalyst). When gathering data in a GPSTest log, if the Trimble Catalyst switches off for some reason (cable disconnects, battery runs out, etc.), the device stops using the mocked location, and after a short pause, GPSTest starts using the phone's own GNSS chip data. This is not something I want. I need to make it only use the mocked location data, since that is the highly accurate location data from the Catalyst, while the phone's GNSS chip is located somewhere else, and is relatively poor anyway. Exposing the isMock() result would be an easy way to detect this:
https://developer.android.com/reference/android/location/Location#isMock()
Right now, the only way to detect it is to look for the SpeedAccuracyMps and BearingAccuracyDegrees data, which is empty in the case of a mocked location, or checking for the relatively imprecise "3.0" estimate of accuracy that comes from the phone's GNSS chip, compared with the Catalyst's "2.5459259".

Describe the solution you'd like
Include another column; "mock", in the gnss_log, which says whether the data came from mock or not. It could have the string values "true" or "false". There was another app that did this, using "mock" (lower case), and the values appeared to be those two strings (true/false). Unfortunately, we cannot remember what app that was.

Describe alternatives you've considered
Another approach might be to have an option forcing GPSTest to only use the native chip, only use mocked location, or "auto" to use both (the current behaviour).

GPSTest 3.9.16 (18093-google).
Samsung Galaxy S20+.
Android 12.
Trimble Catalyst 1.

@barbeau barbeau added this to the v4.0 milestone Jul 11, 2022
@barbeau
Copy link
Owner

barbeau commented Jul 18, 2022

This makes sense - I'll add it as a 0 for false and 1 for true value at the end of the Fix string. Header value will be named IsMockLocation.

Note that this field will be empty on devices below Android S (12) because isMock was added in Android 12.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants