Download this file

68 lines (56 with data), 2.1 kB



  // ************************************
  // Drivers for attaching the pelvis to the global reference system
  // ************************************  
  
  AnyKinEqInterPolDriver PelvisGroundDriver ={
    AnyKinLinear lin ={
      AnyFixedRefFrame &ref1 =....EnvironmentModel.GlobalRef;
      AnySeg &ref2 =....BodyModel.Trunk.SegmentsLumbar.PelvisSeg;
    };
    AnyKinRotational rot ={
      AnyFixedRefFrame &ref1 =....EnvironmentModel.GlobalRef;
      AnySeg &ref2 =....BodyModel.Trunk.SegmentsLumbar.PelvisSeg;
      Type=RotAxesAngles;
    };
        Data={
      .JntPos.PelvisPosXVec,
      .JntPos.PelvisPosYVec,
      .JntPos.PelvisPosZVec,
      pi/180*.JntPos.PelvisRotZVec,
      pi/180*.JntPos.PelvisRotYVec,
      pi/180*.JntPos.PelvisRotXVec
    };
    T=.JntPos.PelvisPosTime;
    Reaction.Type={On,On,On,On,On,On};
      Type=Bspline;

  };


  // ************************************
  // Drivers for the spine
  // ************************************
  
  //Neck driver 
  AnyKinEqInterPolDriver NeckJntDriver = {
    AnyKinMeasure& lb = ...BodyModel.Interface.Trunk.SkullThoraxLateralBending;
    AnyKinMeasure& ar = ...BodyModel.Interface.Trunk.SkullThoraxRotation;
    AnyKinMeasure& fe = ...BodyModel.Interface.Trunk.SkullThoraxFlexion;
    Data = pi/180*{
      .JntPos.NeckLateralBendingVec, 
      .JntPos.NeckAxialRotationVec,
      -1*.JntPos.NeckExtensionVec 
    };
    Reaction.Type = {Off,Off,Off};
    T=.JntPos.NeckTime;
    Type=Bspline;
  };
  
  //Thorax pelvis rotation driver
  AnyKinEqInterPolDriver PostureDriver ={
    AnyKinMeasure& Ref2 = ...BodyModel.Interface.Trunk.PelvisThoraxLateralBending;        
    AnyKinMeasure& Ref3 = ...BodyModel.Interface.Trunk.PelvisThoraxRotation;   
    AnyKinMeasure& Ref1 = ...BodyModel.Interface.Trunk.PelvisThoraxExtension;
    
    Data = pi/180*{
      .JntPos.PelvisThoraxLateralBendingVec,
      .JntPos.PelvisThoraxRotationVec,
      .JntPos.PelvisThoraxExtensionVec
    };
    T=.JntPos.PelvisThoraxTime;
    Type=Bspline;
    Reaction.Type = {Off,Off,Off};  
    
  };