Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
UsefulAdu5Pat Class Reference

As UsefulAnitaEvent is to RawAnitaEvent, UsefulAdu5Pat is to Adu5Pat. Well not quite as useful but you get the picture. More...

#include <UsefulAdu5Pat.h>

Public Member Functions

 UsefulAdu5Pat (const Adu5Pat *patPtr)
 Default constructor.
 
 ~UsefulAdu5Pat ()
 Assignment constructor.
 
int getSourceLonAndLatAtDesiredAlt (Double_t phiWave, Double_t thetaWave, Double_t &sourceLon, Double_t &sourceLat, Double_t desiredAlt)
 Destructor. More...
 
int getSourceLonAndLatAltZero (Double_t phiWave, Double_t thetaWave, Double_t &sourceLon, Double_t &sourceLat)
 
int getSourceLonAndLatAtAlt (Double_t phiWave, Double_t thetaWave, Double_t &sourceLon, Double_t &sourceLat, Double_t &sourceAltitude)
 
int getSourceLonAndLatAtAlt2 (Double_t phiWave, Double_t thetaWave, Double_t &sourceLon, Double_t &sourceLat, Double_t &sourceAltitude, Int_t maxLoopIter=-1, TVector3 *sourcePosOptional=NULL) const
 
TVector3 getUnitVectorAlongThetaWavePhiWave (double thetaWave, double phiWave) const
 
int getSourceLonAndLatAtAlt3 (Double_t phiWave, Double_t thetaWave, Double_t &sourceLon, Double_t &sourceLat, Double_t &sourceAltitude, double *deltaAltIfNoIntersectection=NULL, bool returnBestPositionIfNoIntersection=false) const
 
int traceBackToContinent3 (Double_t phiWave, Double_t thetaWave, Double_t *lon, Double_t *lat, Double_t *alt, Double_t *theta_adjustment_required) const
 
int traceBackToContinent (Double_t phiWave, Double_t thetaWave, Double_t *lon, Double_t *lat, Double_t *alt, Double_t *theta_adjustment_required, Double_t max_theta_adjustment=TMath::Pi()/180, Int_t max_iter=10) const
 
void getThetaAndPhiWave (Double_t sourceLon, Double_t sourceLat, Double_t sourceAlt, Double_t &thetaWave, Double_t &phiWave)
 
void getThetaAndPhiWave2 (Double_t sourceLon, Double_t sourceLat, Double_t sourceAlt, Double_t &thetaWave, Double_t &phiWave, TVector3 *sourcePos=NULL) const
 
void getThetaAndPhiWaveCart (TVector3 *sourcePos, Double_t &thetaWave, Double_t &phiWave) const
 
void getThetaAndPhiWaveOfRayAtInfinity (const TVector3 &p0, const TVector3 &v0, Double_t &thetaWave, Double_t &phiWave, Bool_t plus_infinity=true, Double_t eps=0.00001 *TMath::DegToRad(), Double_t step=10e7, TVector3 *testPosition=0) const
 
void getThetaAndPhiWaveWaisDivide (Double_t &thetaWave, Double_t &phiWave)
 
void getThetaAndPhiWaveLDB (Double_t &thetaWave, Double_t &phiWave)
 
void getThetaWaveAtBase (Double_t baseLon, Double_t baseLat, Double_t baseAlt, Double_t &thetaWave)
 
void getThetaAndPhiWaveWillySeavey (Double_t &thetaWave, Double_t &phiWave)
 
void getThetaAndPhiWaveWillyBorehole (Double_t &thetaWave, Double_t &phiWave)
 
void getThetaAndPhiWaveTaylorDome (Double_t &thetaWave, Double_t &phiWave)
 
Double_t getDeltaTExpected (Int_t ant1, Int_t ant2, Double_t sourceLon, Double_t sourceLat, Double_t sourceAlt)
 
Double_t getDeltaTExpected (Int_t ant1, Int_t ant2, Double_t phiWave, Double_t thetaWave)
 
Double_t getDeltaTExpected (Int_t ant1, Int_t ant2, Double_t cosPhi, Double_t sinPhi, Double_t cosTheta, Double_t sinTheta)
 
Double_t getDeltaTWillySeavey (Int_t ant1, Int_t ant2)
 
Double_t getDeltaTWillyBorehole (Int_t ant1, Int_t ant2)
 
Double_t getDeltaTTaylor (Int_t ant1, Int_t ant2)
 
Double_t getPhiWave () const
 
Double_t getThetaWave () const
 
Double_t getSourceLongitude () const
 
Double_t getSourceLatitude () const
 
Double_t getSourceAltitude () const
 
UInt_t getTaylorDomeTriggerTimeNs () const
 
UInt_t getWaisDivideTriggerTimeNs () const
 Gets the time of flight to Taylor Dome.
 
UInt_t getSipleTriggerTimeNs () const
 Gets the time of flight to Wais Divide.
 
UInt_t getLDBTriggerTimeNs () const
 Gets the time of flight to Siple.
 
UInt_t getTriggerTimeNsFromSource (Double_t sourceLat, Double_t sourceLong, Double_t sourceAlt) const
 Gets the time of flight to LDB camp.
 
Double_t getDistanceFromSource (Double_t sourceLat, Double_t sourceLong, Double_t sourceAlt) const
 Gets time of flight from any source.
 
void setIncludeGroupDelay (Int_t flag)
 Gets distance from any source in meters.
 
Double_t getAngleBetweenPayloadAndSource (Double_t sourceLon, Double_t sourceLat, Double_t sourceAlt)
 
void getSunPosition (Double_t &phiDeg, Double_t &thetaDeg) const
 Uses realTime, latitude, longitude to calculate the sun's position. More...
 
Double_t getAzimuthOfSunRelativeToNorth () const
 Calculates the azimuth position of the sun if ANITA was facing directly north, relies on timeOfDay. More...
 
Double_t getAzimuthOfSun () const
 
Double_t getDifferencePointingToSun (Double_t phiAngle, Bool_t inputInDegrees=true) const
 Quick way of getting difference between any azimuth phi and the sun's azimuth phi. More...
 
void getThetaAndPhiWaveHiCal (Double_t &thetaWave, Double_t &phiWave)
 
Double_t getReflectionAngle (Double_t imageEl, Double_t imageAlt) const
 
int astronomicalCoordinates (Double_t phiWave, Double_t thetaWave, Double_t *RA=0, Double_t *dec=0, Double_t *l=0, Double_t *b=0) const
 
int fromRADec (Double_t RA, Double_t dec, Double_t *phi, Double_t *theta) const
 
int fromRADec (int N, const Double_t *RA, const Double_t *dec, Double_t *phi, Double_t *theta) const
 
void setDebug (bool db)
 
bool getDebug () const
 
void setInterpSurfaceAboveGeoid (bool i)
 
bool getInterpSurfaceAboveGeoid () const
 
void setSurfaceCloseEnoughInter (double closeEnough=1.0)
 
double getSurfaceCloseEnoughInter () const
 
void setMaxLoopIterations (Int_t n=50)
 
int getMaxLoopIterations () const
 
double surfaceAboveGeoid (Double_t lon, Double_t lat) const
 
void updateCartesianBalloonInfo ()
 
- Public Member Functions inherited from Adu5Pat
 Adu5Pat (Int_t trun, UInt_t trealTime, GpsAdu5PatStruct_t *gpsStruct)
 
 ClassDef (Adu5Pat, 10)
 

Static Public Member Functions

static Double_t getReflectionAngle (Double_t plAlt, Double_t imageEl, Double_t imageAlt)
 Currently just does direct events... More...
 

Public Attributes

RampdemReaderfRampdemReader
 Toggles the silly group delay correction on and off.
 
AnitaGeomToolfUPGeomTool
 
