Saturday, July 2, 2011

iPhone and Macbook can Detect Earthquakes!

Do you know that you can use your iPhone, iPad or Macbook as a basic seismometer, the same device that is used to measure the magnitude of earthquakes and volcanoes?

OK, try this.
Launch the Safari browser on your iOS device, or Google Chrome if you using a Macbook, and then open this page - Now shake your phone /computer and the website will capture these movements in real-time much like a seismograph.
The seismic intensity will vary depending on how vigorously (or slowly) you are shaking the phone and will also change based on the orientation of the device. And you’ll be surprised to learn that this basic seismograph is written using few lines of JavaScript.
The idea in simple English is something like this. Apple laptops and mobile devices have a built-in accelerometer. As you move the hardware, the changes in the orientation of the device are detected and reported to the browser which then maps this new data into the seismograph.
The JavaScript, that produces the seismograph, works only with Chrome and Mobile Safari and here’s why. It relies on two events – DeviceOrientation and DeviceMotion – to detect motion and the events are only supported by the two browsers mentioned earlier.

Please Do Not Hesitate To Post Comments On This Article. You Can Share If you Know More About It.

No comments:

Post a Comment

Thank You for your valuable comments.. you will get reply soon.