Catch up on stories from the past week (and beyond) at the Slashdot story archive

 



Forgot your password?
typodupeerror
Education Science

Speed of Light Measurement Using Ping 274

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 ;)
This discussion has been archived. No new comments can be posted.

Speed of Light Measurement Using Ping

Comments Filter:
  • Wouldn't you get delays due to the friction of the copper? You could use fibre, but a switch or patch in the fibre would add latency/friction as well.
    • Friction?! As I remember the electrions themselves move slow as molasses, but the information (current move, current not move,) travels at the speed of light. So how would any kind of friction change this?
      • Its like a hose full of water, you turn on the water on one end, and water almost instantly starts shooting out the other end, but the internal friction and compression of the materials in the hose will effect the speed of that processes. Think of a non compressable fluid, vesus a gas. electrons arn't very compressable, so its fairly instantanious but it does happen, but we know the percent change based on how conductive the material is.
        • The parent post is right: electrons themselves move too slowly for them to carry information all the way from one end of a cable field. Information is carried through cable via an electromagnetic wave, which can propagate much faster. In fact, the parent post is right again: the information propagates at the speed of light (in that medium). In fact, any given electron in the cable probably doesn't go anywhere. A simple example demonstrating this to be true of wave phenomena is that if you send a wave through a string, the end of the string you're holding onto doesn't magically find it's way to the other end of the string--you were holding onto it the whole time. The fact that the wave propagates and the medium doesn't is also why a beach ball out in the ocean beyond the breakers doesn't spontaneously return to shore.
          • Actually, the speed of an electromagnetic wave is somewhat slower in a cable than in a vacuum. How much slower is determined by the dielectric constant [merix.com] for the cabling's material.

            This page on transmission line theory [tmeg.com] explains things pretty well. It actually covers the concepts that students performing the described experiment need in order to actually get their results. It also describes some other neat things (such as the theoretical reasons why you need a "balun" converter to connect 75ohm coax to 300ohm twinlead. It even explains why the wire types are called 75ohm and 300ohm, if indirectly.)

            --Joe
      • Electrons themselves can't travel at the speed of light. (They have a rest mass, and so according to relativity theory, would require infinite energy to accelerate them to this speed). The information is carried by electromagnetic waves (or photons), which pass through the electrons and do travel at the speed of light (because they have zero mass).

        Of course, the speed of light (or photons, or EM waves) in a copper wire is somewhat less than that of light in free space (but, interestingly, somewhat more that that in glass fiber, despite claims that fiber optics is "networking at the speed of light").

        • Of course, the speed of light (or photons, or EM waves) in a copper wire is somewhat less than that of light in free space (but, interestingly, somewhat more that that in glass fiber, despite claims that fiber optics is "networking at the speed of light").
          Two responses:
          1. Fiber optics is networking at the speed of light--it's just the speed of light in glass, which is ~2/3 the speed of light in vacuum.
          2. Photonic bandgap fiber uses a hole in the center of a glass fiber to confine the light. Since this hole is presumably filled with air, which has a refractive index very close to 1, such fiber would be networking very close to the speed of light in vacuum.
      • The electrons move (as a result of an applied voltage) at what is known as the drift velocity [gsu.edu]. A example in copper [gsu.edu] is also available.

        Current doesn't stop (your "current move, current not move" parenthetical). Current is not a thing, but is a description of a situation: moving charge is a current. An Ampere [essex1.com] is defined as one Coulomb of charge passing a reference plane in one second.

        How fast a signal propagates down a wire is its group velocity [mathpages.com].

        The "friction" mentioned by the original poster I interpret to be a flawed understanding of how resisivity works. Electrical signals travelling through resistive materials are attenuated, not slowed down, due to the resistance. Changes in velocity are due to changes in the dielectic constant.
    • They took this into account.

      If you look at the actual paper (pdf version here [lanl.gov]), the 9th page shows the formulas they used to calculate the result.
    • Where does friction enter the picture? If you have the impression that electrons are flowing through CAT-5 to carry bits of information, you're horribly mistaken. You even more horribly mistaken if you think friction has anything to do with fiber-optic communication.

      In general, the speed of light pulses sent through a fiber will be approximately 2/3's the speed of light in vacuum, since the refractive index (ratio speed of light in vacuum to speed of light in that medium) of glass is approximately 1.5. You get the latency by dividing the transmission distance by this speed. I haven't had a chance to read the paper yet, but I imagine that CAT-5 latency is probably similar.
      • I just read the paper, and I was right about the latency of CAT-5:
        The least squares fit to these data yields a slope of 2.04 +/- .14 x 10^8 m/s , indicating that the speed of propagation in a cat-5 cable is some 2/3 the speed of light in the vacuum.(bottom of page 8 of the PDF)
        Damn, I'm good... ;-)
      • You get the latency by dividing the transmission distance by this speed.

        You're presuming that the distance travelled by light is roughly equivalent to the distance of the cable. This is grossly inaccurate.

    • You get delays due to the velocity factor of the cable; this is mostly due to the dielectric behavior of the insulation (which is unlrelated to friction).

      You'd have the same delays in fiber; light travels more slowly though glass than through vacuum, in no small part because of the dieletric properties of glass. In case you're wondering, the speed of light in a medium is equal to 1/; when and are the values for vacuum, v = c.

      (Yes, I'm a physics nut and I studied this crap for my degree. About the only thing I use it for is to set people straight about physics.)

    • Friction equates to loss or attenuation. The signal gets weaker with distance. Attenuation does not affect speed. Propagation factor is another mater. It does affect the velocity of the signal, but does not change the amplitude. In cable both items are present. Attenuation is due to both resitance of the copper conductor and dielectric losses in the insulation. Delay is caused by the dialectric, not the conductor. The delay in cables is well known. Anyone who uses a TDR regularly is aware of the velocity factor of the type of cable they are measuring. It must be known to get an accurate length measurement. Air dielectric has a constant of 1. Coax with solid dielectric is near 2/3rd that speed. I wonder if the university study took into account the velocity factor for the cable. If not, I expect they will find light is about 20% slow.

      The best experiment I saw for measuring the speed of light was done using the mirror (8 sided) out of a laser printer. At rest a laser was reflected off a face of the mirror and went to a target reflector. Oposite the laser, a detector was used to see the same target off another face of the mirror. When the mirror was spun, the laser scanned the reflector. The reflected light pulse would not reach the detector because the travel delay kept the return pulse from hitting the mirror at the right angle to reach the detector. At a certan speed the pulse reached the mirror in the right postion (1/8th rotation) to send the reflected pulse on to the detector. Light only reached the detector with the mirror at rest and at a speed where the mirror turned 1/8th of a revolution in the time the light took to travel from the mirror to the reflector and back to the mirror. It was a good class. We started with a known distance to measure the speed of light, then used an unknown reflector (stop sign down the block) much further away and used our speed results to measure the distance.

  • hrm makes sense to me :)
  • by Guitarzan ( 57028 ) on Tuesday January 29, 2002 @06:56PM (#2922451)
    And according to Unreal Tournament, the speed of light is about 50 miles per hour.
  • But I've certainly used it to measure the speed of lag. I wish I had some of my old traceroute logs from when sprintnet went out in Chicago. Ping times went down to 1545ms on average, going from Bay City, MI to Saginaw, to Michigan Tech, to Rochester, to Willow Springs, to Atlanta, to St. Louis, to Kansas City to Ft. Worth, to Austin. Those were some well travelled packets.
  • How they do it (Score:5, Interesting)

    by Alien54 ( 180860 ) on Tuesday January 29, 2002 @06:56PM (#2922456) Journal
    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.
  • Their recording equipment consists of laptops that are networked. Wouldn't the packet first need to hit the network iterface, be decoded. Hit the pci bus hit the CPU, hit the software, run through the os, to the bash process to be displayed on the bash console?

    Doesn't sound very accurate to me.
    • All those things are mentioned are constant - so you can do it with a long wire, and with a short wire.

      Then you use the difference - and you've eliminated your constants.
  • It sounds good as a experiment. You have to figure out the time the computer in the other end takes to reply and then return an answer. But don't you really need another clock than the one that comes in a standard pc. Some PC's seems to loose up to 30 secs every day. And then there is the limit to how long your cable can be. since you can't have any switches in between, can the cable be long enough so you can measure a delay with the poor accuracy of a pc? Hmm maybe counting clock cycles would be better for timetaking. oh well.
    • I don't think losing a few seconds each day will make the difference needed to mess up the results of such a test, but in either case, NTPd measures the inaccuracy of your system clock by comparing it to reliable sources (stratum 1 time servers) and compensates for it automatically. If you run ntpd, you should be able to see what your offset is by looking at the file /var/lib/ntp/ntp.drift.
      • In my experiences, computers don't have a steady drift. They tend to lose time more under high use. So when Windows is f***ing up and everything is slow, I lose all kinds of time.

        I hate to bury a question like this so low in a thread, but here goes: why is it that for $5 I can buy a Backstreet Boys (or whatever) wristwatch at K-Mart that will lose less than a minute each month, yet I pay thousands of dollars for computers and the clocks are useless if you don't run a program to update it CONSTANTLY? I'd love to learn how to wire a wristwatch into my CPU to be the clock....
  • That you'd only be measuring the amount of pr0n being downloaded by physics students... unless you had your own clean segment.
  • While it seems like it should work I have a hard time believing that the distances are known constants (wiring can take some very odd routes) and that there aren't other bits of wierdness that could cause problems.

    But I guess its no weirder than useing beer cans and watch to determine your location
    • They're using their own wire, not that of a building or telco (ie: running it across a field and back, or around in circles, direct from one laptop to another ... point to point, no switches/routers/hubs in the way).
  • Check out the first review of this story on Ping [amazon.com].
    • LOL! That is absolutely, unequivocally, the funniest thing I've read all day! (Okay, except for the quote at the back of the latest PC Magazine about a digital camera featuring "a high-quality 3X optical zoom lens designed for digital pornography".)

      But I digress.

      The text of the review in question [amazon.com], for you AC's who only read the part of the website above the fold:

      Ping! I love that duck!, January 25, 2000
      Reviewer: A reader from El Segundo
      PING! The magic duck!

      Using deft allegory, the authors have provided an insightful and intuitive explanation of one of Unix's most venerable networking utilities. Even more stunning is that they were clearly working with a very early beta of the program, as their book first appeared in 1933, years (decades!) before the operating system and network infrastructure were finalized.

      The book describes networking in terms even a child could understand, choosing to anthropomorphize the underlying packet structure. The ping packet is described as a duck, who, with other packets (more ducks), spends a certain period of time on the host machine (the wise-eyed boat). At the same time each day (I suspect this is scheduled under cron), the little packets (ducks) exit the host (boat) by way of a bridge (a bridge). From the bridge, the packets travel onto the internet (here embodied by the Yangtze River).

      The title character -- er, packet, is called Ping. Ping meanders around the river before being received by another host (another boat). He spends a brief time on the other boat, but eventually returns to his original host machine (the wise-eyed boat) somewhat the worse for wear.

      If you need a good, high-level overview of the ping utility, this is the book. I can't recommend it for most managers, as the technical aspects may be too overwhelming and the basic concepts too daunting.

      Problems With This Book

      As good as it is, The Story About Ping is not without its faults. There is no index, and though the ping(8) man pages cover the command line options well enough, some review of them seems to be in order. Likewise, in a book solely about Ping, I would have expected a more detailed overview of the ICMP packet structure.

      But even with these problems, The Story About Ping has earned a place on my bookshelf, right between Stevens' Advanced Programming in the Unix Environment, and my dog-eared copy of Dante's seminal work on MS Windows, Inferno. Who can read that passage on the Windows API ("Obscure, profound it was, and nebulous, So that by fixing on its depths my sight -- Nothing whatever I discerned therein."), without shaking their head with deep understanding. But I digress. --This text refers to the School & Library Binding edition.

  • Isn't the speed of light through the copper in cabling a fair bit below c?
  • by Caractacus Potts ( 74726 ) on Tuesday January 29, 2002 @07:05PM (#2922497)
    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 [physlink.com]
    • Why not use Jupiter's moons?

      1) They don't fit in a school's classroom.
      2) You can only see them at night.
      3) You can only see them on a clear night.
      4) You can only see them on a clear night when Jupiter is in your bit of the sky.
    • You look for timing discrepencies when Jupiter is closest to the earth and furthest from the earth (about six months apart). The moons will appear to be slow or fast about fifteen minutes, or the light time to cross earth's orbital diameter.
  • I never thought such a seemingly simple thing as a ping command could be used in a way related to physics/the universe. At this rate, we may be able to explain the space-time continuum by using a simple chat relay message sometime within the next couple of years. Hmm... AOL and the Universe... mind boggling isn't it?
  • Speed of Carrier Pigeon [linux.no] Measurement Using Ping
  • From the PDF file explaining their experiment:

    Software: We took data while running Linux on both computers. Although it should be possible to do this experiment with the new release of ping for Windows, because the authors were unfamiliar with Windows, Linux was chosen.

    Unfamilier with Windows? Where's my checkbook? I want to send my kids to this school! That's not sarcasm, I mean it. I think the fact that the teachers and students were more familar with Linux than Windows is awesome!

  • In my high school physics II class I experimentally measured c. There was a long service hallway that ran the length of the building, about 150 feet. We had a laser at one end and a mirror at the other end. The signal output of the laser went directly into an oscilloscope, while the beam went down the hall and back to a detector at our end. We simply measured the phase shift between the two, and voila! We came within about 6% of the accepted value of c. Not bad for a high school project, but this method sounds interesting, and there may be peripheral conclusions to be drawn, due to the electrical aspects of CAT5.
  • As I write this, there are 20 comments posted already. Nearly all of them are from people who quite clearly haven't read the actual article, or even just its abstract.

    Please, read the article first!
    • It's worse than that. I expect a lot of people, especially early posters, to not read the article.
      But

      A) A lot of them didn't even seem to read the little dept. blurb, which actually has more good info than most of the posts.

      B) A lot of these assinine responses have been moded up as "informative"

      Something is broken. Badly broken. Read it. It's interesting.
  • by Nathdot ( 465087 ) on Tuesday January 29, 2002 @07:09PM (#2922524)
    ...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!!!"

    :)
  • then I thought...It also seems to change. Thanks Ping.

    22 5:02pm ~ >ping localhost
    PING localhost (127.0.0.1): 56 data bytes
    --- localhost ping statistics ---
    5 packets transmitted, 5 packets received, 0% packet loss
    round-trip min/avg/max/stddev = 0.033/0.046/0.054/0.008 ms

    --
  • ... using lengths of wire [cars.com]
  • D:\WINNT\system32>ping slashdot.org

    Pinging slashdot.org [64.28.67.150] with 32 bytes of data:

    Request timed out.
    Request timed out.
    Request timed out.
    Request timed out.

    Ping statistics for 64.28.67.150:
    Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),
    Approximate round trip times in milli-seconds:
    Minimum = 0ms, Maximum = 0ms, Average = 0ms

    I guess that means that slashdot is infinitely far away...I always suspected it
  • Ping is a little thousand-line hack that I wrote in an evening which practically everyone seems to know about.

    It was a great night, after all!
  • Yawn. (Score:3, Funny)

    by Multiple Sanchez ( 16336 ) on Tuesday January 29, 2002 @07:24PM (#2922581)
    Do the same thing with pong, then I'll be impressed.
  • Cuckoo's Egg (Score:5, Interesting)

    by sconeu ( 64226 ) on Tuesday January 29, 2002 @07:24PM (#2922582) Homepage Journal
    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...
  • by antistuff ( 233076 ) on Tuesday January 29, 2002 @07:28PM (#2922591) Homepage
    why go through all that trouble when all you need is a flashlight and a stopwatch?
  • Oh No! (Score:2, Funny)

    by sailracer6 ( 262434 )
    We Slashdotted Los Alamos!

    xxx.lanl.gov.is down.
  • Ping (Score:2, Informative)

    by Banjonardo ( 98327 )
    The creator of ping, a seemingly cool guy, didn't die too long ago [slashdot.org]

  • by GePS ( 543386 ) on Tuesday January 29, 2002 @07:57PM (#2922680) Journal
    "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.
  • by swagr ( 244747 ) on Tuesday January 29, 2002 @07:59PM (#2922684) Homepage
    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 [slashdot.org].
  • Norway? (Score:3, Funny)

    by The Ape With No Name ( 213531 ) on Tuesday January 29, 2002 @08:09PM (#2922708) Homepage
    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.

  • by j-beda ( 85386 ) on Tuesday January 29, 2002 @08:09PM (#2922709) Homepage
    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 [nist.gov] 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.

    • 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.

      Which is exactly the same as 'a fixed, integral number [namely 299_792_458] of wavelengths of light from a particular optical transition [a specific vibration of the cesium atom].' Basically, you missed a step of logic, and you're violently agreeing with the source.
      • by p3d0 ( 42270 )
        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.
      • No, the older definition was a certain number of wavelengths of a particular optical transition and the current (for quite some time now) definition is based on the distance travelled by light in a well defined amount of time. They are quite different.

    • Er. Doesn't the uncertainty principle mean that there is no such thing as a perfect vacuum, reducing somewhat the value of that definition?
      • Blockquoth the poster:

        Er. Doesn't the uncertainty principle mean that there is no such thing as a perfect vacuum, reducing somewhat the value of that definition?

        No. Under modern theories, there is indeed a well-defined vacuum state... it's just not empty. :)
  • by Karn ( 172441 ) on Tuesday January 29, 2002 @08:11PM (#2922717)
    "ping -i .01 > tempfile1.txt" where ">" (the so-called 'pipe' symbol)

    Then what's this thing: | ?

    :)
  • by abe ferlman ( 205607 ) <.moc.oohay. .ta. .oirtgb.> on Tuesday January 29, 2002 @08:23PM (#2922742) Homepage Journal
    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"
    • I could never remember the average distance from the sun to the earth, so I always gave it as either 1AU or eight light minutes..

      I was never much good at astrophysics
      • The average distance from the sun to the earth is 1.5 x 10^23 angstroms, plus or minus a whole lot of angstroms.
    • Physicists working with General Relativity frequently use units where c=1. This makes a lot more sense, as in GR c is more the aspect ratio of spacetime than it is a speed. Richard Feynman pointed out that in E=mc^2, c is just there to make the units work out. The problem is that we went on for hundreds of years thinking that energy and matter were different things, but it turns out they are related in a somewhat similar way that space is related to time. It's much prettier when you look at momentum (a 3-vector) and energy (a scalar). If you put these together, they make something that isn't really a 4-vector (but physicists don't use quaternions for this) but sort of works like that, if you imagine that the scalar is imaginary. The neat thing is that this 4-whatever transforms exactly the 4-whatever for spacetime.

      Anyway, 1 lightyear/year is a fine, pure unit that is quite appropriate for working at galactic scale, at least.

      The other nice coincidence is that the amount light travels in a naosecond is a little bit less than a foot, so about the length of a shoe.

      • I thought Planck units would be a neat way to measure things, being based off of measurable constants. C would always be 1, or at least a power of 10, because Planck time is defined as the time it takes a photon to travel one Planck length, which is in turn defined by other constants and physical rules. I don't know much more about the system, but it would seem to simplify a number of calculations a great deal.

        Check out planck.com [planck.com] for more info. I would too if my network were not eating packets right now.
  • by HardCase ( 14757 ) on Tuesday January 29, 2002 @11:33PM (#2923444)
    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-

  • Practical Pinging (Score:3, Informative)

    by Alioth ( 221270 ) <no@spam> on Wednesday January 30, 2002 @12:25AM (#2923626) Journal
    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.
  • by Horizon_99 ( 58767 ) on Wednesday January 30, 2002 @01:42AM (#2923835)
    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
    • 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 :-)
  • by harlows_monkeys ( 106428 ) on Wednesday January 30, 2002 @02:51AM (#2924039) Homepage
    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.

  • I once inadvertantly found myself measuring the speed of light using GPS and broadcast radio time signals

    My project was to use a GPS system to generate a precise time signal for an experiment. (As part of the method they use for determining position, GPS systems have to determine the time to within a few nanoseconds or so, and some OEM GPS boards - like the one I was using - provide an accurate one pulse-per-second time signal for use). Anyway, I was having trouble understanding the signal, so I wired the signal, and a broadcast time signal from Moscow, into an oscilloscope.

    There was a clear 11ms delay between when the GPS produced it's time signal and when I saw the signal from Moscow. I did the experiment in the west of Ireland, approximately 3,300km from Moscow...

  • That means that to ping the other side of the world, through wire, takes a minimum of 318 +/- 22 ms (round-trip) best case.

    round trip time=pi*diameter earth/propagation speed

    diameter: 12,756.3 km = 12756300 m
    pi: 3.141593
    prop speed: 118000000 +/- 9000000 m/s

Why did the Roman Empire collapse? What is the Latin for office automation?

Working...