From d7c565d88533c415d392f908d17f6010f3011a11 Mon Sep 17 00:00:00 2001 From: Asa Hammond Date: Thu, 25 Feb 2021 18:37:10 -0800 Subject: [PATCH] static const for placeholder vars --- gtsam/navigation/ConstantVelocityFactor.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gtsam/navigation/ConstantVelocityFactor.h b/gtsam/navigation/ConstantVelocityFactor.h index f676108ce..f5a35947f 100644 --- a/gtsam/navigation/ConstantVelocityFactor.h +++ b/gtsam/navigation/ConstantVelocityFactor.h @@ -35,8 +35,8 @@ class ConstantVelocityFactor : public NoiseModelFactor2 { boost::optional H1 = boost::none, boost::optional H2 = boost::none) const override { // only used to use update() below - const Vector3 b_accel{0.0, 0.0, 0.0}; - const Vector3 b_omega{0.0, 0.0, 0.0}; + static const Vector3 b_accel{0.0, 0.0, 0.0}; + static const Vector3 b_omega{0.0, 0.0, 0.0}; Matrix predicted_H_x1; NavState predicted = x1.update(b_accel, b_omega, dt_, predicted_H_x1, {}, {});