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?
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.
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);