Skip to content

Commit 6bf8a02

Browse files
committed
fix: rts
1 parent 0e86acf commit 6bf8a02

File tree

1 file changed

+73
-0
lines changed

1 file changed

+73
-0
lines changed

docs/api/socket/rts.mdx

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,77 @@
22
sidebar_position: 2
33
---
44

5+
import ApiFieldsTable from "@site/src/components/ApiFieldsTable";
6+
57
# RTS
8+
9+
## v1
10+
11+
### 權限
12+
13+
- `websocket.trem.rts.v1`
14+
15+
### 資料
16+
17+
```json
18+
{
19+
"type": "data",
20+
"topic": "websocket.trem.rts.v1",
21+
"payload": {
22+
"station": {
23+
"1480496": { "pga": 0.41, "pgv": 0.02, "i": -2.9, "I": -2.8 }, // 參閱下方 station[id]
24+
"1936924": { "pga": 2.66, "pgv": 0.54, "i": -3, "I": -3 },
25+
"2012144": { "pga": 3.96, "pgv": 0.59, "i": -2.7, "I": 1.5, "alert": 1 }
26+
// . . . 省略
27+
},
28+
"box": { "1": 2, "3": 3, "4": 3, "8": 2, "18": 0, "23": 0 }, // 網格區域內的震度 (震度階 0 ~ 9 對應 0 ~ 7 級)
29+
"int": [
30+
{ "code": 335, "i": 3 }, // 鄉鎮震度 (震度階 0 ~ 9 對應 0 ~ 7 級)
31+
{ "code": 231, "i": 3 },
32+
{ "code": 241, "i": 2 }
33+
],
34+
"time": 1756300287001 // 資料時間
35+
},
36+
"time": 1724935200000 // 發送時間
37+
}
38+
```
39+
40+
### 說明
41+
42+
#### `station[id]`
43+
44+
<ApiFieldsTable
45+
fields={[
46+
{
47+
name: "pga",
48+
type: "Float",
49+
description: "地動加速度",
50+
},
51+
{
52+
name: "pgv",
53+
type: "Float",
54+
description: "地動速度",
55+
},
56+
{
57+
name: "i",
58+
type: "Float",
59+
description: "即時震度 (計測震度)",
60+
},
61+
{
62+
name: "I",
63+
type: "Float",
64+
description: "衰減震度 (計測震度)",
65+
},
66+
{
67+
name: "alert",
68+
type: "Int?",
69+
description: "1 表示該測站觸發",
70+
},
71+
]}
72+
/>
73+
74+
:::warning
75+
76+
`計測震度` 不等於 `震度階`,請勿混淆。
77+
78+
:::

0 commit comments

Comments
 (0)