addPgGps | R Documentation |
Add GPS data to an existing Pamguard database
addPgGps(
db,
gps,
source = c("csv", "SPOTcsv", "SPOTgpx"),
format = c("%m/%d/%Y %H:%M:%S", "%m-%d-%Y %H:%M:%S",
"%Y/%m/%d %H:%M:%S", "%Y-%m-%d %H:%M:%S"),
tz = "UTC"
)
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 |
source |
one of |
format |
date format for converting to POSIXct, only needed for |
tz |
timezone of gps source being added, will be converted to UTC |
Adds to the database db
, invisibly returns the Name
of the GPS track
if successful (NA
if not named)
Taiki Sakai taiki.sakai@noaa.gov
## 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.