You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
poll_radar() polls at 10Hz - presumably to empty some undisclosed FIFO in the LD2410? But with a slow processor, as time goes on last_detection loses sync with reality - as can be seen by logging the various detection measurements for an extended period of time.
I think this is due to the FIFO being emptied at less that 10Hz because the Python Time library is not very accurate with sub-second delays. When this happens, readings are skewed back in time. As a work-around, and to support this theory, calling time.sleep(0.01) between calls to get_radar_data() ensures reading at something greater than 10Hz. (I estimate around 15Hz on my ancient Pi Zero test setup).
There doesn't seem to be any problem reading the LD2410 at higher rates than 10Hz - although I don't know what would happen with faster cpus.
The text was updated successfully, but these errors were encountered:
poll_radar() polls at 10Hz - presumably to empty some undisclosed FIFO in the LD2410? But with a slow processor, as time goes on last_detection loses sync with reality - as can be seen by logging the various detection measurements for an extended period of time.
I think this is due to the FIFO being emptied at less that 10Hz because the Python Time library is not very accurate with sub-second delays. When this happens, readings are skewed back in time. As a work-around, and to support this theory, calling time.sleep(0.01) between calls to get_radar_data() ensures reading at something greater than 10Hz. (I estimate around 15Hz on my ancient Pi Zero test setup).
There doesn't seem to be any problem reading the LD2410 at higher rates than 10Hz - although I don't know what would happen with faster cpus.
The text was updated successfully, but these errors were encountered: