嘿=)我正在做一些前期考试,我有这个练习,他们希望我创建一个程序,给用户飞行时间。当他插入他想要旅行的地点,目的地以及他想要飞入的速度时。他们还添加了目的地列表和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.更多推荐
制定飞行计划
发布评论