|
| | WossDbManager () |
| |
| | WossDbManager (const WossDbManager &instance)=default |
| |
| | WossDbManager (WossDbManager &&instance)=default |
| |
| WossDbManager & | operator= (const WossDbManager &instance)=default |
| |
| WossDbManager & | operator= (WossDbManager &&instance)=default |
| |
| virtual | ~WossDbManager ()=default |
| |
| virtual std::unique_ptr< Altimetry > | getAltimetry (const CoordZ &tx, const CoordZ &rx) const |
| |
| virtual std::unique_ptr< Sediment > | getSediment (const CoordZ &tx, const CoordZ &rx) const |
| |
| virtual std::unique_ptr< Sediment > | getSediment (const CoordZ &tx, const CoordZVector &rx_coordz_vector) const |
| |
| virtual Bathymetry | getBathymetry (const Coord &tx, const Coord &rx) const |
| |
| virtual void | getBathymetry (const Coord &tx, CoordZVector &rx_coordz_vector) const |
| |
| virtual std::unique_ptr< SSP > | getSSP (const Coord &tx, const Coord &rx, const Time &time, long double ssp_depth_precision=SSP_CUSTOM_DEPTH_PRECISION) const |
| |
| virtual std::unique_ptr< SSP > | getAverageSSP (const Coord &tx, const Coord &rx, const Time &time_start, const Time &time_end, int max_time_values, long double ssp_depth_precision=SSP_CUSTOM_DEPTH_PRECISION) const |
| |
| virtual std::unique_ptr< TimeArr > | getTimeArr (const CoordZ &coord_tx, const CoordZ &coord_rx, const double frequency, const Time &time_value) const |
| |
| virtual void | insertTimeArr (const CoordZ &coord_tx, const CoordZ &coord_rx, const double frequency, const Time &time_value, const TimeArr &channel) const |
| |
| virtual std::unique_ptr< Pressure > | getPressure (const CoordZ &coord_tx, const CoordZ &coord_rx, const double frequency, const Time &time_value) const |
| |
| virtual void | insertPressure (const CoordZ &coord_tx, const CoordZ &coord_rx, const double frequency, const Time &time_value, const Pressure &pressure) const |
| |
| WossDbManager & | setBathymetryDb (std::unique_ptr< WossBathymetryDb > ptr) |
| |
| WossDbManager & | setSedimentDb (std::unique_ptr< WossSedimentDb > ptr) |
| |
| WossDbManager & | setSSPDb (std::unique_ptr< WossSSPDb > ptr) |
| |
| WossDbManager & | setResTimeArrDb (std::unique_ptr< WossResTimeArrDb > ptr) |
| |
| WossDbManager & | setResPressureDb (std::unique_ptr< WossResPressDb > ptr) |
| |
| bool | setCustomAltimetry (const Altimetry &altimetry, const Coord &tx_coord=CCAltimetry::DB_CDATA_ALL_OUTER_KEYS, double bearing=CCAltimetry::DB_CDATA_ALL_MEDIUM_KEYS, double range=CCAltimetry::DB_CDATA_ALL_INNER_KEYS) |
| |
| std::unique_ptr< Altimetry > | getCustomAltimetry (const Coord &tx_coord=CCAltimetry::DB_CDATA_ALL_OUTER_KEYS, double bearing=CCAltimetry::DB_CDATA_ALL_MEDIUM_KEYS, double range=CCAltimetry::DB_CDATA_ALL_INNER_KEYS) const |
| |
| WossDbManager & | eraseCustomAltimetry (const Coord &tx_coord=CCAltimetry::DB_CDATA_ALL_OUTER_KEYS, double bearing=CCAltimetry::DB_CDATA_ALL_MEDIUM_KEYS, double range=CCAltimetry::DB_CDATA_ALL_INNER_KEYS) |
| |
| bool | setCustomSediment (const Sediment &sediment, const Coord &tx_coord=CCSediment::DB_CDATA_ALL_OUTER_KEYS, double bearing=CCSediment::DB_CDATA_ALL_MEDIUM_KEYS, double range=CCSediment::DB_CDATA_ALL_INNER_KEYS) |
| |
| bool | setCustomSediment (const std::string &sediment_string, const Coord &txCoord=CCSediment::DB_CDATA_ALL_OUTER_KEYS, double bearing=CCSediment::DB_CDATA_ALL_MEDIUM_KEYS, double range=CCSediment::DB_CDATA_ALL_INNER_KEYS) |
| |
| std::unique_ptr< Sediment > | getCustomSediment (const Coord &tx_coord=CCSediment::DB_CDATA_ALL_OUTER_KEYS, double bearing=CCSediment::DB_CDATA_ALL_MEDIUM_KEYS, double range=CCSediment::DB_CDATA_ALL_INNER_KEYS) const |
| |
| WossDbManager & | eraseCustomSediment (const Coord &tx_coord=CCSediment::DB_CDATA_ALL_OUTER_KEYS, double bearing=CCSediment::DB_CDATA_ALL_MEDIUM_KEYS, double range=CCSediment::DB_CDATA_ALL_INNER_KEYS) |
| |
| bool | setCustomSSP (const SSP &ssp, const Coord &tx_coord=CCSSP::DB_CDATA_ALL_OUTER_KEYS, double bearing=CCSSP::DB_CDATA_ALL_MEDIUM_KEYS, double range=CCSSP::DB_CDATA_ALL_INNER_KEYS, const Time &time_value=CCSSP::DB_CDATA_ALL_TIME_KEYS) |
| |
| bool | setCustomSSP (const std::string &sspString, const Coord &txCoord=CCSSP::DB_CDATA_ALL_OUTER_KEYS, double bearing=CCSSP::DB_CDATA_ALL_MEDIUM_KEYS, double range=CCSSP::DB_CDATA_ALL_INNER_KEYS, const Time &time_value=CCSSP::DB_CDATA_ALL_TIME_KEYS) |
| |
| virtual bool | importCustomSSP (const std::string &filename, const Time &=CCSSP::DB_CDATA_ALL_TIME_KEYS, const Coord &tx_coord=CCSSP::DB_CDATA_ALL_OUTER_KEYS, double bearing=CCSSP::DB_CDATA_ALL_MEDIUM_KEYS) |
| |
| std::unique_ptr< SSP > | getCustomSSP (const Coord &tx_coord=CCSSP::DB_CDATA_ALL_OUTER_KEYS, double bearing=CCSSP::DB_CDATA_ALL_MEDIUM_KEYS, double range=CCSSP::DB_CDATA_ALL_INNER_KEYS, const Time &time_value=CCSSP::DB_CDATA_ALL_TIME_KEYS) const |
| |
| WossDbManager & | eraseCustomSSP (const Coord &tx_coord=CCSSP::DB_CDATA_ALL_OUTER_KEYS, double bearing=CCSSP::DB_CDATA_ALL_MEDIUM_KEYS, double range=CCSSP::DB_CDATA_ALL_INNER_KEYS, const Time &time_value=CCSSP::DB_CDATA_ALL_TIME_KEYS) |
| |
| bool | setCustomBathymetry (const Bathymetry &bathymetry, const Coord &tx_coord=CCBathymetry::DB_CDATA_ALL_OUTER_KEYS, double bearing=CCBathymetry::DB_CDATA_ALL_MEDIUM_KEYS, double range=CCBathymetry::DB_CDATA_ALL_INNER_KEYS) |
| |
| bool | setCustomBathymetry (const std::string &bathyLine, const Coord &tx_coord=CCBathymetry::DB_CDATA_ALL_OUTER_KEYS, double bearing=CCBathymetry::DB_CDATA_ALL_MEDIUM_KEYS) |
| |
| virtual bool | importCustomBathymetry (const std::string &filename, const Coord &tx_coord=CCBathymetry::DB_CDATA_ALL_OUTER_KEYS, double bearing=CCBathymetry::DB_CDATA_ALL_MEDIUM_KEYS) |
| |
| Bathymetry | getCustomBathymetry (const Coord &tx_coord=CCBathymetry::DB_CDATA_ALL_OUTER_KEYS, double bearing=CCBathymetry::DB_CDATA_ALL_MEDIUM_KEYS, double range=CCBathymetry::DB_CDATA_ALL_INNER_KEYS) const |
| |
| WossDbManager & | eraseCustomBathymetry (const Coord &tx_coord=CCBathymetry::DB_CDATA_ALL_OUTER_KEYS, double bearing=CCBathymetry::DB_CDATA_ALL_MEDIUM_KEYS, double range=CCBathymetry::DB_CDATA_ALL_INNER_KEYS) |
| |
| WossDbManager & | setDebug (bool flag) |
| |
| bool | getDebug () const |
| |
Abstraction layer for database and data manipulation.
WossDbManager has the exclusive handling of all databases involved. No other object can access directly to a WossDb entity. Thanks to the abstraction provided, WossDbManager can perform arithmetic and other data manipulation. It should be used with woss::Singleton for safety reasons. ( e.g. woss::Singleton<woss::WossDbManager> ) WossDbManager also provides a way to generate environmental data on the fly. Providing a generator coordinate and a set of bearing and ranges, the user can create all sort of polygon where the given environmental data is valid.
- See also
- setCustom* methods, command
| std::unique_ptr< SSP > WossDbManager::getAverageSSP |
( |
const Coord & |
tx, |
|
|
const Coord & |
rx, |
|
|
const Time & |
time_start, |
|
|
const Time & |
time_end, |
|
|
int |
max_time_values, |
|
|
long double |
ssp_depth_precision = SSP_CUSTOM_DEPTH_PRECISION |
|
) |
| const |
|
virtual |
Returns a std::unique_ptr to a heap-created average SSP for given coordinates, start and end time date if they are present in the database. User is responsible of pointer's ownership
- Parameters
-
| coords | const reference to a valid Coord object |
| time_start | const reference to a valid Time object |
| time_end | const reference to a valid Time object |
| max_time_values | total number of Time to take between time_start and time_end |
| ssp_depth_precision | returned SSP's depth precision |
- Returns
- a std::unique_ptr to a valid SSP if coordinates and both time date are found, not valid otherwise
References ccssp_map, woss::CustomDataTimeContainer< T, MidFunctor, InFunctor, Data, OutComp, MidComp, InComp >::empty(), woss::CustomDataTimeContainer< T, MidFunctor, InFunctor, Data, OutComp, MidComp, InComp >::get(), woss::Singleton< T >::instance(), and ssp_db.
Returns the positive depth value ( bathymetry ) of given coordinates, if present in the database
- Parameters
-
| coords | const reference to a valid Coord object |
- Returns
- positive depth value [m] if coordinates are found, HUGE_VAL otherwise
References bathymetry_db, ccbathy_map, debug, woss::CustomDataContainer< T, MidFunctor, InFunctor, Data, OutComp, MidComp, InComp >::empty(), woss::CustomDataContainer< T, MidFunctor, InFunctor, Data, OutComp, MidComp, InComp >::get(), and woss::CustomDataContainer< T, MidFunctor, InFunctor, Data, OutComp, MidComp, InComp >::size().
Referenced by getBathymetry().
| std::unique_ptr< Sediment > WossDbManager::getSediment |
( |
const CoordZ & |
tx, |
|
|
const CoordZ & |
rx |
|
) |
| const |
|
virtual |
Returns a std::unique_ptr to a heap-created Sediment value for given coordinates and depth, if present in the Sediment database. User is responsible of pointer's ownership
- Parameters
-
| coords | const reference to a valid CoordZ object |
- Returns
- std::unique_ptr to a valid Sediment if coordinates are found, not valid otherwise
References ccsediment_map, debug, woss::CustomDataContainer< T, MidFunctor, InFunctor, Data, OutComp, MidComp, InComp >::empty(), woss::CustomDataContainer< T, MidFunctor, InFunctor, Data, OutComp, MidComp, InComp >::get(), woss::Singleton< T >::instance(), sediment_db, and woss::CustomDataContainer< T, MidFunctor, InFunctor, Data, OutComp, MidComp, InComp >::size().
Referenced by getSediment().
| std::unique_ptr< SSP > WossDbManager::getSSP |
( |
const Coord & |
tx, |
|
|
const Coord & |
rx, |
|
|
const Time & |
time, |
|
|
long double |
ssp_depth_precision = SSP_CUSTOM_DEPTH_PRECISION |
|
) |
| const |
|
virtual |
Returns the SSP value of given coordinates and date time if both present in the database. User is responsible of pointer's ownership
- Parameters
-
| coords | const reference to a valid Coord object |
| time | const reference to a valid Time object |
| ssp_depth_precision | ssp depth precision [m] |
- Returns
- a std::unique_ptr to a valid SSP if coordinates are found, not valid otherwise
References ccssp_map, woss::CustomDataTimeContainer< T, MidFunctor, InFunctor, Data, OutComp, MidComp, InComp >::empty(), woss::CustomDataTimeContainer< T, MidFunctor, InFunctor, Data, OutComp, MidComp, InComp >::get(), woss::Singleton< T >::instance(), and ssp_db.
Imports a CustomSSP from file.
File format:
-
first line: type name.
-
second line: latitude for depth and pressure correction purposes
-
third line: longitude for depth and pressure correction purposes
Following format depends on type name:
-
"SSP" : three columns. range [m] | depth [m] | sound speed [m/s]
-
"FULL" : six columns. range [m] | depth [m] | temperature [C°] | salinity [ppu] | pressure [bar] | sound speed [m/s]
-
"TEMPERATURE_SALINITY_PRESSURE" : four columns. range [m] | temperature [C°] | salinity [ppu] | pressure [bar]
-
"DEPTH_TEMPERATURE_SALINITY" : four columns. range [m] | depth [m] | temperature [C°] | salinity [ppu]
- Parameters
-
| filename | const reference to a string |
| time | const reference to a valid Time object |
| tx_coord | const reference to a valid Coord object (originator coordinates) |
| bearing | bearing value [radians] |
- Returns
- true is import was completed succesfully, false otherwise
References ccssp_map, woss::CustomDataTimeContainer< Coord, BearingOperator, RangeOperator, std::shared_ptr< SSP > >::DB_CDATA_ALL_INNER_KEYS, debug, woss::CustomDataTimeContainer< T, MidFunctor, InFunctor, Data, OutComp, MidComp, InComp >::insert(), and woss::Singleton< T >::instance().