# Ping 360 time info/split image

**URL:** <https://discuss.bluerobotics.com/t/ping-360-time-info-split-image/8328>\
**Category:** Ping Sonar Devices\
**Tags:** ping\
**Created:** [October 9, 2020, 3:34am UTC](https://discuss.bluerobotics.com/t/ping-360-time-info-split-image/8328 "2020-10-09T03:34:37Z")\
**Posts on this page:** 7\
**Page:** 2

<div class="post-metadata">

**Author:** ![EliotBR](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/eliotbr/32/6937_2.png) [@EliotBR](https://discuss.bluerobotics.com/u/EliotBR)\
**Post date:** [November 26, 2021, 12:10pm UTC](https://discuss.bluerobotics.com/t/ping-360-time-info-split-image/8328/21 "2021-11-26T12:10:50Z")

</div>

Some initial data (from three trials of each) - Ping360 via ethernet connection:

| Angular Step Size [gradians] | Distance [m] | Sample Period [ticks] | Transmit Duration [us] | Ping Viewer avg. time [s] | Python avg. time [s] | Python slower by |
| --- | --- | --- | --- | --- | --- | --- |
| 1 | 2 | 88 | 11 | **10.74** | **11.80** | 9.84% |
| 1 | 20 | 888 | 107 | **20.57** | **21.61** | 5.04% |
| 1 | 50 | 2222 | 267 | **37.6** | **38.42** | 2.17% |
| 10 | 2 | 88 | 11 | **3.29** | **3.29** | 0.00% |
| 10 | 20 | 888 | 107 | **4.19** | **4.32** | 3.18% |
| 10 | 50 | 2222 | 267 | **5.89** | **6.01** | 1.98% |

On average, Python was 3.70% slower (so, measurable, but not too bad).

Common testing parameters:

| parameter | value |
| --- | --- |
| gain | 0 (low) |
| sector angle | 360 degrees |
| speed of sound | 1500 |
| transmit freq | 750kHz |
| number of samples | 1200 |

I would note that the update to 0.1.2 included [this PR](https://github.com/bluerobotics/ping-python/pull/110), which provided a 27% speedup for a Ping360 (tested on a 2M baud USB-serial connection), so performance-wise that update is quite important for `ping-python` being anywhere close to the C++/Ping Viewer performance.

I should be able to change my interface over and do some USB-serial tests next week 🙂

---

<div class="post-metadata">

**Author:** ![zarbokk](https://avatars.discourse-cdn.com/v4/letter/z/35a633/32.png) [@zarbokk](https://discuss.bluerobotics.com/u/zarbokk)\
**Post date:** [November 29, 2021, 9:01am UTC](https://discuss.bluerobotics.com/t/ping-360-time-info-split-image/8328/22 "2021-11-29T09:01:13Z")

</div>

Thanks for your data. I will try that out this week and report our findings.

---

<div class="post-metadata">

**Author:** ![zarbokk](https://avatars.discourse-cdn.com/v4/letter/z/35a633/32.png) [@zarbokk](https://discuss.bluerobotics.com/u/zarbokk)\
**Post date:** [November 29, 2021, 11:36am UTC](https://discuss.bluerobotics.com/t/ping-360-time-info-split-image/8328/23 "2021-11-29T11:36:22Z")

</div>

@EliotBR  
My Findings are the Following(With USB3, important with 2M baudrate on Normal Desktop Computer):  
I just copied your table, and changed the measurements.

Edit: This was tested with **Intel i9 CPU** and is **much faster than RPI4** , which was used by @EliotBR

| Angular Step Size [gradians] | Distance [m] | Sample Period [ticks] | Transmit Duration [us] | Ping Viewer avg. time [s] | Python avg. time [s] | Python slower by |
| --- | --- | --- | --- | --- | --- | --- |
| 1 | 2 | 88 | 11 | 6.7 | 7.8 | 16.4% |
| 1 | 20 | 888 | 107 | 17.0 | 18.4 | 8,2% |
| 1 | 50 | 2222 | 267 | 33.8 | 35.0 | 3.6% |
| 10 | 2 | 88 | 11 | 2.83 | 2.88 | 1.7% |
| 10 | 20 | 888 | 107 | 3.8 | 3.92 | 3.2% |
| 10 | 50 | 2222 | 267 | 5.5 | 5.65 | 2.7% |

As far as I can see is the speed much better with USB and a Baudrate of 2M in contrast to Ethernet.  
For me, I just learned how much of a difference there is with different baud rates.  
I think using USB results in slower python code compared to C++, but generally is faster. But maybe there is something different in the setup you used.

You can test it yourself again if you want, but for me, I think I am very pleased with the result. Thanks for your Help.

---

<div class="post-metadata">

**Author:** ![EliotBR](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/eliotbr/32/6937_2.png) [@EliotBR](https://discuss.bluerobotics.com/u/EliotBR)\
**Post date:** [November 29, 2021, 12:47pm UTC](https://discuss.bluerobotics.com/t/ping-360-time-info-split-image/8328/24 "2021-11-29T12:47:46Z")

</div>

I’ve just done my Python tests with serial-USB on an RPi4 running Bullseye (Lite), with Python 3.9.2. The fastest baudrate I could get to initialise was 2823529, so I used that.

I ended up with

| Angular Step Size [gradians] | Distance [m] | Sample Period [ticks] | Transmit Duration [us] | Python Serial avg. time [s] | Python Ethernet avg. time [s] | Serial slower by |
| --- | --- | --- | --- | --- | --- | --- |
| 1 | 2 | 88 | 11 | **13.85** | **11.80** | 17.38% |
| 1 | 20 | 888 | 107 | **23.51** | **21.61** | 8.82% |
| 1 | 50 | 2222 | 267 | **42.03** | **38.42** | 9.41% |
| 10 | 2 | 88 | 11 | **3.57** | **3.29** | 8.72% |
| 10 | 20 | 888 | 107 | **4.60** | **4.32** | 6.56% |
| 10 | 50 | 2222 | 267 | **6.28** | **6.01** | 4.50% |

> [@zarbokk](#):
>
> As far as I can see is the speed much better with USB and a Baudrate of 2M in contrast to Ethernet.

Ethernet is definitely capable of going faster than serial, so likely there are setup differences. My ethernet setup was Ping360 → Ethernet Switch → Fathom-X → tether → Fathom-X → Ethernet-to-USB2 → computer running Python/Ping Viewer, so it’s possible there are slowdowns somewhere in there.

That said, my serial setup was Ping360 → RPi4 USB port, running Python, and it was on average 9.23% slower than the topside Python with the ethernet connection, so perhaps there was some other difference between our setups.

If it’s helpful/relevant, my testing code was basically

```python
from brping import Ping360
from time import perf_counter

p = Ping360()
device = '/dev/ttyUSB0'

# determine highest working baudrate
b_min = 115_200
b_max = 3_000_000
step = (b_max - b_min) // 2
while step > 1:
    p.connect_serial(device, b_max)
    if p.initialize():
        # connection worked -> try a higher baudrate
        b_min = b_max
        b_max += step
        p.iodev.close() # disconnect again
    else:
        # connection failed -> try a lower baudrate
        b_max -= step
    step = round(step / 2)

print('highest working baudrate:', b_min)
p.connect_serial(device, b_min)
p.initialize()

def test(angles):
    start = perf_counter()
    for angle in angles:
        p.transmitAngle(angle)
    return perf_counter() - start

p.set_transmit_frequency(750)
p.set_number_of_samples(1200)

conditions = ((88, 11), (888, 107), (2222, 267))
for sample_period, transmit_duration in conditions:
    print(f'{sample_period=}, {transmit_duration=}')
    p.set_sample_period(sample_period)
    p.set_transmit_duration(transmit_duration)
    
    for step in (1, 10):
        print(f'{step = } gradians')
        results = [test(range(0, 400, step)) for _ in range(3)]
        print(results, sum(results) / 3)

```

---

<div class="post-metadata">

**Author:** ![zarbokk](https://avatars.discourse-cdn.com/v4/letter/z/35a633/32.png) [@zarbokk](https://discuss.bluerobotics.com/u/zarbokk)\
**Post date:** [November 29, 2021, 1:18pm UTC](https://discuss.bluerobotics.com/t/ping-360-time-info-split-image/8328/25 "2021-11-29T13:18:39Z")

</div>

My setup is really just Ping360 → USB3(2M) -\>Ubuntu 20.04(Intel i9 CPU) with either Python3.8.10 or Ping-Viewer.  
The code is very similar to mine, except the fancy baudrate finder.

Now after testing it with my RPI4, I come basically on the same numbers as you do.  
This just shows again how “slow” the RPI4 i/o interface can be.  
I will keep the numbers on my top post but add that it was done on a faster Computer.

The speed up with Ethernet can be an option for many, maybe this is even faster with the RPI4.

---

<div class="post-metadata">

**Author:** ![EliotBR](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/eliotbr/32/6937_2.png) [@EliotBR](https://discuss.bluerobotics.com/u/EliotBR)\
**Post date:** [July 22, 2025, 6:14am UTC](https://discuss.bluerobotics.com/t/ping-360-time-info-split-image/8328/26 "2025-07-22T06:14:33Z")

</div>

Update: [`auto_transmit` is available now](https://discuss.bluerobotics.com/t/ping360-firmware-update/21023), which speeds up the scan rate by reducing communication overheads 🙂

---

<div class="post-metadata">

**Author:** ![EliotBR](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/eliotbr/32/6937_2.png) [@EliotBR](https://discuss.bluerobotics.com/u/EliotBR)\
**Post date:** [November 1, 2025, 6:20pm UTC](https://discuss.bluerobotics.com/t/ping-360-time-info-split-image/8328/27 "2025-11-01T18:20:02Z")

</div>

A post was split to a new topic: [Ping360 auto\_transmit clarification](https://discuss.bluerobotics.com/t/ping360-auto-transmit-clarification/21935)

[Previous page](https://discuss.bluerobotics.com/t/ping-360-time-info-split-image/8328.md?page=1)
