I am writing a python script to log data collected from a Ping2 Echosounder, but the script is sampling at a higher frequency than the echosounder, so many duplicates are present in the data. I thought the “ping_number” field of the get_distance() output dictionary would be the answer to my problem, but the field does not increment between new readings as I expected. Is there something I need to do to enable this functionality, or is it not implimented?
Hi @MJS_FRF, welcome to the forum
I’m currently travelling and don’t have access to my Ping Sonar, but I just replayed an old log file and the ping number does increase throughout the log.
When you say the field does not increment as you expected, are you saying it’s not incrementing at all, or that it’s incrementing in a different way to how you expected?
Hi @EliotBR. The field does not increase at all, it remains at 0.
@EliotBR Were you able to confirm whether the ping number increments on your Ping sonar?
I finally got around to looking into this today, and it does seem like there’s some unexpected behaviour going on, which I’ve described in this issue.
I’ve asked internally whether there’s a reason for it, and if not hopefully we can release a new firmware version soon that fixes it, since at least conceptually it seems like it should be quite straightforward to implement as it’s described in the docs
Great to hear. Thank you Eliot.