- Public Attributes inherited from Adu5Pat
Int_t run
 
UInt_t realTime
 Time from the GPS unit.
 
UInt_t readTime
 Time of readout by the CPU.
 
UInt_t payloadTime
 
UInt_t payloadTimeUs
 
UInt_t timeOfDay
 in ms since the start of the day
 
Float_t latitude
 In degrees.
 
Float_t longitude
 In degrees.
 
Float_t altitude
 In metres.
 
Float_t heading
 0 is facing north, 180 is facing south
 
Float_t pitch
 in degrees
 
Float_t roll
 
Float_t mrms
 in degrees More...
 
Float_t brms
 Baseline rms error in metres.
 
UInt_t attFlag
 0 is good attitude, 1 is bad attitude
 
Int_t intFlag
 for raw data = 0, otherwise shows interpolation time
 

Detailed Description

As UsefulAnitaEvent is to RawAnitaEvent, UsefulAdu5Pat is to Adu5Pat. Well not quite as useful but you get the picture.

This is the position and attitude class that inherits from Adu5Pat and has some useful methods for determining the expected plane wave angles and inter-antenna crossing times for a given source.

Definition at line 39 of file UsefulAdu5Pat.h.

Inheritance diagram for UsefulAdu5Pat:
Inheritance graph
[legend]
Collaboration diagram for UsefulAdu5Pat:
Collaboration graph
[legend]

Member Function Documentation

int UsefulAdu5Pat::astronomicalCoordinates ( Double_t  phiWave,
Double_t  thetaWave,
Double_t *  RA = 0,
Double_t *  dec = 0,
Double_t *  l = 0,
Double_t *  b = 0 
) const

Gets the astronomical coordinates corresponding to a wave coming from phiWave, thetaWave The sign convention for thetaWave is the same as elsewhere, where thetaWave is positive going down. Computed RA is in hours, dec, l and b in degrees.

Parameters
phiWaveis the plane wave phi
thetaWaveis the plane wave theta, with the anitaEventCorrelator sign convention
RARight ascention in hours
decdeclination in degrees
l(degrees)
b(degrees)
Returns

Definition at line 1521 of file UsefulAdu5Pat.cxx.

Double_t UsefulAdu5Pat::getAzimuthOfSun ( ) const

Get's the sun's azimuth position in payload phi relative to adu5 aft-fore

Returns
the azimuth position of the sun taking into account ANITA's heading.

Definition at line 1182 of file UsefulAdu5Pat.cxx.

Double_t UsefulAdu5Pat::getAzimuthOfSunRelativeToNorth ( ) const

Calculates the azimuth position of the sun if ANITA was facing directly north, relies on timeOfDay.

Returns
azimuth (Degrees) relative to heading=0.

Uses the timeOfDay variable from inside the Adu5Pat to get the sun's azimuth position relative to north. i.e. returns -1*heading of the sun, as payload phi increases anti-clockwise and heading increases clockwise. The more useful quantity is probably returned by UsefulAdu5Pat::getAzimuthOfSun().

Definition at line 1147 of file UsefulAdu5Pat.cxx.

bool UsefulAdu5Pat::getDebug ( ) const
inline

Is the debug output on?

Returns
the value of fDebug

Definition at line 400 of file UsefulAdu5Pat.h.

Double_t UsefulAdu5Pat::getDeltaTExpected ( Int_t  ant1,
Int_t  ant2,
Double_t  sourceLon,
Double_t  sourceLat,
Double_t  sourceAlt 
)

For a given source latitude, longitude and altitude calculates the plane wave crossing time difference between two antennas.

Parameters
ant1The first antenna.
ant2The second antenna.
sourceLonThe longitude of the source.
sourceLatThe latitude of the source.
sourceAltThe altitude of the source.
Returns
The plane wave crossing time difference between the two antennas (t_1-t_2).

Definition at line 865 of file UsefulAdu5Pat.cxx.

