Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
dlib
Commits
81b32723
"docs/source/api/vscode:/vscode.git/clone" did not exist on "8b43e9667fce7cd944dca0641c1d960770a62cb2"
Commit
81b32723
authored
Feb 25, 2017
by
Ehsan Azar
Committed by
Davis E. King
Feb 25, 2017
Browse files
add set_state to kalman filter for the case we know the initial state (#246)
parent
a3023fde
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
0 deletions
+19
-0
dlib/filtering/kalman_filter.h
dlib/filtering/kalman_filter.h
+7
-0
dlib/filtering/kalman_filter_abstract.h
dlib/filtering/kalman_filter_abstract.h
+12
-0
No files found.
dlib/filtering/kalman_filter.h
View file @
81b32723
...
...
@@ -36,6 +36,13 @@ namespace dlib
void
set_process_noise
(
const
matrix
<
double
,
states
,
states
>&
Q_
)
{
Q
=
Q_
;
}
void
set_measurement_noise
(
const
matrix
<
double
,
measurements
,
measurements
>&
R_
)
{
R
=
R_
;
}
void
set_estimation_error_covariance
(
const
matrix
<
double
,
states
,
states
>&
P_
)
{
P
=
P_
;
}
void
set_state
(
const
matrix
<
double
,
states
,
1
>&
xb_
)
{
xb
=
xb_
;
if
(
!
got_first_meas
)
{
x
=
xb_
;
got_first_meas
=
true
;
}
}
const
matrix
<
double
,
measurements
,
states
>&
get_observation_model
(
)
const
{
return
H
;
}
...
...
dlib/filtering/kalman_filter_abstract.h
View file @
81b32723
...
...
@@ -93,6 +93,18 @@ namespace dlib
understand what you are doing.)
!*/
void
set_state
(
const
matrix
<
double
,
states
,
1
>&
xb
);
/*!
ensures
- #get_predicted_next_state() == xb
- If update() is never called with a measurement
#get_current_state() == get_predicted_next_state()
(Can be used when the initial state is known, or if the state needs to be corrected
before the next update())
!*/
const
matrix
<
double
,
measurements
,
states
>&
get_observation_model
(
)
const
;
/*!
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment