PointLatLng PureProjection::translate(PointLatLng p1,double distance,double bearing) { PointLatLng ret; double d=distance; double tc=bearing; double lat1_R = p1.Lat() * DEG2RAD; double lon1_R = p1.Lng() * DEG2RAD; double R=6378137; double lat2_R = asin(sin(lat1_R) * cos(d/R) + cos(lat1_R) * sin(d/R) * cos(tc) ); double lon2_R = lon1_R + atan2(sin(tc) * sin(d/R) * cos(lat1_R), cos(d/R) - sin(lat1_R) * sin(lat2_R)); ret.SetLat(lat2_R * RAD2DEG); ret.SetLng(lon2_R * RAD2DEG); return ret; }