FDRS and timekeeping #140
aviateur17
started this conversation in
Ideas
Replies: 2 comments 6 replies
-
Beta Was this translation helpful? Give feedback.
1 reply
-
Something that just flashed into my mind: Access to time will make up for one of the system's major shortcomings: slow speed. The age of a DataReading when it arrives at the front-end could be seconds to a minute depending on LoRa settings and number of repeaters. As such we'll eventually need to update the DataReading structure to hold timestamps as well. This shouldn't be too painful hopefully, but I definitely hadn't considered it. |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Started this discussion to talk about timekeeping and FDRS and implementation and features.
I've implemented NTP via ESP32 WiFi on FDRS gateway. The resolution is in seconds and I hope that is okay.
The gateway will query NTP server upon startup (after Wifi and MQTT) and check to see if the time is valid. If it is valid it will keep the time and update the time and periodically poll the NTP server to correct any inaccuracies. I'm not sure off the top of my head how accurate the time stays on different platforms without querying the NTP server.
I've also implemented gateways sending time via LoRa broadcast to remote nodes. The node will check for accurate time and then keep the time internally.
As we discovered via FDRS ping, the ping responses are quite sub 1 second (5ms ESP-NOW, 100ms LoRa) so I'm not sure that it would be of any use for time correction but I welcome comments on that as the time is only precise down to the 1 second interval and I'm not sure if a more precise time would be required.
Features to do that I can think of would be:
I will hopefully send the first PR for my code in the next 24 hours so that people can comment and test. I will submit the PR against the release_2023_01 branch or maybe it would be better to start a new branch for this so it can be developed and tested before included into mainstream release.
Sort of off topic but thinking about all of these broadcasts make me wonder how collisions are handed in ESP-NOW and LoRA and if we need to implement some channel detection features or if retries and CRC checking are sufficient.
Beta Was this translation helpful? Give feedback.
All reactions