{"id":5376,"date":"2024-06-27T11:35:45","date_gmt":"2024-06-27T02:35:45","guid":{"rendered":"https:\/\/blog.bitmeister.jp\/?p=5376"},"modified":"2025-06-20T15:40:05","modified_gmt":"2025-06-20T06:40:05","slug":"azarashi-supported-dcx","status":"publish","type":"post","link":"https:\/\/blog.bitmeister.jp\/?p=5376","title":{"rendered":"Azarashi supported DCX"},"content":{"rendered":"<p>\u3088\u3046\u3084\u304f\u3067\u304d\u307e\u3057\u305f\u3002\u307f\u3061\u3073\u304d\u306e\u707d\u5bb3\u30fb\u5371\u6a5f\u7ba1\u7406\u901a\u5831\u30b5\u30fc\u30d3\u30b9(\u707d\u5371\u901a\u5831\u3001DCR)\u306bJ-Alert\u3068L-Alert\u304c\u8ffd\u52a0\u3055\u308c\u308b\u3068\u805e\u3044\u3066\u3001\u300c2\u3064\u8ffd\u52a0\u3055\u308c\u308b\u3060\u3051\u3067\u3057\u3087\uff1f\u304b\u3093\u305f\u3093\u304b\u3093\u305f\u3093\u300d\u3068\u601d\u3063\u3066\u3044\u305f\u3089\u5168\u7136\u9055\u3044\u307e\u3057\u305f\u3002DCR\u306e\u30c7\u30b3\u30fc\u30c0\u30fc\u3092\u3082\u3046\u4e00\u5ea6\u4f5c\u308b\u3088\u3046\u306a\u624b\u9593\u304c\u304b\u304b\u308a\u307e\u3057\u305f\u3002<\/p>\n<p><a href=\"https:\/\/pypi.org\/project\/azarashi\/\">https:\/\/pypi.org\/project\/azarashi\/<\/a><\/p>\n<p>J-Alert\u3001L-Alert\u306fDCX\u3068\u3044\u3046DCR\u3068\u306f\u7570\u306a\u308b\u30e1\u30c3\u30bb\u30fc\u30b8\u3067\u914d\u4fe1\u3055\u308c\u3001CAMF\u3068\u3044\u3046\u30e1\u30c3\u30bb\u30fc\u30b8\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u3092\u4f7f\u3063\u3066\u3044\u307e\u3059\u3002\u65e5\u672c\u306e\u707d\u5bb3\u30fb\u5371\u6a5f\u7ba1\u7406\u901a\u5831\u3060\u3051\u3092\u30bf\u30fc\u30b2\u30c3\u30c8\u306b\u3057\u305f\u30e1\u30c3\u30bb\u30fc\u30b8\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u3067\u306f\u306a\u304f\u3001\u69d8\u3005\u306a\u707d\u5bb3\u304c\u5b9a\u7fa9\u3055\u308c\u3066\u304a\u308a\u3001EU\u306eGALILEO\u3068\u5171\u901a\u3067\u7528\u3044\u3089\u308c\u308b\u3053\u3068\u304c\u60f3\u5b9a\u3055\u308c\u3066\u3044\u308b\u3088\u3046\u3067\u3059\u3002\u3053\u308c\u306f\u307e\u305f\u5225\u306e\u8a18\u4e8b\u3067\u66f8\u304d\u307e\u3059\u3002<\/p>\n<p>\u3055\u3066\u3001azarashi\u306fDCX\u3092CAMF\u3067\u5b9a\u7fa9\u3055\u308c\u3066\u3044\u308b\u30d3\u30c3\u30c8\u30d5\u30a3\u30fc\u30eb\u30c9\u306b\u5f93\u3063\u3066\u3053\u306e\u3088\u3046\u306b\u6587\u5b57\u5217\u5316\u3057\u307e\u3059\u3002<br \/>\n<!--more--><\/p>\n<pre class=\"brush: python; gutter: false; title: ; notranslate\" title=\"\">\r\n&gt;&gt;&gt; import azarashi\r\n&gt;&gt;&gt; msg = '$QZQSM,55,53B0604DE19524CDA305B2C1E355B57800000CCC000000000000001022A8188*7E' # l-alert\r\n&gt;&gt;&gt; report = azarashi.decode(msg, 'nmea')\r\n&gt;&gt;&gt; print(report)\r\n<\/pre>\n<pre class=\"brush: plain; gutter: false; title: ; notranslate\" title=\"\">\r\n### DCX Message - L-Alert ###\r\nA1 - Message type: Alert\r\nA2 - Country\/region name: Japan\r\nA3 - Provider identifier: Foundation for MultiMedia Communications\r\nA4 - Hazard category and type: MET - Rainfall\r\nA4 - Hazard definition: Rainfall greater than or equal to 50 mm in past 24 hours. Note: Precise threshold is according to each local standard.\r\nA5 - Severity: Severe - Significant threat to life or property\r\nA6A7 - Hazard onset: 2024-06-23 13:00:00\r\nA8 - Hazard duration: 6H &lt;= Duration &lt; 12H\r\nA11 - Guidance to react: Keep away from Water area.\r\nA11 - Guidance to react (ja): \u96e2\u308c\u308d\u3002\u6c34\u5834\u3002\r\nA12 - Ellipse centre latitude: 35.688\r\nA13 - Ellipse centre longitude: 139.691\r\nA14 - Ellipse semi - major axis: 10.933\r\nA15 - Ellipse semi - minor axis: 5.979\r\nA16 - Ellipse azimuth: 45.0\r\nA17 - Specific settings: B1 - Improved Resolution of Main Ellipse\r\nC1 - Refined latitude of centre of main ellipse: 35.688\r\nC2 - Refined longitude of centre of main ellipse: 139.691\r\nC3 - Refined length of semi major axis: 10.933\r\nC4 - Refined length of semi minor axis: 5.979\r\n<\/pre>\n<p>\u3069\u306e\u30d5\u30a3\u30fc\u30eb\u30c9\u306b\u306a\u3093\u306e\u60c5\u5831\u304c\u5165\u308b\u304b\u306f\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3092\u8aad\u3093\u3067\u307f\u3066\u304f\u3060\u3055\u3044\u3002\u30e1\u30c3\u30bb\u30fc\u30b8\u306b\u3088\u3063\u3066\u4f7f\u308f\u308c\u308b\u30d5\u30a3\u30fc\u30eb\u30c9\u304c\u304b\u308f\u308b\u306e\u3067\u3001\u3053\u308c\u307e\u3067\u306eDCR\u3068\u9055\u3063\u3066\u3061\u3083\u3093\u3068\u4ed5\u69d8\u3092\u78ba\u8a8d\u3057\u306a\u3044\u3068DCX\u306f\u4f7f\u3048\u306a\u3044\u3068\u601d\u3044\u307e\u3059\u3002<br \/>\n<a href=\"https:\/\/qzss.go.jp\/technical\/download\/ps-is-qzss.html\">https:\/\/qzss.go.jp\/technical\/download\/ps-is-qzss.html<\/a><br \/>\n<a href=\"https:\/\/www.gsc-europa.eu\/sites\/default\/files\/sites\/all\/files\/EWSS-CAMF_v1.0.pdf\">https:\/\/www.gsc-europa.eu\/sites\/default\/files\/sites\/all\/files\/EWSS-CAMF_v1.0.pdf<\/a><\/p>\n<p>\u5b9f\u969b\u306b\u4f7f\u3046\u3053\u3068\u306b\u306a\u3063\u305f\u3068\u304d\u306f\u305f\u3068\u3048\u3070A4\u30d5\u30a3\u30fc\u30eb\u30c9\u306e\u707d\u5bb3\u306b\u95a2\u3059\u308b\u60c5\u5831\u306f\u65e5\u672c\u8a9e\u306b\u7ffb\u8a33\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u305d\u3046\u3067\u3059\u306d\u3002A4\u304c0\u306e\u30e1\u30c3\u30bb\u30fc\u30b8\u304c\u964d\u3063\u3066\u304f\u308b\u3053\u3068\u3082\u3042\u308b\u306e\u3067\u3001\u305d\u308c\u3082\u8003\u616e\u3057\u3066\u5b9f\u88c5\u3057\u307e\u3057\u3087\u3046\u3002<br \/>\n\u3061\u306a\u307f\u306b\u3001\u57f7\u7b46\u6642\u70b9\u3067\u5b9f\u969b\u306b\u964d\u3063\u3066\u304f\u308bL-Alert\u306e\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u898b\u3066\u3044\u308b\u3068A12~A16\u306e\u4f4d\u7f6e\u60c5\u5831\u306f\u8a2d\u5b9a\u3055\u308c\u3066\u304a\u3089\u305a\u3001\u305d\u306e\u3068\u304d\u306fEX1\u30d5\u30a3\u30fc\u30eb\u30c9\u306b\u5e02\u533a\u753a\u6751\u30b3\u30fc\u30c9\u304c\u8a2d\u5b9a\u3055\u308c\u307e\u3059\u3002<\/p>\n<pre class=\"brush: python; gutter: false; title: ; notranslate\" title=\"\">\r\n&gt;&gt;&gt; from pprint import pprint\r\n&gt;&gt;&gt; pprint(report.get_params(), sort_dicts=False)\r\n<\/pre>\n<p>\u30ec\u30dd\u30fc\u30c8\u30af\u30e9\u30b9\u306e\u4e2d\u8eab\u3082DCR\u3068\u5168\u304f\u9055\u3044\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; gutter: false; title: ; notranslate\" title=\"\">\r\n{'sentence': '$QZQSM,55,53B0604DE19524CDA305B2C1E355B57800000CCC000000000000001022A8188*7E',\r\n 'timestamp': datetime.datetime(2024, 6, 21, 15, 9, 5, 433111),\r\n 'message': b'S\\xb0`M\\xe1\\x95$\\xcd\\xa3\\x05\\xb2\\xc1\\xe3U\\xb5x\\x00\\x00\\x0c\\xcc'\r\n            b'\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x10&quot;\\xa8\\x18\\x80',\r\n 'nmea': '$QZQSM,55,53B0604DE19524CDA305B2C1E355B57800000CCC000000000000001022A8188*7E',\r\n 'message_header': '$QZQSM',\r\n 'satellite_id': 55,\r\n 'satellite_prn': 183,\r\n 'raw': b'M\\xe1\\x95$\\xcd\\xa3\\x05\\xb2\\xc1\\xe3U\\xb5x\\x00\\x00\\x0c\\xcc\\x00\\x00\\x00'\r\n        b'\\x00\\x00\\x00\\x00\\x10',\r\n 'preamble': 'A',\r\n 'message_type': 'DCX',\r\n 'camf': &lt;azarashi.qzss_dcr_lib.decoder.qzss_dcx_decoder.QzssDcxDecoder.decode.&lt;locals&gt;.CAMF object at 0x1023af6a0&gt;,\r\n 'ignore_a12_to_a16': False,\r\n 'ignore_a17_to_a18': False,\r\n 'ignore_ex1': True,\r\n 'ignore_ex2_to_ex7': True,\r\n 'ignore_ex8_to_ex9': True,\r\n 'satellite_designation_mask_type': 'MT44 is for Japan or for use outside Japan',\r\n 'satellite_designation_mask': &#x5B;'For Japan',\r\n                                'For Japan',\r\n                                'For Japan',\r\n                                'For Japan',\r\n                                'For Japan',\r\n                                'For use outside Japan',\r\n                                'For use outside Japan',\r\n                                'For Japan',\r\n                                'For Japan'],\r\n 'dcx_message_type': 'L-Alert',\r\n 'a1_message_type': 'Alert',\r\n 'a2_country_region_name': 'Japan',\r\n 'a3_provider_identifier': 'Foundation for MultiMedia Communications',\r\n 'a4_hazard_category': 'MET',\r\n 'a4_hazard_type': 'Rainfall',\r\n 'a4_hazard_definition': 'Rainfall greater than or equal to 50 mm in past 24 '\r\n                         'hours. Note: Precise threshold is according to each '\r\n                         'local standard.',\r\n 'a5_severity': 'Severe - Significant threat to life or property',\r\n 'a6_hazard_onset_week': 'Current',\r\n 'a7_hazard_onset_time_of_week': 'SUNDAY - 01:00 PM',\r\n 'a6a7_hazard_onset_datetime': datetime.datetime(2024, 6, 23, 13, 0),\r\n 'a8_hazard_duration': '6H &lt;= Duration &lt; 12H',\r\n 'a9_selection_of_library': 'Country\/region guidance library',\r\n 'a10_library_version': '#1',\r\n 'a11_japanese_library': 'Keep away from Water area.',\r\n 'a11_japanese_library_ja': '\u96e2\u308c\u308d\u3002\u6c34\u5834\u3002',\r\n 'a12_ellipse_centre_latitude': 35.6882581826505,\r\n 'a13_ellipse_centre_longitude': 139.69085457500137,\r\n 'a14_ellipse_semi_major_axis': 10.932758602420911,\r\n 'a15_ellipse_semi_minor_axis': 5.978542029422428,\r\n 'a16_ellipse_azimuth': 45.0,\r\n 'a17_main_subject_for_specific_settings': 'B1 - Improved Resolution of Main '\r\n                                           'Ellipse',\r\n 'c1_refined_latitude_of_centre_of_main_ellipse': 35.6882581826505,\r\n 'c2_refined_longitude_of_centre_of_main_ellipse': 139.69085457500137,\r\n 'c3_refined_length_of_semi_major_axis': 10.932758602420911,\r\n 'c4_refined_length_of_semi_minor_axis': 5.978542029422428,\r\n 'dcx_version': 1}\r\n<\/pre>\n<p>\u3053\u308c\u307e\u3067\u306eDCR\u3092\u30cf\u30f3\u30c9\u30ea\u30f3\u30b0\u3059\u308b\u30b3\u30fc\u30c9\u306bDCX\u306e\u30ec\u30dd\u30fc\u30c8\u30af\u30e9\u30b9\u3092\u6d41\u3057\u8fbc\u3080\u3068\u60f3\u5b9a\u3057\u3066\u3044\u308b\u30e1\u30f3\u30d0\u5909\u6570\u304c\u5b58\u5728\u305b\u305a\u30a8\u30e9\u30fc\u306b\u306a\u308b\u3068\u601d\u3044\u307e\u3059\u3002azarashi.decode_stream()\u30e1\u30bd\u30c3\u30c9\u306b\u306fignore_dcx\u30aa\u30d7\u30b7\u30e7\u30f3\u304c\u3042\u308b\u306e\u3067\u3001DCX\u3092\u6d41\u3057\u3066\u3088\u3051\u308c\u3070False\u3092\u8a2d\u5b9a\u3057\u3066\u304f\u3060\u3055\u3044\u3002<br \/>\n\u5f8c\u65b9\u4e92\u63db\u6027\u306e\u305f\u3081\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u306fDCX\u306f\u7121\u8996\u3055\u308c\u307e\u3059\u3002<\/p>\n<p>\u300c\u81ea\u5206\u3067\u4f5c\u3063\u305f\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u4f7f\u3046\u3093\u3058\u3083\u3044\u300d\u3068\u3044\u3046\u65b9\u306freport.camf\u306b\u30d3\u30c3\u30c8\u30d5\u30a3\u30fc\u30eb\u30c9\u306e\u5024\u304c\u5165\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<pre class=\"brush: python; gutter: false; title: ; notranslate\" title=\"\">\r\n&gt;&gt;&gt; print(report.camf.get_params())\r\n<\/pre>\n<pre class=\"brush: plain; gutter: false; title: ; notranslate\" title=\"\">\r\n{'sdmt': 0, 'sdm': 96, 'a1': 1, 'a2': 111, 'a3': 1, 'a4': 74, 'a5': 2, 'a6': 0, 'a7': 9421, 'a8': 2, 'a9': 1, 'a10': 0, 'a11': 773, 'a12': 45761, 'a13': 116395, 'a14': 13, 'a15': 11, 'a16': 48, 'a17': 0, 'a18': 0, 'ex1': 13104, 'ex2': 0, 'ex3': 0, 'ex4': 0, 'ex5': 0, 'ex6': 0, 'ex7': 0, 'ex8': 0, 'ex9': 7376896189632872448, 'ex10': 0, 'vn': 1, 'c1': 0, 'c2': 0, 'c3': 0, 'c4': 0}\r\n<\/pre>\n<p>GitHub\u306e\u30ec\u30dd\u30b8\u30c8\u30ea\u306b\u661f\u3092\u304f\u3060\u3055\u3063\u305f\u65b9\u3001\u672c\u5f53\u306b\u3042\u308a\u304c\u3068\u3046\u3054\u3056\u3044\u307e\u3059\u3002azarashi\u306e\u534a\u5206\u306f\u3042\u306a\u305f\u306e\u661f\u3067\u3067\u304d\u3066\u3044\u307e\u3059\u3002<br \/>\n\u661f\u3092\u62bc\u3055\u305a\u306b\u4f7f\u3063\u3066\u3044\u308b\u65b9\u3001\u3044\u307e\u3059\u3050\u661f\u3092\u62bc\u3059\u306e\u3067\u3059\u3002\u661f\u3092\u62bc\u3055\u306a\u3044\u3068\u958b\u767a\u304c\u6b62\u307e\u308a\u307e\u3059\u3088\u3002\u661f\u304c\u8db3\u308a\u307e\u305b\u3093\u3002\u661f\u3092\u3082\u3063\u3068\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\u3067\u306f\u3001\u3088\u3044\u30cf\u30c3\u30af\u3092\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3088\u3046\u3084\u304f\u3067\u304d\u307e\u3057\u305f\u3002\u307f\u3061\u3073\u304d\u306e\u707d\u5bb3\u30fb\u5371\u6a5f\u7ba1\u7406\u901a\u5831\u30b5\u30fc\u30d3\u30b9(\u707d\u5371\u901a\u5831\u3001DCR)\u306bJ-Alert\u3068L-Alert\u304c\u8ffd\u52a0\u3055\u308c\u308b\u3068\u805e\u3044\u3066\u3001\u300c2\u3064\u8ffd\u52a0\u3055\u308c\u308b\u3060\u3051\u3067\u3057\u3087\uff1f\u304b\u3093\u305f\u3093\u304b\u3093\u305f\u3093\u300d\u3068\u601d\u3063\u3066\u3044\u305f\u3089\u5168\u7136\u9055\u3044\u307e\u3057\u305f\u3002DCR\u306e\u30c7\u30b3\u30fc [&hellip;]<\/p>\n","protected":false},"author":8,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-5376","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/blog.bitmeister.jp\/index.php?rest_route=\/wp\/v2\/posts\/5376","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.bitmeister.jp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.bitmeister.jp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.bitmeister.jp\/index.php?rest_route=\/wp\/v2\/users\/8"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.bitmeister.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5376"}],"version-history":[{"count":20,"href":"https:\/\/blog.bitmeister.jp\/index.php?rest_route=\/wp\/v2\/posts\/5376\/revisions"}],"predecessor-version":[{"id":5454,"href":"https:\/\/blog.bitmeister.jp\/index.php?rest_route=\/wp\/v2\/posts\/5376\/revisions\/5454"}],"wp:attachment":[{"href":"https:\/\/blog.bitmeister.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5376"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.bitmeister.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5376"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.bitmeister.jp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5376"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}