Skip to content

Commit

Permalink
update example and doc
Browse files Browse the repository at this point in the history
  • Loading branch information
lionelvoirol committed May 15, 2023
1 parent 63c8c95 commit 502bb5a
Show file tree
Hide file tree
Showing 8 changed files with 33 additions and 31 deletions.
8 changes: 4 additions & 4 deletions R/navigation.R
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@
#' traj <- make_trajectory(data = lemniscate_traj_ned, system = "ned")
#' timing <- make_timing(
#' nav.start = 0, # time at which to begin filtering
#' nav.end = 20,
#' nav.end = 15,
#' freq.imu = 100, # frequency of the IMU, can be slower wrt trajectory frequency
#' freq.gps = 1, # GNSS frequency
#' freq.baro = 1, # barometer frequency (to disable, put it very low, e.g. 1e-5)
#' gps.out.start = 10, # to simulate a GNSS outage, set a time before nav.end
#' gps.out.end = 15
#' gps.out.start = 8, # to simulate a GNSS outage, set a time before nav.end
#' gps.out.end = 13
#' )
#' # create sensor for noise data generation
#' snsr.mdl <- list()
Expand Down Expand Up @@ -94,7 +94,7 @@
#' KF.mdl = KF.mdl,
#' num.runs = num.runs,
#' noProgressBar = TRUE,
#' PhiQ_method = "4",
#' PhiQ_method = "1",
#' # order of the Taylor expansion of the matrix exponential
#' # used to compute Phi and Q matrices
#' compute_PhiQ_each_n = 10,
Expand Down
9 changes: 5 additions & 4 deletions R/plot.navigation.R
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@
#' plot(traj)
#' timing <- make_timing(
#' nav.start = 0, # time at which to begin filtering
#' nav.end = 20,
#' nav.end = 10,
#' freq.imu = 100, # frequency of the IMU, can be slower wrt trajectory frequency
#' freq.gps = 1, # GNSS frequency
#' freq.baro = 1, # barometer frequency (to disable, put it very low, e.g. 1e-5)
#' gps.out.start = 10, # to simulate a GNSS outage, set a time before nav.end
#' gps.out.end = 15
#' gps.out.start = 5, # to simulate a GNSS outage, set a time before nav.end
#' gps.out.end = 8
#' )
#' # create sensor for noise data generation
#' snsr.mdl <- list()
Expand Down Expand Up @@ -108,7 +108,8 @@
#' P_subsampling = timing$freq.imu
#' )
#' plot(res)
#' plot(res, plot3d = TRUE)
#' # 3D plot
#' # plot(res, plot3d = TRUE)
#' plot(res, error_analysis = TRUE)
#' @export
#' @importFrom stats qnorm
Expand Down
6 changes: 3 additions & 3 deletions R/plot.navigation.stat.R
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@
#' plot(traj)
#' timing <- make_timing(
#' nav.start = 0, # time at which to begin filtering
#' nav.end = 30,
#' nav.end = 15,
#' freq.imu = 100, # frequency of the IMU, can be slower wrt trajectory frequency
#' freq.gps = 1, # GNSS frequency
#' freq.baro = 1, # barometer frequency (to disable, put it very low, e.g. 1e-5)
#' gps.out.start = 20, # to simulate a GNSS outage, set a time before nav.end
#' gps.out.end = 25
#' gps.out.start = 8, # to simulate a GNSS outage, set a time before nav.end
#' gps.out.end = 13
#' )
#' # create sensor for noise data generation
#' snsr.mdl <- list()
Expand Down
8 changes: 4 additions & 4 deletions man/navigation.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 5 additions & 4 deletions man/plot.navigation.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions man/plot.navigation.stat.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions vignettes/compare_model.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ We then define a `timing` object
```{r}
timing <- make_timing(
nav.start = 0, # time at which to begin filtering
nav.end = 20,
nav.end = 15,
freq.imu = 100, # frequency of the IMU, can be slower wrt trajectory frequency
freq.gps = 1, # gnss frequency
freq.baro = 1, # barometer frequency (to disable, put it very low, e.g. 1e-5)
gps.out.start = 10, # to simulate a GNSS outage, set a time before nav.end
gps.out.end = 15
gps.out.start = 8, # to simulate a GNSS outage, set a time before nav.end
gps.out.end = 13
)
```

Expand Down Expand Up @@ -104,7 +104,7 @@ res <- navigation(
PhiQ_method = "1",
parallel.ncores = 1,
P_subsampling = timing$freq.imu,
compute_PhiQ_each_n = 20
compute_PhiQ_each_n = 50
) # keep one covariance every second
```

Expand All @@ -121,7 +121,7 @@ wrong_res <- navigation(
PhiQ_method = "1",
parallel.ncores = 1,
P_subsampling = timing$freq.imu,
compute_PhiQ_each_n = 20
compute_PhiQ_each_n = 50
) # keep one covariance every second
```

Expand Down
8 changes: 4 additions & 4 deletions vignettes/model_evaluation.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@ Then we need to make a `timing` object (see `?make_timing` for details) where we
```{r}
timing <- make_timing(
nav.start = 0, # time at which to begin filtering
nav.end = 20,
nav.end = 15,
freq.imu = 100, # frequency of the IMU, can be slower wrt trajectory frequency
freq.gps = 1, # GNSS frequency
freq.baro = 1, # barometer frequency (to disable, put it very low, e.g. 1e-5)
gps.out.start = 10, # to simulate a GNSS outage, set a time before nav.end
gps.out.end = 15
gps.out.start = 8 , # to simulate a GNSS outage, set a time before nav.end
gps.out.end = 13
)
```

Expand Down Expand Up @@ -105,7 +105,7 @@ res <- navigation(
num.runs = num.runs,
noProgressBar = TRUE,
PhiQ_method = "1", # order of the Taylor expansion of the matrix exponential used to compute Phi and Q matrices
compute_PhiQ_each_n = 10, # compute new Phi and Q matrices every n IMU steps (execution time optimization)
compute_PhiQ_each_n = 50, # compute new Phi and Q matrices every n IMU steps (execution time optimization)
parallel.ncores = 1,
P_subsampling = timing$freq.imu
) # keep one covariance every second
Expand Down

0 comments on commit 502bb5a

Please sign in to comment.