简体   繁体   English

AirSim 获取高度

[英]AirSim get altitude

I am using Microsoft AirSim with Unreal engine, and connecting with python API.我正在使用带有 Unreal 引擎的 Microsoft AirSim,并与 python API 连接。 I am using the LandscapeMountains project available through Unreal.我正在使用 Unreal 提供的 LandscapeMountains 项目。 I am able to capture the altitude with client.getGpsData().gnss.geo_point.altitude However the altitude does not seem to change if I set the drone on a straight flight path.我可以使用 client.getGpsData().gnss.geo_point.altitude 捕获高度但是,如果我将无人机设置在直线飞行路径上,高度似乎不会改变。 Shouldn't it be changing with various mountain terrain?它不应该随着各种山地地形而变化吗?

Like when the drone flies over a high mountain shouldn't the altitude be closer to zero than when it passes the mountain.就像无人机飞越高山时,高度不应该比它通过山时更接近零。 If this isn't the way it should work, how would I get the relative distance between drone and the terrain directly below the drone?如果这不是它应该工作的方式,我将如何获得无人机与无人机正下方地形之间的相对距离?

I hope someone reads this that uses AirSim.我希望有人读到这个使用 AirSim。

GeoPoint will give you z axis position with respect to your player start position. GeoPoint将为您提供 z 轴 position 相对于您的播放器开始 position。 Means your initial spawn position would be considered the origin and all other distances will be measured relatively.意味着您的初始生成 position 将被视为原点,所有其他距离将相对测量。 So, external objects like mountains etc won't affect the value.因此,山脉等外部物体不会影响价值。

If you want to get relative vertical position, you can read about altimeter here .如果您想获得相对垂直的 position,您可以在此处阅读有关高度计的信息。

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

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