duandang9434 2014-10-11 00:17
浏览 43
已采纳

如何计算并获得下一个纬度 - 经度,该时间间隔是每10分钟两个点之间的时间估算的,具有起点和终点? [关闭]

I need help I have the following 2 points on the map point A lat1/long1 and point B lat2/long2 in google map I have distance, arrived_time, bearingradians and speed.

With these data how can I get a estimated latitude longitude (google map format) to the next point on 10 minutes,20,30 and 40 minutes ?, having start and end point.

Point A lat1=37.78472 lon1=-122.39913

Point B lat2=37.78240 lon2=-121.23208

bearingradians=270

distance=102 KM

arrive_time=50 minutes

speed =122 KM/H

example: http://hmarina.sytes.net/mapagoogle.jpg

What I need you to calculate the nexts points, I going to use PHP, or where should I start

Thank you

  • 写回答

2条回答 默认 最新

  • dp9599 2014-10-11 02:16
    关注

    There are multiple ways to calculate this. Some of them are quite complex.

    You could use Vincenty's formula, which is often used for bearing and distance calculations. The formula needs Long/Lat of the starting point, the bearing and a distance. I doubt, that you want to reimplement this algo, so here you go: Implementing Vincenty's Formula in PHP

    Another solution could be to use vectors to calculate the destination points along a great-circle given distance and bearing from start point. This approach might be a bit easier, then to work with spherical trigonometry. http://www.movable-type.co.uk/scripts/latlong-vectors.html and https://stackoverflow.com/a/1739066/1163786

    Another one is to calculate the intermediate points on a great-circle. http://williams.best.vwh.net/avform.htm#Intermediate


    Let's use Vincenty here and re-calc your end-point, given a starting-point, bearing and distance:

    • a starting point: Point A lat1=37.78472; lon1=-122.39913;
    • the bearing: approx. 89
    • the distance: 102 km

    Result: Latitude: 37°47′42″N 37.79506902, Longitude: 121°14′28″W -121.24119021

    That is pretty close your Point B.


    Now, you want to determine the future position (lang/lat) by calculating the distance you will travel based on your current speed and your known time interval. In other words, your next point is 10 minutes from the starting point given speed 122 km/h and 89 bearing.

    Calculate new distance: 122 km/h = 2033.33 m/min, so in 10 minutes: 20333.33 m = 20,333 km approx.

    You new data for the formula:

    • a starting point, here: Point A lat1=37.78472; lon1=-122.39913;
    • the bearing: approx. 89
    • the distance: 20,333 km

    And re-run vincenty with these values to get Lat/Long...


    This might be of help:

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 树莓派与pix飞控通信
  • ¥15 自动转发微信群信息到另外一个微信群
  • ¥15 outlook无法配置成功
  • ¥30 这是哪个作者做的宝宝起名网站
  • ¥60 版本过低apk如何修改可以兼容新的安卓系统
  • ¥25 由IPR导致的DRIVER_POWER_STATE_FAILURE蓝屏
  • ¥50 有数据,怎么建立模型求影响全要素生产率的因素
  • ¥50 有数据,怎么用matlab求全要素生产率
  • ¥15 TI的insta-spin例程
  • ¥15 完成下列问题完成下列问题