sallmin / thunder-distance-calculator

Thunder distance calculator with Ajax & PHP

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

thunder-distance-calculator

Thunder distance calculator with Ajax & PHP

Simple calculator of lighting strike distance in metric units.

Script was made with Ajax so all the operations should be done without a single refresh of page.

Calculating the distance of a thunder is really easy. All you need it to count in seconds how long it takes for you to hear rumble after thunder has struck. Knowing that light travels approximately 300 000 km/s, or more than 6 times round the world in a second, we know that we see the light immediately upon striking. Sound travels at about 340 m/s in room temperature (20℃). To calculate the final distance of a thunder we just multiply seconds counted with speed of sound. Example: If we counted 5 seconds after thunder struck, and then multiply this number by 340 we get 1700 meters or 1.7 kilometers distance from a thunder.

Special thanks to my friend, Mentor (https://github.com/mentorgashi) - a super programmer, who on a day with thunder, enlightened me with this idea.

Demo: http://thdc.sallm.in

About

Thunder distance calculator with Ajax & PHP


Languages

Language:HTML 84.2%Language:PHP 10.9%Language:CSS 4.9%