Compare commits
8 Commits
0.0.1
...
b33e5ca223
| Author | SHA1 | Date | |
|---|---|---|---|
| b33e5ca223 | |||
| fe4430b1bf | |||
| 5a48073152 | |||
| 41c1e6f9fd | |||
| 0743fa45eb | |||
| 7f2c0d2e23 | |||
| 14202714cc | |||
| ce0c23805a |
@@ -1,3 +1,3 @@
|
|||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
|
|
||||||
[assembly: AssemblyVersion("0.0.1")]
|
[assembly: AssemblyVersion("0.0.2")]
|
||||||
|
|||||||
@@ -34,20 +34,26 @@ namespace Cryville.EEW.Unity {
|
|||||||
}
|
}
|
||||||
|
|
||||||
[JsonPolymorphic(TypeDiscriminatorPropertyName = "Type", UnknownDerivedTypeHandling = JsonUnknownDerivedTypeHandling.FallBackToBaseType)]
|
[JsonPolymorphic(TypeDiscriminatorPropertyName = "Type", UnknownDerivedTypeHandling = JsonUnknownDerivedTypeHandling.FallBackToBaseType)]
|
||||||
|
[JsonDerivedType(typeof(BMKGOpenDataEventSourceConfig), "BMKGOpenData")]
|
||||||
[JsonDerivedType(typeof(CWAOpenDataEventSourceConfig), "CWAOpenData")]
|
[JsonDerivedType(typeof(CWAOpenDataEventSourceConfig), "CWAOpenData")]
|
||||||
|
[JsonDerivedType(typeof(EMSCRealTimeEventSourceConfig), "EMSCRealTime")]
|
||||||
[JsonDerivedType(typeof(GlobalQuakeServerEventSourceConfig), "GlobalQuakeServer")]
|
[JsonDerivedType(typeof(GlobalQuakeServerEventSourceConfig), "GlobalQuakeServer")]
|
||||||
[JsonDerivedType(typeof(GlobalQuakeServer15EventSourceConfig), "GlobalQuakeServer15")]
|
[JsonDerivedType(typeof(GlobalQuakeServer15EventSourceConfig), "GlobalQuakeServer15")]
|
||||||
[JsonDerivedType(typeof(JMAAtomEventSourceConfig), "JMAAtom")]
|
[JsonDerivedType(typeof(JMAAtomEventSourceConfig), "JMAAtom")]
|
||||||
[JsonDerivedType(typeof(NOAAEventSourceConfig), "NOAA")]
|
[JsonDerivedType(typeof(NOAAEventSourceConfig), "NOAA")]
|
||||||
[JsonDerivedType(typeof(UpdateCheckerEventSourceConfig), "UpdateChecker")]
|
[JsonDerivedType(typeof(UpdateCheckerEventSourceConfig), "UpdateChecker")]
|
||||||
|
[JsonDerivedType(typeof(USGSQuakeMLEventSourceConfig), "USGSQuakeML")]
|
||||||
[JsonDerivedType(typeof(WolfxEventSourceConfig), "Wolfx")]
|
[JsonDerivedType(typeof(WolfxEventSourceConfig), "Wolfx")]
|
||||||
abstract record EventSourceConfig();
|
abstract record EventSourceConfig();
|
||||||
|
record BMKGOpenDataEventSourceConfig([property: JsonRequired] string[] Subtypes) : EventSourceConfig;
|
||||||
record CWAOpenDataEventSourceConfig([property: JsonRequired] string Subtype, [property: JsonRequired] string Token) : EventSourceConfig;
|
record CWAOpenDataEventSourceConfig([property: JsonRequired] string Subtype, [property: JsonRequired] string Token) : EventSourceConfig;
|
||||||
|
record EMSCRealTimeEventSourceConfig() : EventSourceConfig;
|
||||||
record GlobalQuakeServerEventSourceConfig([property: JsonRequired] string Host, int Port = 38000) : EventSourceConfig;
|
record GlobalQuakeServerEventSourceConfig([property: JsonRequired] string Host, int Port = 38000) : EventSourceConfig;
|
||||||
record GlobalQuakeServer15EventSourceConfig(string Host, int Port = 38000) : GlobalQuakeServerEventSourceConfig(Host, Port);
|
record GlobalQuakeServer15EventSourceConfig(string Host, int Port = 38000) : GlobalQuakeServerEventSourceConfig(Host, Port);
|
||||||
record JMAAtomEventSourceConfig(IReadOnlyCollection<string> Filter = null, bool IsFilterWhitelist = false) : EventSourceConfig;
|
record JMAAtomEventSourceConfig(IReadOnlyCollection<string> Filter = null, bool IsFilterWhitelist = false) : EventSourceConfig;
|
||||||
record NOAAEventSourceConfig([property: JsonRequired] string Subtype) : EventSourceConfig;
|
record NOAAEventSourceConfig([property: JsonRequired] string Subtype) : EventSourceConfig;
|
||||||
record UpdateCheckerEventSourceConfig : EventSourceConfig;
|
record UpdateCheckerEventSourceConfig : EventSourceConfig;
|
||||||
|
record USGSQuakeMLEventSourceConfig([property: JsonRequired] string Subtype) : EventSourceConfig;
|
||||||
record WolfxEventSourceConfig(IReadOnlyCollection<string> Filter = null, bool IsFilterWhitelist = false) : EventSourceConfig;
|
record WolfxEventSourceConfig(IReadOnlyCollection<string> Filter = null, bool IsFilterWhitelist = false) : EventSourceConfig;
|
||||||
|
|
||||||
[JsonSerializable(typeof(Config))]
|
[JsonSerializable(typeof(Config))]
|
||||||
|
|||||||
@@ -1,9 +1,12 @@
|
|||||||
|
using Cryville.EEW.BMKGOpenData.Map;
|
||||||
using Cryville.EEW.Core;
|
using Cryville.EEW.Core;
|
||||||
using Cryville.EEW.CWAOpenData.Map;
|
using Cryville.EEW.CWAOpenData.Map;
|
||||||
|
using Cryville.EEW.EMSC.Map;
|
||||||
using Cryville.EEW.GlobalQuake.Map;
|
using Cryville.EEW.GlobalQuake.Map;
|
||||||
using Cryville.EEW.JMAAtom.Map;
|
using Cryville.EEW.JMAAtom.Map;
|
||||||
using Cryville.EEW.Map;
|
using Cryville.EEW.Map;
|
||||||
using Cryville.EEW.NOAA.Map;
|
using Cryville.EEW.NOAA.Map;
|
||||||
|
using Cryville.EEW.QuakeML.Map;
|
||||||
using Cryville.EEW.Report;
|
using Cryville.EEW.Report;
|
||||||
using Cryville.EEW.Wolfx.Map;
|
using Cryville.EEW.Wolfx.Map;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
@@ -23,6 +26,7 @@ namespace Cryville.EEW.Unity.Map {
|
|||||||
readonly List<int> _displayingOrder = new();
|
readonly List<int> _displayingOrder = new();
|
||||||
|
|
||||||
public int Count => _displayingReports.Count;
|
public int Count => _displayingReports.Count;
|
||||||
|
public int OngoingCount => _displayingReports.Count - (_selected != null ? 1 : 0);
|
||||||
|
|
||||||
[SerializeField] MapElementManager m_subManager;
|
[SerializeField] MapElementManager m_subManager;
|
||||||
|
|
||||||
@@ -123,16 +127,19 @@ namespace Cryville.EEW.Unity.Map {
|
|||||||
}
|
}
|
||||||
|
|
||||||
readonly ContextedGeneratorManager<IMapGeneratorContext, MapElement> _gen = new(new IContextedGenerator<IMapGeneratorContext, MapElement>[] {
|
readonly ContextedGeneratorManager<IMapGeneratorContext, MapElement> _gen = new(new IContextedGenerator<IMapGeneratorContext, MapElement>[] {
|
||||||
|
new BMKGEarthquakeMapGenerator(),
|
||||||
new CENCEarthquakeMapGenerator(),
|
new CENCEarthquakeMapGenerator(),
|
||||||
new CENCEEWMapGenerator(),
|
new CENCEEWMapGenerator(),
|
||||||
new CWAEarthquakeMapGenerator(),
|
new CWAEarthquakeMapGenerator(),
|
||||||
new CWAEEWMapGenerator(),
|
new CWAEEWMapGenerator(),
|
||||||
new CWATsunamiMapGenerator(),
|
new CWATsunamiMapGenerator(),
|
||||||
|
new EMSCRealTimeEventMapGenerator(),
|
||||||
new FujianEEWMapGenerator(),
|
new FujianEEWMapGenerator(),
|
||||||
new GlobalQuakeMapViewGenerator(),
|
new GlobalQuakeMapViewGenerator(),
|
||||||
new JMAAtomMapGenerator(),
|
new JMAAtomMapGenerator(),
|
||||||
new JMAEEWMapGenerator(),
|
new JMAEEWMapGenerator(),
|
||||||
new NOAAMapGenerator(),
|
new NOAAMapGenerator(),
|
||||||
|
new QuakeMLEventMapGenerator(),
|
||||||
new SichuanEEWMapGenerator(),
|
new SichuanEEWMapGenerator(),
|
||||||
});
|
});
|
||||||
public UnityMapElement Build(object e, out CultureInfo culture, out int order) {
|
public UnityMapElement Build(object e, out CultureInfo culture, out int order) {
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
using Cryville.EEW.Core.Map;
|
using Cryville.EEW.Core.Map;
|
||||||
using System;
|
using System;
|
||||||
using System.Diagnostics.CodeAnalysis;
|
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
@@ -67,7 +66,6 @@ namespace Cryville.EEW.Unity.Map {
|
|||||||
_downloadDone = true;
|
_downloadDone = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
[SuppressMessage("CodeQuality", "IDE0051", Justification = "Unity message")]
|
|
||||||
void Update() {
|
void Update() {
|
||||||
if (_downloadDone) {
|
if (_downloadDone) {
|
||||||
try {
|
try {
|
||||||
@@ -100,7 +98,6 @@ namespace Cryville.EEW.Unity.Map {
|
|||||||
_callback?.Invoke(this);
|
_callback?.Invoke(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
[SuppressMessage("CodeQuality", "IDE0051", Justification = "Unity message")]
|
|
||||||
void OnDestroy() {
|
void OnDestroy() {
|
||||||
if (_req != null) {
|
if (_req != null) {
|
||||||
_req.Abort();
|
_req.Abort();
|
||||||
|
|||||||
@@ -77,7 +77,13 @@ namespace Cryville.EEW.Unity.Map {
|
|||||||
DTSweep.Triangulate(tcx);
|
DTSweep.Triangulate(tcx);
|
||||||
|
|
||||||
var codeToIndex = new Dictionary<uint, int>();
|
var codeToIndex = new Dictionary<uint, int>();
|
||||||
var vertices = ArrayPool<Vector3>.Shared.Rent(convertedPolygon.Points.Count);
|
int vertexCount = convertedPolygon.Points.Count;
|
||||||
|
if (convertedPolygon.Holes != null) {
|
||||||
|
foreach (var hole in convertedPolygon.Holes) {
|
||||||
|
vertexCount += hole.Points.Count;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
var vertices = ArrayPool<Vector3>.Shared.Rent(vertexCount);
|
||||||
var triangles = ArrayPool<int>.Shared.Rent(convertedPolygon.Triangles.Count * 3);
|
var triangles = ArrayPool<int>.Shared.Rent(convertedPolygon.Triangles.Count * 3);
|
||||||
int vi = 0, ii = 0;
|
int vi = 0, ii = 0;
|
||||||
foreach (var tri in convertedPolygon.Triangles) {
|
foreach (var tri in convertedPolygon.Triangles) {
|
||||||
|
|||||||
@@ -1,21 +1,27 @@
|
|||||||
|
using Cryville.EEW.BMKGOpenData;
|
||||||
|
using Cryville.EEW.BMKGOpenData.TTS;
|
||||||
using Cryville.EEW.Core;
|
using Cryville.EEW.Core;
|
||||||
using Cryville.EEW.CWAOpenData;
|
using Cryville.EEW.CWAOpenData;
|
||||||
using Cryville.EEW.CWAOpenData.Model;
|
using Cryville.EEW.CWAOpenData.Model;
|
||||||
using Cryville.EEW.CWAOpenData.TTS;
|
using Cryville.EEW.CWAOpenData.TTS;
|
||||||
|
using Cryville.EEW.EMSC;
|
||||||
using Cryville.EEW.GlobalQuake;
|
using Cryville.EEW.GlobalQuake;
|
||||||
using Cryville.EEW.JMAAtom;
|
using Cryville.EEW.JMAAtom;
|
||||||
using Cryville.EEW.JMAAtom.TTS;
|
using Cryville.EEW.JMAAtom.TTS;
|
||||||
using Cryville.EEW.NOAA;
|
using Cryville.EEW.NOAA;
|
||||||
using Cryville.EEW.NOAA.TTS;
|
using Cryville.EEW.NOAA.TTS;
|
||||||
|
using Cryville.EEW.QuakeML;
|
||||||
using Cryville.EEW.Report;
|
using Cryville.EEW.Report;
|
||||||
using Cryville.EEW.Unity.Map;
|
using Cryville.EEW.Unity.Map;
|
||||||
using Cryville.EEW.Unity.UI;
|
using Cryville.EEW.Unity.UI;
|
||||||
using Cryville.EEW.UpdateChecker;
|
using Cryville.EEW.UpdateChecker;
|
||||||
|
using Cryville.EEW.USGS;
|
||||||
using Cryville.EEW.Wolfx;
|
using Cryville.EEW.Wolfx;
|
||||||
using Cryville.EEW.Wolfx.Model;
|
using Cryville.EEW.Wolfx.Model;
|
||||||
using Cryville.EEW.Wolfx.TTS;
|
using Cryville.EEW.Wolfx.TTS;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Concurrent;
|
using System.Collections.Concurrent;
|
||||||
|
using System.Globalization;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
@@ -80,20 +86,24 @@ namespace Cryville.EEW.Unity {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void RegisterViewModelGenerators(CoreWorker worker) {
|
static void RegisterViewModelGenerators(CoreWorker worker) {
|
||||||
|
worker.RegisterViewModelGenerator(new BMKGEarthquakeRVMGenerator());
|
||||||
worker.RegisterViewModelGenerator(new CENCEarthquakeRVMGenerator());
|
worker.RegisterViewModelGenerator(new CENCEarthquakeRVMGenerator());
|
||||||
worker.RegisterViewModelGenerator(new CENCEEWRVMGenerator());
|
worker.RegisterViewModelGenerator(new CENCEEWRVMGenerator());
|
||||||
worker.RegisterViewModelGenerator(new CWAEarthquakeRVMGenerator());
|
worker.RegisterViewModelGenerator(new CWAEarthquakeRVMGenerator());
|
||||||
worker.RegisterViewModelGenerator(new CWAEEWRVMGenerator());
|
worker.RegisterViewModelGenerator(new CWAEEWRVMGenerator());
|
||||||
worker.RegisterViewModelGenerator(new CWATsunamiRVMGenerator());
|
worker.RegisterViewModelGenerator(new CWATsunamiRVMGenerator());
|
||||||
|
worker.RegisterViewModelGenerator(new EMSCRealTimeEventRVMGenerator());
|
||||||
worker.RegisterViewModelGenerator(new FujianEEWRVMGenerator());
|
worker.RegisterViewModelGenerator(new FujianEEWRVMGenerator());
|
||||||
worker.RegisterViewModelGenerator(new GlobalQuakeRVMGenerator());
|
worker.RegisterViewModelGenerator(new GlobalQuakeRVMGenerator());
|
||||||
worker.RegisterViewModelGenerator(new JMAAtomRVMGenerator());
|
worker.RegisterViewModelGenerator(new JMAAtomRVMGenerator());
|
||||||
worker.RegisterViewModelGenerator(new JMAEEWRVMGenerator());
|
worker.RegisterViewModelGenerator(new JMAEEWRVMGenerator());
|
||||||
worker.RegisterViewModelGenerator(new NOAAAtomRVMGenerator());
|
worker.RegisterViewModelGenerator(new NOAAAtomRVMGenerator());
|
||||||
|
worker.RegisterViewModelGenerator(new QuakeMLEventRVMGenerator());
|
||||||
worker.RegisterViewModelGenerator(new SichuanEEWRVMGenerator());
|
worker.RegisterViewModelGenerator(new SichuanEEWRVMGenerator());
|
||||||
worker.RegisterViewModelGenerator(new VersionRVMGenerator());
|
worker.RegisterViewModelGenerator(new VersionRVMGenerator());
|
||||||
}
|
}
|
||||||
static void RegisterTTSMessageGenerators(CoreWorker worker) {
|
static void RegisterTTSMessageGenerators(CoreWorker worker) {
|
||||||
|
worker.RegisterTTSMessageGenerator(new BMKGEarthquakeTTSMessageGenerator());
|
||||||
worker.RegisterTTSMessageGenerator(new CENCEarthquakeTTSMessageGenerator());
|
worker.RegisterTTSMessageGenerator(new CENCEarthquakeTTSMessageGenerator());
|
||||||
worker.RegisterTTSMessageGenerator(new CENCEEWTTSMessageGenerator());
|
worker.RegisterTTSMessageGenerator(new CENCEEWTTSMessageGenerator());
|
||||||
worker.RegisterTTSMessageGenerator(new CWAEarthquakeTTSMessageGenerator());
|
worker.RegisterTTSMessageGenerator(new CWAEarthquakeTTSMessageGenerator());
|
||||||
@@ -114,17 +124,22 @@ namespace Cryville.EEW.Unity {
|
|||||||
_worker.AddWorker(new CWAReportWorker<Tsunami>(new Uri("http://localhost:9095/E-A0014-001.json"), "1"));
|
_worker.AddWorker(new CWAReportWorker<Tsunami>(new Uri("http://localhost:9095/E-A0014-001.json"), "1"));
|
||||||
_worker.AddWorker(new CWAReportWorker<Earthquake>(new Uri("http://localhost:9095/E-A0015-001.json"), "1"));
|
_worker.AddWorker(new CWAReportWorker<Earthquake>(new Uri("http://localhost:9095/E-A0015-001.json"), "1"));
|
||||||
_worker.AddWorker(new CWAReportWorker<Earthquake>(new Uri("http://localhost:9095/E-A0016-001.json"), "1"));
|
_worker.AddWorker(new CWAReportWorker<Earthquake>(new Uri("http://localhost:9095/E-A0016-001.json"), "1"));
|
||||||
|
BMKGOpenDataWorker bmkgWorker = new(new Uri("http://localhost:9095/autogempa.json"));
|
||||||
|
bmkgWorker.SetDataUris(new Uri[] { new("http://localhost:9095/gempadirasakan.json") });
|
||||||
|
_worker.AddWorker(bmkgWorker);
|
||||||
_worker.AddWorker(new NOAAAtomWorker(new("http://localhost:9095/PAAQAtom.xml")));
|
_worker.AddWorker(new NOAAAtomWorker(new("http://localhost:9095/PAAQAtom.xml")));
|
||||||
_worker.AddWorker(new UpdateCheckerWorker(typeof(Worker).Assembly.GetName().Version?.ToString(3) ?? "", "unity"));
|
_worker.AddWorker(new UpdateCheckerWorker(typeof(Worker).Assembly.GetName().Version?.ToString(3) ?? "", "unity"));
|
||||||
#else
|
#else
|
||||||
foreach (var source in SharedSettings.Instance.EventSources) {
|
foreach (var source in SharedSettings.Instance.EventSources) {
|
||||||
_worker.AddWorker(source switch {
|
_worker.AddWorker(source switch {
|
||||||
|
BMKGOpenDataEventSourceConfig bmkgOpenData => BuildBMKGOpenDataWorkerUris(new BMKGOpenDataWorker(new("https://data.bmkg.go.id/DataMKG/TEWS/autogempa.json")), bmkgOpenData),
|
||||||
CWAOpenDataEventSourceConfig cwaOpenData => cwaOpenData.Subtype switch {
|
CWAOpenDataEventSourceConfig cwaOpenData => cwaOpenData.Subtype switch {
|
||||||
"E-A0014-001" => new CWAReportWorker<Tsunami>(new Uri("https://opendata.cwa.gov.tw/api/v1/rest/datastore/E-A0014-001"), cwaOpenData.Token, 1440, 17280),
|
"E-A0014-001" => new CWAReportWorker<Tsunami>(new Uri("https://opendata.cwa.gov.tw/api/v1/rest/datastore/E-A0014-001"), cwaOpenData.Token, 1440, 17280),
|
||||||
"E-A0015-001" => new CWAReportWorker<Earthquake>(new Uri("https://opendata.cwa.gov.tw/api/v1/rest/datastore/E-A0015-001"), cwaOpenData.Token),
|
"E-A0015-001" => new CWAReportWorker<Earthquake>(new Uri("https://opendata.cwa.gov.tw/api/v1/rest/datastore/E-A0015-001"), cwaOpenData.Token),
|
||||||
"E-A0016-001" => new CWAReportWorker<Earthquake>(new Uri("https://opendata.cwa.gov.tw/api/v1/rest/datastore/E-A0016-001"), cwaOpenData.Token),
|
"E-A0016-001" => new CWAReportWorker<Earthquake>(new Uri("https://opendata.cwa.gov.tw/api/v1/rest/datastore/E-A0016-001"), cwaOpenData.Token),
|
||||||
_ => throw new InvalidOperationException("Unknown CWA open data sub-type."),
|
_ => throw new InvalidOperationException("Unknown CWA open data sub-type."),
|
||||||
},
|
},
|
||||||
|
EMSCRealTimeEventSourceConfig => new EMSCRealTimeWorker(new("wss://www.seismicportal.eu/standing_order/websocket")),
|
||||||
GlobalQuakeServer15EventSourceConfig gq => new GlobalQuakeWorker15(gq.Host, gq.Port),
|
GlobalQuakeServer15EventSourceConfig gq => new GlobalQuakeWorker15(gq.Host, gq.Port),
|
||||||
GlobalQuakeServerEventSourceConfig gq => new GlobalQuakeWorker(gq.Host, gq.Port),
|
GlobalQuakeServerEventSourceConfig gq => new GlobalQuakeWorker(gq.Host, gq.Port),
|
||||||
JMAAtomEventSourceConfig jmaAtom => BuildJMAAtomWorkerFilter(new JMAAtomWorker(new("https://www.data.jma.go.jp/developer/xml/feed/eqvol.xml")), jmaAtom),
|
JMAAtomEventSourceConfig jmaAtom => BuildJMAAtomWorkerFilter(new JMAAtomWorker(new("https://www.data.jma.go.jp/developer/xml/feed/eqvol.xml")), jmaAtom),
|
||||||
@@ -134,18 +149,19 @@ namespace Cryville.EEW.Unity {
|
|||||||
_ => throw new InvalidOperationException("Unknown NOAA sub-type."),
|
_ => throw new InvalidOperationException("Unknown NOAA sub-type."),
|
||||||
},
|
},
|
||||||
UpdateCheckerEventSourceConfig => new UpdateCheckerWorker(typeof(Worker).Assembly.GetName().Version?.ToString(3) ?? "", "unity"),
|
UpdateCheckerEventSourceConfig => new UpdateCheckerWorker(typeof(Worker).Assembly.GetName().Version?.ToString(3) ?? "", "unity"),
|
||||||
|
USGSQuakeMLEventSourceConfig usgsQuakeML => BuildUSGSQuakeMLWorkerUri(new USGSQuakeMLWorker(new Uri("https://earthquake.usgs.gov/earthquakes/feed/v1.0/quakeml.php")), usgsQuakeML),
|
||||||
WolfxEventSourceConfig wolfx => BuildWolfxWorkerFilter(new WolfxWorker(new Uri("wss://ws-api.wolfx.jp/all_eew")), wolfx),
|
WolfxEventSourceConfig wolfx => BuildWolfxWorkerFilter(new WolfxWorker(new Uri("wss://ws-api.wolfx.jp/all_eew")), wolfx),
|
||||||
_ => throw new InvalidOperationException("Unknown event source type."),
|
_ => throw new InvalidOperationException("Unknown event source type."),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
JMAAtomWorker BuildJMAAtomWorkerFilter(JMAAtomWorker worker, JMAAtomEventSourceConfig config) {
|
static JMAAtomWorker BuildJMAAtomWorkerFilter(JMAAtomWorker worker, JMAAtomEventSourceConfig config) {
|
||||||
if (config.Filter != null) worker.SetFilter(config.Filter);
|
if (config.Filter != null) worker.SetFilter(config.Filter);
|
||||||
worker.IsFilterWhitelist = config.IsFilterWhitelist;
|
worker.IsFilterWhitelist = config.IsFilterWhitelist;
|
||||||
return worker;
|
return worker;
|
||||||
}
|
}
|
||||||
WolfxWorker BuildWolfxWorkerFilter(WolfxWorker worker, WolfxEventSourceConfig config) {
|
static WolfxWorker BuildWolfxWorkerFilter(WolfxWorker worker, WolfxEventSourceConfig config) {
|
||||||
if (config.Filter != null) worker.SetFilter(config.Filter.Select(i => i switch {
|
if (config.Filter != null) worker.SetFilter(config.Filter.Select(i => i switch {
|
||||||
"cenc_eew" => typeof(CENCEEW),
|
"cenc_eew" => typeof(CENCEEW),
|
||||||
"cenc_eqlist" => typeof(WolfxEarthquakeList<CENCEarthquake>),
|
"cenc_eqlist" => typeof(WolfxEarthquakeList<CENCEarthquake>),
|
||||||
@@ -158,6 +174,14 @@ namespace Cryville.EEW.Unity {
|
|||||||
worker.IsFilterWhitelist = config.IsFilterWhitelist;
|
worker.IsFilterWhitelist = config.IsFilterWhitelist;
|
||||||
return worker;
|
return worker;
|
||||||
}
|
}
|
||||||
|
static BMKGOpenDataWorker BuildBMKGOpenDataWorkerUris(BMKGOpenDataWorker worker, BMKGOpenDataEventSourceConfig config) {
|
||||||
|
worker.SetDataUris(config.Subtypes.Select(i => new Uri(string.Format(CultureInfo.InvariantCulture, "https://data.bmkg.go.id/DataMKG/TEWS/{0}.json", i))));
|
||||||
|
return worker;
|
||||||
|
}
|
||||||
|
static USGSQuakeMLWorker BuildUSGSQuakeMLWorkerUri(USGSQuakeMLWorker worker, USGSQuakeMLEventSourceConfig config) {
|
||||||
|
worker.SetFeedRelativeUri(new(string.Format(CultureInfo.InvariantCulture, "/earthquakes/feed/v1.0/summary/{0}.quakeml", config.Subtype), UriKind.Relative));
|
||||||
|
return worker;
|
||||||
|
}
|
||||||
|
|
||||||
readonly OngoingReportManager _ongoingReportManager = new();
|
readonly OngoingReportManager _ongoingReportManager = new();
|
||||||
readonly ConcurrentQueue<Action> _uiActionQueue = new();
|
readonly ConcurrentQueue<Action> _uiActionQueue = new();
|
||||||
@@ -167,11 +191,13 @@ namespace Cryville.EEW.Unity {
|
|||||||
Debug.LogError(e);
|
Debug.LogError(e);
|
||||||
_ongoingReportManager.Report(e);
|
_ongoingReportManager.Report(e);
|
||||||
_uiActionQueue.Enqueue(() => {
|
_uiActionQueue.Enqueue(() => {
|
||||||
m_mapElementManager.SetSelected(e);
|
if (m_mapElementManager.OngoingCount == 0) {
|
||||||
|
m_mapElementManager.SetSelected(e);
|
||||||
|
m_cameraController.OnMapElementUpdated();
|
||||||
|
}
|
||||||
if (e.InvalidatedTime == null && (!(e.RevisionKey?.IsCancellation ?? false))) {
|
if (e.InvalidatedTime == null && (!(e.RevisionKey?.IsCancellation ?? false))) {
|
||||||
_latestHistoryReport = e;
|
_latestHistoryReport = e;
|
||||||
}
|
}
|
||||||
m_cameraController.OnMapElementUpdated();
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
void OnOngoingReported(ReportViewModel item, CollectionChangeAction action) {
|
void OnOngoingReported(ReportViewModel item, CollectionChangeAction action) {
|
||||||
@@ -181,7 +207,6 @@ namespace Cryville.EEW.Unity {
|
|||||||
m_mapElementManager.SetSelected(null);
|
m_mapElementManager.SetSelected(null);
|
||||||
}
|
}
|
||||||
m_ongoingEventList.Add(item);
|
m_ongoingEventList.Add(item);
|
||||||
m_cameraController.OnMapElementUpdated();
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
else if (action == CollectionChangeAction.Remove) {
|
else if (action == CollectionChangeAction.Remove) {
|
||||||
@@ -191,7 +216,6 @@ namespace Cryville.EEW.Unity {
|
|||||||
m_mapElementManager.SetSelected(_latestHistoryReport, true);
|
m_mapElementManager.SetSelected(_latestHistoryReport, true);
|
||||||
}
|
}
|
||||||
m_ongoingEventList.Remove(item);
|
m_ongoingEventList.Remove(item);
|
||||||
m_cameraController.OnMapElementUpdated();
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
BIN
Assets/Plugins/Cryville.EEW.BMKGOpenData.Map.dll
Normal file
BIN
Assets/Plugins/Cryville.EEW.BMKGOpenData.Map.dll
Normal file
Binary file not shown.
33
Assets/Plugins/Cryville.EEW.BMKGOpenData.Map.dll.meta
Normal file
33
Assets/Plugins/Cryville.EEW.BMKGOpenData.Map.dll.meta
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 9c2c20067e0adc54c813350fd61f9a3a
|
||||||
|
PluginImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
iconMap: {}
|
||||||
|
executionOrder: {}
|
||||||
|
defineConstraints: []
|
||||||
|
isPreloaded: 0
|
||||||
|
isOverridable: 0
|
||||||
|
isExplicitlyReferenced: 0
|
||||||
|
validateReferences: 1
|
||||||
|
platformData:
|
||||||
|
- first:
|
||||||
|
Any:
|
||||||
|
second:
|
||||||
|
enabled: 1
|
||||||
|
settings: {}
|
||||||
|
- first:
|
||||||
|
Editor: Editor
|
||||||
|
second:
|
||||||
|
enabled: 0
|
||||||
|
settings:
|
||||||
|
DefaultValueInitialized: true
|
||||||
|
- first:
|
||||||
|
Windows Store Apps: WindowsStoreApps
|
||||||
|
second:
|
||||||
|
enabled: 0
|
||||||
|
settings:
|
||||||
|
CPU: AnyCPU
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
BIN
Assets/Plugins/Cryville.EEW.BMKGOpenData.TTS.dll
Normal file
BIN
Assets/Plugins/Cryville.EEW.BMKGOpenData.TTS.dll
Normal file
Binary file not shown.
33
Assets/Plugins/Cryville.EEW.BMKGOpenData.TTS.dll.meta
Normal file
33
Assets/Plugins/Cryville.EEW.BMKGOpenData.TTS.dll.meta
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: e9164d2df3d1c03499419935666416ae
|
||||||
|
PluginImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
iconMap: {}
|
||||||
|
executionOrder: {}
|
||||||
|
defineConstraints: []
|
||||||
|
isPreloaded: 0
|
||||||
|
isOverridable: 0
|
||||||
|
isExplicitlyReferenced: 0
|
||||||
|
validateReferences: 1
|
||||||
|
platformData:
|
||||||
|
- first:
|
||||||
|
Any:
|
||||||
|
second:
|
||||||
|
enabled: 1
|
||||||
|
settings: {}
|
||||||
|
- first:
|
||||||
|
Editor: Editor
|
||||||
|
second:
|
||||||
|
enabled: 0
|
||||||
|
settings:
|
||||||
|
DefaultValueInitialized: true
|
||||||
|
- first:
|
||||||
|
Windows Store Apps: WindowsStoreApps
|
||||||
|
second:
|
||||||
|
enabled: 0
|
||||||
|
settings:
|
||||||
|
CPU: AnyCPU
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
BIN
Assets/Plugins/Cryville.EEW.BMKGOpenData.dll
Normal file
BIN
Assets/Plugins/Cryville.EEW.BMKGOpenData.dll
Normal file
Binary file not shown.
33
Assets/Plugins/Cryville.EEW.BMKGOpenData.dll.meta
Normal file
33
Assets/Plugins/Cryville.EEW.BMKGOpenData.dll.meta
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 152cea136489ac044b7c12c66ba72b53
|
||||||
|
PluginImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
iconMap: {}
|
||||||
|
executionOrder: {}
|
||||||
|
defineConstraints: []
|
||||||
|
isPreloaded: 0
|
||||||
|
isOverridable: 0
|
||||||
|
isExplicitlyReferenced: 0
|
||||||
|
validateReferences: 1
|
||||||
|
platformData:
|
||||||
|
- first:
|
||||||
|
Any:
|
||||||
|
second:
|
||||||
|
enabled: 1
|
||||||
|
settings: {}
|
||||||
|
- first:
|
||||||
|
Editor: Editor
|
||||||
|
second:
|
||||||
|
enabled: 0
|
||||||
|
settings:
|
||||||
|
DefaultValueInitialized: true
|
||||||
|
- first:
|
||||||
|
Windows Store Apps: WindowsStoreApps
|
||||||
|
second:
|
||||||
|
enabled: 0
|
||||||
|
settings:
|
||||||
|
CPU: AnyCPU
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Assets/Plugins/Cryville.EEW.EMSC.Map.dll
Normal file
BIN
Assets/Plugins/Cryville.EEW.EMSC.Map.dll
Normal file
Binary file not shown.
33
Assets/Plugins/Cryville.EEW.EMSC.Map.dll.meta
Normal file
33
Assets/Plugins/Cryville.EEW.EMSC.Map.dll.meta
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: e1ef9470a2a1d7b4da9ddd106620b665
|
||||||
|
PluginImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
iconMap: {}
|
||||||
|
executionOrder: {}
|
||||||
|
defineConstraints: []
|
||||||
|
isPreloaded: 0
|
||||||
|
isOverridable: 0
|
||||||
|
isExplicitlyReferenced: 0
|
||||||
|
validateReferences: 1
|
||||||
|
platformData:
|
||||||
|
- first:
|
||||||
|
Any:
|
||||||
|
second:
|
||||||
|
enabled: 1
|
||||||
|
settings: {}
|
||||||
|
- first:
|
||||||
|
Editor: Editor
|
||||||
|
second:
|
||||||
|
enabled: 0
|
||||||
|
settings:
|
||||||
|
DefaultValueInitialized: true
|
||||||
|
- first:
|
||||||
|
Windows Store Apps: WindowsStoreApps
|
||||||
|
second:
|
||||||
|
enabled: 0
|
||||||
|
settings:
|
||||||
|
CPU: AnyCPU
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
BIN
Assets/Plugins/Cryville.EEW.EMSC.dll
Normal file
BIN
Assets/Plugins/Cryville.EEW.EMSC.dll
Normal file
Binary file not shown.
33
Assets/Plugins/Cryville.EEW.EMSC.dll.meta
Normal file
33
Assets/Plugins/Cryville.EEW.EMSC.dll.meta
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 48f0c884a8a1e4043948f765ed18e4bc
|
||||||
|
PluginImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
iconMap: {}
|
||||||
|
executionOrder: {}
|
||||||
|
defineConstraints: []
|
||||||
|
isPreloaded: 0
|
||||||
|
isOverridable: 0
|
||||||
|
isExplicitlyReferenced: 0
|
||||||
|
validateReferences: 1
|
||||||
|
platformData:
|
||||||
|
- first:
|
||||||
|
Any:
|
||||||
|
second:
|
||||||
|
enabled: 1
|
||||||
|
settings: {}
|
||||||
|
- first:
|
||||||
|
Editor: Editor
|
||||||
|
second:
|
||||||
|
enabled: 0
|
||||||
|
settings:
|
||||||
|
DefaultValueInitialized: true
|
||||||
|
- first:
|
||||||
|
Windows Store Apps: WindowsStoreApps
|
||||||
|
second:
|
||||||
|
enabled: 0
|
||||||
|
settings:
|
||||||
|
CPU: AnyCPU
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user