0

I am working on a project in which i have to calculate my device height from ground. I have searched all over the internet but could not find any solution.

Please, Anyone tell me what to do..??

Rz Rasel
  • 23
  • 8

1 Answers1

1

There is no simple way to do it, but I can think of several possibilities (obviously, combining more than one can improve the solution):

  • Using sound - Emitting a beep and recording the echo can be used to measure the distance to whatever returned the sound (by using time difference and the amount of attenuation, i.e. volume)
  • Using light - in low light situation (or at least low light in one color) it is possible to light the ground (using the phone's led) and using the camera measure the spread and intensity of light beam
  • Using GPS - probably not accurate enough unless you are flying
  • Using accelerometer - raising the phone from the ground and integrating the acceleration one the way up twice

Most of these would require taking one measurement close to the ground and one at the measured hight for calibration.

Ofir
  • 8,194
  • 2
  • 29
  • 44
  • 1
    Also, if you allow for a bit of string - make a pendulum and using the accelerometer, measure the swing period ;) - http://easycalculation.com/physics/classical-physics/simple-pendulum.php – Ofir Jul 18 '13 at 09:33
  • I believe that accelerometer would be the simplest to implement. Sound is harder since the echo (or any other sound) could come from anywhere. – Viktor Mellgren Jul 18 '13 at 09:34
  • wouldn't want to swing my phone close to the ground, but it's a fun idea. Another idea is if you know the circumference of the phone, and then "roll" it up your body and calculate how many rotations were done :D – Viktor Mellgren Jul 18 '13 at 09:37