forked from positioning/kalmanfilter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
test-trackit.r
26 lines (26 loc) · 974 Bytes
/
test-trackit.r
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
###=============================================================================================
### Trackit
###=============================================================================================
library(trackit)
### A fix for R 3.0+
data(deltat); deltat$JDE = with(deltat,JDE(year,month,day))
data(gmt3)
### Fit to data
data(drifter)
prep.track<-prepit(drifter, fix.first=c(360-161.45,22.85,2002,9,10,0,0,0), fix.last=c(360-159.87,21.95,2003,5,21,0,0,0), scan=FALSE)
fit<-trackit(prep.track)
sstfolder <- get.sst.from.server(drifter,180,210,10,40)
data(driftersst)
ptsst<-prepit(drifter, sst=driftersst,
fix.first=c(360-161.45,22.85,2002,9,10,0,0,0),
fix.last=c(360-159.87,21.95,2003,5,21,0,0,0), scan=FALSE)
fitsst<-trackit(ptsst, bsst.ph=3, rad.ph=-1)
### Plotting to file
pdf(height=6, width =6, file = 'trackit-exe-test.pdf')
plot(fit)
fitmap(fit, ci = T)
print(fit)
plot(fitsst)
fitmap(fitsst, ci = T)
print(fitsst)
dev.off()