Double_t UsefulAdu5Pat::getDeltaTExpected ( Int_t  ant1,
Int_t  ant2,
Double_t  phiWave,
Double_t  thetaWave 
)

Calculates the plane wave crossing time difference between two antennas for a given wave phi and theta - useful for testing prior to flight when heading etc not known/needed

Parameters
ant1The first antenna.
ant2The second antenna.
Returns
The plane wave crossing time difference between the two antennas (t_1-t_2).

Definition at line 902 of file UsefulAdu5Pat.cxx.

Double_t UsefulAdu5Pat::getDeltaTExpected ( Int_t  ant1,
Int_t  ant2,
Double_t  cosPhi,
Double_t  sinPhi,
Double_t  cosTheta,
Double_t  sinTheta 
)

Calculates the plane wave crossing time difference between two antennas for a given wave cos and sin of phi and theta useful for testing prior to flight when heading etc not known/needed, quicker than the above method if calculating deltaT for many phi and theta values

  • no need to get cos and sin each time
Parameters
ant1The first antenna.
ant2The second antenna.
Returns
The plane wave crossing time difference between the two antennas (t_1-t_2).

Definition at line 928 of file UsefulAdu5Pat.cxx.

Double_t UsefulAdu5Pat::getDeltaTTaylor ( Int_t  ant1,
Int_t  ant2 
)

Calculates the plane wave crossing time difference between two antennas for the Taylor Dome borehole.

Parameters
ant1The first antenna.
ant2The second antenna.
Returns
The plane wave crossing time difference between the two antennas (t_1-t_2).

Definition at line 960 of file UsefulAdu5Pat.cxx.

Double_t UsefulAdu5Pat::getDeltaTWillyBorehole ( Int_t  ant1,
Int_t  ant2 
)

Calculates the plane wave crossing time difference between two antennas for the Williams Field borehole.

Parameters
ant1The first antenna.
ant2The second antenna.
Returns
The plane wave crossing time difference between the two antennas (t_1-t_2).

Definition at line 952 of file UsefulAdu5Pat.cxx.

Double_t UsefulAdu5Pat::getDeltaTWillySeavey ( Int_t  ant1,
Int_t  ant2 
)

Calculates the plane wave crossing time difference between two antennas for the Williams Field seavey.

Parameters
ant1The first antenna.
ant2The second antenna.
Returns
The plane wave crossing time difference between the two antennas (t_1-t_2).

Definition at line 944 of file UsefulAdu5Pat.cxx.

Double_t UsefulAdu5Pat::getDifferencePointingToSun ( Double_t  phiAngle,
Bool_t  inputInDegrees = true 
) const

Quick way of getting difference between any azimuth phi and the sun's azimuth phi.

Parameters
phiAngleis the input azimuth in either degrees or radians
inputInDegreesis a boolian, which should be true is the phiAngle is in degrees or false if the phiAngle is in radians.
Returns
the difference between the two angles in Degrees (regardless of whether the input is in radians or degrees).

Definition at line 1205 of file UsefulAdu5Pat.cxx.

bool UsefulAdu5Pat::getInterpSurfaceAboveGeoid ( ) const
inline

Is the flag set to use to bilinear interpolated version of RampdemReader::SurfaceAboveGeoid?

Returns
the value of fInterpSurfaceAboveGeoid

Definition at line 411 of file UsefulAdu5Pat.h.

int UsefulAdu5Pat::getMaxLoopIterations ( ) const
inline

Get how many loop iterations to allow before giving up in getSourceLonAndLatAtAlt

Returns
the current value of fMaxLoopIterations

Definition at line 438 of file UsefulAdu5Pat.h.

Double_t UsefulAdu5Pat::getPhiWave ( ) const
inline

Payload centric with phi equals zero lying along the direction of the ADU5 fore antenna

Returns
Returns the last calculated azimuthal angle in radians.

Definition at line 291 of file UsefulAdu5Pat.h.

