Hello Kylie,

You may be able to do what you want with functions in the RNCEP package.
 Specifically the function NCEP.flight()

Perhaps something like the following would work...

## Load the RNCEP library
library(RNCEP)

## Using equation groundspeed, i.e. holding the animal's speed relative to
the ground constant (see ?NCEP.Groundspeed),
## move the animal from a starting location to an ending location.
## The animal's speed relative to the ground is set by 'groundspeed' in
'fa.args'
## By specifying that u and v both equal zero, we indicate that there are
no wind conditions to consider
## Note that we set query=FALSE so that wind conditions are not queried
from the Internet.
out <- NCEP.flight(beg.loc=c(55,10), end.loc=c(45,0), begin.dt="2009-01-01
12:01:01", flow.assist='NCEP.Groundspeed', fa.args=list(u=0,
v=0,groundspeed=12), path='loxodrome', calibrate.dir=FALSE,
calibrate.alt=FALSE, cutoff=-10,
when2stop=list('latitude','longitude',0.01), levels2consider=NULL,
hours=12, evaluation.interval=60, id=1, land.if.bad=FALSE, reanalysis2 =
FALSE, query=FALSE)

## Show the resulting trajectory, coloring the points by distance to end
location ##
NCEP.vis.points(wx=out$dist2goal, lats=out$lat, lons=out$lon)

###########################
############################


Hope this helps.
Kind regards,
Michael


On Sat, Jul 28, 2012 at 12:00 PM, <r-sig-ecology-request@r-project.org>wrote:

> Send R-sig-ecology mailing list submissions to
>         r-sig-ecology@r-project.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
>         https://stat.ethz.ch/mailman/listinfo/r-sig-ecology
> or, via email, send a message with subject or body 'help' to
>         r-sig-ecology-request@r-project.org
>
> You can reach the person managing the list at
>         r-sig-ecology-owner@r-project.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of R-sig-ecology digest..."
>
>
> Today's Topics:
>
>    1. Assign constant speed to animal trajectory -      recommendations
>       for function? (Kylie Scales)
>    2. Re: Assign constant speed to animal trajectory -
>       recommendations for function? (Pinaud David)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Fri, 27 Jul 2012 11:29:18 +0100
> From: Kylie Scales <klscales10@gmail.com>
> To: r-sig-ecology@r-project.org
> Subject: [R-sig-eco] Assign constant speed to animal trajectory -
>         recommendations for function?
> Message-ID:
>         <
> CAOCVvHO9+zSb1_rRJGHy3f9anzFOdZ41Z3uGzkxS1djyVEhQnw@mail.gmail.com>
> Content-Type: text/plain
>
> I am currently conducting a 'First Passage Time' (fpt) animal movement
> analysis, in order to identify ARS zones from GPS tracks.
>
> The study species in question frequently rests on the water surface during
> darkness hours.  To avoid artificial inflation of fpt, I have removed these
> points and have used the variance in the log of fpt to identify scales of
> ARS behaviour within each of these track sub-sets. This has worked for
> smaller-scale ARS zones, but not larger scales, owing to the separation of
> each trip into daylight-only sections.
>
> I would like to assign a constant speed to the whole trajectory for each
> bird and then conduct a fpt analysis on the whole trajectory, to get an
> indication of larger-scale ARS.
>
> Could anyone recommend a function that could be used to rediscretize an
> animal trajectory to constant speed?
>
> I've tried redisltraj() from package adehabitatLT to rediscretize step
> length at a constant interval, and then setNA() followed by sett0() to
> create constant time interval, but this results in a lot of NAs in x/y,
> which then seems to constain the fpt analysis.
>
> Is there a better way to assign constant speed to the whole trajectory?
>
> Any advice much appreciated.
>
> Kylie Scales
> Postgraduate Researcher
> Plymouth Marine Laboratory
>
>         [[alternative HTML version deleted]]
>
>
>
> ------------------------------
>
> Message: 2
> Date: Fri, 27 Jul 2012 13:25:04 +0200
> From: Pinaud David <pinaud@cebc.cnrs.fr>
> To: r-sig-ecology@r-project.org, klscales10@gmail.com
> Subject: Re: [R-sig-eco] Assign constant speed to animal trajectory -
>         recommendations for function?
> Message-ID: <50127A90.3010708@cebc.cnrs.fr>
> Content-Type: text/plain; charset="iso-8859-1"; Format="flowed"
>
> Hi Kylie,
> To my knowledge, there is no such a function.
> Maybe you could calculate the distance between successive locations then
> recalculate the time at each location, assuming a constant speed :
> ie t2 = t1 + dist(t12) / cstSpeed
>
> Something like:
>
> # tr is a trip object or a SpatialPointsDataFrame
> dist <- trackDistance(coordinates(tr), longlat = T)
> tr@data$newtime <- c(tr@data$time[1], tr@data$time[1] +
> cumsum(dist/CstSpeed))
>
> HTH
>
> David
>
>
> Le 27/07/2012 12:29, Kylie Scales a ?crit :
> > I am currently conducting a 'First Passage Time' (fpt) animal movement
> > analysis, in order to identify ARS zones from GPS tracks.
> >
> > The study species in question frequently rests on the water surface
> during
> > darkness hours.  To avoid artificial inflation of fpt, I have removed
> these
> > points and have used the variance in the log of fpt to identify scales of
> > ARS behaviour within each of these track sub-sets. This has worked for
> > smaller-scale ARS zones, but not larger scales, owing to the separation
> of
> > each trip into daylight-only sections.
> >
> > I would like to assign a constant speed to the whole trajectory for each
> > bird and then conduct a fpt analysis on the whole trajectory, to get an
> > indication of larger-scale ARS.
> >
> > Could anyone recommend a function that could be used to rediscretize an
> > animal trajectory to constant speed?
> >
> > I've tried redisltraj() from package adehabitatLT to rediscretize step
> > length at a constant interval, and then setNA() followed by sett0() to
> > create constant time interval, but this results in a lot of NAs in x/y,
> > which then seems to constain the fpt analysis.
> >
> > Is there a better way to assign constant speed to the whole trajectory?
> >
> > Any advice much appreciated.
> >
> > Kylie Scales
> > Postgraduate Researcher
> > Plymouth Marine Laboratory
> >
> >       [[alternative HTML version deleted]]
> >
> > _______________________________________________
> > R-sig-ecology mailing list
> > R-sig-ecology@r-project.org
> > https://stat.ethz.ch/mailman/listinfo/r-sig-ecology
> >
> >
>
> --
> ***************************************************
> Dr. David PINAUD
> Ing?nieur de Recherche "Analyses spatiales"
>
> Centre d'Etudes Biologiques de Chiz? - CNRS UPR1934
> 79360 Villiers-en-Bois, France
> poste 485
> Tel: +33 (0)5.49.09.35.58
> Fax: +33 (0)5.49.09.65.26
> http://www.cebc.cnrs.fr/
>
> ***************************************************
>
>
> ------------------------------
>
> _______________________________________________
> R-sig-ecology mailing list
> R-sig-ecology@r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-ecology
>
>
> End of R-sig-ecology Digest, Vol 52, Issue 19
> *********************************************
>

	[[alternative HTML version deleted]]

