Identify AIS base stations and high-speed craft
Source:R/AISidentify_stations_aircraft.R
AISidentify_stations_aircraft.RdStations and aircraft are identified from speed, distance and time only. Other criteria (e.g. MMSIs with fewer than 9 digits) are not considered.
Arguments
- ais_data
AIS data frame containing
timestamp,lon,lat, andmmsi.timestampmust be Unix time (seconds since 1970-01-01), whilelonandlatmust be numeric. Another vessel identifier may be used if the column is namedmmsi.- crs_meters
CRS (metres) used to calculate distances in the study area (defaults to EPSG:3035, Europe). Tip: use
suggest_crsfunction (crsuggestpackage) to find a suitable CRS for your study area.
Value
The input AIS data with the following additional columns:
station: Whether the MMSI is classified as a base station.high_speed: Whether the MMSI is classified as a high-speed craft.n_point_mmsi_initial_data: Number of valid AIS positions for the MMSI.id_mmsi_point_initial: Sequential identifier of each AIS position.
Examples
data("ais")
# Define the Unix time (seconds since 1970-01-01)
ais$timestamp <- as.numeric(lubridate::ymd_hms(ais$datetime))
# calculate the travelled distance, time, and speed:
ais <- AIStravel(ais_data = ais, crs_meters = 3035)
# Identify stations and aircrafts:
out <- AISidentify_stations_aircraft(ais_data = ais, crs_meters = 3035)