[installation] Change to nightly
This commit is contained in:
@ -1,109 +0,0 @@
|
||||
/***************************************************************************
|
||||
* Copyright (C) gempa GmbH *
|
||||
* All rights reserved. *
|
||||
* Contact: gempa GmbH (seiscomp-dev@gempa.de) *
|
||||
* *
|
||||
* GNU Affero General Public License Usage *
|
||||
* This file may be used under the terms of the GNU Affero *
|
||||
* Public License version 3.0 as published by the Free Software Foundation *
|
||||
* and appearing in the file LICENSE included in the packaging of this *
|
||||
* file. Please review the following information to ensure the GNU Affero *
|
||||
* Public License version 3.0 requirements will be met: *
|
||||
* https://www.gnu.org/licenses/agpl-3.0.html. *
|
||||
* *
|
||||
* Other Usage *
|
||||
* Alternatively, this file may be used in accordance with the terms and *
|
||||
* conditions contained in a signed written agreement between you and *
|
||||
* gempa GmbH. *
|
||||
***************************************************************************/
|
||||
|
||||
|
||||
#ifndef SEISCOMP_SEISMOLOGY_FIXED_HYPOCENTER_H
|
||||
#define SEISCOMP_SEISMOLOGY_FIXED_HYPOCENTER_H
|
||||
|
||||
|
||||
#include <seiscomp/core/exceptions.h>
|
||||
#include <seiscomp/datamodel/origin.h>
|
||||
#include <seiscomp/datamodel/arrival.h>
|
||||
#include <seiscomp/datamodel/pick.h>
|
||||
#include <seiscomp/datamodel/station.h>
|
||||
#include <seiscomp/seismology/locatorinterface.h>
|
||||
#include <seiscomp/seismology/ttt.h>
|
||||
#include <seiscomp/core.h>
|
||||
|
||||
#include <cstdint>
|
||||
#include <vector>
|
||||
|
||||
|
||||
namespace Seiscomp{
|
||||
namespace Seismology {
|
||||
|
||||
|
||||
class SC_SYSTEM_CORE_API FixedHypocenter : public LocatorInterface {
|
||||
// ----------------------------------------------------------------------
|
||||
// X'truction
|
||||
// ----------------------------------------------------------------------
|
||||
public:
|
||||
FixedHypocenter() = default;
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
// Locator interface
|
||||
// ----------------------------------------------------------------------
|
||||
public:
|
||||
virtual bool init(const Config::Config &config) override;
|
||||
|
||||
//! Returns supported parameters to be changed.
|
||||
virtual IDList parameters() const override;
|
||||
|
||||
//! Returns the value of a parameter.
|
||||
virtual std::string parameter(const std::string &name) const override;
|
||||
|
||||
//! Sets the value of a parameter.
|
||||
virtual bool setParameter(const std::string &name,
|
||||
const std::string &value) override;
|
||||
|
||||
virtual IDList profiles() const override;
|
||||
virtual void setProfile(const std::string &name) override;
|
||||
|
||||
virtual int capabilities() const override;
|
||||
|
||||
virtual DataModel::Origin *locate(PickList& pickList) override;
|
||||
virtual DataModel::Origin *locate(PickList& pickList,
|
||||
double initLat, double initLon, double initDepth,
|
||||
const Seiscomp::Core::Time& initTime) override;
|
||||
|
||||
virtual DataModel::Origin *relocate(const DataModel::Origin* origin) override;
|
||||
|
||||
|
||||
private:
|
||||
enum Flag {
|
||||
UsePickUncertainties = 0x01,
|
||||
UseOriginUncertainties = 0x02
|
||||
};
|
||||
|
||||
// Configuration
|
||||
IDList _profiles;
|
||||
int _degreesOfFreedom{8};
|
||||
double _confidenceLevel{0.9};
|
||||
double _defaultTimeError{1.0};
|
||||
union {
|
||||
uint8_t _flags{UseOriginUncertainties};
|
||||
bool _legacyAndUnusedFlag;
|
||||
};
|
||||
bool _verbose{false};
|
||||
std::string _lastError;
|
||||
OPT(double) _initLat;
|
||||
OPT(double) _initLon;
|
||||
OPT(double) _initDepth;
|
||||
|
||||
// Runtime
|
||||
TravelTimeTableInterfacePtr _ttt;
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
@ -1,158 +0,0 @@
|
||||
/***************************************************************************
|
||||
* Copyright (C) gempa GmbH *
|
||||
* All rights reserved. *
|
||||
* Contact: gempa GmbH (seiscomp-dev@gempa.de) *
|
||||
* *
|
||||
* GNU Affero General Public License Usage *
|
||||
* This file may be used under the terms of the GNU Affero *
|
||||
* Public License version 3.0 as published by the Free Software Foundation *
|
||||
* and appearing in the file LICENSE included in the packaging of this *
|
||||
* file. Please review the following information to ensure the GNU Affero *
|
||||
* Public License version 3.0 requirements will be met: *
|
||||
* https://www.gnu.org/licenses/agpl-3.0.html. *
|
||||
* *
|
||||
* Other Usage *
|
||||
* Alternatively, this file may be used in accordance with the terms and *
|
||||
* conditions contained in a signed written agreement between you and *
|
||||
* gempa GmbH. *
|
||||
***************************************************************************/
|
||||
|
||||
|
||||
#ifndef SEISCOMP_SEISMOLOGY_LOCSAT_H
|
||||
#define SEISCOMP_SEISMOLOGY_LOCSAT_H
|
||||
|
||||
|
||||
#include <seiscomp/core/exceptions.h>
|
||||
#include <seiscomp/datamodel/origin.h>
|
||||
#include <seiscomp/datamodel/arrival.h>
|
||||
#include <seiscomp/datamodel/pick.h>
|
||||
#include <seiscomp/datamodel/station.h>
|
||||
#include <seiscomp/seismology/locatorinterface.h>
|
||||
#include <seiscomp/core.h>
|
||||
|
||||
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
#include <stdio.h>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
|
||||
|
||||
namespace Seiscomp{
|
||||
|
||||
|
||||
namespace Internal {
|
||||
|
||||
struct Locator_params;
|
||||
class LocSAT;
|
||||
class Loc;
|
||||
|
||||
}
|
||||
|
||||
|
||||
struct SC_SYSTEM_CORE_API LocSATErrorEllipsoid {
|
||||
LocSATErrorEllipsoid() {
|
||||
sxx=syy=szz=stt=sxy=sxz=syz=stx=sty=stz=sdobs=smajax=sminax=strike=sdepth=stime=conf=0.;
|
||||
}
|
||||
|
||||
float sxx;
|
||||
float syy;
|
||||
float szz;
|
||||
float stt;
|
||||
float sxy;
|
||||
float sxz;
|
||||
float syz;
|
||||
float stx;
|
||||
float sty;
|
||||
float stz;
|
||||
float sdobs;
|
||||
float smajax;
|
||||
float sminax;
|
||||
float strike;
|
||||
float sdepth;
|
||||
float stime;
|
||||
float conf;
|
||||
};
|
||||
|
||||
|
||||
class SC_SYSTEM_CORE_API LocSAT : public Seismology::LocatorInterface {
|
||||
public:
|
||||
LocSAT();
|
||||
virtual ~LocSAT();
|
||||
|
||||
virtual bool init(const Config::Config &config);
|
||||
|
||||
//! Returns supported parameters to be changed.
|
||||
virtual IDList parameters() const;
|
||||
|
||||
//! Returns the value of a parameter.
|
||||
virtual std::string parameter(const std::string &name) const;
|
||||
|
||||
//! Sets the value of a parameter.
|
||||
virtual bool setParameter(const std::string &name,
|
||||
const std::string &value);
|
||||
|
||||
virtual IDList profiles() const;
|
||||
virtual void setProfile(const std::string &name);
|
||||
|
||||
static void setDefaultProfile(const std::string &name);
|
||||
static std::string currentDefaultProfile();
|
||||
|
||||
void setNewOriginID(const std::string& newOriginID);
|
||||
|
||||
int capabilities() const;
|
||||
|
||||
DataModel::Origin* locate(PickList& pickList);
|
||||
DataModel::Origin* locate(PickList& pickList,
|
||||
double initLat, double initLon, double initDepth,
|
||||
const Seiscomp::Core::Time& initTime);
|
||||
|
||||
DataModel::Origin* relocate(const DataModel::Origin* origin);
|
||||
|
||||
const LocSATErrorEllipsoid &errorEllipsoid() const {
|
||||
return _errorEllipsoid;
|
||||
}
|
||||
|
||||
private:
|
||||
void setLocatorParams(int param, const char* value);
|
||||
std::string getLocatorParams(int param) const;
|
||||
void setDefaultLocatorParams();
|
||||
|
||||
bool loadArrivals(const DataModel::Origin* origin);
|
||||
DataModel::Origin *fromPicks(PickList& pickList);
|
||||
DataModel::Origin *loc2Origin(Internal::Loc* loc);
|
||||
|
||||
double stationCorrection(const std::string &staid, const std::string &stacode,
|
||||
const std::string &phase) const;
|
||||
|
||||
|
||||
private:
|
||||
typedef std::map<std::string, double> PhaseCorrectionMap;
|
||||
typedef std::map<std::string, PhaseCorrectionMap> StationCorrectionMap;
|
||||
|
||||
static std::string _defaultTablePrefix;
|
||||
static IDList _allowedParameters;
|
||||
|
||||
StationCorrectionMap _stationCorrection;
|
||||
std::string _newOriginID;
|
||||
std::string _tablePrefix;
|
||||
bool _computeConfidenceEllipsoid;
|
||||
Internal::LocSAT *_locateEvent;
|
||||
Internal::Locator_params *_locator_params;
|
||||
double _minArrivalWeight{0.5};
|
||||
double _defaultPickUncertainty;
|
||||
bool _usePickUncertainties{false};
|
||||
bool _usePickBackazimuth{true};
|
||||
bool _usePickSlowness{true};
|
||||
|
||||
bool _enableDebugOutput;
|
||||
|
||||
IDList _profiles;
|
||||
|
||||
LocSATErrorEllipsoid _errorEllipsoid;
|
||||
};
|
||||
|
||||
|
||||
}// of namespace Seiscomp
|
||||
|
||||
#endif
|
||||
@ -48,8 +48,8 @@
|
||||
weight but flags to enable/disable the time, backazimuth and/or slowness
|
||||
*/
|
||||
|
||||
namespace Seiscomp{
|
||||
namespace Seismology{
|
||||
namespace Seiscomp {
|
||||
namespace Seismology {
|
||||
|
||||
|
||||
class PickNotFoundException;
|
||||
@ -70,6 +70,60 @@ class SC_SYSTEM_CORE_API SensorLocationDelegate : public Core::BaseObject {
|
||||
|
||||
DEFINE_SMARTPOINTER(LocatorInterface);
|
||||
|
||||
|
||||
/**
|
||||
* @brief The LocatorInterface class defines an abstract interface to
|
||||
* various locators such as LOCSAT, Hypo71 or NonLinLoc.
|
||||
*
|
||||
* An instance of an implementation of this class must be reentrant, meaning
|
||||
* that two instances are not interfering with each other when either used
|
||||
* from within different threads or interleaved. The requirement is illustrated
|
||||
* in the following code:
|
||||
*
|
||||
* @code
|
||||
* // Run two instances in one thread
|
||||
* Locator l1, l2;
|
||||
* l1.init(cfg);
|
||||
* l2.init(cfg);
|
||||
* l1.setProfile("profile1");
|
||||
* l2.setProfile("profile2");
|
||||
* org1 = l1.locate(org1);
|
||||
* org2 = l2.locate(org2);
|
||||
@ @endcode
|
||||
*
|
||||
* This code must produce the exactly same output as
|
||||
*
|
||||
* @code
|
||||
* Locator l1, l2;
|
||||
* l1.init(cfg);
|
||||
* l1.setProfile("profile1");
|
||||
* org1 = l1.locate(org1);
|
||||
*
|
||||
* l2.init(cfg);
|
||||
* l2.setProfile("profile2");
|
||||
* org2 = l2.locate(org2);
|
||||
* @endcode
|
||||
*
|
||||
* Involving threads looks like this
|
||||
*
|
||||
* @code
|
||||
* void locate() {
|
||||
* Locator l;
|
||||
* l.init(cfg);
|
||||
* l.setProfile("someProfile");
|
||||
* org = l.locate(org);
|
||||
* }
|
||||
*
|
||||
* thread1 = thread(locate);
|
||||
* thread2 = thread(locate);
|
||||
* thread1.join();
|
||||
* thread2.join();
|
||||
* @endcode
|
||||
*
|
||||
* Note that this does not require the code to be thread-safe. Calling
|
||||
* locate() on the same instance from within two different threads is not
|
||||
* required to work.
|
||||
*/
|
||||
class SC_SYSTEM_CORE_API LocatorInterface : public Core::BaseObject {
|
||||
public:
|
||||
MAKEENUM(
|
||||
|
||||
@ -24,6 +24,7 @@
|
||||
|
||||
#include <seiscomp/core.h>
|
||||
#include <seiscomp/geo/feature.h>
|
||||
#include <seiscomp/geo/featureset.h>
|
||||
#include <vector>
|
||||
|
||||
|
||||
@ -35,7 +36,7 @@ class SC_SYSTEM_CORE_API PolyRegions {
|
||||
public:
|
||||
PolyRegions() = default;
|
||||
PolyRegions(const std::string &location);
|
||||
~PolyRegions();
|
||||
~PolyRegions() = default;
|
||||
|
||||
public:
|
||||
void print();
|
||||
@ -53,10 +54,7 @@ class SC_SYSTEM_CORE_API PolyRegions {
|
||||
const std::string& dataDir() const { return _dataDir; }
|
||||
|
||||
private:
|
||||
bool readFepBoundaries(const std::string& filename);
|
||||
|
||||
private:
|
||||
std::vector<GeoFeature*> _regions;
|
||||
GeoFeatureSet _regions;
|
||||
std::string _dataDir;
|
||||
};
|
||||
|
||||
|
||||
@ -85,10 +85,10 @@ class SC_SYSTEM_CORE_API TravelTime {
|
||||
*/
|
||||
class SC_SYSTEM_CORE_API TravelTimeList : public std::list<TravelTime> {
|
||||
public:
|
||||
bool isEmpty() { return size()==0; } // XXX temporary hack
|
||||
|
||||
bool isEmpty() { return empty(); }
|
||||
void sortByTime();
|
||||
|
||||
public:
|
||||
double depth, delta;
|
||||
};
|
||||
|
||||
@ -215,24 +215,24 @@ class SC_SYSTEM_CORE_API TravelTimeTable : public TravelTimeTableInterface {
|
||||
|
||||
|
||||
public:
|
||||
bool setModel(const std::string &model);
|
||||
const std::string &model() const;
|
||||
bool setModel(const std::string &model) override;
|
||||
const std::string &model() const override;
|
||||
|
||||
TravelTimeList *
|
||||
compute(double lat1, double lon1, double dep1,
|
||||
double lat2, double lon2, double elev2 = 0.,
|
||||
int ellc = 1);
|
||||
int ellc = 1) override;
|
||||
|
||||
TravelTime
|
||||
compute(const char *phase,
|
||||
double lat1, double lon1, double dep1,
|
||||
double lat2, double lon2, double elev2 = 0.,
|
||||
int ellc = 1);
|
||||
int ellc = 1) override;
|
||||
|
||||
TravelTime
|
||||
computeFirst(double lat1, double lon1, double dep1,
|
||||
double lat2, double lon2, double elev2 = 0.,
|
||||
int ellc = 1);
|
||||
int ellc = 1) override;
|
||||
|
||||
private:
|
||||
static TravelTimeTableInterfacePtr _interface;
|
||||
@ -242,19 +242,28 @@ class SC_SYSTEM_CORE_API TravelTimeTable : public TravelTimeTableInterface {
|
||||
|
||||
// Some helpers
|
||||
|
||||
/**
|
||||
* @brief Returns the travel time ellipticity correction in seconds.
|
||||
* @param phase The phase code
|
||||
* @param lat1 Source latitude in degrees
|
||||
* @param lon1 Source longitude in degrees
|
||||
* @param depth Source depth in km
|
||||
* @param lat2 Receiver latitude in degrees
|
||||
* @param lon2 Receiver longitude in degrees
|
||||
* @return Correction in seconds
|
||||
*/
|
||||
SC_SYSTEM_CORE_API
|
||||
bool ellipcorr(const std::string &phase,
|
||||
double lat1, double lon1,
|
||||
double lat2, double lon2,
|
||||
double depth, double &corr);
|
||||
double ellipticityCorrection(const std::string &phase,
|
||||
double lat1, double lon1, double depth,
|
||||
double lat2, double lon2);
|
||||
|
||||
// Retrieve traveltime for the specified phase. Returns true if phase was
|
||||
// found, false otherwise.
|
||||
SC_SYSTEM_CORE_API
|
||||
const TravelTime* getPhase(const TravelTimeList *, const std::string &phaseCode);
|
||||
const TravelTime *getPhase(const TravelTimeList *, const std::string &phaseCode);
|
||||
|
||||
SC_SYSTEM_CORE_API
|
||||
const TravelTime* firstArrivalP(const TravelTimeList *);
|
||||
const TravelTime *firstArrivalP(const TravelTimeList *);
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -48,7 +48,7 @@ class SC_SYSTEM_CORE_API LibTau : public TravelTimeTableInterface {
|
||||
* Construct a TravelTimeTable object for the specified model.
|
||||
* Currently only "iasp91" is supported.
|
||||
*/
|
||||
LibTau();
|
||||
LibTau() = default;
|
||||
~LibTau();
|
||||
|
||||
LibTau(const LibTau &other);
|
||||
@ -69,9 +69,6 @@ class SC_SYSTEM_CORE_API LibTau : public TravelTimeTableInterface {
|
||||
|
||||
/**
|
||||
* Compute the traveltime(s) for the branch selected using setBranch()
|
||||
* @param dep1 The source depth in km
|
||||
*
|
||||
* @returns A TravelTimeList of travel times sorted by time.
|
||||
*
|
||||
* It should be noted that in this implementation it is extremely
|
||||
* important to compute as many travel times for the same focal
|
||||
@ -79,29 +76,38 @@ class SC_SYSTEM_CORE_API LibTau : public TravelTimeTableInterface {
|
||||
* the time-consuming re-computation of some internal tables,
|
||||
* which can be avoided by as many consecutive compute() calls as
|
||||
* possible, for the same depth.
|
||||
*
|
||||
* XXX However:
|
||||
* XXX NEITHER ellipticity NOR altitude correction is currently
|
||||
* XXX implemented! The respective parameters are ignored.
|
||||
* @param lat1 The source latitude in degrees
|
||||
* @param lon1 The source longitude in degrees
|
||||
* @param dep1 The source depth in km
|
||||
* @param lat2 The receiver latitude in degrees
|
||||
* @param lon2 The receiver longitude in degrees
|
||||
* @param elev2 The receiver elevation in meter.
|
||||
* Elevation correction is not implemented and this
|
||||
* parameter is ignored.
|
||||
* @param ellc Toggle earth ellipticity correction.
|
||||
* @returns A TravelTimeList of travel times sorted by time.
|
||||
*/
|
||||
TravelTimeList *compute(double lat1, double lon1, double dep1,
|
||||
double lat2, double lon2, double alt2 = 0.,
|
||||
double lat2, double lon2, double elev2 = 0.,
|
||||
int ellc = 1) override;
|
||||
|
||||
|
||||
/**
|
||||
* Compute the traveltime for the branch selected using setBranch()
|
||||
* and the first (fastest) phase.
|
||||
* @param lat1 The source latitude in degrees
|
||||
* @param lon1 The source longitude in degrees
|
||||
* @param dep1 The source depth in km
|
||||
*
|
||||
* @param lat2 The receiver latitude in degrees
|
||||
* @param lon2 The receiver longitude in degrees
|
||||
* @param elev2 The receiver elevation in meter.
|
||||
* Elevation correction is not implemented and this
|
||||
* parameter is ignored.
|
||||
* @param ellc Toggle earth ellipticity correction.
|
||||
* @returns A TravelTime
|
||||
*
|
||||
* XXX However:
|
||||
* XXX NEITHER ellipticity NOR altitude correction is currently
|
||||
* XXX implemented! The respective parameters are ignored.
|
||||
*/
|
||||
TravelTime computeFirst(double lat1, double lon1, double dep1,
|
||||
double lat2, double lon2, double alt2 = 0.,
|
||||
double lat2, double lon2, double elev2 = 0.,
|
||||
int ellc = 1) override;
|
||||
|
||||
|
||||
@ -117,12 +123,11 @@ class SC_SYSTEM_CORE_API LibTau : public TravelTimeTableInterface {
|
||||
|
||||
void initPath(const std::string &model);
|
||||
|
||||
libtau _handle;
|
||||
|
||||
double _depth;
|
||||
std::string _model;
|
||||
|
||||
bool _initialized;
|
||||
libtau _handle;
|
||||
double _depth{-1};
|
||||
std::string _model;
|
||||
bool _initialized{false};
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -1,148 +0,0 @@
|
||||
/***************************************************************************
|
||||
* Copyright (C) gempa GmbH *
|
||||
* All rights reserved. *
|
||||
* Contact: gempa GmbH (seiscomp-dev@gempa.de) *
|
||||
* *
|
||||
* GNU Affero General Public License Usage *
|
||||
* This file may be used under the terms of the GNU Affero *
|
||||
* Public License version 3.0 as published by the Free Software Foundation *
|
||||
* and appearing in the file LICENSE included in the packaging of this *
|
||||
* file. Please review the following information to ensure the GNU Affero *
|
||||
* Public License version 3.0 requirements will be met: *
|
||||
* https://www.gnu.org/licenses/agpl-3.0.html. *
|
||||
* *
|
||||
* Other Usage *
|
||||
* Alternatively, this file may be used in accordance with the terms and *
|
||||
* conditions contained in a signed written agreement between you and *
|
||||
* gempa GmbH. *
|
||||
***************************************************************************/
|
||||
|
||||
|
||||
|
||||
#ifndef SEISCOMP_TTT_LOCSAT_H
|
||||
#define SEISCOMP_TTT_LOCSAT_H
|
||||
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <seiscomp/seismology/ttt.h>
|
||||
|
||||
|
||||
namespace Seiscomp {
|
||||
namespace TTT {
|
||||
|
||||
|
||||
/**
|
||||
* TTTLibTau
|
||||
*
|
||||
* A class to compute seismic travel times for 1D models like "iasp91".
|
||||
*/
|
||||
class SC_SYSTEM_CORE_API Locsat : public TravelTimeTableInterface {
|
||||
public:
|
||||
struct Velocity {
|
||||
Velocity() {}
|
||||
Velocity(float z, float p, float s) : depth(z), vp(p), vs(s) {}
|
||||
float depth;
|
||||
float vp;
|
||||
float vs;
|
||||
};
|
||||
|
||||
public:
|
||||
/**
|
||||
* Construct a TravelTimeTable object for the specified model.
|
||||
* Currently only "iasp91" is supported.
|
||||
*/
|
||||
Locsat();
|
||||
~Locsat();
|
||||
|
||||
Locsat(const Locsat &other);
|
||||
Locsat &operator=(const Locsat &other);
|
||||
|
||||
|
||||
public:
|
||||
bool setModel(const std::string &model) override;
|
||||
const std::string &model() const override;
|
||||
|
||||
|
||||
/**
|
||||
* @brief Compute the traveltime(s) for the model selected using
|
||||
* setModel().
|
||||
*
|
||||
* Note that altitude correction is currently not implemented! The
|
||||
* respective parameters are ignored.
|
||||
* @param dep1 The source depth in km
|
||||
*
|
||||
* @returns A TravelTimeList of travel times sorted by time.
|
||||
*/
|
||||
TravelTimeList *compute(double lat1, double lon1, double dep1,
|
||||
double lat2, double lon2, double alt2 = 0.,
|
||||
int ellc = 1) override;
|
||||
|
||||
/**
|
||||
* Compute the traveltime and a given phase. The default implementation
|
||||
* computes the complete travel time list and searches for them
|
||||
* requested phase.
|
||||
* @param dep1 The source depth in km
|
||||
*
|
||||
* @returns A TravelTime
|
||||
*/
|
||||
TravelTime compute(const char *phase,
|
||||
double lat1, double lon1, double dep1,
|
||||
double lat2, double lon2, double alt2=0.,
|
||||
int ellc = 1) override;
|
||||
|
||||
/**
|
||||
* @brief Compute the traveltime for the model selected using setModel()
|
||||
* and the first (fastest) phase.
|
||||
*
|
||||
* Note that altitude correction is currently not implemented! The
|
||||
* respective parameters are ignored.
|
||||
* @param dep1 The source depth in km
|
||||
* @returns A TravelTime
|
||||
*/
|
||||
TravelTime computeFirst(double lat1, double lon1, double dep1,
|
||||
double lat2, double lon2, double alt2 = 0.,
|
||||
int ellc = 1) override;
|
||||
|
||||
|
||||
/**
|
||||
* Compute the travel time for a given phase. This is intended
|
||||
* to be a faster call than 'compute' since only the travel time
|
||||
* is returned.
|
||||
*
|
||||
* @param lat1 Latitude of source
|
||||
* @param lon1 Longitude of source
|
||||
* @param dep1 The source depth in km
|
||||
* @param lat2 Latitude of receiver
|
||||
* @param lon2 Longitude of receiver
|
||||
* @param elev2 Elevation of receiver in m
|
||||
* @param ellc Apply ellipticity correction (1 = on, 0 = off)
|
||||
* @returns The travel time for the phase
|
||||
*/
|
||||
double computeTime(const char *phase,
|
||||
double lat1, double lon1, double dep1,
|
||||
double lat2, double lon2, double elev2=0.,
|
||||
int ellc = 1) override;
|
||||
|
||||
|
||||
private:
|
||||
TravelTimeList *compute(double delta, double depth);
|
||||
TravelTime compute(const char *phase, double delta, double depth);
|
||||
TravelTime computeFirst(double delta, double depth);
|
||||
double computeTime(const char *phase, double delta, double depth);
|
||||
|
||||
bool initTables();
|
||||
|
||||
|
||||
private:
|
||||
std::string _model;
|
||||
std::string _tablePrefix;
|
||||
int _Pindex;
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user