CLLocation altitude property validity in flight
Asked Answered
R

1

3

I understand the concept of negative for below sea levels and positive for above + there is vertical accuracy to check the sanity of this value.

I am interested in GPS data in a flight. What could be the max or approx max value of altitude so that I can differentiate Flight from road travel.

I understand I can query the speed but speed itself won't solve the purpose.

Rundlet answered 24/8, 2018 at 11:36 Comment(6)
GPS is disabled above 18,000 feet; you would need to reference the ground level at the location to determine if you are on the surface or notAtlantean
@Atlantean Would it be safe to assume that maximumOf(the highest motorable road in the world OR highest bridge) + 100m buffer = Plane Data?Rundlet
Probably, but you could still be in a plane at a much lower altitude. For example, anything about 770m is flying where I am but 10 minutes away you have to be at 1100m to be flying.Atlantean
How did you find these stats: "anything about 770m is flying where I am". Your current above sea level + some buffer?Rundlet
Because I know that my house is at 770m above sea level.Atlantean
@Atlantean GPS is not disabled above 18,000 feet. I recently measured altitude using GPS on a recent flight at 39,000 feet. There's no reason to disable it at any altitude.Smug
S
3

The proper way to determine flight from GPS altitude is to lookup the ground elevation of the current location (latitude/longitude) in a database. If the GPS altitude is greater then the user is in flight (or in a tall building).

This takes a very large database but the data is available. This is probably not practical for most apps. Look for DEM data (digital elevation model) databases such as SRTM, ASTER (see here)

Another method would be to detect take off. If you are only interested in flight in jet aircraft, you would need to detect acceleration in a straight line from <10 knots to >100 knots, and then if the GPS altitude climbs by > 1000 fpm, you are likely in a jet taking off (although most prop planes can also climb >1000fpm).

Detecting all kinds of flight (airships, hot air balloons, light aircraft) gets more difficult. It's hard to distinguish between an aircraft and a car climbing mountains, though it is possible with various heuristics. It would also be difficult to distinguish a hot air balloon vs a tall building, low horizontal motion and both cases elevation is above ground level.

Smug answered 13/9, 2018 at 2:10 Comment(1)
As of now I was able to eliminate Train data using OSM database and will try the DEM model in near future. Thanks for the intuitive comment.Rundlet

© 2022 - 2024 — McMap. All rights reserved.