Closed MedadRufus closed 4 years ago
I completely agree with the first point, let's change it to ignore the "is_retry" packets.
Regarding the second point, isn't it better to use the TTN network time? I would say that the TTN time (in JSON: metadata.time) is probably the most reliable, not influenced by individual gateway owners, is complete in the sense that is has both a date and a time-of-day (the payload only sends time, not date) and is not affected by things like GPS issues on the payload, low battery on the payload, RTC drift on the payload, etc.
What do you think?
Strictly speaking, option 1 is not the best because it discards some gateway metadata that gets displayed/logged by habhub, namely the gateway id. Better will be to send the retry data with a corrected timestamp to habhub. But to be honest, I don't think it is worth preserving.
I need to check if TTN time (in JSON: metadata.time) is correct, even for retry messages. I have extensive logs of all data from ICSPACE22 launched today. I have attached them in this post. I will look through them. I have also attached it in this post
I have seen some packets on the TTN console with a wrong timestamp, but with no "is_retry":true
attribute. It may be a seperate issue, with rogue TTN gateways.
I find that parasitic retry messages have the wrong metadata.time
timestamp. It is simply easier to discard all retry messages. And then use the data and metadata.time
timestamp from the first message exclusively.
I committed a fix for this, and used your examples in a basic unit test, thanks!
Thanks @bertrik. I will run the latest code tomorrow. But this time I don't think we will have the retry
packet issue; There are far fewer gateways over the Mediterranean where ICSPACE22 will be flying!
Very happy to contribute to this project, albeit in a very simple way with log data.
Regards Medad
When flying over areas with lots of LoRaWAN gateways, some TTN gateways seem to send the data later than other gateways to the MQTT broker. These late packets are have the attribute
"is_retry":true
. This is a problem because these have a later timestamp than the original message and they all get sent to habhub with the wrong timestamp.For example in the image below, packet 301 is reported to arrive at 3 different times:
14:30:59
,14:31:00
and14:31:04
. Only the first is correct.Therefore, when calculating speed of the balloon, due to the wrong timestamps, the speed readings are incorrect.
I suggest 2 solutions.
"is_retry":true
attribute. Dont use the data from these retry packets. It is likely that the data contained within already came in a packet earlier A packet with this retry attribute looks like this.Conversely, a packet that contains the correct timestamp and not the retry attribute looks like this: