R/distanceTrack.R

Defines functions `distanceTrack`

.packageName<-"argosfilter"

`distanceTrack` <-
function(lat, lon)
{
distanceTrack<-numeric(length(lat)-1)
for (k in 1:(length(lat)-1)){
	lat1<-lat[k]
	lat2<-lat[k+1]
	lon1<-lon[k]
	lon2<-lon[k+1]
	distanceTrack[k]<-distance(lat1,lat2,lon1,lon2)
	}
distanceTrack
}

Try the argosfilter package in your browser

Any scripts or data that you put into this service are public.

argosfilter documentation built on Sept. 13, 2022, 5:05 p.m.