I am new to R but I am working on a project for which the back-end is in R.
I figured most of which I need. Like linear interpolation for cartographic degrees.
Problem is I need to interpolate time too now, because this is for a timed-animation where birds move from one point to another.
Let's say we have point A and point B. Time of access tA and tB.
I need to interpolate coordinates between A and B(Already figured how) with a dynamically calculated step, so for example if I want ten values, then it produces ten values.
And I need to interpolate times between tA and tB.
Basically I will be combining the two together in a file.
So now my question is how do I interpolate for example:
Between, 4-Mar-13 6:59:17
And, 4-Mar-13 12:51:13
Yes the format of the dates is going to be like so and it must take account of the date on top of the time.
How do I interpolate between those two date-time values in R?
Edit: Thanks to r2evans here is the answer to my own question, with extra conversion to work with ISO 8601 dates(which is required to generate CZML).
strftime(seq(as.POSIXct("4-Mar-13 6:50:17", format=fmt), as.POSIXct("4-Mar-13 12:51:13", format=fmt), len=10), format="%Y-%m-%dT%H:%M:%SZ", usetz=FALSE)
#[1] "2013-03-04T06:50:17Z" "2013-03-04T07:30:23Z" "2013-03-04T08:10:29Z"
#[4] "2013-03-04T08:50:35Z" "2013-03-04T09:30:41Z" "2013-03-04T10:10:48Z"
#[7] "2013-03-04T10:50:54Z" "2013-03-04T11:31:00Z" "2013-03-04T12:11:06Z"