Double_t UsefulAdu5Pat::getReflectionAngle ( Double_t  plAlt,
Double_t  imageEl,
Double_t  imageAlt 
)
static

Currently just does direct events...

Returns a source elevation angle, assuming the image is a specular reflection of a source at infinity no refraction is considered added by S. Stafford 02/01/2017

Parameters
plAltpayload altitude
imageElelevation of the image in payload coords
imageAltaltitude at the reconstruction on continent
Returns
Source elevation angle assuming specular reflection

Definition at line 1497 of file UsefulAdu5Pat.cxx.

Double_t UsefulAdu5Pat::getReflectionAngle ( Double_t  imageEl,
Double_t  imageAlt 
) const

Returns a source elevation angle, assuming the image is a specular reflection of a source at infinity no refraction is considered added by S. Stafford 02/01/2017

Parameters
imageElelevation of the image in payload coords
imageAltaltitude at the reconstruction on continent
Returns
Source elevation angle assuming specular reflection

Definition at line 1516 of file UsefulAdu5Pat.cxx.

Double_t UsefulAdu5Pat::getSourceAltitude ( ) const
inline

Get the last calculated source altitude.

Returns
the last calculated source altitude

Definition at line 322 of file UsefulAdu5Pat.h.

Double_t UsefulAdu5Pat::getSourceLatitude ( ) const
inline

Get the last calculated source latitude

Returns
the last calculated source latitude

Definition at line 314 of file UsefulAdu5Pat.h.

int UsefulAdu5Pat::getSourceLonAndLatAtAlt ( Double_t  phiWave,
Double_t  thetaWave,
Double_t &  sourceLon,
Double_t &  sourceLat,
Double_t &  sourceAltitude 
)

For a given azimuthal and elevation angle of a plane wave (in payload coordinates) calculates the point on the Earth's surface that the source would come from Accounts for the ice surface.

Parameters
phiWaveAzimuthal angle of plane wave (in payload centric coordinates)
thetaWaveElevation angle of plane wave (in payload centric coordinates)
sourceLonReference to a Double_t in which the longitude of the source will be stored.
sourceLatReference to a Double_t in which the latitude of the source will be stored.
desiredAltCall specified altitude of the payload (if not specified, set to 0.0 so that this function would behave the same as getSourceLonAndLatAltZero() function)
Returns
1 or 2 successful source localisation, -1, 0, or 4 for various failures, all of which set sourceLon/Lat/Alt to -9999 (see comments in source code for explanation)

Definition at line 256 of file UsefulAdu5Pat.cxx.

int UsefulAdu5Pat::getSourceLonAndLatAtAlt2 ( Double_t  phiWave,
Double_t  thetaWave,
Double_t &  sourceLon,
Double_t &  sourceLat,
Double_t &  sourceAltitude,
Int_t  maxLoopIter = -1,
TVector3 *  sourcePosOptional = NULL 
) const

Const version of getSourceLonAndLatAtAlt, all params and return values are the same.

Okay so effectively what we do here is switch to cartesian coords with the balloon at RE_balloon + altitude and then try to find where the line at thetaWave cuts the Earth's surface. This is iterative because the Earth is cruel and isn't flat, and I couldn't be bothered to work out how to do it more elegantly.

Definition at line 267 of file UsefulAdu5Pat.cxx.

int UsefulAdu5Pat::getSourceLonAndLatAtDesiredAlt ( Double_t  phiWave,
Double_t  thetaWave,
Double_t &  sourceLon,
Double_t &  sourceLat,
Double_t  desiredAlt = 0.0 
)

Destructor.

For a given azimuthal and elevation angle of a plane wave (in payload coordinates) calculates the point on the Earth's surface that the source would come from.

