Skip to content
This repository has been archived by the owner on May 10, 2023. It is now read-only.

Commit

Permalink
Merge branch 'release/jakarta' into build/jakarta/2020.330
Browse files Browse the repository at this point in the history
  • Loading branch information
gempa-jabe committed Feb 23, 2021
2 parents b76a7de + ac3e4c6 commit c68de76
Show file tree
Hide file tree
Showing 19 changed files with 234 additions and 156 deletions.
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,24 @@
# Jakarta

## Release 2020.330 patch3

* trunk

* Fixed crash of distance computation if distance is close to zero
* Fixed SQLite3 database schema

* slmon

* Fixed import of configparser for Python 2

* scevent

* Fixed crash if magnitude value is unset

* ew2sc3

* Correct location code search algorithm

## Release 2020.330 patch2

* seedlink
Expand Down
10 changes: 5 additions & 5 deletions src/gui-qt4/libs/seiscomp3/gui/map/layers/geofeaturelayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -280,9 +280,9 @@ void GeoFeatureLayer::LayerProperties::read(const string &dataDir) {
string fn = cfg.getString(cfgSymbolIcon);
if ( !fn.empty() ) {
if ( fn[0] == '/' )
symbolIcon = QPixmap(fn.c_str());
symbolIcon = QImage(fn.c_str());
else
symbolIcon = QPixmap((dataDir + '/' + fn).c_str());
symbolIcon = QImage((dataDir + '/' + fn).c_str());
}
}
catch( ... ) {}
Expand Down Expand Up @@ -316,9 +316,9 @@ void GeoFeatureLayer::LayerProperties::read(const string &dataDir) {
string fn = SCApp->configGetString(query + cfgSymbolIcon);
if ( !fn.empty() ) {
if ( fn[0] == '/' )
symbolIcon = QPixmap(fn.c_str());
symbolIcon = QImage(fn.c_str());
else
symbolIcon = QPixmap((dataDir + '/' + fn).c_str());
symbolIcon = QImage((dataDir + '/' + fn).c_str());
}
}
catch( ... ) {}
Expand Down Expand Up @@ -561,7 +561,7 @@ bool GeoFeatureLayer::drawFeature(Canvas *canvas, QPainter *painter,
if ( width < 0 ) width = 8;

if ( !props->symbolIcon.isNull() ) {
painter->drawPixmap(p - props->symbolIconHotspot, props->symbolIcon);
painter->drawImage(p - props->symbolIconHotspot, props->symbolIcon);
p.setY(p.y() - props->symbolIconHotspot.y() + props->symbolIcon.height());
}
else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ class SC_GUI_API GeoFeatureLayer : public Layer,
bool filled;
int symbolSize;
SymbolShape symbolShape;
QPixmap symbolIcon;
QImage symbolIcon;
QPoint symbolIconHotspot;

LayerProperties(const std::string &name)
Expand Down
37 changes: 33 additions & 4 deletions src/ipgp/apps/ew2sc3/ew2sc3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -956,13 +956,13 @@ int EW2SC3::extractOrigin(char* msg) {
for (size_t i = 0; i < inv->networkCount(); ++i) {
NetworkPtr n = inv->network(i);

if ( n->code() != network )
if ( n->code() != strip_space(network) )
continue;

for (size_t j = 0; j < n->stationCount(); ++j) {
StationPtr station = n->station(j);

if ( station->code() != site )
if ( station->code() != strip_space(site) )
continue;

for (size_t l = 0; l < station->sensorLocationCount();
Expand All @@ -979,9 +979,39 @@ int EW2SC3::extractOrigin(char* msg) {
if ( sloc->start() > ot )
continue;

sensor = sloc;
for (size_t c = 0; c < sloc->streamCount();
++c) {
StreamPtr schan = sloc->stream(c);

// channel's is finished (out of date)
try {
if ( schan->end() <= ot )
continue;
} catch ( ... ) {}

// channel's hasn't even begin yet
if ( schan->start() > ot )
continue;

if ( schan->code() != strip_space(component) )
continue;

// channel found, store sensor location code and break channel loop
sensor = sloc;
SEISCOMP_DEBUG("Loccode sensor found : %s.%s.%s", network.c_str(),station->code().c_str(),sensor->code().c_str());
break;
}
// sensor location code found, break sensor loop
if ( sensor )
break;
}
// sensor location code found, break station loop
if ( sensor )
break;
}
// sensor location code found, break network loop
if ( sensor )
break;
}
}
else
Expand Down Expand Up @@ -1369,4 +1399,3 @@ void EW2SC3::strExplode(const string& s, char c, vector<string>& v) {
}
}
// >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

2 changes: 1 addition & 1 deletion src/sed/libs/3rd-party/nll/GridLib.h
Original file line number Diff line number Diff line change
Expand Up @@ -667,7 +667,7 @@ EXTERN_TXT int NumQuality2ErrorLevels;
/* model coordinates */
#define COORDS_RECT 0
#define COORDS_LATLON 1
int ModelCoordsMode;
EXTERN_TXT int ModelCoordsMode;

/* */
/*------------------------------------------------------------/ */
Expand Down
2 changes: 2 additions & 0 deletions src/sed/libs/3rd-party/nll/GridMemLib.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ tel: +33(0)493752502 e-mail: [email protected] web: http://www.alomax.net



#define EXTERN_MODE 1

#include "GridLib.h"
//#include "ran1.h"
#include "GridMemLib.h"
Expand Down
2 changes: 2 additions & 0 deletions src/sed/libs/3rd-party/nll/NLLoc1.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ tel: +33(0)493752502 e-mail: [email protected] web: http://www.alomax.net
#define PNAME "NLLoc"
#endif

#define EXTERN_MODE 1

#include "GridLib.h"
#include "ran1/ran1.h"
#include "velmod.h"
Expand Down
16 changes: 8 additions & 8 deletions src/sed/libs/3rd-party/nll/NLLocLib.h
Original file line number Diff line number Diff line change
Expand Up @@ -266,12 +266,12 @@ EXTERN_TXT int LocGridSave[MAX_NUM_LOCATION_GRIDS]; /* !should be in GridDesc */
//EXTERN_TXT int Num3DGridReadToMemory, MaxNum3DGridMemory;

/* related hypocenter file pointers */
FILE *pSumFileHypNLLoc[MAX_NUM_LOCATION_GRIDS];
FILE *pSumFileHypo71[MAX_NUM_LOCATION_GRIDS];
FILE *pSumFileHypoEll[MAX_NUM_LOCATION_GRIDS];
FILE *pSumFileHypoInv[MAX_NUM_LOCATION_GRIDS];
FILE *pSumFileHypoInvY2K[MAX_NUM_LOCATION_GRIDS];
FILE *pSumFileAlberto4[MAX_NUM_LOCATION_GRIDS];
EXTERN_TXT FILE *pSumFileHypNLLoc[MAX_NUM_LOCATION_GRIDS];
EXTERN_TXT FILE *pSumFileHypo71[MAX_NUM_LOCATION_GRIDS];
EXTERN_TXT FILE *pSumFileHypoEll[MAX_NUM_LOCATION_GRIDS];
EXTERN_TXT FILE *pSumFileHypoInv[MAX_NUM_LOCATION_GRIDS];
EXTERN_TXT FILE *pSumFileHypoInvY2K[MAX_NUM_LOCATION_GRIDS];
EXTERN_TXT FILE *pSumFileAlberto4[MAX_NUM_LOCATION_GRIDS];

/* related flags */
EXTERN_TXT int iWriteHypHeader[MAX_NUM_LOCATION_GRIDS];
Expand Down Expand Up @@ -359,8 +359,8 @@ EXTERN_TXT int topo_surface_index; // topo surface index is velmod.h.MAX_SURFACE


/* station list */
int NumStations;
SourceDesc StationList[X_MAX_NUM_ARRIVALS];
EXTERN_TXT int NumStations;
EXTERN_TXT SourceDesc StationList[X_MAX_NUM_ARRIVALS];

/* fixed origin time parameters */
EXTERN_TXT int FixOriginTimeFlag;
Expand Down
2 changes: 2 additions & 0 deletions src/sed/libs/3rd-party/nll/calc_crust_corr.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#define EXTERN_MODE 1

//#include "iscloc.h"
#include "GridLib.h"
#include "calc_crust_corr.h"
Expand Down
3 changes: 3 additions & 0 deletions src/sed/libs/3rd-party/nll/ran1/ran1.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

#include <stdlib.h>
#include <stdio.h>

#define EXTERN_MODE 1

#include "ran1.h"


Expand Down
6 changes: 1 addition & 5 deletions src/sed/libs/3rd-party/nll/util.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,7 @@



#ifdef EXTERN_MODE
#define EXTERN_TXT extern
#else
#define EXTERN_TXT
#endif
#define EXTERN_MODE 1

#include "util.h"

Expand Down
6 changes: 6 additions & 0 deletions src/sed/libs/3rd-party/nll/util.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,12 @@
#define VERY_SMALL_DOUBLE 1.0e-30
#endif

#ifdef EXTERN_MODE
#define EXTERN_TXT extern
#else
#define EXTERN_TXT
#endif

EXTERN_TXT char package_name[MAXLINE];
EXTERN_TXT char prog_name[MAXLINE];
EXTERN_TXT char prog_ver[MAXLINE];
Expand Down
2 changes: 1 addition & 1 deletion src/sed/plugins/locator/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
SUBDIRS(nll)
#SUBDIRS(nll)
6 changes: 5 additions & 1 deletion src/slmon/apps/slmon/myconfig.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
from __future__ import print_function
import configparser
import xml.dom.minidom
try:
import configparser

except ImportError:
import ConfigParser as configparser

def parseXMLnode(root):
"""
Expand Down
4 changes: 2 additions & 2 deletions src/system/libs/seiscomp3/config/exceptions.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ class SC_CONFIG_API SyntaxException : public Exception {

class SC_CONFIG_API CaseSensitivityException : public Exception {
public:
CaseSensitivityException() : Exception("Case-insensitiv names are ambigous") { }
CaseSensitivityException(const std::string &str) : Exception("Case-insensitiv names are ambigous: " + str) { }
CaseSensitivityException() : Exception("Case-insensitiv names are ambiguous") { }
CaseSensitivityException(const std::string &str) : Exception("Case-insensitiv names are ambiguous: " + str) { }
};


Expand Down
21 changes: 17 additions & 4 deletions src/trunk/apps/processing/scevent/eventtool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -849,8 +849,14 @@ void EventTool::addObject(const string &parentID, Object* object) {
if ( org != mag->origin() )
org->add(mag);

SEISCOMP_LOG(_infoChannel, "Received new magnitude %s (%s %.2f)",
mag->publicID().c_str(), mag->type().c_str(), mag->magnitude().value());
try {
SEISCOMP_LOG(_infoChannel, "Received new magnitude %s (%s %.2f)",
mag->publicID().c_str(), mag->type().c_str(), mag->magnitude().value());
}
catch ( ... ) {
SEISCOMP_LOG(_infoChannel, "Received new magnitude %s (%s -.--)",
mag->publicID().c_str(), mag->type().c_str());
}

_updates.insert(TodoEntry(org));
}
Expand Down Expand Up @@ -1028,8 +1034,15 @@ void EventTool::updateObject(const std::string &parentID, Object* object) {
logObject(_inputMagnitude, Core::Time::GMT());
if ( !mag->registered() )
mag = Magnitude::Find(mag->publicID());
SEISCOMP_LOG(_infoChannel, "Received updated magnitude %s (%s %.2f)",
mag->publicID().c_str(), mag->type().c_str(), mag->magnitude().value());
try{
SEISCOMP_LOG(_infoChannel, "Received updated magnitude %s (%s %.2f)",
mag->publicID().c_str(), mag->type().c_str(), mag->magnitude().value());
}
catch ( ... ) {
SEISCOMP_LOG(_infoChannel, "Received updated magnitude %s (%s -.--)",
mag->publicID().c_str(), mag->type().c_str());
}

org = _cache.get<Origin>(parentID);
if ( org )
_updates.insert(TodoEntry(org, mag));
Expand Down
Binary file modified src/trunk/apps/tools/scconfig/icons/info_small.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit c68de76

Please sign in to comment.