--- a +++ b/Tools/GRFPrediction/FootPlateConditionalContact_ForceMomentMeasure.any @@ -0,0 +1,27 @@ +AnyForceMomentMeasure ForceMomentMeasure_Auto = +{ +// IncludeForces = arrcat( +// ObjSearch(".Contacts.*.Push.Direction0Muscle.NormalDirectionMuscle" ), +// ObjSearch(".Contacts.*.Push.Direction0*Muscle.*.FrictionMuscle" ) +// ); + IncludeForces = ObjSearchRecursive(".Contacts","*", "AnyForceBase"); + + AnyRefFrame& base = .PlateBaseFrame ; + + AnyVec3 Flocal = F * base.Axes; + AnyVec3 Mlocal = M * base.Axes; + + AnyVar Fx_On_Plate = Flocal[0]; + AnyVar Fy_On_Plate = Flocal[1]; + AnyVar Fz_On_Plate = Flocal[2]; + AnyVar Mx_On_Plate = Mlocal[0]; + AnyVar My_On_Plate = Mlocal[1]; + AnyVar Mz_On_Plate = Mlocal[2]; + + AnyVar Fx_On_Human = -Fx_On_Plate; + AnyVar Fy_On_Human = -Fy_On_Plate; + AnyVar Fz_On_Human = -Fz_On_Plate; + AnyVar Mx_On_Human = -Mx_On_Plate; + AnyVar My_On_Human = -My_On_Plate; + AnyVar Mz_On_Human = -Mz_On_Plate; +};