simPassiveSonar | R Documentation |
The function generates a sample trajectory of the target and the corresponding observations with sensor locations at (0,0) and (20,0).
simPassiveSonar(nn = 200, q, r, start, seed)
nn |
sample size. |
q |
contains the information about the covariance of the noise. |
r |
contains the information about |
start |
the initial value. |
seed |
the seed of random number generator. |
The function returns a list with components:
xx |
the state data. |
yy |
the observed data. |
H |
the state coefficient matrix. |
W |
|
V |
|
s2 <- 20 #second sonar location at (s2,0)
q <- c(0.03,0.03)
r <- c(0.02,0.02)
nobs <- 200
start <- c(10,10,0.01,0.01)
H <- c(1,0,1,0,0,1,0,1,0,0,1,0,0,0,0,1)
H <- matrix(H,ncol=4,nrow=4,byrow=TRUE)
W <- c(0.5*q[1], 0,0, 0.5*q[2],q[1],0,0,q[2])
W <- matrix(W,ncol=2,nrow=4,byrow=TRUE)
V <- diag(r)
mu0 <- start
SS0 <- diag(c(1,1,1,1))*0.01
simu_out <- simPassiveSonar(nobs,q,r,start,seed=20)
yy<- simu_out$yy
tt<- 100:200
plot(simu_out$xx[1,tt],simu_out$xx[2,tt],xlab='x',ylab='y')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.