From f0537efb0fa3cb5c0c84e36b60f055c1d1c60d21 Mon Sep 17 00:00:00 2001 From: Scott Fennell Date: Fri, 21 Dec 2018 14:01:48 -0600 Subject: [PATCH] example sim SIM_msd add init body --- trick_sims/SIM_msd/models/msd/src/msd_init.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/trick_sims/SIM_msd/models/msd/src/msd_init.cpp b/trick_sims/SIM_msd/models/msd/src/msd_init.cpp index c1ec280a..de8c099d 100644 --- a/trick_sims/SIM_msd/models/msd/src/msd_init.cpp +++ b/trick_sims/SIM_msd/models/msd/src/msd_init.cpp @@ -9,5 +9,8 @@ PROGRAMMERS: /* initialization job */ int MSD::init() { + x = x_0; + v = v_0; + a = (F - b*v - k*x)/m; return 0; }