Android Question GPS get altitude

GaryK4

Member
Licensed User
Longtime User
If I have a map location (lat & long) is it possible to get the altitude? I know that LocationChanged gives me an altitude, but I want the altitude for a non current location. When I do Log(marker_location.AltitudeValid) it return false. It should be false because it initializes to zero.
I don't see any method to get the true altitude.
 

eurojam

Well-Known Member
Licensed User
Longtime User
You can use the NMEA String and extract the altitude - which will be very inaccurate by the way...
You can define a event for the gps:
B4X:
Sub myGPS_NMEA (TimeStamp As Long, Sentence As String)
    Log(Sentence)
End Sub
and then search the $GPGGA Sentence: http://aprs.gids.nl/nmea/#gga
 
Upvote 0
Top