CLLocation altitude property validity in flight

风格不统一 提交于 2019-12-10 20:05:33

问题


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.


回答1:


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.



来源:https://stackoverflow.com/questions/52003623/cllocation-altitude-property-validity-in-flight

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!