Adding time dependent external force

Hi,

I am working with the MoCapModel (version 1.6.3) and I have a problem with an external force I want to add. The force is a traction force working from the sternum and I have estimated it by inverting the reaction forces I got from used force plates. I have the force data in a space separated .txt file with the values in columns of t, x, y and z. However I find a few problems. The illustration of the force is constant through the whole simulation, I guess it just takes the first value in the text file. How can I get it to pick all values, values corresponding to the right time?
Here comes next problem. In my trial specific data I have stated a Front- and LastFrameOffset. When I run my model the force is still the one representing the first frame. How will I get the force vector F to pick the right time?

I am not really completely understanding what t in force(t) stands for. Is that an internal character for the time collected from the first column in the text file?

I have implemented the external force in the Environment.any file with the following code:

AnyFolder Loads = {
AnyForce3D InterpForce = {
AnyFunInterpol force = {
Type = PiecewiseLinear;
FileName = “YOYOERIKA_TractionForce_ss.txt”;
};
AnyRefNode &SternumNode = Main.Studies.HumanModel.BodyModel.Trunk.SegmentsThorax.ThoraxSeg.RACP_CO6Node;
F = {force(t)[0],force(t)[1],force(t)[2]};
AnyDrawVector DrawForce = {
AnyRefFrame &ref = .SternumNode;
Vec = .F*1/1000;
Line = {
Style = Line3DStyleFull;
Thickness = 0.01;
RGB = {0,1,0};
End = {
Style = Line3DCapStyleArrow;
RGB = {1,0,0};
Thickness = 0.02;
Length = 0.04;
};
};
};
};
};

Kind regards,
Maria

Hi,

Please upload your model on the debug section if you want to get further investigation.
Debug section: http://forum.anyscript.org/forumdisplay.php?f=21

Best regards,
Moonki