我想画一条飞机当前速度和航向的矢量线,以预测飞机的未来位置,每五分钟添加一个实心点。我不知道该怎么做。 look like this
答案 0 :(得分:0)
The formula using spherical geometry is given here https://www.movable-type.co.uk/scripts/latlong.html (ellipsoidal geometry would be slightly more accurate but more complex)
var lat2 = Math.asin( Math.sin(lat1)*Math.cos(distance/radius) +
Math.cos(lat1)*Math.sin(distance/radius)*Math.cos(bearing) );
var lon2 = lon1 + Math.atan2(Math.sin(bearing)*Math.sin(distance/radius)*Math.cos(lat1),
Math.cos(distance/radius)-Math.sin(lat1)*Math.sin(lat2));
OpenLayers uses 6371008.8 meters for the Earth's radius
distance
would be calculated from time*speed
in the same units