1. Adventure Rider Print Magazine!
    We're doing a print magazine this November - 128 pages of high quality adventure riding stories, photography and interviews!

    Click here to purchase a copy for $9. Limited copies still available.
    Dismiss Notice

external bluetooth GPS /trackers/accuracy/geekfestival

Discussion in 'GPS 101 - Which GPS For Me' started by ohgood, Nov 20, 2019.

  1. ohgood

    ohgood Just givver tha berries !!!

    Joined:
    Sep 21, 2010
    Oddometer:
    10,053
    Location:
    alabama
    ***************************


    this will be a thread to discuss external sources of GPS stuff..... ie: you have a phone/tablet/camera/whatever and need GPS location information for it, over Bluetooth, with good accuracy....
    you're in the right place

    *************************



    years ago someone suggested using an external GPS unit as a source for phones. it was supposed to be a way to cut down on the battery usage of GPS enabled applications. after some testing, i realized that the applications, or more importantly the GPS antenna, wasn't actually using much battery at all. around 1-4% each hour was the norm. other people said " GPS is a battery hog, you're wrong!" and similar. so i tried to duplicate their findings. what i found was that GPS (antenna) was actually very efficient, but GPS + cellular + Bluetooth + wifi = was very very not efficient!

    i kind of stumbled across this while setting up a new-to-me-phone. when i looked at the "settings>>>> location settings" i realized that the default was "high accuracy" instead of "GPS only". then i noticed that the "battery saving" was actually a terrible choice, as it didn't use the GPS antenna at all, but instead used only the cellular antenna !? wtf !? why would anyone want to rely on cellular triangulation (VERY POOR) instead of using GPS trilateration (VERY VERY GOOD!) ???
    then i dug a little deeper, and saw that the settings also included extras like "always enable Bluetooth/wifi scanning" , even when applications don't need GPS location info.
    yup, by default, phones and tablets were constantly scanning for wifi access points, Bluetooth printers, cellular towers, cellular triangulation, AND the lowly GPS system.
    but why ?
    Google ?
    why Google ?

    yup, Google wanted to harvest all the data they could, from every single device you get close to.
    aha !
    Google intentionally labeled the most battery intensive location setting as "high accuracy" , but the best for actual location and battery use labeled only as " gps only". people assumed that "high accuracy" was the best, and let all those antennas (and Android services) scan their area constantly.

    battery usage problem identified ! now i could see why people said that good was a battery hog ! it actually wasn't, when using only the GPS antenna, but all the other services and antennas WERE leading folks to believe it was GPS.

    next up, accuracy.... this problem was identified at the same time the battery usage problem was. accuracy was all over the place when "high accuracy" was selected. one moment your display showed +/- 9 feet, then next it was +/- a football field. or worse. this was as simple as changing the Android location settings from "high accuracy"to "GPS only". later Android operating systems started calling it "device only". I'm convinced this was to make the BEST choice look even less attractive, and persuade people to use the "high accuracy"option, subsequently sending more data to google.

    so we killed two birds with one stone. cool. it's that it ?

    for me, it was. for years this was good enough. i recorded thousands of miles of track every year, and it was fine.

    then one day i saw an old thread where i was being lambasted for not trying Bluetooth low energy external GPS receivers. "you're an idiot, you think phones are accurate, they SUCK!" ... well, i knew 50% if that statement was correct, right away ;-)

    a quick Google for Bluetooth GPS receivers turned up sales for devices:
    arrow $$$$$
    Trimble $$$$$$
    GLO $$$$
    badelf $$$
    dual $$$$
    Tom Tom $$$
    and then, a slew of rebranded /knockoffs/ chinesium

    i ordered a $16 device from eBay and realized it was produced in 2003-2006, after i hit the buy it now button....
    #1
    sierra_victor and gpsdualsport like this.
  2. ohgood

    ohgood Just givver tha berries !!!

    Joined:
    Sep 21, 2010
    Oddometer:
    10,053
    Location:
    alabama
    reserved for pictures n stuff
    Screenshot_20191120-172915.png
    #2
    gpsdualsport likes this.
  3. AdvNener

    AdvNener Long timer

    Joined:
    May 29, 2013
    Oddometer:
    2,173
    Location:
    Marseille, France
    Quite interested in the topic, not really for accuracy (for my purpose -motorcycle navigation tool- internal gps in phones are ok both for precision and speed, but YMMV - land surveying, racing analysis...) but enabling navigation in gps-less devices and maybe battery saving (if any...), YES.
    I already digged a bit in the subject by using an Onyx e-reader (no internal gps). I don't have an external gps (yet), so used an android phone sharing its gps info through dedicated apps.
    Keep in mind I am not experienced in gps stuff nor android stuff, from a developpement point of view. Just discovering this stuff on my spare time.

    Android GPS sharing apps (acts like an external sensor.. kindof):
    - All the apps I have seen use the serial port protocol (see below) or some custom protocol, I didn't find one using BLE.
    There are 3 ways for this to work:
    1/ The sharing app ("sensor" device side) use some sort of custom protocol. Then you will need the matching app on the navigation device side to receive the gps info and make your navigation device believe it has a gps sensor (this is the "mock gps" settings), which means you have to activate a setting in developper mode (example: GPS2Bluetooth app. Worked on my phones but not on my e-reader on the receiving side)

    2/ The sharing app use a standard protocol (most likely SPP) and your navigation app can directly connect to it: good. Locus can do that. I chose this way with my custom navigation app too.

    3/ The sharing app uses a standard protocol but the navigation app only works with internal gps. Your kinda back to situation 1/ but can choose any "gps mock app" (like Bluetooth GPS Provider) that will get the shared data and make your navigation device believe it has a gps sensor.

    - Share GPS: works with SPP but I had random disconnection. This may need further investigation because this happened while using my own custom app on the navigation device side. Doesn't seem to provide number of satellite info
    - Bluetooth GPS Output: works with SPP too. Maybe more stable. Doesn't share the precision info? Should share number of satellite (GGA frames) but i could not get them (nor did Locus)

    SPP (Serial Port Protocol):

    Basically various GPS information are formatten into strings and sent as simple text using the bluetooth connection as a serial communication. The way the strings are build is documented so easy to interpret, this is called NMEA protocol.
    Locus supports this.
    I'm pretty sure most external devices not using BLE use this (there are a lot of different NMEA frames that can be used so the detail will vary from device to device though).

    BLE (Bluetooth Low Energy):

    BLE is more complicated. The idea is that there are predefined "services", that are used to share "characteristics". The protocols define how the data is stored and how to access it (see https://www.bluetooth.com/specifications/gatt/services/)
    Such a service exists for "location and navigation": https://www.bluetooth.com/wp-conten...bluetooth.service.location_and_navigation.xml
    Note that this is not specifically tailored for gps info (unlike NMEA protocol). I guess this is still the "standard" way to do it with BLE, but this would need confirmation.

    Another way is to define a custom service and characteristics. Then both the sensor device and the receiving app must be using it of course..

    Last possibility is to use UART over BLE. This is back to something very similar to the SPP: a BLE service is defined to emulated a serial communication (one characteristic to write and one to read). This way you can send NMEA frames "just like with SPP". Only problem is this is not totally standardized, ie you won't find it in the official bluetooth links above, bluetooth chipset manufacturers tends to do this their own way (see https://learn.adafruit.com/introducing-adafruit-ble-bluetooth-low-energy-friend/uart-service)

    I don't know how BLE compatible external devices works. What I know is that they require their specific app on the navigation device side (but this would be true for the 3 possibiilties I mentionned). I don't know of any navigation app that is compatible with BLE (locus does not) either.

    Battery savings/use:
    Just a few numbers using an onyx e-reader (2500 mA.h battery):
    - getting one gps position per second through SPP from a sharing app running on a phone burn approx 6-8% battery per hour (both with my custom app and with locus on the e-reader)
    - staying connected to a cheap amazon joystick through bluetooth burned > 10% per hour (yikes!)
    - staying connected to a custom BLE keyboard (adafruit - nordic semiconductors chipset) burns a bit under 2% battery per hour.
    #3
    gpsdualsport and ohgood like this.
  4. gpsdualsport

    gpsdualsport former mid life crisis motorcycle owner

    Joined:
    Jan 2, 2007
    Oddometer:
    113
    Thanks for posting the e-reader info @AdvNener. I'm considering going with an e-ink display myself just because of daylight visibility advantage over the typical phone display.
    Yeah, it's a gray scale only display but there no issue with direct sunlight washing out the screen.
    How noticeable is the screen refresh rate on your Onyx e-reader while displaying maps?
    #4
  5. AdvNener

    AdvNener Long timer

    Joined:
    May 29, 2013
    Oddometer:
    2,173
    Location:
    Marseille, France
    There are two refresh mode available. The "A2" mode kinda has a lower display quality (less contrasts between "colors", still usable for maps IMO) but refreshes just fine to allow a constantly moving map to be perfectly readable (locus refreshes position once per second). Then zooming in/out and scrolling the map manually is not going to be as smooth as as smartphone/tablet, but again usable. There is no big "flash" of the whole screen when the display is updated.
    I don't have hard numbers but i'd say the refresh duration is around 0.1s?
    #5
  6. turtlespeed

    turtlespeed Been here awhile

    Joined:
    Feb 15, 2016
    Oddometer:
    443
    Location:
    NJ
    I jsut noticed that Samsung S10e does nto have device only GPS setting... I can only disable scanning for GPS position using wifi and bluetooth.
    #6
  7. ohgood

    ohgood Just givver tha berries !!!

    Joined:
    Sep 21, 2010
    Oddometer:
    10,053
    Location:
    alabama
    two mornings of testing, the qstarz 1000xt is interesting... it drifted from "really close" to "somewhere within 40 feet" over the course of about two hours.

    the first group that moves SW to NE was over about two hours. the upper group that moves generally east to west with some snake like influences was over three hours. the green circle is a fifteen foot radius

    Screenshot_20191123-053601.png

    this really surprised me, I'm not used to seeing drift. the unit was sitting in a large window facing north, with about half the sky visible east/west.

    I'm going to toss it in the glove box and test it on a 90 mile drive, then heavy covered single track, this weekend. :-)
    #7
  8. ohgood

    ohgood Just givver tha berries !!!

    Joined:
    Sep 21, 2010
    Oddometer:
    10,053
    Location:
    alabama
    I reset to default settings and charged the qstarz friday night, then dropped it in a backpack saturday morning. The event was hosted by KTMWorld (highland park ohv) and a really good chance to ride all the BETA models available. I rode the 125, 250, 300, 350, 390, 430, 500 and 300 trials. the most fun was the 250 2t, but I think the 350 handled the best of the 4t bikes. keep in mind the course was very short, extremely slick, and covered in loose mud.

    on to the tracker... i wanted a good test of it's defaults, so i wiped it and turned it on. nothing else. it recorded all day saturday and sunday. battery life is not an issue.

    accuracy doesn't appear to be an issue either, as it will return to current location very close (usually around 10 feet) also.

    track recording on device with the default settings is about as unintelligent as they get. if x distance and y time elapses, it records a point. this led to a LOT of unneeded trackpoints... aka a spaghetti bowl of trackpoints, all over camp, or anywhere i stopped for more than a few minutes.

    track recording VIA BLUETOOTH TO PHONE is -excellent-. i included a screenshot of a track that i recorded at camp. i tossed my phone to @FenceJumper09 and walked around the campfire with the qstarz in hand. it recorded a very smooth/clean track of the short walk, as an example of what 1hz recording can look like, with locus doing the filtering/smoothing. i would suggest if you hate doing post-processing, to use either a phone/tablet/something to filter trackpoints and do the smoothing for you.

    ruggedness seems to be ok. i tossed it into the bottom of my camelbak (which was wet) and it bounced around with tools/trailtrash all day sat/sun. the 'waypoint' button was not pressed during any of the riding, which surprised me. it is not waterproof, but i wanted to see if a typical wet/muddy ride would hurt it, without any protection. it's fine.

    waypoint button i didn't realize how cool a push-button for marking waypoints could be. i really liked the waypoint button, as i didn't have to look at it, rename it or anything, just press n go. of course, I HAVE NO IDEA WHY I MARKED ANY OF MY POINTS NOW, which is kind of a bummer after the fact. yes, this is why using touch screens to rename waypoints/tracks is such a good idea. if the push button was only used 3-4 times, i might remember why and rename them later, but over 5, and i'll be scratching my head.

    screenshots:


    all the 4-6 diamond trails we could find, recorded directly on the qstarz:
    Screen Shot 2019-11-26 at 5.23.57 AM.png



    an example of how messy the trackpoint recordings are, recorded on qstarz:
    Screen Shot 2019-11-26 at 5.24.22 AM.png


    and finally, the qstarz feeding 1hz trackpoints to Locus on the kyocera pro... i walked around the campsite while my buddy held the phone at the fire. i tested blueooth range at home also, it's pretty good at around 25-35 feet depending on wall thickness. ( the red track was smoothed by locus)
    Screen Shot 2019-11-26 at 5.28.21 AM.png


    after this i'm going to test using 1hz trackpoint frequency, feeding locus over bluetooth, and setting locus filtering to 'medium'. this should result in some nice smooth tracks with a LOT of points.
    #8
    FenceJumper09, AdvNener and PTJCAL like this.
  9. AdvNener

    AdvNener Long timer

    Joined:
    May 29, 2013
    Oddometer:
    2,173
    Location:
    Marseille, France
    Any hint on the power drain on the phone compared to using the phone internal gps?

    Btw I started experimenting with BLE. I don't have a gps chip to connect to my nrf52 bluefruit (yet :D) but hopefully this week-end I'll be able to receive dummy NMEA frames on android devices and estimate battery drain from here.
    #9
    ohgood likes this.
  10. ohgood

    ohgood Just givver tha berries !!!

    Joined:
    Sep 21, 2010
    Oddometer:
    10,053
    Location:
    alabama

    i haven't tested external GPS (Bluetooth on) vs internal GPS(Bluetooth off) yet. i plan to try both this weekend, in heavily wooded terrain. I'll update then :-)
    #10
    Sonny S. likes this.
  11. ohgood

    ohgood Just givver tha berries !!!

    Joined:
    Sep 21, 2010
    Oddometer:
    10,053
    Location:
    alabama
    after several weeks of tests, here are the results.

    traveling the same trails under moderate to heavy tree cover, and in hilly terrain, the tracks are normally within 5-10 feet of each other. i left the old agps data that was dated 6-7-2000 or so on the device (avoiding to the Bluetooth logger on my Mac and Bluetooth updater on my phone) to see what it would do with old assistance data.

    the blue dots represent a cold start, then recording waypoints at random intervals(when i remembered to set one) to show the drift through the day/evening. the red track was to show current drift, recording a track. all of these points are under one roof, with large (>70' tall) trees to the south and one window to the north.

    Screenshot_20200110-081430.png

    generally speaking, it tends to start up (cold start, battery out, off for a day or so) about 10 feet (3 meter) to the south west of the location it finally settles into later on. then through the recording period it will drift to the north east, somewhere between 10-20 feet. over several weeks the worst drift/offset I've recorded while moving is about 11 feet from one track to another. the best is close to 2-3 feet, while moving.

    i updated the agps data this morning, and am planning to do a little more testing today.

    the Bluetooth range has really surpassed me. i can walk in a thirty foot radius /(10 meters) and the phone still receives coordinates. inside or out, doesn't seem to matter.

    i managed to splash it pretty good (just mud) and it hasn't failed yet.
    KIMG2720.JPG

    anyway, there's the cheapo GPS tracker thing.
    #11