Commit c1a78611 authored by Matteo Quintiliani's avatar Matteo Quintiliani
Browse files

Merge branch 'release/1.17.0'

parents 893c5309 0c0f0e3d
Pipeline #8728 passed with stages
in 3 minutes and 55 seconds
......@@ -14,6 +14,8 @@ variables:
EW_INSTALL_VERSION: "earthworm"
EW_INSTALL_BITS: 64
EW_RUN_DIR: "$CI_PROJECT_DIR/$EW_INSTALL_VERSION"
# https://gitlab.com/seismic-software/earthworm/-/commit/6382013f288ef0f2e40748f7411b792c05c72a66
EW_GIT_REF: "6382013f288ef0f2e40748f7411b792c05c72a66"
build:
stage: build
......@@ -41,18 +43,15 @@ build:
- ./autogen.sh --enable-static
- make
- cd -
# Checkout only Earthworm libraries source and its dependencies
# - git clone https://${CI_DEPLOY_TOKEN_EW}:${CI_DEPLOY_SECRET_EW}@gitlab.rm.ingv.it/earthworm/earthworm.git/ $EW_INSTALL_HOME/$EW_INSTALL_VERSION
- svn checkout --depth empty svn://svn.isti.com/earthworm/trunk $EW_INSTALL_HOME/$EW_INSTALL_VERSION
- cd $EW_INSTALL_HOME/$EW_INSTALL_VERSION/
- svn update --set-depth infinity include
- svn update --set-depth infinity lib
- svn update --set-depth infinity bin
- svn update --set-depth infinity environment
- svn update --set-depth infinity params
- svn update --set-depth empty src
- svn update --set-depth infinity src/libsrc
# Checkout Git Earthworm Repository
- mkdir $EW_INSTALL_HOME/$EW_INSTALL_VERSION
- cd $EW_INSTALL_HOME/$EW_INSTALL_VERSION
- git init
- git remote add origin https://gitlab.com/seismic-software/earthworm.git
- git fetch origin ${EW_GIT_REF}
- git reset --hard FETCH_HEAD
- cd -
# Set Earthworm variables from EW_INSTALL_X variables
- . $EW_INSTALL_HOME/$EW_INSTALL_VERSION/environment/ew_linux.bash
# Copy earthworm.d earthworm_global.d from environment/ to params/
......@@ -65,7 +64,7 @@ build:
# Configure and build ew2openapi
- make -f makefile.unix clean static
# Copy binary in the current directory
- cp $EW_INSTALL_HOME/$EW_INSTALL_VERSION/bin/ew2openapi ./
- cp $EW_INSTALL_HOME/$EW_INSTALL_VERSION/bin/ew2openapi ./src/
# Create not existing directory
- mkdir -p $EW_LOG
- echo $EW_RUN_DIR
......@@ -79,7 +78,7 @@ build:
- $EW_INSTALL_HOME/$EW_INSTALL_VERSION/bin
- $EW_INSTALL_HOME/$EW_INSTALL_VERSION/environment
- $EW_INSTALL_HOME/$EW_INSTALL_VERSION/params
- ./ew2openapi
- ./src/ew2openapi
# depending on your build setup it's most likely a good idea to cache outputs to reduce the build time
# cache:
# paths:
......@@ -95,7 +94,7 @@ test:
# Set Earthworm variables from EW_INSTALL_X variables
- . $EW_INSTALL_HOME/$EW_INSTALL_VERSION/environment/ew_linux.bash
# Run ew2openapi without argument
- ./ew2openapi
- ./src/ew2openapi
# Run ew2openapi tests
- make -f makefile.unix clean static test
......@@ -2,6 +2,11 @@
ew2openapi Release History
#########################
* Release 1.17.0 (2022/03/09)
- Use ARC_EXTRA_FIELDS officially added in Earthworm Git Repository. Issue #25 (2022/03/09)
https://gitlab.com/seismic-software/earthworm/-/issues/49
- Checkout new Git Earthworm Repository instead of old Subversion. Issue #55 (2022/03/09)
* Release 1.16.0 (2022/01/11)
- Add script ew2openapi_logplayer.sh. Issue #51 (2021/11/05)
- CAST TYPE_PICK_SCNL.pickWeight to integer (not a string). Issue #52 (2021/11/05)
......
1.16.0 (2022-01-11)
\ No newline at end of file
1.17.0 (2022-03-09)
\ No newline at end of file
......@@ -44,10 +44,6 @@ CFLAGS = -D_REENTRANT $(GLOBALFLAGS) $(SPECIFIC_CFLAGS)
CFLAGS += -g
CFLAGS += $(CFLAGS_JSON) $(CFLAGS_CURL) $(CFLAGS_RABBITMQ) $(CFLAGS_LIBLO)
# Under development reading extra fields in ARC structure related to magnitude values
# https://gitlab.rm.ingv.it/earthworm/ew2openapi/issues/25
# CFLAGS += -D ARC_EXTRA_FIELDS
LDFLAGS += -L$(RABBITMQDIR)/build/librabbitmq -L$(JSONCDIR)/build/lib
APP = ew2openapi
......
......@@ -223,20 +223,14 @@ char *get_json_string_from_arc_ew_struct(struct Hsum *arcSum, struct Hpck *arcPc
json_object_object_add(jobj_ew_message,"mdwt", json_object_new_double_with_precision(arcSum->mdwt, 2));
json_object_object_add(jobj_ew_message,"ingvQuality", json_object_new_string(ingv_quality_str));
#ifdef ARC_EXTRA_FIELDS
/* Extra fields */
/* Extra fields */
json_object_object_add(jobj_ew_message,"amplitudeMagnitude", json_object_new_double_with_precision(arcSum->amplitudeMagnitude, 2));
json_object_object_add(jobj_ew_message,"numberOfAmpMagWeightCode", json_object_new_double_with_precision(arcSum->numberOfAmpMagWeightCode, 1));
json_object_object_add(jobj_ew_message,"medianAbsDiffAmpMag", json_object_new_double_with_precision(arcSum->medianAbsDiffAmpMag, 2));
json_object_object_add(jobj_ew_message,"codeOfCrustAndDelayModel", json_object_new_string(arcSum->codeOfCrustAndDelayModel));
json_object_object_add(jobj_ew_message,"preferredMagLabel", json_object_new_string_from_char(arcSum->preferredMagLabel));
json_object_object_add(jobj_ew_message,"preferredMag", json_object_new_double_with_precision(arcSum->preferredMag, 2));
json_object_object_add(jobj_ew_message,"numberOfPreferredMags", json_object_new_double_with_precision(arcSum->numberOfPreferredMags, 1));
json_object_object_add(jobj_ew_message,"modelDepthType", json_object_new_string_from_char(arcSum->modelDepthType));
json_object_object_add(jobj_ew_message,"dominantCrustModelType", json_object_new_string_from_char(arcSum->dominantCrustModelType));
json_object_object_add(jobj_ew_message,"earthquakeDepthDatum", json_object_new_int(arcSum->earthquakeDepthDatum));
json_object_object_add(jobj_ew_message,"geoidDepth", json_object_new_double_with_precision(arcSum->geoidDepth, 2));
#endif
json_object_object_add(jobj_ew_message,"preferredMagLabel", json_object_new_string_from_char(arcSum->labelpref));
json_object_object_add(jobj_ew_message,"preferredMag", json_object_new_double_with_precision(arcSum->Mpref, 2));
json_object_object_add(jobj_ew_message,"numberOfPreferredMags", json_object_new_double_with_precision(arcSum->wtpref, 1));
/* GeoJSON conversion */
if(flag_geojson) {
......@@ -348,8 +342,7 @@ char *get_json_string_from_arc_ew_struct(struct Hsum *arcSum, struct Hpck *arcPc
}
json_object_object_add(jobj_phase,"caav", jobj_tmp);
#ifdef ARC_EXTRA_FIELDS
/* Extra fields */
/* Extra fields */
json_object_object_add(jobj_phase,"amplitude", json_object_new_double_with_precision(arcPck[i]->amplitude, 2));
json_object_object_add(jobj_phase,"ampUnitsCode", json_object_new_int(arcPck[i]->ampUnitsCode));
json_object_object_add(jobj_phase,"ampType", json_object_new_int(arcPck[i]->ampType));
......@@ -357,7 +350,6 @@ char *get_json_string_from_arc_ew_struct(struct Hsum *arcSum, struct Hpck *arcPc
json_object_object_add(jobj_phase,"ampMagWeightCode", json_object_new_int(arcPck[i]->ampMagWeightCode));
json_object_object_add(jobj_phase,"importanceP", json_object_new_double_with_precision(arcPck[i]->importanceP, 3));
json_object_object_add(jobj_phase,"importanceS", json_object_new_double_with_precision(arcPck[i]->importanceS, 3));
#endif
/* GeoJSON conversion */
if(flag_geojson) {
......
/* DO NOT EDIT. Automatically generated. Change file HISTORY in ew2openapi_version main directory. */
#define EW2OPENAPI_NAME "ew2openapi"
#define EW2OPENAPI_VERSION "1.16.0 (2022-01-11)"
#define EW2OPENAPI_VERSION "1.17.0 (2022-03-09)"
#define EW2OPENAPI_NAME_AND_VERSION EW2OPENAPI_NAME" "EW2OPENAPI_VERSION
#define EW2OPENAPI_USERAGENT EW2OPENAPI_NAME"/"EW2OPENAPI_VERSION
#define EW2OPENAPI_URL_PATH "quakedb/ew/v1"
......
This diff is collapsed.
This diff is collapsed.
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment