c
c     Initialize data needed to make specific marker sets be read properly
c     from motion analysis p3d marker data files. Marker sets included are:
c      hh        - Helen Hayes Gait Marker Set
c      ckc       - Closed Kinetic Chain
c      ckc_nomak - Special CKC set with medial ankle marker missing
c      cc        - Cleveland Clinic Gait Marker Set
c      ccr       - Cleveland Clinic right leg marker alignment
c      ccl       - Cleveland Clinic left leg marker alignment
c      f3d       - Foot trak 3d marker set                                
c      mayo      - Mayo marker set
c      mir       - Mayo marker set right side alignment
c      mil       - Mayo marker set left  side alignment
c                               
      integer*4 hh_tru(21),tru_hh(25),hh_nch(21),ckc_nch(17),ckc_nma_nch(16),
     &          cc_nch(27),ccr_nch(17),ccl_nch(17),f3d_nch(15),
     &          mayo_nch(27),mir_nch(19),mil_nch(19)
      character ckc_names(17)*10,ckc_nma_names(16)*10,hh_names(21)*10,
     &          cc_names(27)*13,ccr_names(17)*15,ccl_names(17)*15,
     &          f3d_names(15)*19,cc_names_new(33)*4,ccl_names_new(17)*4,
     &          ccr_names_new(17)*4,ckc_names_new(20)*4,
     &          ckc_nma_names_new(19)*4,f3d_names_new(15)*4,hh_names_new(25)*4,
     &          mayo_names(27)*13,mir_names(19)*15,mil_names(19)*15,
     &          mayo_names_new(33)*4,mir_names_new(19)*4,mil_names_new(19)*4
                                     
      data hh_tru / 17,18,19,3,23,10,25,11,12,21,2,14,15,16,1,22,7,24,8,9,20 /
      data tru_hh / 15,11,4,25,25,25,17,19,20,6,8,9,25,12,13,14,1,2,3,21,10,16,5,18,7 /
                                                                     
      data hh_nch  /10,7,7,6,7,6,7,7,5,6,8,10,7,7,6,7,6,7,7,5,6 /
                                                
      data ckc_nch     /6,10,6,6,7,7,7,8,8,7,7,7,9,9,3,4,9 /
      data ckc_nma_nch /6,10,6,6,7,7,7,8,8,7,7,7,9,9,3,4 /
c
c      Configuration for Cleveland Clinic with 2 markers on foot
c                                                            
c      data cc_nch  /10,10,7,7,7,7,8,5,5,13,13,13,13,12,12,
c     &              13,13,13,13,12,12,6,6,5,5 /
c      data ccr_nch /13,14,13,13,12,13,13,12,14,15,8,5,5,14,6,5,11,11/
c      data ccl_nch /13,14,13,13,12,13,13,12,14,15,8,5,5,14,6,5,11,11/
c
c      Configuration for Cleveland Clinic with 3 markers on foot
c                                                            
      data cc_nch  /10,10,7,7,7,7,8,5,5,13,13,13,13,12,12,
     &              13,13,13,13,12,12,6,6,5,5,10,10 /
      data ccr_nch /13,14,13,13,12,13,13,12,14,15,8,5,5,14,6,5,10/
      data ccl_nch /13,14,13,13,12,13,13,12,14,15,8,5,5,14,6,5,10/

      data hh_names / 'L.SHOULDER','L.ELBOW   ','L.WRIST   ','L.ASIS    ',
     &                'L.THIGH   ','L.KNEE    ','L.SHANK   ','L.ANKLE   ',
     &                'L.TOE     ','L.HEEL    ','V.SACRAL  ',
     &                'R.SHOULDER','R.ELBOW   ','R.WRIST   ','R.ASIS    ',
     &                'R.THIGH   ','R.KNEE    ','R.SHANK   ','R.ANKLE   ',
     &                'R.TOE     ','R.HEEL    ' /

      data hh_names_new
     &    /'RTAS','SACR','LFAS','RTHP','LFHP','NECK','RTKN','RTAK','RTTO',
     &     'LFKN','LFAK','LFTO','MSAC','RTSH','RTEL','RTWR','LFSH','LFEL',
     &     'LFWR','RTHE','LFHE','RTTH','LFTH','RTCF','LFCF'/

      data ckc_names / 'SACRAL    ','ANT PELVIS','R ASIS    ','L ASIS    ',
     &                 'THIGH.1   ','THIGH.2   ','THIGH.3   ','KNEE LAT  ',
     &                 'KNEE MED  ','SHANK.1   ','SHANK.2   ','SHANK.3   ',
     &                 'ANKLE LAT ','ANKLE MED ','TOE       ','HEEL      ',
     &                 'GR. TROCH ' /
                                    
      data ckc_names_new
     &    / 'SACR','APLV','RTAS','LFAS','RTH1','RTH2','RTH3',
     &      'LRKN','MRKN','RCF1','RCF2','RCF3','LRAK','MRAK',
     &      'RTOE','RHEL','RGTR','RTAK','RTKN','RTHP' /

      data ckc_nma_names 
     &    / 'SACRAL    ','ANT PELVIS','R ASIS    ','L ASIS    ',
     &      'THIGH.1   ','THIGH.2   ','THIGH.3   ','KNEE LAT  ',
     &      'KNEE MED  ','SHANK.1   ','SHANK.2   ','SHANK.3   ',
     &      'ANKLE LAT ','TOE       ','HEEL      ','GR. TROCH ' /

      data ckc_nma_names_new
     &    / 'SACR','APLV','RTAS','LFAS','RTH1','RTH2','RTH3',
     &      'LRKN','MRKN','RCF1','RCF2','RCF3','LRAK',
     &      'RTOE','RHEL','RGTR','RTAK','RTKN','RTHP' /
c
c     Configuration for Cleveland Clinic with 2 markers on foot
c                                                       
c      data cc_names / 'R.SHOULDER   ','L.SHOULDER   ','R.ELBOW      ',
c     &                'L.ELBOW      ','R.WRIST      ','L.WRIST      ',
c     &                'V.SACRAL     ','R.HIP        ','L.HIP        ',
c     &                'R.THIGH.UPPER','L.THIGH.UPPER','R.THIGH.FRONT',
c     &                'L.THIGH.FRONT','R.THIGH.REAR ','L.THIGH.REAR ',
c     &                'R.SHANK.UPPER','L.SHANK.UPPER','R.SHANK.FRONT',
c     &                'L.SHANK.FRONT','R.SHANK.REAR ','L.SHANK.REAR ',
c     &                'R.HEEL       ','L.HEEL       ',
c     &                'R.TOE        ','L.TOE        '/              
                                                                  
c      data cc_names_new / 'RTSH','LFSH','RTEL','LFEL','RTWR','LFWR',
c     &                    'SACR','RTAS','LFAS', 
c     &                    'RTTU','LFTU','RTTF','LFTF','RTTR','LFTR',
c     &                    'RTSU','LFSU','RTSF','LFSF','RTSR','LFSR',
c     &                    'RTHL','LFHL','RTTO','LFTO',
c     &                    'RTAK','LFAK','RTKN','LFKN','RTHP','LFHP' /
c
c     Configuration for Cleveland Clinic with 3 markers on foot
c                                                       
      data cc_names / 'R.SHOULDER   ','L.SHOULDER   ','R.ELBOW      ',
     &                'L.ELBOW      ','R.WRIST      ','L.WRIST      ',
     &                'V.SACRAL     ','R.HIP        ','L.HIP        ',
     &                'R.THIGH.UPPER','L.THIGH.UPPER','R.THIGH.FRONT',
     &                'L.THIGH.FRONT','R.THIGH.REAR ','L.THIGH.REAR ',
     &                'R.SHANK.UPPER','L.SHANK.UPPER','R.SHANK.FRONT',
     &                'L.SHANK.FRONT','R.SHANK.REAR ','L.SHANK.REAR ',
     &                'R.HEEL       ','L.HEEL       ',              
     &                'R.TOE        ','L.TOE        ',
     &                'R.MID.FOOT   ','L.MID.FOOT   ' /
                                                                  
      data cc_names_new / 'RTSH','LFSH','RTEL','LFEL','RTWR','LFWR',
     &                    'SACR','RTAS','LFAS', 
     &                    'RTTU','LFTU','RTTF','LFTF','RTTR','LFTR',
     &                    'RTSU','LFSU','RTSF','LFSF','RTSR','LFSR',
     &                    'RTHL','LFHL','RTTO','LFTO','RTMF','LFMF',
     &                    'RTAK','LFAK','RTKN','LFKN','RTHP','LFHP' /
                              
      data ccr_names / 'R.KNEE.MEDIAL  ','R.KNEE.LATERAL ',
     &                 'R.THIGH.UPPER  ','R.THIGH.FRONT  ','R.THIGH.REAR   ',
     &                 'R.SHANK.UPPER  ','R.SHANK.FRONT  ','R.SHANK.REAR   ',
     &                 'R.ANKLE.MEDIAL ','R.ANKLE.LATERAL',
     &                 'SACRAL         ','R.HIP          ','L.HIP          ',
     &                 'SACRAL2        ','R.HEEL         ','R.TOE          ',
     &                 'R.MID.FOOT     ' /
                                                                      
      data ccr_names_new / 'RTKM','RTKL','RTTU','RTTF','RTTR',
     &                     'RTSU','RTSF','RTSR','RTAM','RTAL',
     &                     'SACR','RTHP','LFHP','SACI','RTHL',
     &                     'RTTO','RTMF' /
                              

      data ccl_names / 'L.KNEE.MEDIAL  ','L.KNEE.LATERAL ',
     &                 'L.THIGH.UPPER  ','L.THIGH.FRONT  ','L.THIGH.REAR   ',
     &                 'L.SHANK.UPPER  ','L.SHANK.FRONT  ','L.SHANK.REAR   ',
     &                 'L.ANKLE.MEDIAL ','L.ANKLE.LATERAL',
     &                 'SACRAL         ','R.HIP          ','L.HIP          ',
     &                 'SACRAL2        ','L.HEEL         ','L.TOE          ',
     &                 'L.MID.FOOT     ' /
                                                                      
      data ccl_names_new / 'LFKM','LFKL','LFTU','LFTF','LFTR',
     &                     'LFTU','LFSF','LFSR','LFAM','LFAL',
     &                     'SACR','RTHP','LFHP','SACI','LFHL',
     &                     'LFTO','LFMF'/
c
c     Configuration for Mayo Marker set
c                                                       
      data mayo_nch  /10,10,7,7,7,7,8,5,5,13,13,13,13,12,12,
     &                13,13,13,13,12,12,6,6,5,5,10,10 /
      data mir_nch /12,12,11,13,13,12,13,13,12,13,13,12,6,5,5,7,6,5,10/
      data mil_nch /12,12,11,13,13,12,13,13,12,13,13,12,6,5,5,7,6,5,10/

      data mayo_names / 'R.SHOULDER   ','L.SHOULDER   ','R.ELBOW      ',
     &                'L.ELBOW      ','R.WRIST      ','L.WRIST      ',
     &                'V.SACRAL     ','R.HIP        ','L.HIP        ',
     &                'R.THIGH.UPPER','L.THIGH.UPPER','R.THIGH.FRONT',
     &                'L.THIGH.FRONT','R.THIGH.REAR ','L.THIGH.REAR ',
     &                'R.SHANK.UPPER','L.SHANK.UPPER','R.SHANK.FRONT',
     &                'L.SHANK.FRONT','R.SHANK.REAR ','L.SHANK.REAR ',
     &                'R.HEEL       ','L.HEEL       ',              
     &                'R.TOE        ','L.TOE        ',
     &                'R.MID.FOOT   ','L.MID.FOOT   ' /
                                                                  
      data mayo_names_new / 'RTSH','LFSH','RTEL','LFEL','RTWR','LFWR',
     &                    'SACR','RTAS','LFAS', 
     &                    'RTTU','LFTU','RTTF','LFTF','RTTR','LFTR',
     &                    'RTSU','LFSU','RTSF','LFSF','RTSR','LFSR',
     &                    'RTHL','LFHL','RTTO','LFTO','RTMF','LFMF',
     &                    'RTAK','LFAK','RTKN','LFKN','RTHP','LFHP' /
                              
      data mir_names / 'R.KNEE.UPPER   ','R.KNEE.FRONT   ','R.KNEE.REAR    ',
     &                 'R.THIGH.UPPER  ','R.THIGH.FRONT  ','R.THIGH.REAR   ',
     &                 'R.SHANK.UPPER  ','R.SHANK.FRONT  ','R.SHANK.REAR   ',
     &                 'R.ANKLE.UPPER  ','R.ANKLE.FRONT  ','R.ANKLE.REAR   ',
     &                 'SACRAL         ','R.HIP          ','L.HIP          ',
     &                 'SACRAL2        ','R.HEEL         ','R.TOE          ',
     &                 'R.MID.FOOT     ' /
                                                                      
      data mir_names_new / 'RTKU','RTKF','RTKR','RTTU','RTTF','RTTR',
     &                     'RTSU','RTSF','RTSR','RTAU','RTAF','RTAR',
     &                     'SACR','RTHP','LFHP','SACI','RTHL',
     &                     'RTTO','RTMF' /                                   

      data mil_names / 'L.KNEE.UPPER   ','L.KNEE.FRONT   ','L.KNEE.REAR    ',
     &                 'L.THIGH.UPPER  ','L.THIGH.FRONT  ','L.THIGH.REAR   ',
     &                 'L.SHANK.UPPER  ','L.SHANK.FRONT  ','L.SHANK.REAR   ',
     &                 'L.ANKLE.UPPER  ','L.ANKLE.FRONT  ','L.ANKLE.REAR   ',
     &                 'SACRAL         ','R.HIP          ','L.HIP          ',
     &                 'SACRAL2        ','L.HEEL         ','L.TOE          ',
     &                 'L.MID.FOOT     ' /
                                                                      
      data mil_names_new / 'LFKU','LFKF','LFKR','LFTU','LFTF','LFTR',
     &                     'LFSU','LFSF','LFSR','LFAU','LFAF','LFAR',
     &                     'SACR','RTHP','LFHP','SACI','LFHL',
     &                     'LFTO','LFMF' /
c
c     Configuration of Dwight's version of the foot track 3d marker set
c                                                                 
      data f3d_nch / 13,13,14,14,16,19,17,12,13,17,16,17,16,14,15 /
      data f3d_names / 'TIBIA.ANT.SUP      ','TIBIA.ANT.INF      ',
     &                 'TIBIA.POST.SUP     ','TIBIA.POST.INF     ',
     &                 'CALCANEUS.MEDIAL   ','CALCANEUS.POSTERIOR',
     &                 'CALCANEUS.LATERAL  ', 
     &                 'ANKLE.MEDIAL       ','ANKLE.LATERAL      ',
     &                 'METATARSAL.1.POST  ','METATARSAL.1.ANT   ',
     &                 'METATARSAL.5.POST  ','METATARSAL.5.ANT   ',
     &                 'TOE.1.ANTERIOR     ','TOE.1.POSTERIOR    ' /
      data f3d_names_new / 'TAS ','TAI ','TPS ','TPI ',
     &                     'CM  ','CP  ','CL  ',
     &                     'AM  ','AL  ',
     &                     'M1P ','M1A ','M5P ','M5A ',
     &                     'T1A ','T1P ' /
                                                                   
