Is there a debugged asset tracker GPS library yet?

I’ve read the threads, but am under a tight schedule and don’t have time to attempt to debug GPS parsing problems.

In the meantime, I get periodic aberrant GPS Lat & Lon, so my algorithm just filters out anything that suddenly sends me to Gilroy or Beijing.

Have you had a look at AssetTrackerRK library?
https://build.particle.io/libs/57e98f06d94585ab81000aa9

1 Like

No I haven’t.
Should I use Official Library ASSETTRACKERRK .0.0.1 instead of original Official Library ASSETTRACKER?
I assume the answer is yes.
I’ll compare and switch…
Thanks.

mbed has a nice community feature that will alert you be email upon changes, such as critical upgrade to a library.
Does Particle have this feature?

So, the big question is:

Does ASSET TRACKER RK fix the faulty GPS coordinate bugs?

This is my original question.
I don’t want to spend hours using ASSET TRACKER RK if it doesn’t solve the original problems.

Just try it.
Go to the lib in Web IDE, use one of the examples and see.
No need to spend hours, just 5 minutes and you’ll know.

1 Like

I’m seeing to issues:

  1. GROSS LAT OR LON VARIANCE
    Lat or Lon momentarily change a lot: eg. longitude may change sign. Latitude may be suddenly 50 miles diff.
    CAUSE: from reading forums, the asset tracker API has faulty parsing of ASCII output of GPS device.
    WORKAROUND: I programmed my app to filter out these gross variances.
    (Alas, tight schedule precludes my debug of API.)

  2. SMALL LAT OR LON VARIANCES:
    Lat and Lon GPS momentarily jerk around up to ~130 feet.
    WORKAROUND: In progress – filter these out.

QUESTIONS:
1.
Is there an API correction for faulty Particle’s ASSET TRACKER product software (build.particle.io > ASSET TRACKER library)?

Is SMALL LAT OR LON VARIANCE part and parcel of GPS system behavior, or a fault in the GPS device used by asset tracker, or another software fault in the API?

I moved your other post here, since there is no point scattering this over multiple threads.
As said, try AssetTrackerRK (which may well replace the “official” library soon) and report your results.
But scattered lat/lon readings are rather common, especially if you’re only using the chip antenna.
Try a powered antenna for best results.

2 Likes

Ok, I’ll test it for you, and report result.

I always use external GPS antenna, according to Particle community recommendation.
Here they are:

– I. M. Guineapig

When I walk around neighborhood, or driver around town or Hwy, it tracks perfectly, except when it is back on my desk just sitting there; then Lat or Lon sometimes fluctuate ~150 feet.

@douglaskbell, are those active external antennas? When you walk around, they are powered by battery. However when you get home, do you plug a USB power supply to them right away? Have you looked at the lat/lon data when you are home and battery (only) powered?

That’s no surprise. These GPS satellites do transmit with rather low power and inside buildings satellite “visibility” is severely degraded.

That sounds about right. The GPS needs to “see” the satellites in order to work and four satellites is the minimum number for a valid fix, but when it “sees” more satellites it can improve the potential error in the fix by combining all the data. So going outside should improve your fix and going inside degrades it.

By how much it is degraded depends on the GPS itself (sensitivity and number of channels), on the antenna (gain and directionality), and somewhat on the software used to read the GPS if it misses or garbles a reading.

Let’s say you have a nice Garmin or other handheld GPS and it reports that its accuracy is currently 5 meters, which is a typical number and sounds pretty good. That is the CEP or Circular Error Probable and means that 50% of readings are within 5 meters of true location and 50% are not–imagine a circle around the true location with a 5 m radius and half the readings are inside that circle. We don’t know what the CEP is for your case, but let’s look at the error probabilities.

You can continue on with the statistical analysis for this 5m example and 43% of the readings are outside the 5 meter ring but inside a 2X or 10 meter radius ring. Then 7% of the readings will fall between 10 meters and 15 meters (3X). Finally 0.3% will be outside 15 meters (>3x).

So you can always get odd-ball readings with some probability. If you are taking a measurement every second, that is 3600 times an hour and you should expect to see >3X CEP reading around 11 times an hour over a long period.

Most automotive GPS’s also use Kalman filters to track the position. A Kalman filter is way of taking a noisy signal like a GPS position with errors and creating a less noisy estimate of the true value. It does this by first predicting where it thinks you will be at the next measurement based on its internal state. It then compares the noisy measurement to predicted location and decides how to update the internal state for the next go round. The math is complicated but this has the effect of smoothing the noisy measurements.

3 Likes

peekay123:
I don’t know.
Yes, I usually plug into USB when I get home.
No.

So, you suspect the GSP inaccuracy when it’s on USB power?

I will check into this.

BATTERY STATUS QUESTION:

How do I get battery status (v and %)?
Does TinyGPS have this?

Or, can I have both libraries loaded in my app (ASSET TRACKER 0.0.3 to get ‘fuel’ class, and ASSET TRACKER RK 0.0.1 to get TinyGPS).

…UPDATE:
Ah, hah! I just spied batteryStatus() within ASSET TRACKER RK 0.0.1
Whew! I’m saved! (…if TinyGPS solves GPS parse bugs)

Look here
https://docs.particle.io/reference/firmware/electron/#fuelgauge

It’s not part of the Asset Tracker but the Electron.

1 Like

peekay123:
My ASSET TRACKER 0.0.3 based electron firmware still drifts by Lat 112’ and Lon 158’ when indoors on battery power only.

I am presently implementing ASSET TRACKER RK 0.0.1

Did any of that reasoning “against” indoors use reach you at all?

@bko has given you a rather well founded background in the topic.

And I just stated the short version

2 Likes

@douglaskbell, then that confirms what @bko said. Clean power is always important but in this case, is not the problem.

1 Like

ScruffR, all above reasoning reaches me, especially your endlessly patient and kind product support style. :smiley:

I have implemented software filters to correct the erroneous GPS data. Customers using the product will go indoors. (Imagine that!) And will not want to see bad GPS data.

Good news: ASSET TRACKER RK was drop in compatible.

Now for more testing…

2 Likes

It solved the parsing problem. But it doesn’t filter erroneous GPS Lat/Lon when GPS is indoors.
I need to Google for a solution to sudden gross location changes…