【发布时间】:2011-11-16 16:31:29
【问题描述】:
我找到了另一种使用 SensorManager 获取高度的方法,但它需要两个参数。
public static float getAltitude (float p0, float p)
Computes the Altitude in meters from the atmospheric pressure and the pressure at sea level.
p0 pressure at sea level
p atmospheric pressure
能否通过实际示例/代码 sn-p 教我们如何使用它。
更新1
我找到了获取p0 pressure at sea level 的Web 服务提供商(WSP) url。我已经成功获取了值但是不明白返回的值。
WSP 网址:http://avdata.geekpilot.net/
这是东京国际机场 (http://avdata.geekpilot.net/weather/HND)
的示例输出<weather>
<ident>RJTT</ident>
<error/>
<metar>
2011/09/22 08:00
RJTT 220800Z 04019KT 9999 -SHRA FEW012 BKN025 BKN040 21/18 Q1000 NOSIG
</metar>
<taf>
2011/09/22 04:12
TAF
AMD TAF
AMD RJTT 220409Z 2204/2306 08016KT 9999 FEW030 SCT050
BECMG 2204/2206 05014KT
TEMPO 2207/2209 36018G30KT SHRA
BECMG 2303/2306 10008KT
</taf>
</weather>
【问题讨论】:
标签: android android-sensors altitude