barbeau / gpstest

The #1 open-source Android GNSS/GPS test program
Apache License 2.0
1.72k stars 360 forks source link

Support external GPS via Bluetooth #79

Open barbeau opened 7 years ago

barbeau commented 7 years ago

Summary:

From a user in the Google Group at https://groups.google.com/forum/#!topic/gpstest_android/Uwmhvp-glfA:

Is there any chance that GPSTest will support using external bluetooth GPS?

I'd like to support this. I assume this means supporting NMEA sentences over Bluetooth serial port profile, although I'd like further clarify from actual users for what devices they'd like to see supported to make sure we can get this right.

Information that would be useful from users:

Steps to reproduce:

  1. Start GPSTest

Expected behavior:

Give me an option to see external Bluetooth-connected GPS in the app

Observed behavior:

There is no way to view external Bluetooth GPS in the app

tzac commented 7 years ago

I have Stonex S5 external GNSS receiver and android 6.0

barbeau commented 7 years ago

Thanks @tzac! I emailed Stonex earlier today to ask for technical specs to connect to this device. Did you get a GNSS Server APK with your device? If so can you share that?

tzac commented 7 years ago

I paired my Huawei P9lite mobile and S5 with Bluetooth GPS apk from GG moblab and enabled Mock GPS provider. After that GPS Test showing status from S5 but without sat list

barbeau commented 7 years ago

So to my understanding the Mock GPS provider should let you see location lat/longs from external GPS in Android apps, but to my knowledge you can't see status information like elevation, azimuth, signal strength or satellite IDs per satellite - that comes from a different Android API.

Have you found any other Android apps that allow you to see a list of satellites from your external device? If so, what are they?

BTW, my email to Stonex bounced, so I'm not sure how to get more detailed technical information about possible integration.

tzac commented 7 years ago

Bluetooth GPS app showing all that info on status tab page, and on NMEA tab page all nmea log from external gps

barbeau commented 7 years ago

Thanks - this is the app?

https://play.google.com/store/apps/details?id=googoo.android.btgps

Looks like it reads a NMEA sentence over Bluetooth serial port profile. I'll see if I can contact developer and get more details.

tzac commented 7 years ago

Correct

panosmark commented 7 years ago

Hi this project has external gps support and it is open source!!!!! https://github.com/platypii/BASElineFlightComputer

barbeau commented 7 years ago

Thanks @panosmark! I'll check it out.

barbeau commented 7 years ago

Here's the Bluetooth management code: https://github.com/platypii/BASElineFlightComputer/tree/master/app/src/main/java/com/platypii/baseline/bluetooth

sp00n commented 5 years ago

Is this still on your list? I'd have a couple of external Bluetooth GPS devices that I'd like to see the app to work with:

Other interesting chipsets would be MediaTek MT3318 and MediaTek MT3329 (used by some Holux devices).

I currently have the Nokia, the Garmin and the GNS 2000 available, although I'm thinking about returning one or both of the Garmin and the GNS 2000, as I'm not 100% satisfied with their accuracy. Which is how I stumbled across your app, to maybe gain some more insight, which unfortunately doesn't seem to work yet.

So if you need any more information I could provide for these devices, let me know, before I possibly return them.

barbeau commented 5 years ago

@sp00n It's still on my list of features I'd like to add to the app but I just haven't gotten to it yet.

