Skip to content

Commit

Permalink
Merge pull request xspanger3770#251 from xspanger3770/0.11.0
Browse files Browse the repository at this point in the history
update develop branch with pre-2 version bug fixes
  • Loading branch information
xspanger3770 authored Feb 23, 2024
2 parents 2aaf868 + c96985c commit df8d5e8
Show file tree
Hide file tree
Showing 10 changed files with 16 additions and 17 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ RUN addgroup --gid 1000 group && \
WORKDIR /home/user/

# Copy the application JAR file into the container at the working directory
COPY out/artifacts/GlobalQuakeServer/GlobalQuakeServer.jar .
COPY GlobalQuakeServer/target/GlobalQuakeServer-*-jar-with-dependencies.jar ./GlobalQuakeServer.jar

# Copy station database and configuration files
COPY Container ./.GlobalQuakeServerData
Expand Down
2 changes: 1 addition & 1 deletion GlobalQuakeAPI/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>xspanger.GlobalQuake</groupId>
<artifactId>GlobalQuake</artifactId>
<version>0.11.0_pre-1</version>
<version>0.11.0_pre-2</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
4 changes: 2 additions & 2 deletions GlobalQuakeClient/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>xspanger.GlobalQuake</groupId>
<artifactId>GlobalQuake</artifactId>
<version>0.11.0_pre-1</version>
<version>0.11.0_pre-2</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down Expand Up @@ -74,7 +74,7 @@
<dependency>
<groupId>xspanger.GlobalQuake</groupId>
<artifactId>GlobalQuakeCore</artifactId>
<version>0.11.0_pre-1</version>
<version>0.11.0_pre-2</version>
<scope>compile</scope>
</dependency>
<dependency>
Expand Down
2 changes: 1 addition & 1 deletion GlobalQuakeCore/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>xspanger.GlobalQuake</groupId>
<artifactId>GlobalQuake</artifactId>
<version>0.11.0_pre-1</version>
<version>0.11.0_pre-2</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

public abstract class GlobalQuake {

public static final String version = "v0.11.0_pre-1";
public static final String version = "v0.11.0_pre-2";

protected GlobalQuakeRuntime globalQuakeRuntime;
protected SeedlinkNetworksReader seedlinkNetworksReader;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -318,8 +318,8 @@ public static boolean couldBeArrival(double eventLat, double eventLon, double ev
angle);

if(considerIntensity) {
double expectedIntensity = IntensityTable.getIntensity(quakeMag, GeoUtils.gcdToGeo(distGC));
if (expectedIntensity < 3.0) {
double expectedRatio = IntensityTable.getRatio(quakeMag, GeoUtils.gcdToGeo(distGC));
if (expectedRatio < 3.0) {
return false;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public class EarthquakeAnalysis {
private static final double OBVIOUS_CORRECT_MAX_DISTANCE = 1000;
private static final double OBVIOUS_CORRECT_THRESHOLD = 0.30;
private static final double OBVIOUS_CORRECT_DELETE_THRESHOLD = 0.20;
private static final double OBVIOUS_CORRECT_INTENSITY_THRESHOLD = 256.0;
private static final double OBVIOUS_CORRECT_RATIO_THRESHOLD = 256.0;
public static final int OBVIOUS_CORRECT_MIN_TOTAL = 8;

public static boolean DEPTH_FIX_ALLOWED = true;
Expand Down Expand Up @@ -722,8 +722,8 @@ private void calculateObviousArrivals(Hypocenter bestHypocenter) {
continue;
}

double expectedIntensity = IntensityTable.getIntensity(bestHypocenter.magnitude, GeoUtils.gcdToGeo(distGC));
if (expectedIntensity < OBVIOUS_CORRECT_INTENSITY_THRESHOLD) {
double expectedRatio = IntensityTable.getRatio(bestHypocenter.magnitude, GeoUtils.gcdToGeo(distGC));
if (expectedRatio < OBVIOUS_CORRECT_RATIO_THRESHOLD) {
continue;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@

public class IntensityTable {

// old, only for unknown sensors
private static double getIntensityFromRatio(double mag, double dist) {
public static double getRatio(double mag, double dist) {
mag = 1.2 * mag - 0.022 * mag * mag - 1;
if (dist > 1200) {
dist = 1200 + Math.pow(dist - 1200, 0.4) * 22.0;
Expand Down Expand Up @@ -70,7 +69,7 @@ public static double getMagnitude(double dist, double intensity) {
}

public static double getMagnitudeByRatio(double dist, double intensity) {
return findMagnitude(intensity, value -> getIntensityFromRatio(value, dist));
return findMagnitude(intensity, value -> getRatio(value, dist));
}

public static double getMagnitudeByAccelerometer(double dist, double intensity) {
Expand Down
4 changes: 2 additions & 2 deletions GlobalQuakeServer/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>xspanger.GlobalQuake</groupId>
<artifactId>GlobalQuake</artifactId>
<version>0.11.0_pre-1</version>
<version>0.11.0_pre-2</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down Expand Up @@ -113,7 +113,7 @@
<dependency>
<groupId>xspanger.GlobalQuake</groupId>
<artifactId>GlobalQuakeCore</artifactId>
<version>0.11.0_pre-1</version>
<version>0.11.0_pre-2</version>
<scope>compile</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/net.dv8tion/JDA -->
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>xspanger.GlobalQuake</groupId>
<artifactId>GlobalQuake</artifactId>
<version>0.11.0_pre-1</version>
<version>0.11.0_pre-2</version>
<packaging>pom</packaging>
<modules>
<module>GlobalQuakeClient</module>
Expand Down

0 comments on commit df8d5e8

Please sign in to comment.