cst2hms.R
Convert a time to year, month, day, hours, minutes, seconds local time.
Syntax
d <- cst2hms(tag, cst, d3, TAGON, GMT2LOC) # R
Description
This function is used to convert a time in CST (seconds since start of recording) to year, month, day, hours, minutes, seconds local time.
Inputs
Input var | Description | Units | Default value |
---|---|---|---|
tag | is tag id string eg zc11_267a | N/A | N/A |
cst | is a scalar or a vector of times to convert, in seconds since start of recording. | N/A | N/A |
d3 | is 0 if the tag was a dtag2, or 1 if a d3 (if 1, then it will be assumed that the TAGON in the cal file is in UTC and GMT2LOC will be used to covert to local). | N/A | N/A |
TAGON | is a vector with tagon time as [yyyy mm dd hh mm ss], in case there is no cal file for this tag available. | N/A | N/A |
GMT2LOC | is an optional conversion factor for GMT to local time, if d3=1 and tagon is given then GMT2LOC should be given as well. | N/A | N/A |
Outputs
Output var | Description | Units |
---|---|---|
d | is the output for a date/time string which is a matrix of strings where row n is a string indicating the local date and time for entry n of csts. | N/A |
Example
cst2hms("hi", c(1:2), 1, c(1111,11,11,11,11,11), 5) Returns: "1111-11-11 16:11:12 LMT" "1111-11-11 16:11:13 LMT"
About
bugs@animaltags.org Last modified: 24 July 2017