MCPcopy Create free account
hub / github.com/SuperMap/iClient-JavaScript / setFlightTimes

Function setFlightTimes

libs/mapv/mapv.3d.js:1933–1940  ·  view source on GitHub ↗
(index)

Source from the content-addressed store, hash-verified

1931}
1932
1933function setFlightTimes(index) {
1934 var scaling_factor = (flight_point_speed_scaling - flight_point_speed_min_scaling) / (flight_point_speed_max_scaling - flight_point_speed_min_scaling);
1935 var duration = (1 - scaling_factor) * flight_distance[index] * 80000;
1936
1937 var start_time = Date.now() + Math.random() * 5000;
1938 flight_point_start_time[index] = start_time;
1939 flight_point_end_time[index] = start_time + duration;
1940}
1941
1942function easeOutQuadratic(t, b, c, d) {
1943 if ((t /= d / 2) < 1) return c / 2 * t * t + b;

Callers 2

generateControlPointsFunction · 0.85
update_flightsFunction · 0.85

Calls 1

randomMethod · 0.45

Tested by

no test coverage detected