Slashdot Mirror


Speed of Light Measurement Using Ping

Thomas Colthurst writes "You've no doubt already read the story of ping, but have you ever used it to measure the speed of light?" Here's a case where all that cat5 on college campuses can actually be used for education ;)

23 of 274 comments (clear)

  1. I just measured it by Guitarzan · · Score: 5, Funny

    And according to Unreal Tournament, the speed of light is about 50 miles per hour.

  2. How they do it by Alien54 · · Score: 5, Interesting
    As seen in the paper:
    Here's the problem; the cable range of ethernet without a repeater is about 250 feet (that is, at most a few microseconds roundtrip in cat-5 cable) and actually all the tests described here are done in much shorter cat-5 cable (more practical for typical reuse) and coaxial cable lengths so that it can be done cheaply. A typical classroom can hold several experiments of this type, the cables being shared between pairs of computers (and thus lab groups). Since ping only returns roundtrip times as measured in microseconds the actual signal (which is the additional delay in a cable path of longer length) is below the (reported) resolution of ping.

    The solution is to use noise. Although noise usually hampers one's ability to measure a signal, in this experiment, noise in the form of randomly distributed small delays (microseconds) associated with machine response actually makes the measurement of the signal (nanosecond-long cable transit delays) possible. Without the noise, the experiment we describe here would be impossible! This concept of noise-assisted sub-threshold signal detection (hereafter; stochastic resonance) is of great value because it plays a role in a great variety of systems. For a readable introduction and overview of stochastic resonance see Ref. [7] and Ref. [10] for a bibliography. For example, stochastic resonance has been used to analyze climate patterns [8] and plays a role in fundamental neuro-physiology [9] . Part of the hidden pedagogic agenda of this laboratory is to introduce the concept of stochastic resonance in a hands-on way. How well this laboratory can actually get students to ponder that depends on the approach of the instructor. Our experience with this laboratory indicates that time differences on the order of 50 nanoseconds (or about 5 % of the threshold) are reliably resolvable.

    Which is damn clever of them indeed.
    --
    "It is a greater offense to steal men's labor, than their clothes"
  3. Re:Delays due to molecular friction? by HMC+CS+Major · · Score: 3, Informative

    They took this into account.

    If you look at the actual paper (pdf version here), the 9th page shows the formulas they used to calculate the result.

  4. Why not use Jupiter's moons? by Caractacus+Potts · · Score: 4, Informative

    If you want a real experiment, measure the speed of light using Jupiter's moons. This was how the first accurate measurement was made. At least they'll be playing outside.

    click me

  5. It looks like... by Nathdot · · Score: 3, Funny

    ...someone is very close to getting some sweet government funding to play quake all day!!!

    M: "Joel, did you get those speed of light measurements this time?"

    Joel: "No, It looks like we'll have to fire up another game. You wanna play one-on-one or co-op M?"

    M: "Sweeeeet!!!"

    :)

  6. Re:Memories of high school by Anonymous Coward · · Score: 3, Funny

    In high school, I measured geeks' resistance to pain and hunger by beating you up and taking your lunch money.

  7. Yawn. by Multiple+Sanchez · · Score: 3, Funny

    Do the same thing with pong, then I'll be impressed.

  8. Cuckoo's Egg by sconeu · · Score: 5, Interesting

    Cliff Stoll mentions using Kermit ack latency to measure distance in "The Cuckoo's Egg". Of course, he wasn't trying to measure c, but to figure out where his hacker was. Turns out he was pretty accurate, even though the data was ignored because it didn't fit the currently known theories...

    --
    General Relativity: Space-time tells matter where to go; Matter tells space-time what shape to be.
  9. This makes no sense to me.... by antistuff · · Score: 3, Funny

    why go through all that trouble when all you need is a flashlight and a stopwatch?

  10. "educational" network by GePS · · Score: 3, Funny

    "Here's a case where all that cat5 on college campuses can actually be used for education ;)"


    Did I just hear education implied when talking about a college campus network? All these marvelous filesharing programs do little but propogate porn.

    Hell, perhaps you could somehow measure the speed of light by observing how fast the search "teen sex" on Kazaa fills up.

  11. A few recommendations: by swagr · · Score: 5, Funny

    1. Ping a machine farther away for more accurate results.
    2. Have the entire lab flood-ping it to collect statistics at a faster rate.
    3. Get some other shools doing this at the same time so you can compare results.

    I recommend slashdot.org.

    --

    -... --- .-. . -.. ..--..
  12. Norway? by The+Ape+With+No+Name · · Score: 3, Funny
    My original impetus for writing PING for 4.2a BSD UNIX came from an offhand remark in July 1983 by Dr. Dave Mills while we were attending a DARPA meeting in Norway...."


    Why on earth was a US Defense department group having a meeting in Norway? I need to get my boss to start having meetings in Maui. Sheesh.

    --
    Comparing it to Windows will be a moot point, since El Dorado is going to have a 40% larger code base than XP.
  13. SI length of the meter? by j-beda · · Score: 4, Insightful
    The first footnote of the paper seems to be incorrect, it reads:

    [1] Since the mid eighties the meter has actually been defined in terms of a fixed, integral number of wavelengths of light from a particular optical transition. Since the frequency of that optical transition is tied up in (what are believed to be fundamental) constants of nature, the speed of light is defined through this definition of the meter.

    I had thought that the meter was defined as the distance light travels in 1/299792458 of a second, with the second being so many vibrations of a particular atom (cesium?).

    Yep, according to NIST the length has been defined this way for quite some time:

    The 1889 definition of the meter, based upon the artifact international prototype of platinum-iridium, was replaced by the CGPM in 1960 using a definition based upon a wavelength of krypton-86 radiation. This definition was adopted in order to reduce the uncertainty with which the meter may be realized. In turn, to further reduce the uncertainty, in 1983 the CGPM replaced this latter definition by the following definition:

    The meter is the length of the path travelled by light in vacuum during a time interval of 1/299 792 458 of a second.

    1. Re:SI length of the meter? by p3d0 · · Score: 3, Informative

      Nope. It was 1,650,763.73 wavelengths, not 299,792,458. The latter would have been an astounding coincidence if it were true. Imagine: what are the odds that the meter happens to be the exact geometric mean between one light-second and one wavelength of this krypton radiation.

      --
      Patrick Doyle
      I mod down every jackass who puts his moderation policy in his sig. Oh, wait a sec....
  14. First typo post! by Karn · · Score: 3, Funny

    "ping -i .01 > tempfile1.txt" where ">" (the so-called 'pipe' symbol)

    Then what's this thing: | ?

    :)

    --


    Why do I keep typing pythong?
  15. physics class by abe+ferlman · · Score: 5, Funny

    This is a little off topic, but not much so bear with me.

    A friend of mine found physics easy in high school, but found his teacher unbearable. So he would always convert his (generally correct) answers into inconvenient units, you know, pico-thises, nano-thats.

    One time the question was "what is the speed of light?"

    His answer? "1 lightyear/year"

    --
    microsoftword.mp3 - it doesn't care that they're not words...
    1. Re:physics class by Hal-9001 · · Score: 3, Funny

      The average distance from the sun to the earth is 1.5 x 10^23 angstroms, plus or minus a whole lot of angstroms.

      --
      "It take 9 months to bear a child, no matter how many women you assign to the job."
  16. More than just the speed of light by HardCase · · Score: 3, Informative
    Even though there are a few minor errors in the paper, the authors deserve a mighty pat on the back for this. Not only did they devise a rather interesting method of estimating the speed of light, but they also managed to throw in a little basic electronic theory as well.


    I'm less than a semester away from graduation as an electrical engineer and I've taken more than my fair share of physics classes, in fact, more than the curriculum required. I think that an experiment like this one has a solid place in a second semester physics class, particularly one that is taken by engineers. In the second semester, the students have (hopefully) mastered classical concepts of mechanics and are moving into waves and fields. What a perfect time for a project like this.


    Suffice to say that my physics experience was not nearly so fun. Oh, and eventually we did measure the speed of light, but not until I took quantum mechanics. And then we measured it directly by modulating a laser with an extremely high frequency function generator and measuring the phase shift with an equally high sampling oscilloscope. It didn't require any particular expertise in overcoming the limitations of the hardware or really any problem solving at all, other than a little bit of math to convert feet per microsecond to meters per second.


    All in all, a very good job.


    -h-

  17. Practical Pinging by Alioth · · Score: 3, Informative

    Pings are used to measure things in real life.

    For example, DME (distance measuring equipment) in aviation. This works by equipment on the aircraft sending a signal to the ground-based DME station, which replies. The round-trip is measured, giving the distance from the station.

    Maybe ICMP pings can be used to find out how much Cat 5 there is between you and the target machine :-) Of course, the time taken to process the ping by the target etc. must be taken into account.

  18. My favorite part of the ping story by Horizon_99 · · Score: 3, Funny

    Dunno how many of you read it but this is hilarious:

    "The best ping story I've ever heard was told to me at a USENIX conference, where a network administrator with an intermittent Ethernet had linked the ping program to his vocoder program, in essence writing:

    ping goodhost | sed -e 's/.*/ping/' | vocoder

    He wired the vocoder's output into his office stereo and turned up the volume as loud as he could stand. The computer sat there shouting "Ping, ping, ping..." once a second, and he wandered through the building wiggling Ethernet connectors until the sound stopped. And that's how he found the intermittent failure."


    -Horizon
    "The universe is not required to be in perfect harmony with human ambition." - Carl Sagan

  19. Measuring the speed of light with a ruler by harlows_monkeys · · Score: 4, Interesting
    One day in APh 23 (the introductory optics class) at Caltech, the professor announced it was time to measure the speed of light, and pulled a ruler out of his pocket. The class laughed.


    He then turned on a laser of known wavelength, and reflected the beam off the ruler onto the chalkboard. The ruler had raised lines every 1/16th of an inch, and this made it basically act as a diffraction grating, and there was a clear diffraction pattern on the chalkboard. He marked off the pattern on the chalkboard with chalk, then took the ruler and measured the distance between the lines on the diffraction pattern. Then, still using the ruler, he measured the distance to where he had held the ruler.


    A quick calculation later, and he had the speed of light.


    I'm not sure that this was fully legitimate, because I can't think of a way to know the wavelength of the laser that doesn't involve already knowing the speed of light, but it was interesting nonetheless.


    Speaking of interesting things to do with interference patterns, that professor did some work at Hughes on an optical weapon system. It had an array of radiators. Turn them all on, and you get a classic interference pattern, so you get a strong lobe in one direction, and not enough radiation in other directions to harm anything. The cool part was how it was aimed.


    You aimed the main lobe by playing with the phase of the various radiators, so you didn't have to move things around to do fine aiming.


    Here's the cool part. They used a feedback system. The modulated the phase of each radiator with a sine wave, using a different frequency for each radiator. They'd point a sensor at the target, and look for variations in the intensity of the reflection. If a particular radiator was at a phase that was contributing toward putting the max lobe on the target, there would be a weak variation in the reflection at the frequency of the sine wave they were modulating that radiator with (if the radiator is at the right phase, you are near a peak, and small variations from the modulation don't lose much). If a particular radiator's phase was way off, you'd get a strong single at the frequency of the modulation.


    So, they could simply do a fourier analysis of the reflection, and see what radiators needed their phase adjusted to hit the target.


    The professor had a film of a test, with a small number of radiators. They were all pointing at a black background, and you saw a kind of vague shifting light pattern. Then someone tossed a small metal model of the starship Enterprise in, and blam!, the phases were adjusted in a millisecond or so, and that thing lit up. It was very cool.

  20. Re:How can this be accurate? by Anonymous Coward · · Score: 4, Informative

    [The error bias is] by no means a constant, rather a mean or average of a group of values.


    It doesn't have to be a constant. See below.


    This is by no means accurate, anaything can throw the values off (OS, System, Hardware, or disks). This is really a wastes of time, in it's current form, needs more thought.


    Except for the fact that it actually gives the right answer for the speed of light -- reliably and reproducibly, to within a few percent. I wonder how that happened. Accident? Coincidence? Fudging the data? Incompetent error analysis? Wishful thinking? No, none of the above.


    You really need to learn about statistical error analysis. This happens in every scientific experiment: there are always uncontrollable, unknown sources of error "that can throw the values off" -- be they fluctuations in OS response time, or in the temperature of a material, or air currents, or whatever is relevant to your experiment. (This case is just more extreme, where the errors are larger than the signal.)


    However, that doesn't prevent you from analyzing the magnitudes of the errors and getting an accurate result bounded by error bars. In this case, if you take enough measurements, it's possible to extract a signal from the noise -- you just need to make sure that the signal-to-noise ratio is good enough.


    I'm reminded of a trick for improving GPS accuracy: it's only accurate to some certain number of meters. But if you leave the receiver at the same location and carefully integrate the signal for a sufficiently long period of time (hours or days), you can actually get down to centimeter accuracy -- far beyond the theoretical "accuracy" of the equipment, even though random errors throw each individual measurement off by metters.


    The reason is because the error goes like 1/sqrt(N) where N is the number of measurements. Take a lot of measurements, and you can reduce the error. (Up to a point, until the noise swamps the signal beyond any statistical chance of recovery. It isn't a magic trick for providing infinite accuracy.) I remember Jerry Pournelle, in his Chaos Manor column, talking about using a GPS unit this way to locate the exact best location for a solar eclipse (just for the heck of it, not that you really need to know it down to the last centimeter).


    For that matter, this is the same reason why the LIGO instrument can use laser rangefinding to measure distances on the order of 1/1000 of the diameter of a proton. No, I'm not joking. 10^-18 meters. How can it do that, if that's far smaller than the size of an atom, if the mirror the beam is bouncing off of isn't even flat to that accuracy?


    It can do that because it's measuring the average distance of lots of atoms (all the atoms in the mirror), so the same kind of 1/sqrt(N) argument applies. It's another counterexample to your first remark: the measured values don't have to be constant (due to a constant systematic error bias); they can fluctuate, as long as you've got a very accurate measurement of their average. Thus, the instrument will be able to detect the minute changes in distance that occur when a gravitational wave passes by and curves space along the beam line.


    (Side note: LIGO II will be sensitive that it will actually be making macroscopic quantum measurements, running up against the Heisenburg uncertainty bound on position accuracy -- as applied to a 30-40 kg object, the mirror. It's a textbook problem to verify that the HUP bound on position for a macroscopic object is utterly tiny, but for the first time, we will be able to demonstrate its applicability on the macroscale directly.)


    In all of the above cases, including the case under discussion here, this trick is only possible because the SNR was low enough to permit signal extraction from the noise. If the OS/system/hardware threw off the values by too wide a spread every time, then you wouldn't be able to do this -- but they don't. (In the LIGO case, the signal is so small that they have to do amazing noise reduction in order to pull out any signal at all. The observatory is so sensitive that it can track passing aircraft from the noise they make, since it vibrates the mirrors that the lasers are bouncing off of. Fortunately, they have all kinds of ways of subtracting out noise like that, so that the remaining unavoidable noise is absolutely tiny.)


    In fact, in the case under discussion, the very errors you're claiming make the experiment "a waste of time", are what make the experiment work! (As was pointed out in the paper, and by other posters here.) If you always got a consistent "ping 1 ms" or whatever, that wouldn't tell you much, since the actual transit time is much less than 1 ms. But if there are some fluctuations due to random errors, then changing the physical round trip time will have an influence on the statistical distribution of those fluctuations. (i.e., the shape of the error bars -- or, more accurately, of the statistical distribution of error -- bounding a data point depends on where the data point is. Thus, the noise tells you about the signal!)


    Incidentally, I'm reminded of some amateur radio astronomers being able to measure pulsar emission rates using homebuilt experiments. There's no way you can actually see the period signal directly, but with long integration times, some Fourier transforms, and a little signal processing... It's really amazing what you can do with a little signal processing! I'm pretty sure they weren't using anything as fancy as stochastic resonance, but imagine what they could do if they could apply this technique...

  21. If you think that's hilarious... by Mawbid · · Score: 3, Interesting

    I have a wireless internet connection at home. A guy came and installed a directional antenna on the roof. He had me ping their gateway and he oriented the antenna while I read ping times to him over a two-way radio.

    Well, I wasn't happy with the latency, so later I adjusted the antenna myself. But I didn't have anyone to read ping times to me and I wasn't too thrilled about this method anyway, so I came up with something better.

    I wrote a perl script that would ping a host, wait for a reply (or a one second timeout), play a tick sound, and repeat the process. It sounds like a Geiger counter. The more frequent and steady the ticks, the better the connection. Also, every five seconds the script calls Festival to speak the average ping time. So, I get a nice intuitive feel for the connection through the stream of ticks, and a concrete measurement too.

    Speakers out the window, full blast. Me on the roof. Neighbours' quizzical faces in the windows :-)

    --
    Fuck the system? Nah, you might catch something.