Jpp  19.1.0-rc.1
the software that should make you happy
JAHRSCalibration.sh
Go to the documentation of this file.
1 #!/bin/zsh
2 #
3 #
4 # \author mdejong
5 #
6 version=1.0
7 script=${0##*/}
8 
9 if [ -z $JPP_DIR ]; then
10  echo "Variable JPP_DIR undefined."
11  exit
12 fi
13 
14 source $JPP_DIR/setenv.sh $JPP_DIR
15 
16 set_variable: DEBUG COMPASS_DEBUG 2
17 set_variable: WORKDIR COMPASS_WORKDIR ./
18 
19 if do_usage $*; then
20  usage "$script <detector identifier>"\
21  "\nAuxiliary script to download compass calibration data from database."
22 fi
23 
24 if (( $# != 1 )); then
25  fatal "Wrong number of parameters."
26 fi
27 
28 set_variable DETECTOR_ID $argv[1]
29 set_variable AHRS_CALIBRATION_FILE $WORKDIR/ahrs_calibration.txt
30 
31 JCookie.sh
32 
33 if [[ ! -f $AHRS_CALIBRATION_FILE ]]; then
34 
35  JAHRSCalibration \
36  -D $DETECTOR_ID \
37  -o $AHRS_CALIBRATION_FILE \
38  -d $DEBUG
39 fi