Sure thing--they look great when plotted in ctmm, and the errors only occur once exported. I imported the polygon boundary layer as a shapefile--can I send that over to you via e-mail?
Here's data from one tag:
LotekID Lat Long DateTime
58 27.40528 -81.15264 2021/02/08 14:40:00+00
58 27.41154 -81.14277 2021/02/18 14:48:00+00
58 27.41135 -81.14317 2021/03/04 00:00:00+00
58 27.41168 -81.14264 2021/03/08 16:07:00+00
58 27.41178 -81.14234 2021/03/15 16:01:00+00
58 27.41044 -81.1447 2021/03/22 15:59:59+00
58 27.41235 -81.14223 2021/03/30 15:23:00+00
58 27.41007 -81.14509 2021/04/05 15:57:00+00
58 27.4119 -81.14245 2021/04/23 15:30:00+00
58 27.41071 -81.1391 2021/06/03 11:31:00+00
Script:
locs_xy<-locs_df[c("Long","Lat")]
coordinates(locs_xy)<-~Long+Lat
proj4string(locs_xy)<-CRS("+init=epsg:4326")
ref<-CRS(SRS_string = "EPSG:32617")
locs_utm<-spTransform(locs_xy, CRSobj=ref)
locs_utm_spdf<-SpatialPointsDataFrame(locs_utm, data=locs_df)
locs_utm_spdf$Name<-as.factor(locs_utm_spdf$LotekID)
locs_utm_spdf$hdop<-1 #locations were typically exact with confirmed visual sighting
ref<-CRS("+init=epsg:32617")
GPS.HDOP<-as.data.frame(locs_utm_spdf$hdop)
hdop<-as.data.frame(locs_utm_spdf$GPS.HDOP)
names(GPS.HDOP)[1]<-"GPS.HDOP"
date<-as.POSIXct(locs_utm_spdf$DateTime)
xy<-as.data.frame(cbind(locs_utm_spdf$Long,locs_utm_spdf$Lat))
ids<-as.factor(locs_utm_spdf$Name)
trajectories<-as.ltraj(xy=xy, date=date, id=ids, typeII = T, infolocs=GPS.HDOP)
# Create Move object
locs_move<-move(trajectories)
proj4string(locs_move)<-"+proj=utm +zone=17 +datum=WGS84 +units=m +no_defs"
# Create telemetry object
locs_telem<-as.telemetry(locs_move, keep = FALSE, projection="+proj=utm +zone=17 +datum=WGS84 +units=m +no_defs")
## Setting the RMS UERE
uere(locs_telem)<-1
L58<-locs_telem$X58_58
SVF<-variogram(L58)
SVf_fit<-variogram.fit(SVF) #Interactive fit, make sure to check error box for irregular sampling
L58_sel<-ctmm.select(L58, CTMM=GUESS, IC="AICc", verbose=TRUE)
L58_fit<-ctmm.fit(L58, GUESS)
L58_akde<-akde(L58, L58_fit, SP=SP1_spdf, SP.in=T,weights=T, grid=2,debias = T, smooth=T)
writeShapefile(L58_akde, ".",level.UD=0.95, level=0.95, "L58", overwrite=T)
Thank you for looking into this!
Best,
Brittany