Skip to content
This repository has been archived by the owner on Sep 7, 2024. It is now read-only.

Commit

Permalink
fix: avoid re-calculate local intensity
Browse files Browse the repository at this point in the history
  • Loading branch information
Fonger committed May 2, 2024
1 parent 8a9f0ad commit 8ed20a6
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -253,16 +253,11 @@ api.on(WebSocketEvent.Eew, (e) => {
lat: e.eq.lat,
lng: e.eq.lon,
})({ lng: area.lng, lat: area.lat })(e.eq.depth);
const localExpectedIntensity = calculateIntensity(
surfaceDistance,
distance,
e.eq.mag,
e.eq.depth
);
const localExpectedIntensity = intensity[config.cache.location.area];
data.surface = surfaceDistance;
data.distance = distance;
data.i = roundIntensity(localExpectedIntensity);
data.i = localExpectedIntensity;
let { p, s } = calculateLocalExpectedWaveTime(
data.distance,
Expand Down

0 comments on commit 8ed20a6

Please sign in to comment.