R/bearingTrack.R

Defines functions `bearingTrack`

.packageName<-"argosfilter"

`bearingTrack` <-
function(lat, lon)
{
bearingTrack<-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]
	bearingTrack[k]<-bearing(lat1,lat2,lon1,lon2)
	}
bearingTrack
}

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.