bitcraze / crazyflie-lib-python

Python library to communicate with Crazyflie
Other
262 stars 895 forks source link

Calculate latency, receive uplink RSSI, calculate bandwidth congestion and packet rate #492

Open gemenerik opened 1 month ago

gemenerik commented 1 month ago

Continuation of #480 and #477

:rocket: Features

Introduces a framework for link statistics, enabling the tracking of various metrics, starting with latency measurement.

Refactors link quality callback to contain signal health obj with additional signal health information:

:memo: To-do

The implementation improves the lib's ability to monitor communication quality and lays the groundwork for further enhancements in link statistics.

gemenerik commented 1 month ago

In the last commit, I renamed the SignalHealth class to RadioLinkStatistics to better represent its focus on metrics specific to the radio communication, such as RSSI. This class exists to measure parameters at the driver level, as metrics like congestion require direct access to the radio driver, while latency can be measured through packet exchanges.

I also want to bring up the consideration of feeding data from RadioLinkStatistics into the general LinkStatistics. This approach could enhance user clarity by centralizing all link-related metrics in one place. However, keeping them separate might maintain clearer responsibilities and modularity. This is something we might want to discuss further as we refine the implementation.