I have know my current position({lat:x,lon:y}) and I know my speed and direction angle; How to predict next position at next time?
相关问题
- I want to read exif info in image in android. I ca
- Stop location updates when app terminate
- Can Google Maps plot points based on Hours Minutes
- Location not updating on server when app enters st
- Mapbox 'setMyLocationEnabled' doesn't
相关文章
- Taking np.average while ignoring NaN's?
- Is there way to programmatically enable GPS on And
- Implementing Triangulation in android [closed]
- Get Coordinates for given Location
- Google maps Android API getting wifi location
- add GPS metadata dictionary to image taken with AV
- How to get the current accurate GPS Coordinates us
- Is it possible to retrive an existing iPhone image
Here in JS for calculating lat and lng given bearing and distance:
Based on the answer of @clody96 and @mike, here is an implementation in R using a data.frame with velocity and timesteps instead of distance:
Which brings the same result as for @clody96:
Same code in Java:
First, calculate the distance you will travel based on your current speed and your known time interval ("next time"):
Then you can use this formula to calculate your new position (lat2/lon2):
For an implementation in Javascript, see the function
LatLon.prototype.destinationPoint
on this pageUpdate for those wishing a more fleshed-out implementation of the above, here it is in Javascript:
This code works for me :
1. We have to count the distance ( speed * time ).
2. The code converts the distance to KM because earthradius is used in KM too.