Ping Sonar range setting and the angle definition

Hi @yuki,

Note that:

Yes, assuming you don’t turn off the device in between (parameters are reset to the defaults when the device turns on).

The range per sample is determined by the sample_period, so the total range is determined by sample_period and number_of_samples, together with the speed of sound in the water you’re operating in (see here if you want to estimate it from vehicle data, and here for estimating salinity).

If you want to make a set_range function, it may be worth looking at how it’s implemented in Ping Viewer :slight_smile:

The following information may be useful:

Not certain what you’re referring to here.

If you transmitAngle(40) and then transmitAngle(0) it will go the shortest direction back to the target angle (0 in this case), and it won’t transmit or take samples until it gets to the target angle. If you want you can test that by sending transmitAngle requests for 40, then 0, then 200 - it will take longer to get from 0 to 200 than from 40 to 0.

If you’re referring to the auto-transmit section then

The “not released” state is documented for auto_device_data but apparently got missed for auto_transmit - I’ve added that fix to a pull request.