记录 VS 震级信息
scvsmaglog 记录来自 scvsmag 的 VS 震级信息,一旦事件超时,生成报告文件。
scvsmaglog 实现 ActiveMQ 接口,能发送消息至 UserDisplay —— Caltech 开发的实时 EEW 用户界面。
下例是报告文件的前几行:
Mag.|Lat. |Lon. |tdiff |Depth |creation time (UTC) |origin time (UTC) |likeh.|#st.(org.) |#st.(mag.)
------------------------------------------------------------------------------------------------------------------
3.42| 47.15| 8.52| 12.73| 25.32|2012-02-11T22:45:39.0000Z|2012-02-11T22:45:26.2729Z| 0.99| 6| 6
3.43| 47.15| 8.52| 13.73| 25.32|2012-02-11T22:45:40.0000Z|2012-02-11T22:45:26.2729Z| 0.99| 6| 6
3.56| 47.15| 8.54| 14.70| 25.73|2012-02-11T22:45:41.0000Z|2012-02-11T22:45:26.3032Z| 0.99| 10| 10
3.64| 47.16| 8.54| 15.58| 24.32|2012-02-11T22:45:42.0000Z|2012-02-11T22:45:26.4178Z| 0.99| 12| 12
3.54| 47.16| 8.53| 16.45| 22.40|2012-02-11T22:45:43.0000Z|2012-02-11T22:45:26.5547Z| 0.99| 14| 14
3.67| 47.15| 8.54| 17.29| 20.40|2012-02-11T22:45:44.0000Z|2012-02-11T22:45:26.7142Z| 0.99| 16| 16
3.66| 47.16| 8.54| 18.34| 21.31|2012-02-11T22:45:45.0000Z|2012-02-11T22:45:26.6562Z| 0.99| 18| 18
3.75| 47.16| 8.54| 19.27| 19.91|2012-02-11T22:45:46.0000Z|2012-02-11T22:45:26.7326Z| 0.99| 19| 19
首个震级估算有效时将发送事件消息。第一个消息的message_type
是new
,其他消息的为update
或delete
。当前,除了不可靠估算外所有的值均由 scvsmaglog 设置。
<?xml version='1.0' encoding='UTF-8'?>
<event_message message_type="new" orig_sys="dm" version="0">
<core_info id="-9">
<mag units="Mw">-9.9</mag>
<mag_uncer units="Mw">-9.9</mag_uncer>
<lat units="deg">-999.9</lat>
<lat_uncer units="deg">-999.9</lat_uncer>
<lon units="deg">-999.9</lon>
<lon_uncer units="deg">-999.9</lon_uncer>
<depth units="km">-9.9</depth>
<depth_uncer units="km">-9.9</depth_uncer>
<orig_time units="UTC">2013-06-10T13:35:12Z</orig_time>
<orig_time_uncer units="sec">-9.9</orig_time_uncer>
<likelihood>-9.9</likelihood>
</core_info>
</event_message>
心跳消息每隔 5 秒钟发送一次。
<?xml version='1.0' encoding='UTF-8'?>
<hb originator="vs.9" sender="vs.9" timestamp="Mon June 10 13:41:35 2013" />
<connector>
<serverTransport uri="stomp://your-server-name:your-port"/>
</connector>
#!/usr/bin/env python
from stompy.simple import Client
stomp = Client(host='your-server-name', port=your-port)
stomp.connect(username='username', password='password')
stomp.subscribe("/topic/heartbeat")
stomp.subscribe("/topic/alert")
while True:
message = stomp.get()
print message.body
stomp.unsubscribe("/topic/heartbeat")
stomp.unsubscribe("/topic/alerts")
stomp.disconnect()
etc/defaults/global.cfg
etc/defaults/scvsmaglog.cfg
etc/global.cfg
etc/scvsmaglog.cfg
~/.seiscomp3/global.cfg
~/.seiscomp3/scvsmaglog.cfg