Array to GPS map?

Is there way to send an array of GPS positions to a mapping dashboard? The GPS map and heatmap seem to want to deal with devices one at a time. However, our data is sporadic - that is we get a bunch of GPS positions in a short period of time, then nothing for several minutes. But the GPS map dashboard samples slower, and so we will miss dots.

Hi @Bryan_Chase,

There is not currently a way to send an array of positions to the GPS maps without the data being bucketed by duration. Currently, the block I might recommend trying out would be the Custom HTML Block. This block offers three query options and, with your own custom HTML, CSS, and JavaScript, you should be able to configure this block to your liking for an array of GPS positions.

Let me know if I can answer any further questions!
Julia

Julia,

I see. But can an array of GPS be sent to the existing GPS block? I don’t mind if it’s bucketed, but I don’t want to lose data by sending only 1 element of the array each time.

Or how about if I create some loop which is timed to read 1 element from the array every minute (or something) and send it to the device and dashboard, which is also sampling at a minute? If I get only 5 positions every 15 minutes then I’d still get to see
them all. Does that make sense? Any examples like this?

Thanks!

-Bryan

Hi @Bryan_Chase,

This is much more clear now, thank you for detailing further! Just a quick question, when these individual values are reported every 15 minutes, are they reported with a timestamp of the time they were recorded? Meaning, is data stored and then reported in a batch to Losant? Currently, when reporting state to Losant, you are using the time the values arrived to Losant, but you may be able to report state using the actual time the values were recorded on the device.

Thanks!
Julia

We do have the time each value was recorded, yes. For the Custom HTML Block, can it take an array of GPS locations? I see one dot being displayed (through Google maps) but didn’t yet read through all the details.

I have a related question, specifically to the Heatmap dashboard.

I now have a workflow which produces 10 or 11 GPS positions in about 15 seconds. These are sent to the same device over the course of ~15 seconds. The GPS positions are all slightly different from each other (a meter here, a meter there…). I want the heatmap to show these dots as a heatmap group, but I’m usually getting only 1 dot.

What setting can show me a true heatmap of a few dots?

My heatmap dashboard is set as in the SSs shown, and the device debugger shows the GPS locations are getting to the device:



Hi @Bryan_Chase,

I just wanted to begin by going over some timestamps. In your screenshot, all of these values are reported to Losant within the same second. Thus, your device will look as though it took 10 readings within one second and then reported immediately. If you report state to your Losant device without these times, it is as though they all occurred simultaneously; your maps will likely be less accurate and your data could be aggregated into one point, depending on the block.

However, it could be possible that, since your dots are quite close together, the heatmap has not determined them to be far enough apart, but I do believe your timestamps are playing a major role here, as the device state is currently a lot of GPS readings all at one time within a small radius.

If you want these as a few dots and are not able to find success with the timestamp change, I would recommend using the Custom HTML Block with Google Maps.

Thanks!
Julia

Julia,

Thanks for the help. You were right it was because of the timestamps. I got what I expected by changing the STATE block to use the current time and not payload time:
image

I like the idea of the Custom HTML Block with Google Maps but that’s a bigger fish to fry which will take some learning.

1 Like