制定飞行计划

编程入门 行业动态 更新时间:2024-10-10 12:17:54
本文介绍了制定飞行计划的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

嘿=)我正在做一些前期考试,我有这个练习,他们希望我创建一个程序,给用户飞行时间。当他插入他想要旅行的地点,目的地以及他想要飞入的速度时。他们还添加了目的地列表和2个起始位置,显示了从2个起点到所有目的地的距离。任何想法我应该怎么做? 所有的帮助都会很多apreciated =) 谢谢!

解决方案

时间=距离/速度 如果您只有纬度/长度的位置,请查找大圆公式以获得有关如何计算距离的公式地球上的两点。然后,对于每个起始位置,计算到列表中每个其他位置的距离。 BTW,重要的是要注意距离/速度公式,分母需要与分子的单位相同。例如,100km / 50mph!= 2h,即使这是你得到的答案。确保如果你的分子以公里为单位,分母以kph为单位,如果分子以英里为单位,则分母必须为英里。

Hey =) I''m doing some studying pre-exams, and i have this excercise where they want me to create a program that will give the user "Flight time" when he inserts where he wants to travel from, destination, and which speed he wants to fly in. Also they added a list of destinations, and 2 startng places , showing distance from the 2 startng places to all destinations. Any idead how i should do this? All help would be much apreciated =) Thank you !

解决方案

Time = Distance/Speed If you only have lat/long of the locations, look up Great Circle Formula to get the formula on how to calculate the distance between two points on the globe. Then for each starting place, calculate the distance to every other place in your list. BTW, its important to note about the Distance/Speed formula, that the denominator needs to be in the same units as the numerator. For example, 100km/50mph != 2h, even though thats the answer you will get. Make sure that if your numerator is in kilometers, the the denominator is in kph, if numerator is in miles, denominator must be mph.

更多推荐

制定飞行计划

本文发布于:2023-11-30 21:52:33,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1651586.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:计划

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!