Auxiliary application to determine tilt angles of seabed based on tripod positions.
More...
#include <string>
#include <iostream>
#include <iomanip>
#include <vector>
#include "JDetector/JTripod.hh"
#include "JMath/JSVD3D.hh"
#include "Jeep/JContainer.hh"
#include "Jeep/JParser.hh"
#include "Jeep/JMessage.hh"
Go to the source code of this file.
|
int | main (int argc, char **argv) |
|
Auxiliary application to determine tilt angles of seabed based on tripod positions.
- Author
- mdejong
Definition in file examples/JAcoustics/JSeabed.cc.
int main |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
Definition at line 21 of file examples/JAcoustics/JSeabed.cc.
33 JParser<> zap(
"Auxiliary application to determine tilt angles of seabed based on tripod positions.");
40 catch(
const exception& error) {
41 FATAL(error.what() << endl);
50 JUTMPosition pos(0.0, 0.0, 0.0);
52 for (tripods_container::const_iterator
i =
tripods.begin();
i !=
tripods.end(); ++
i) {
53 pos +=
i->getUTMPosition();
59 << showpos <<
FIXED(12,3) << pos.getX() <<
' '
60 << showpos <<
FIXED(12,3) << pos.getY() <<
' '
61 << showpos <<
FIXED(12,3) << pos.getZ() << endl);
66 double Y[3] = { 0.0, 0.0, 0.0 };
68 for (tripods_container::const_iterator
i =
tripods.begin();
i !=
tripods.end(); ++
i) {
70 const double x =
i->getX() - pos.getX();
71 const double y =
i->getY() - pos.getY();
72 const double z =
i->getZ() - pos.getZ();
74 A.a00 += x *
x;
A.a01 += x *
y;
A.a02 +=
x;
75 A.a10 += x *
y;
A.a11 += y *
y;
A.a12 +=
y;
76 A.a20 +=
x;
A.a21 +=
y;
A.a22 += 1.0;
91 const double a =
A.a00 *
Y[0] +
A.a01 *
Y[1] +
A.a02 *
Y[2];
92 const double b =
A.a10 *
Y[0] +
A.a11 *
Y[1] +
A.a12 *
Y[2];
105 cout << showpos <<
FIXED(12,6) << Tx <<
' '
106 << showpos <<
FIXED(12,6) << Ty << endl;
108 catch(
const exception& error) {
Utility class to parse command line options.
then fatal Wrong number of arguments fi set_variable STRING $argv[1] set_variable DETECTORXY_TXT $WORKDIR $DETECTORXY_TXT tail read X Y CHI2 RMS printf optimum n $X $Y $CHI2 $RMS awk v Y
Auxiliary data structure for floating point format specification.
V(JDAQEvent-JTriggerReprocessor)*1.0/(JDAQEvent+1.0e-10)
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
JContainer< std::vector< JTripod > > tripods_container
then usage $script[energy[distance[z of PMT]]] fi case set_variable z
source $JPP_DIR setenv csh $JPP_DIR &dev null eval JShellParser o a A
#define DEBUG(A)
Message macros.