如何在openlayers 3中根据飞机当前的速度和航向预测未来的轨迹位置并画线?
How to predict the future trajectory position and draw a line based on the current speed and course of the aircraft in openlayers 3?
我想画一条飞机当前速度和航向的矢量线来预测它的未来位置,每五分钟添加一个实心点。我不知道该怎么做。
look like this
此处给出了使用球面几何的公式https://www.movable-type.co.uk/scripts/latlong.html(椭圆体几何会稍微更准确但更复杂)
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 使用地球的 6371008.8 米 radius
distance
将从 time*speed
以相同的单位计算
我想画一条飞机当前速度和航向的矢量线来预测它的未来位置,每五分钟添加一个实心点。我不知道该怎么做。 look like this
此处给出了使用球面几何的公式https://www.movable-type.co.uk/scripts/latlong.html(椭圆体几何会稍微更准确但更复杂)
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 使用地球的 6371008.8 米 radius
distance
将从 time*speed
以相同的单位计算