Skip to content

Commit

Permalink
[sample] simplify vehicle location
Browse files Browse the repository at this point in the history
  • Loading branch information
FrancoisCarouge committed Oct 5, 2024
1 parent 8f044f7 commit 9f08e18
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 12 deletions.
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,14 +70,13 @@ Example from the [2-dimension vehicle location, velocity, and acceleration vehic
{0., 0., 0., 500., 0., 0.},
{0., 0., 0., 0., 500., 0.},
{0., 0., 0., 0., 0., 500.}},
process_uncertainty{[]() -> matrix<6, 6> {
return 0.2 * 0.2 * matrix<6, 6>{{0.25, 0.5, 0.5, 0., 0., 0.},
process_uncertainty{0.2 * 0.2 *
matrix<6, 6>{{0.25, 0.5, 0.5, 0., 0., 0.},
{0.5, 1., 1., 0., 0., 0.},
{0.5, 1., 1., 0., 0., 0.},
{0., 0., 0., 0.25, 0.5, 0.5},
{0., 0., 0., 0.5, 1., 1.},
{0., 0., 0., 0.5, 1., 1.}};
}()},
{0., 0., 0., 0.5, 1., 1.}}},
output_uncertainty{{9., 0.}, {0., 9.}},
output_model{{1., 0., 0., 0., 0., 0.},
{0., 0., 0., 1., 0., 0.}},
Expand Down
15 changes: 7 additions & 8 deletions sample/kf_6x2x0_vehicle_location.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,13 @@ using state = fcarouge::state<vector<6>>;
{0., 0., 0., 0., 0., 500.}},
// The process uncertainty noise matrix Q, constant, computed in place,
// with random acceleration standard deviation: σa = 0.2 m.s^-2.
process_uncertainty{[]() -> matrix<6, 6> {
return 0.2 * 0.2 * matrix<6, 6>{{0.25, 0.5, 0.5, 0., 0., 0.},
{0.5, 1., 1., 0., 0., 0.},
{0.5, 1., 1., 0., 0., 0.},
{0., 0., 0., 0.25, 0.5, 0.5},
{0., 0., 0., 0.5, 1., 1.},
{0., 0., 0., 0.5, 1., 1.}};
}()},
process_uncertainty{0.2 * 0.2 *
matrix<6, 6>{{0.25, 0.5, 0.5, 0., 0., 0.},
{0.5, 1., 1., 0., 0., 0.},
{0.5, 1., 1., 0., 0., 0.},
{0., 0., 0., 0.25, 0.5, 0.5},
{0., 0., 0., 0.5, 1., 1.},
{0., 0., 0., 0.5, 1., 1.}}},
// The output uncertainty matrix R. Assume that the x and y measurements
// are uncorrelated, i.e. error in the x coordinate measurement doesn't
// depend on the error in the y coordinate measurement. In real-life
Expand Down

0 comments on commit 9f08e18

Please sign in to comment.