addPgGps: Add GPS to a Pamguard Database

Description Usage Arguments Value Author(s) Examples

View source: R/addPgGps.R

Description

Add GPS data to an existing Pamguard database

Usage

1
2
3
4
5
6
7
addPgGps(
  db,
  gps,
  source = c("SPOTcsv", "SPOTgpx", "csv"),
  format = "%m/%d/%Y %H:%M:%S",
  tz = "UTC"
)

Arguments

db

database file to add gps data to

gps

data.frame of gps data or a character of the file name to be read. If a data.frame or non-SPOT csv file, needs columns UTC, Latitude, and Longitude. If multiple separate tracks are present in the same dataset, this should be marked with a column labeled Name

source

one of SPOTcsv, SPOTgpx, or csv. Describes the source of the GPS data, not needed if gps is a data.frame

format

date format for converting to POSIXct, only needed for source='csv'. See strptime

tz

timezone of gps source being added, will be converted to UTC

Value

Adds to the database db, invisibly returns the Name of the GPS track if successful (NA if not named)

Author(s)

Taiki Sakai taiki.sakai@noaa.gov

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Not run: 
# not run because example files don't exist
myDb <- 'PamguardDatabase.sqlite3'
# adding from a .gpx file downloaded from SPOT
spotGpx <- 'SpotGPX.gpx'
addPgGps(myDb, spotGpx, source='SPOTgpx')
# adding from a csv file with a Y-M-D H:M date format
gpsCsv <- 'GPS.csv'
addPgGps(myDb, gpsCsv, source='csv', format='%Y-%m-%d %H:%M')

## End(Not run)

PAMmisc documentation built on Oct. 8, 2021, 9:08 a.m.