Parameters
phiWaveAzimuthal angle of plane wave (in payload centric coordinates)
thetaWaveElevation angle of plane wave (in payload centric coordinates)
sourceLonReference to a Double_t in which the longitude of the source will be stored.
sourceLatReference to a Double_t in which the latitude of the source will be stored.
desiredAltCall specified altitude of the payload (if not specified, set to 0.0 so that this function would behave the same as getSourceLonAndLatAltZero() function)
Returns
1 on successful source localisation, 0 if the solution does not point to the ground.

Definition at line 189 of file UsefulAdu5Pat.cxx.

Double_t UsefulAdu5Pat::getSourceLongitude ( ) const
inline

Get the last calculated source longitude

Returns
the last calculated longitude

Definition at line 307 of file UsefulAdu5Pat.h.

void UsefulAdu5Pat::getSunPosition ( Double_t &  phiDeg,
Double_t &  thetaDeg 
) const

Uses realTime, latitude, longitude to calculate the sun's position.

Parameters
phiDegwill contain the phi position in ANITA's coordinates after the function call
thetaDegwill contain the theta position in ANITA's coordinates after the function call

The meat of this function was taken from here http://www.psa.es/sdg/sunpos.htm

Definition at line 1244 of file UsefulAdu5Pat.cxx.

double UsefulAdu5Pat::getSurfaceCloseEnoughInter ( ) const
inline

What is the currently set value for which getSourceAtLonAndLatAtAlt accepts agreement between source height and surfaceAboveGeoid?

Returns
the current value of fSurfaceCloseEnoughIter

Definition at line 424 of file UsefulAdu5Pat.h.

void UsefulAdu5Pat::getThetaAndPhiWave ( Double_t  sourceLon,
Double_t  sourceLat,
Double_t  sourceAlt,
Double_t &  thetaWave,
Double_t &  phiWave 
)

For a given source latitude, longitude and altitude calculates the payload centric azimuthal and elevation angles of the plane wave incident at the payload.

Parameters
sourceLonThe longitude of the source.
sourceLatThe latitude of the source.
sourceAltThe altitude of the source.
phiWaveReference to a Double_t in which to store the azimuthal angle of plane wave (in payload centric coordinates with phi equals zero lying in the direction the ADU5 fore antenna)
thetaWaveReference to a Double_t in which to store the elevation angle of plane wave (in payload centric coordinates with phi equals zero lying in the direction the ADU5 fore antenna)

Definition at line 752 of file UsefulAdu5Pat.cxx.

void UsefulAdu5Pat::getThetaAndPhiWave2 ( Double_t  sourceLon,
Double_t  sourceLat,
Double_t  sourceAlt,
Double_t &  thetaWave,
Double_t &  phiWave,
TVector3 *  sourcePos = NULL 
) const

const/thread-safe version of getThetaAndPhiWave, unlike that function the fSourcePos vector is not updated

Parameters
sourceLonThe longitude of the source.
sourceLatThe latitude of the source.
sourceAltThe altitude of the source.
phiWaveReference to a Double_t in which to store the azimuthal angle of plane wave (in payload centric coordinates with phi equals zero lying in the direction the ADU5 fore antenna)
thetaWaveReference to a Double_t in which to store the elevation angle of plane wave (in payload centric coordinates with phi equals zero lying in the direction the ADU5 fore antenna)
sourcePosoptional pointer to vector to store source position in

Definition at line 758 of file UsefulAdu5Pat.cxx.

void UsefulAdu5Pat::getThetaAndPhiWaveCart ( TVector3 *  sourcePos,
Double_t &  thetaWave,
Double_t &  phiWave 
) const

Cartesian version of above. Note that sourcePos will be modified so that it is rotated to balloon coords, so pass a copy if you don't want to change it

Definition at line 770 of file UsefulAdu5Pat.cxx.

void UsefulAdu5Pat::getThetaAndPhiWaveLDB ( Double_t &  thetaWave,
Double_t &  phiWave 
)

Returns the expected theta and phi expected from LDB camp

Parameters
phiWaveReference to a Double_t in which to store the azimuthal angle of plane wave (in payload centric coordinates with phi equals zero lying in the direction of the ADU5 fore antenna)
thetaWaveReference to a Double_t in which to store the elevation angle of plane wave, in the convention of this function +ve theta is upwards.