For this and sending NMEA over USB/serial (https://github.com/barbeau/gpstest/issues/308) it looks like I may need to get a hold of an actual device for development. It's hard to implement something when you don't have anything to test against.

sp00n commented 5 years ago

Well, you can get a used Nokia LD-3W for around 15€ on eBay these days. Not sure about the US though.

gdt commented 3 years ago

This perhaps belongs in a separate PR, but in addition to bluetooth it would be nice to support NMEA over TCP sockets. Vespucci has support for this now, to be able to use local rtklib on the phone or an external GPS receiver over wifi.

barbeau commented 3 years ago

@gdt Could you open a new issue for TCP support and link to this issue? If you have any links to existing tools/code you could share that would help that would be great.

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

gdt commented 3 years ago

Hey bot: Despite no activity, this is still valid.

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. Please comment here if it is still valid so that we can reprioritize. Thank you!

gdt commented 2 years ago

Hey bot: Despite no activity, this is still valid.

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. Please comment here if it is still valid so that we can reprioritize. Thank you!

gdt commented 2 years ago

Hey bot: Despite no activity, this is still valid.

And, here's a device that can provide NMEA over Bluetooth SPP: https://www.sparkfun.com/products/18442

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. Please comment here if it is still valid so that we can reprioritize. Thank you!

gdt commented 1 year ago

Hey bot: Despite no activity, this is still valid.

Another device is the Sparkfun RTK Express. A fairly large number of devices just send NMEA over a bluetooth serial port, so the app connects to SPP (serial port profile). Another app that can talk to bluetooth GNSS receivers is QField.

abw8353 commented 1 year ago

I'd like to see this have another look. I am having a heck of a time with what seems to be an intermittent issue with an expensive (for me) bluetooth gnss receiver through the "Bluetooth GNSS" app https://github.com/ykasidit/bluetooth_gnss/). GPStest (my go-to app for gnss issues) is only showing the accuracy plot and histogram, anything else useful is blank. I am attaching an nmea log (from an obstructed sky) in case that helps to see what can be collected from the gps (the accompanying csv show position perhaps a bit more consistent than plausible), for whatever that might be worth.

Another Android app, Locus Map, has an option for switching between internal and bluetooth GNSS. It optionally shows a sky map with signal strength histogram, may be getting more accuracy than is provided by "mock location" which is the primary location sharing channel for apps such as Bluetooth GNSS.

=-=-= NMEA: 2023-04-29_19-34-18_rx_log.txt

Locations: 2023-04-29_19-34-19_location_log.csv

gdt commented 1 year ago

The mock location bit isn't about accuracy. That is just the way location is injected so that the rest of the phone uses the external location. You could also use QField. However, what you really should do is take this to someplace that is outdoors with a good sky view and see how it behaves there after being powered up for 15 minutes.

abw8353 commented 1 year ago

As a workaround, supporting an option for input from an NMEA log file would be quite useful - https://github.com/barbeau/gpstest/issues/641

abw8353 commented 1 year ago

...  what you really should do is take this to someplace that is outdoors with a good sky view and see how it behaves there after being powered up for 15 minutes.

Yes, thank you, I do appreciate the response, but in this instance I have spent several hours doing that over the last few days, with often suspect or worse behavior. I'm returning the external GNSS receiver in this instance, but I would like to be able to work with better tools (eg GPStest) in the future. At one point I seemed to see lower resolution location data, and wondered if the mock locations were being truncated or rounded. However, others report realtime NTRIP working fine with appropriate receivers, apparently through mock locations, so my concerns in that regard would have faded if I had stopped to think a bit.  

My primary use case is under obstructed sky (rough terrain, dense tree canopy), with relatively rapid TTFF needed. A 15 minute delay at each of multiple sites is not acceptable.  Accuracy after 15 minutes under an open sky can be good, goofy fun but doesn't budget out.

Before I subject myself to another several-day testing process, I need to enhance my procedures and tools. If GPStest supported Bluetooth receivers either directly or via an option to input from NMEA log files would be one such step forward.

[Also I'd like a tool that would translate my .txt file NMEA log into something resembling my .CSV location log (files in my first comment).]

gdt commented 1 year ago

I said 15 minutes so that you'd be sure to have ephemeris for all satellites. If you are in an open field and you don't get a position within a few minutes that is stable to better than 5-10m then something is quite wrong.

I don't see any reason mock locations would have granularity bigger than about a meter, and probably it is much finer. Degrees to 8 decimal places is about a mm.

Check out gpsd, which you can run on a computer (vs phone), and will process the NMEA and you can then log with gpspipe -w, and then feed to gpsprof, which will give you the analysis that I think you are looking for.

stale[bot] commented 10 months ago

This issue has been automatically marked as stale because it has not had recent activity. Please comment here if it is still valid so that we can reprioritize. Thank you!

barbeau commented 10 months ago

Not stale

jcinternetstuff commented 5 months ago

Bloody stupid bot!