knowing a decimal latitude, decimal longitude, speed (km/h), heading how to find the next positio
I've found more accurate formula
This code work for me :
1. First we have to count the distance ( speed * time ).
2. In my program, i convert the distance to KM because I use earth radius in KM too.
const double radiusEarthKilometres = 6371.01f;
kmDistance = kmSpeed * (timer1.Interval / 1000f) / 3600f;
var distRatio = kmDistance / radiusEarthKilometres;
var distRatioSine = Math.Sin(distRatio);
var distRatioCosine = Math.Cos(distRatio);
var startLatRad = deg2rad(lat0);
var startLonRad = deg2rad(lon0);
var startLatCos = Math.Cos(startLatRad);
var startLatSin = Math.Sin(startLatRad);
var endLatRads = Math.Asin((startLatSin * distRatioCosine) + (startLatCos * distRatioSine * Math.Cos(angleRadHeading)));
var endLonRads = startLonRad
+ Math.Atan2(Math.Sin(angleRadHeading) * distRatioSine * startLatCos,
distRatioCosine - startLatSin * Math.Sin(endLatRads));
newLat = rad2deg(endLatRads);
newLong = rad2deg(endLonRads);
This might help:
distance_traveled = speed * time
Then, calculate x and y components of speed using heading as angle (trigonometry):
speed_x=distance_traveled * Math.Cos(heading/180*Math.PI)
speed_y=distance_traveled * Math.Sin(heading/180*Math.PI)
Next, see how to map lat/long into some form of x/y coordinates, add speed_x and speed_y, and convert to lat/long again.
This last one is a tricky one, look here: http://www.movable-type.co.uk/scripts/latlong.html
In fact, you'll find everything within that article!