Definition at line 745 of file UsefulAdu5Pat.cxx.

void UsefulAdu5Pat::getThetaAndPhiWaveOfRayAtInfinity ( const TVector3 &  p0,
const TVector3 &  v0,
Double_t &  thetaWave,
Double_t &  phiWave,
Bool_t  plus_infinity = true,
Double_t  eps = 0.00001 * TMath::DegToRad(),
Double_t  step = 10e7,
TVector3 *  testPosition = 0 
) const

Find the direction in payload coordinates of a cartesian ray p0 - v0 t as t-> infinity or -infinity This does it the dumbest possible way, there's probably a smart way to do it.

Definition at line 1765 of file UsefulAdu5Pat.cxx.

void UsefulAdu5Pat::getThetaAndPhiWaveTaylorDome ( Double_t &  thetaWave,
Double_t &  phiWave 
)

For a the Taylor Dome seavey antenna calculates the payload centric azimuthal and elevation angles of the plane wave incident at the payload.

Parameters
phiWaveReference to a Double_t in which to store the azimuthal angle of plane wave (in payload centric coordinates with phi equals zero lying in the direction the ADU5 fore antenna)
thetaWaveReference to a Double_t in which to store the elevation angle of plane wave (in payload centric coordinates with phi equals zero lying in the direction the ADU5 fore antenna)

Definition at line 134 of file UsefulAdu5Pat.cxx.

void UsefulAdu5Pat::getThetaAndPhiWaveWaisDivide ( Double_t &  thetaWave,
Double_t &  phiWave 
)

Returns the expected theta and phi expected from WAIS divide

Parameters
phiWaveReference to a Double_t in which to store the azimuthal angle of plane wave (in payload centric coordinates with phi equals zero lying in the direction of the ADU5 fore antenna)
thetaWaveReference to a Double_t in which to store the elevation angle of plane wave, in the convention of this function +ve theta is upwards.

Definition at line 740 of file UsefulAdu5Pat.cxx.

void UsefulAdu5Pat::getThetaAndPhiWaveWillySeavey ( Double_t &  thetaWave,
Double_t &  phiWave 
)

For a the Williams Field seavey antenna calculates the payload centric azimuthal and elevation angles of the plane wave incident at the payload.

Parameters
phiWaveReference to a Double_t in which to store the azimuthal angle of plane wave (in payload centric coordinates with phi equals zero lying in the direction the ADU5 fore antenna)
thetaWaveReference to a Double_t in which to store the elevation angle of plane wave (in payload centric coordinates with phi equals zero lying in the direction the ADU5 fore antenna)

Definition at line 117 of file UsefulAdu5Pat.cxx.

Double_t UsefulAdu5Pat::getThetaWave ( ) const
inline

Get last calculated elevation angle

Returns
the (payload centric) elevation angle last calculated.

Definition at line 299 of file UsefulAdu5Pat.h.

void UsefulAdu5Pat::getThetaWaveAtBase ( Double_t  baseLon,
Double_t  baseLat,
Double_t  baseAlt,
Double_t &  thetaWave 
)

For a given base, calculates the theta angle from the base to the balloon - use as a horizon check

Parameters
thetaWaveReference to a Double_t in which to store the elevation angle of plane wave from base to balloon

Definition at line 842 of file UsefulAdu5Pat.cxx.

TVector3 UsefulAdu5Pat::getUnitVectorAlongThetaWavePhiWave ( double  thetaWave,
double  phiWave 
) const

Get a unit length TVector that points along thetaWave and phiWave

Parameters
phiWaveis the azimuth direction (radians) in payload coordinates
thetaWaveis the elevation angle (radians) theta=0 lies along the horizonal with -ve theta being up (the UsefulAdu5Pat convention)
Returns
TVector3 containing a unit vector pointing to thetaWave/phiWave away from ANITA

