制定飞行计划 [英] Creating a flight plan

查看:89
本文介绍了制定飞行计划的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

所有的帮助都会很多apreciated =)

谢谢!

解决方案

< blockquote>时间=距离/速度



如果您只有纬度/长度的位置,请查找大圆公式以获得有关如何计算距离的公式地球上的两点。然后,对于每个起始位置,计算到列表中每个其他位置的距离。



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.


这篇关于制定飞行计划的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