简体   繁体   English

Android磁力计计算高度

[英]Android Magnetometer calculate altitude

Is it possible to get the altitude of my position using the Android magnetometer? 是否可以使用Android磁力计获得我的位置的高度? If yes how can I calculate the altitude? 如果是,我该如何计算海拔高度? As I understood I get from the Android API three coordinates x,y and z and the magnetic field strength in Tesla. 据我所知,我从Android API获得三个坐标x,y和z以及特斯拉的磁场强度。 I can transfer these coordinates into the Euler angles to determine the position, but I do not know if I can calculate the altitude. 我可以将这些坐标转换为欧拉角来确定位置,但我不知道我是否可以计算高度。 Does anybody know about that and is able to help me to figure out the altitude without using GPS? 有没有人知道这一点,并能够帮助我在不使用GPS的情况下找出海拔高度?

There is a reason most devices use GPS (which already has horrible dilutiuon when it comes to altitude calculation) or even a barometric system to calculate their altitude : Magnetic measurements are terribly unstable and perceptive to interference from outside, not to mention that the planet does not have a completely uniform magnetic field, and that it runs lateral with the surface rather than in a straight angle with it. 大多数设备都使用GPS(在高度计算方面已经有可怕的稀释度)或者甚至是气压系统来计算它们的高度是有原因的:磁性测量非常不稳定并且能够感知来自外部的干扰,更不用说地球了不具有完全均匀的磁场,并且它与表面横向延伸而不是与其成直角。

If you managed to get a decent altitude reading with a magnetometer, i think you would be elligable for a prize in the fields of mathematics, physics and programming. 如果你设法通过磁力计获得了不错的高度读数,我想你可以在数学,物理和编程领域获得奖项。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM