-
Notifications
You must be signed in to change notification settings - Fork 4
Description
The descriptions of the times on the status menu (98) have always been confusing:
Current Time: Thu Jan 01, 2026 16:25:49.200
Last Ntwk Rx Pkt System time:
<System Time Not Set>, diff: 2053190544 msec
Last Ntwk Rx Pkt Timestamp time:
<System Time Not Set>, diff: 0 msec
They are related to this code:
mydiff = system_time.vtime_sec - last_rxpacket_sys_time.vtime_sec;
mydiff *= 1000;
mydiff1 = system_time.vtime_nsec - last_rxpacket_sys_time.vtime_nsec;
mydiff1 /= 1000000;
mydiff += mydiff1;
printf("Last Ntwk Rx Pkt System time: %s, diff: %ld msec\n",logtime_p(&last_rxpacket_sys_time),mydiff);
main_processing_loop();
secondary_processing_loop();
mydiff = last_rxpacket_sys_time.vtime_sec - last_rxpacket_time.vtime_sec;
mydiff *= 1000;
mydiff1 = last_rxpacket_sys_time.vtime_nsec - last_rxpacket_time.vtime_nsec;
mydiff1 /= 1000000;
mydiff += mydiff1;
printf("Last Ntwk Rx Pkt Timestamp time: %s, diff: %ld msec\n",logtime_p(&last_rxpacket_time),mydiff);
system_time is OUR current time (if we have a GPS connected).
last_rxpacket_sys_time is OUR timestamp when we last received a packet from the HOST to TRANSMIT. If this client is not a transmitter (ie satellite receiver only), it will NEVER receive a packet from the host to transmit, so this will always be zero.
printf("Last Ntwk Rx Pkt System time: %s, diff: %ld msec\n",logtime_p(&last_rxpacket_sys_time),mydiff); intends to say, "what time was it when we last received a packet from the host to send, and how long ago was that from now (diff)?". Alas, Last Ntwk Rx Pkt System time: diff: is not that clear.
Likewise, last_rxpacket_time is the timestamp from the header in the packet the HOST sent us to transmit. So, printf("Last Ntwk Rx Pkt Timestamp time: %s, diff: %ld msec\n",logtime_p(&last_rxpacket_time),mydiff); intends to say, "what was the HOST time of the last packet we received from the host to send, and what was the difference between the host's time and our time?". Again, Last Ntwk Rx Pkt Timestamp time: diff" is not that clear.
Let's see if we can come up with better labels.