[SOLVED] TinyGPS++ with Asset Tracker

Hi,

can anyone tell me if TinyGPS++ is compatible with the Asset Tracker v1 shield? When I connect it, it just tells me there is no GPS data and I should check my wiring. Also the Fix indicator does not blink. The Asset Tracker lib works fine, but I need to calculate the distance of my position to an array of fixed points, which the Asset Tracker Lib does not provide.

Basically I want to know if I should try get the TinyGPS++ to work, or if I need to modify the Asset Tracker lib with a distance to function ( which, having had a look at the code to perform such calculation, I sincerely doubt I could write myself :worried:)

Any help/tips would be greatly appreciated.

The AssetTrackerRK library uses TinyGPS++ and is mostly compatible with the API for the official AssetTracker library. It exposes the underlying TinyGPS object, however, so you can use all of the other methods it supports.

It works with the AssetTracker v1 and v2. It’s in the community libraries as AssetTrackerRK.

4 Likes

great, just what I need thx!

Thanks for the help @rickkas7!

@rickkas7 I was just wondering if the radians/degree bug has been corrected in this version?The distanceTo calculation seems to be quite off. I’ll take a reading and ask it to calculate the distance to where I am (sitting outside) and its between 10 and 20 meters (fluctuating). So I was wondering if its a code issue or in the hardware.

Hi @raune

Have you seen this post?

yes - and this one: Is there a debugged asset tracker GPS library yet? thats why I was wondering if @rickkas7 had fixed the issue in the AssetTrackerRK lib thats in the build.

UPDATE: ok so I have been spending some time just logging coordinates - without moving - and the calculations seem pretty accurate from where the AT tells me I am, but that varies with up to 25 meters! Any idea what could be going on here? Could the GPS sensor be broken?

I guess you are testing inside a building.
GPS signals come a long way with low power and low bandwidth, so you need to have good reception - best outside with direct line of sight to a big portion of the sky.
Another option is to use an external GPS antenna.

I’m outside on a roof terrace but with some of the buildings enclosing around me - but just like 1 storey. What I dont really understand is that I have 8 satellites available and I’m about 30 meters off.

Problem is that I need it to locate different points in an urban environment (5 storey houses max) and be inconspicuous so those big external antennas aren’t really an option. But I also have Maybe I was expecting too much from the GPS, then again it works so well with the phone I was anticipating similar results. I see there are some options to integrate with the cell towers and I tried the Google maps integration but without result.

Smartphones do incorporate multiple positioning techniques to get their precission GPS + aGPS + cell triangulation
Also the new Asset Tracker v2 board uses a better GPS module.

yes I realise that, still I was expecting accuracy at about 2.5 meters, accepting up to 4 as stated in the docs.
Unfortunately I’m stuck with the v1 :frowning:

@raune, to be clear, for consumer GPS:

The United States government currently claims 4 meter RMS (7.8 meter 95% Confidence Interval) horizontal accuracy for civilian (SPS) GPS.

So not sure where 2.5 meters comes in unless other location data is fused (cell locate, etc as @ScruffR mentioned.) The 7.8 meters is more realistic. To dramatically improve your results, I suggest you use an active external antenna, though this will increase the total power consumption.

1 Like

well the Particle docs say:
The shield has the same GPS module as the Adafruit Ultimate GPS so all of their specs and usage notes apply here, too. It’s the PA6H module based around the Mediatek’s MT3339 GPS receiver.
and the the specs on the Adafruit Ultimate GPS state
Position Accuracy: < 3 meters (all GPS technology has about 3m accuracy).
So thats where the 2.5 m come from and also the basis on which I planned this project, going on 8 meters is just not feasible for whet I need it to do.
I’m not too worried about power consumption as it will not need to run for long periods at a time, but when you say dramatically improve do you mean down to somewhere about 3 meters or still more like 8?

See my post here that explains the concept of “circular error probable”. So when a GPS says 3m accuracy, what they typically mean is CEP is 3m so 50% of the readings are within 3m of the actual location.

1 Like

…just wish that would be more explicitly stated on the specs., especially as the Asset Tracker is being sold as a more or less plug’n play kit a lot of users will not be deeply knowledgeable and assume the given info to be correct (and not requiring reading the fine print). This applies across the board though not just to particle.

Anyway I got hold of a colleague who has a bit of experience working with GPS tracking, who suggested that the glass facades around my rooftop terrace may be causing issues due to the signals being bounced around. So I went to a parking lot and did a walk down a road and the signal is much better, and tracking pretty accurately. Still fluctuating up to 5 - 7 meters when stationary though but I will give it a try with an active external antennae and see what that does. And maybe not track if not moving to filter out errors.

But I wonder if there is not a way to integrate the cell tower signal for improved accuracy?
Using the new Google Maps Integration or something like this: https://www.hackster.io/middleca/cellular-geolocation-using-your-cell-tower-and-google-b83534 ?