How does getAltitude() of Android GPS Location Works

Posted by Sebi on Stack Overflow See other posts from Stack Overflow or by Sebi
Published on 2010-05-07T22:01:12Z Indexed on 2010/05/07 22:08 UTC
Read the original article Hit count: 106

Filed under:

HI

I tried to implement a simple GPS tracker. Therefore is used

lm = (LocationManager) getSystemService(Context.LOCATION_SERVICE);
lm.requestLocationUpdates(LocationManager.GPS_PROVIDER, 1000, 0, this);  

Then i used the

public void onLocationChanged(Location location) {

method to read the altitude of my current location.

But i dont really know what Location.getAltitude() returns. The document says it returns the altitude. But is this in meters? or feets? if i put the phone on the desk next to me, this value changes between 500 and -500??

How does this really work???

© Stack Overflow or respective owner

Related posts about android