Hi Søren, thank you for your reply,

Does the timestep refer the the time of the starting frame, or the duration of the tStart to tEnd divided by the number of steps?

I see the repo model uses tStart as the initial heel contact at the starting point and runs for 685ms, but the pressure data has only 650ms of data.

Also, in the Environment.any…

```
#if FirstRun == 1
AnyFunEx PressureFun =
{
AnyVector Return = .FootPressureNodeCoeffVecInitial;
AnyFunExMonoPy PressureFunction =
{
ModuleFile = "Final2.py";
ArgList =
{
AnyMatrix Mat = ...FootPressureNodeMatInitial;
AnyFloat Time = 0;
AnyString path = " ";
};
};
};
AnyVector FootPressureNodeCoeffVec = PressureFun(FootPressureNodeMat, Main.Studies.InverseDynamicStudy.t - Main.Studies.InverseDynamicStudy.tStart, Main.FootPrintFolderPath + "/Input/" + Main.TrialSpecificData.NameOfFile + "-PressureData.txt");
```

what does the Time in ArgList refer to? does it allow me to off set the start time of the pressure data by say 0.001 or 1 ms so it reads 11ms 21ms 31ms instead of 10ms 20ms 30ms?

Lastly, for some of the vectors/nodes in anybody - they seem to have an offset in the python scripting which is consistent throughout which effects location of, for example the StrikeNode in the Environment.any file

The offset is either

```
0.049+(Rb+0.5+i)*CellL
```

or

```
0.4 -0.049 -64*CellW + (Rl+0.5+i)*CellW
```

Which in final2.py is also applied to

```
cell0 = [0.4 -0.049 -64*CellW + (Rl+0.5)*CellW, 0.049 + (Rb+0.5)*CellL, 0] #theoretical value
```

In the Environment.any I’ve rotated each of the location nodes, as the foot location was facing the wrong way on the platform like so:

```
AnyFolder &GlobalRef = .GlobalRef;
GlobalRef = {
AnyRefNode StrikeFootRef = {
sRel = {..FootLocationCooVec[0] -0.65, ..FootLocationCooVec[1] -0.88, 0}*RotMat(-pi,y)*RotMat(-pi,x);
AnyDrawNode Draw = {ScaleXYZ=0.005*{1,1,1}; RGB={1,0,0};};
};
```

As these foot location nodes have the offset of

```
#First time step CoP, correspond to heel strike location
#******************************************************* Step1Vec = Data[0][1:]
LongWeightedStep1Vec = []
for i in range(Rh):
LongCoo = 0.049+(Rb+0.5+i)*CellL
for j in range(Rw):
LongWeightedStep1Vec.append(Step1Vec[i*Rw+j]*LongCoo)
LongCooStrike = sum(LongWeightedStep1Vec)/sum(Step1Vec)
LatWeightedStep1Vec = []
for i in range(Rw):
LatCoo = 0.4 -0.049 -64*CellW + (Rl+0.5+i)*CellW
for j in range(Rh):
LatWeightedStep1Vec.append(Step1Vec[j*Rw+i]*LatCoo)
LatCooStrike = sum(LatWeightedStep1Vec)/sum(Step1Vec)
```

So i was wondering how i can apply the same logic to

Final2.py…

```
# Create the matrix of pressure cells global coordinates (size [i][3])
#*********************************************************************
cell = []
cell0 = [0.4 -0.049 -64*CellW + (Rl+0.5)*CellW, 0.049 + (Rb+0.5)*CellL, 0] #theoretical value
#cell0 = [0.4 -0.049 -64*CellW + (Rl+0.5)*CellW, 0.049 -0.01 + (Rb+0.5)*CellL, 0] #with offset
for h in range(Rh):
for w in range(Rw):
cell.append([cell0[0] + CellW*w, cell0[1] + CellL*h, cell0[2]])
```

and rotate/translate this to match the rotation and translation i’ve applied to the location nodes, but I am not quite sure how.

I am able to run a complete inverse dynamics simulation, but again the pressure nodes are not visible. to do this I change:

```
# Create the matrix of pressure cells global coordinates (size [i][3])
#*********************************************************************
cell = []
cell0 = [0.4 -0.049 -64*CellW + (Rl+0.5)*CellW, 0.049 + (Rb+0.5)*CellL, 0] #theoretical value
#cell0 = [0.4 -0.049 -64*CellW + (Rl+0.5)*CellW, 0.049 -0.01 + (Rb+0.5)*CellL, 0] #with offset
for h in range(Rh):
for w in range(Rw):
cell.append([cell0[0] -0.2 + CellW*w, cell0[1] - 0.3 + CellL*h, cell0[2]])
```

Thank you very much for your time Søren, I feel like I am getting close to a working model…

Best Regards,

Zach