Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error calculating AvgResponseTime #14

Open
svesaja opened this issue Jan 26, 2025 · 0 comments
Open

Error calculating AvgResponseTime #14

svesaja opened this issue Jan 26, 2025 · 0 comments

Comments

@svesaja
Copy link

svesaja commented Jan 26, 2025

Dear all,
I have just tested the Ping.ino example that comes with the library. The AvgResponseTime is calculated incorrectly. If you calculate the correct average from the actual response times by hand, you will see that in the example the average is calculated by the number of requests raised to the power of 2 (Tested with 4 and 5 requests).

11:45:30.798 -> Pinging technologytourist.com
11:45:30.842 -> Reply from 76.223.54.146: bytes=32 time=11ms TTL=249
11:45:31.817 -> Reply from 76.223.54.146: bytes=32 time=13ms TTL=249
11:45:32.810 -> Reply from 76.223.54.146: bytes=32 time=9ms TTL=249
11:45:33.798 -> Reply from 76.223.54.146: bytes=32 time=8ms TTL=249
11:45:34.783 -> Ping statistics for 76.223.54.146:
11:45:34.816 -> Packets: Sent = 4, Received = 4, Lost = 0 (0.00% loss),
11:45:34.849 -> Approximate round trip times in milli-seconds:
11:45:34.916 -> Minimum = 8ms, Maximum = 13ms, Average = 2.56ms

Regards
-svesaja

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant