4 if [ -z $JPP_DIR ]; then
 
    5     echo "Variable JPP_DIR undefined."
 
    9 source $JPP_DIR/setenv.sh $JPP_DIR >& /dev/null
 
   11 set_variable:  DEBUG    ACOUSTICS_DEBUG    0
 
   12 set_variable:  WORKDIR  ACOUSTICS_WORKDIR  ./
 
   13 set_variable:  THREADS  ACOUSTICS_THREADS  5
 
   16     usage "$script <detector file> (input file)+ <output file>"\
 
   17           "\nAuxiliary script to process acoustic data for dynamic position calibration."\
 
   18           "\nInput files correspond to the output of JAcousticsEventBuilder[.sh]."
 
   22     fatal "Wrong number of arguments."
 
   25 set_variable  DETECTOR            $argv[1]
 
   26 set_array     INPUT_FILES         $argv[2,-2]
 
   27 set_variable  OUTPUT_FILE         $argv[-1]
 
   29 eval `JPrintDetector -a $DETECTOR -O IDENTIFIER`
 
   31 JAcoustics.sh   $DETECTOR_ID
 
   39        -f "$INPUT_FILES[*]"                      \
 
   41        -T $WORKDIR/tripod.txt                    \
 
   42        -Y $WORKDIR/transmitter.txt               \
 
   43        -V $WORKDIR/sound_velocity.txt            \
 
   44        -M $WORKDIR/mechanics.txt                 \
 
   45        -@ $WORKDIR/acoustics_fit_parameters.txt  \
 
   46        -! $WORKDIR/disable.txt                   \
 
   48        -d $DEBUG 3>&1 1>&4 } | read RESULT } 4>&1
 
   53 echo "Result <$RESULT>"