Definition at line 635 of file UsefulAdu5Pat.cxx.

void UsefulAdu5Pat::setDebug ( bool  db)
inline

Sets whether to print the debug messages

Parameters
dbtrue or false

Definition at line 394 of file UsefulAdu5Pat.h.

void UsefulAdu5Pat::setInterpSurfaceAboveGeoid ( bool  i)
inline

Set whether or not to use to interpolated version of RampdemReader::SurfaceAboveGeoid?

Parameters
itrue means use the bilinear interpolated version, false means use the plain old version

Definition at line 406 of file UsefulAdu5Pat.h.

void UsefulAdu5Pat::setMaxLoopIterations ( Int_t  n = 50)
inline

Set how many loop iterations to allow before giving up in getSourceLonAndLatAtAlt

Parameters
nthe number of loops to allow (default is 50, which should be enough in most instances)

Definition at line 432 of file UsefulAdu5Pat.h.

void UsefulAdu5Pat::setSurfaceCloseEnoughInter ( double  closeEnough = 1.0)
inline

Sets the epsilon parameter at which the getSourceAtLonAndLatAtAlt thinks it's found a valid solution

Parameters
closeEnoughepsilon distance in metres (default is 1.0)

Definition at line 418 of file UsefulAdu5Pat.h.

double UsefulAdu5Pat::surfaceAboveGeoid ( Double_t  lon,
Double_t  lat 
) const
inline

Get surface above geoid, depending on whether interpolation is requested.

Returns
surface elevation of the ice, above the geoid

Definition at line 445 of file UsefulAdu5Pat.h.

int UsefulAdu5Pat::traceBackToContinent ( Double_t  phiWave,
Double_t  thetaWave,
Double_t *  lon,
Double_t *  lat,
Double_t *  alt,
Double_t *  theta_adjustment_required,
Double_t  max_theta_adjustment = TMath::Pi()/180,
Int_t  max_iter = 10 
) const

Trace back to continent, based a bit on Abby's code. phiWave and thetaWave are in payload coordinates, and I believe should be in radians (they're just passed to getSourceLonAndLatAtDesiredAlt)

This works by iterating altitude down until it hits the ground. If it never hits the ground, we try adjusting theta slightly, up to max_theta_adjustment, until it does.

Returns 0 if never hits the ground, even with maximum adjustment

Returns 1 if hits the ground with no adjustment

Returns 2 if it hits the ground with adjustment

If the pointers are passed, they are filled if we return 1 or 2, but not if we return 0.

A binary search with up to max_iter iterations is used to search for the smallest theta that hits the ground

Definition at line 1380 of file UsefulAdu5Pat.cxx.

int UsefulAdu5Pat::traceBackToContinent3 ( Double_t  phiWave,
Double_t  thetaWave,
Double_t *  lon,
Double_t *  lat,
Double_t *  alt,
Double_t *  theta_adjustment_required 
) const

New version of traceBackToContinent with same arguments as Cosmin's version. However this one uses the new and lovely getSourceLonAndLatAtAlt3.

Parameters
phiWavepayload phi in radians (relative to adu5 aft-fore)
thetaWaveradians, +ve theta is up, the silly EventCorrelator convention
lonpointer to the calculated longitude
latpointer to the calculated latitude
altpointer to the calculated altitud
theta_adjustment_requiredif non-null, will encode difference in theta required for intersection with the continent at the returned lon/lat/alt
Returns
same as getSourceLonAndLatAtAlt3

Definition at line 452 of file UsefulAdu5Pat.cxx.

void UsefulAdu5Pat::updateCartesianBalloonInfo ( )

Call this function if you update the payload lon/lat/alt after construction. This function checks whether public longitude/latitude/altitude has changed since the fBalloon cartesian stuff was calculated. Updates it if it has.

Definition at line 92 of file UsefulAdu5Pat.cxx.


The documentation for this class was generated from the following files: