Skip to content

VTS Browser Autopilot API

David Levinsky edited this page Apr 17, 2017 · 1 revision

VTS Browser Autopilot API

This module provides methods for transition between positions.

Methods

Method Returns Description
flyTo(<Position> position, FlyOptions) this Sets map position
flyTrajectory(<Array of Positions> trajectory, <Number> samplePeriod) this Fly along the provided trajectory
cancelFlight() this Cancels the currently executing flight
setAutorotate(<Number> speed) this Sets how fast will the map rotate around the observed point. Speed is given in degrees per second. If speed is zero, no rotation is applied.
getAutorotate() Number Returns rotation speed in degrees per second.

Fly Options

Option Type Default Description
mode String "direct" Sets fly mode. Supported modes are: "direct", "ballistic".
maxDuration Number 10000 Sets maximum duration of flight in milliseconds
maxHeight Number 100000 Sets maximum height of flight. This option is supported only in "ballistic" mode.
samplePeriod Number 10 Sample period in milliseconds. Sets the density of samples of the generated trajectory.
height Number null Sets the height of flight. The height is determined automatically, but can be overridden by this option. This option is supported only in "ballistic" mode.

Fly Events

Event Data content Description
fly-start <Position> startPosition, <Position> endPosition, <FlyOptions> options When the flight starts.
fly-progress <Position> position, <Number> progress During the flight. The progress is in percents.
fly-end <Position> position When the flight ends.
autorotate-changed <Number> speed, <Number> lastSpeed When autorotation speed is changed.

VTS Browser API

VTS Browser Core API

VTS File Format

VTS Browser Inspector Mode

Clone this wiki locally