plotPlanes: Plot the location of a set of aircrafts

Description Usage Arguments Value Examples

View source: R/openSkies_plottingFunctions.R

Description

Draws the location of a set of aircrafts given in their state vectors on a ggmap object. The planes will be oriented according to the path they are following.

Usage

1
2
plotPlanes(stateVectors, ggmapObject=NULL, plotResult=TRUE, paddingFactor=0.2, 
           iconSize=1)

Arguments

stateVectors

list of state vectors. Each state vector must be represented by a list with, at least, fields "longitude", "latitude" and "trueTrack".

ggmapObject

optional ggmap object on which the route will be drawn. By default, a new ggmap object will be created, covering the necessary space plus an amount of padding determined by the paddingFactor argument.

plotResult

whether or not the resulting ggmap object with the added route should be plotted.

paddingFactor

amount of padding to add to the map if no ggmap object is provided. The added padding will be equal to paddingFactor multiplied by the height and width of the map (determined by the difference between the maximum and minimum longitudes/latitudes).

iconSize

scaling factor for the size of the plane icons.

Value

A ggmap object with added paths and points representing the route.

Examples

1
2
3
4
5
6
7
8
9
# Plot the position of aircrafts currently flying over an area covering 
# Switzerland.

if(interactive()){
vectors <- getSingleTimeStateVectors(minLatitude=45.8389, maxLatitude=47.8229, 
                                minLongitude=5.9962, maxLongitude=10.5226)

plotPlanes(vectors)
}

openSkies documentation built on April 17, 2021, 9:06 a.m.