diff --git a/README.md b/README.md index fe04bb675..31b364e85 100644 --- a/README.md +++ b/README.md @@ -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.}}, diff --git a/sample/kf_6x2x0_vehicle_location.cpp b/sample/kf_6x2x0_vehicle_location.cpp index 75b2dd376..70378e756 100644 --- a/sample/kf_6x2x0_vehicle_location.cpp +++ b/sample/kf_6x2x0_vehicle_location.cpp @@ -60,14 +60,13 @@ using state = fcarouge::state>; {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