Closed afpastorio closed 4 years ago
Hi @EdanPotter, you really should not be sending text over LoRa. It wastes a lot of precious airtime. I believe the TTN Fair Use Policy states this too.
Look at https://www.thethingsnetwork.org/docs/devices/bytes.html and there are some examples at https://github.com/ttnmapper/gps-node-examples
Please change this first, then we can figure out what else is wrong.
Thank's for the answer and sorry for the delay. I had some time today and made the changes as suggested. As it can take 24h to data to show on TTN mapper, I will be back tomorrow with an update.
It's only the aggregated map layers that take some time to update. When you go to advanced maps and filter by device ID or gateway ID, it shows all the raw data. This should reflect the incoming data immediately.
So, the data still not showing. Here's my payload decoder, and it shows my location correctly.
function Decoder(bytes, port) {
// Decode an uplink message from a buffer
// (array) of bytes to an object of fields.
var decoded = {};
// if (port === 1) decoded.led = bytes[0];
decoded.latitude = ((bytes[0]<<16)>>>0) + ((bytes[1]<<8)>>>0) + bytes[2];
decoded.latitude = (decoded.latitude / 16777215.0 * 180) - 90;
decoded.longitude = ((bytes[3]<<16)>>>0) + ((bytes[4]<<8)>>>0) + bytes[5];
decoded.longitude = (decoded.longitude / 16777215.0 * 360) - 180;
var altValue = ((bytes[6]<<8)>>>0) + bytes[7];
var sign = bytes[6] & (1 << 7);
if(sign)
{
decoded.altitude = 0xFFFF0000 | altValue;
}
else
{
decoded.altitude = altValue;
}
decoded.hdop = bytes[8] / 10.0;
return decoded;
}
The integration:
My device information:
I see you are logging your data to an experiment. It will therefore not appear on the main map.
https://ttnmapper.org/experiments/map.php?experiment=gpshield
Looking at your data we see some points had incorrect coordinates, so those would have been filtered out if you logged to the main map. The rest of your points seem fine.
I noticed that there is a bug with the web interface that it will add both "on" and "off" parameters to the URL when you want to view the experiment map. For now you can use the URL linked above while I fix this issue.
Wow, cool.
Thank you very much, I really appreciate your help.
I'm trying to use TTN to see how far can I get signal with an Arduino UNO + GPS shield + LoRa Module. The GPS works fine, and I'm transmiting payload as a string wich is decoded with the following function:
The data appear just fine in the 'Data' tab in application, as well in other gps integrations as Tago.io.
I'm I doing something wrong? Why I can't see my data in ttnmapper?