Warning: The magic method SFML_Singleton::__wakeup() must have public visibility in /home/public/wp-content/plugins/sf-move-login/inc/classes/class-sfml-singleton.php on line 72

Warning: Cannot modify header information - headers already sent by (output started at /home/public/wp-content/plugins/sf-move-login/inc/classes/class-sfml-singleton.php:72) in /home/public/wp-includes/rest-api/class-wp-rest-server.php on line 1642

Warning: Cannot modify header information - headers already sent by (output started at /home/public/wp-content/plugins/sf-move-login/inc/classes/class-sfml-singleton.php:72) in /home/public/wp-includes/rest-api/class-wp-rest-server.php on line 1642

Warning: Cannot modify header information - headers already sent by (output started at /home/public/wp-content/plugins/sf-move-login/inc/classes/class-sfml-singleton.php:72) in /home/public/wp-includes/rest-api/class-wp-rest-server.php on line 1642

Warning: Cannot modify header information - headers already sent by (output started at /home/public/wp-content/plugins/sf-move-login/inc/classes/class-sfml-singleton.php:72) in /home/public/wp-includes/rest-api/class-wp-rest-server.php on line 1642

Warning: Cannot modify header information - headers already sent by (output started at /home/public/wp-content/plugins/sf-move-login/inc/classes/class-sfml-singleton.php:72) in /home/public/wp-includes/rest-api/class-wp-rest-server.php on line 1642

Warning: Cannot modify header information - headers already sent by (output started at /home/public/wp-content/plugins/sf-move-login/inc/classes/class-sfml-singleton.php:72) in /home/public/wp-includes/rest-api/class-wp-rest-server.php on line 1642

Warning: Cannot modify header information - headers already sent by (output started at /home/public/wp-content/plugins/sf-move-login/inc/classes/class-sfml-singleton.php:72) in /home/public/wp-includes/rest-api/class-wp-rest-server.php on line 1642

Warning: Cannot modify header information - headers already sent by (output started at /home/public/wp-content/plugins/sf-move-login/inc/classes/class-sfml-singleton.php:72) in /home/public/wp-includes/rest-api/class-wp-rest-server.php on line 1642
{"id":289,"date":"2020-02-11T20:53:40","date_gmt":"2020-02-12T03:53:40","guid":{"rendered":"http:\/\/www.munderwood.ca\/?p=289"},"modified":"2020-02-11T20:53:41","modified_gmt":"2020-02-12T03:53:41","slug":"mmsi-parsing-library-mmsi-js","status":"publish","type":"post","link":"https:\/\/www.munderwood.ca\/index.php\/2020\/02\/11\/mmsi-parsing-library-mmsi-js\/","title":{"rendered":"MMSI parsing library: mmsi.js"},"content":{"rendered":"\n

A Maritime Mobile Service Identity<\/a> is a nine-digit number that can be broadcast by a ship or other vessel to provide some information about itself and its current location, to anyone within radio range. I recently published on NPM<\/a> a small JavaScript library<\/a> for validating MMSIs and parsing them to extract details about the country or jurisdiction to which they are assigned.<\/p>\n\n\n\n

In the initial version, the primary usefulness of the library lies in two parts. First is its knowledge of which three digits of a given MMSI represent a MID code<\/a>, since the location of the Marine Identification Digits is not the same in every MMSI. Second is its ability to provide the ISO 3166 code for the jurisdiction,1<\/a><\/sup> along with its name and (if different) full name.<\/p>\n\n\n\n

For example, given the MMSI “316123456”, with mmsi.js you can find out that the MID code is “316”, which corresponds to a code of “CA” and a country of “Canada”. With a different format, “986681234” has a MID code of “668”, corresponding to S\u00e3o Tom\u00e9 and Pr\u00edncipe, with a code of “ST” and a full name of “S\u00e3o Tom\u00e9 and Pr\u00edncipe (Democratic Republic of)”.<\/p>\n\n\n\n

Additional information encoded in MMSIs includes details about the type of transceiver to which the code is assigned, such as vessel, search-and-rescue aircraft, or shore station. I plan to add more functionality to extract these sorts of details, as well as to improve the detection of valid values beyond simply checking for nine numeric digits.<\/p>\n

  1. There are a very small number of jurisdictions assigned MID codes by the ITU<\/a> that do not have ISO codes, such as the Crozet Archipelago<\/a>, Kerguelen Islands<\/a>, and Saint Paul<\/a> and Amsterdam Islands<\/a>, all part of the French Southern Territories<\/a>. In these few cases, reasonable adaptations have been assigned. [↩<\/a>]<\/span><\/li><\/ol>","protected":false},"excerpt":{"rendered":"

    A Maritime Mobile Service Identity is a nine-digit number that can be broadcast by a ship or other vessel to provide some information about itself and its current location, to anyone within radio range. I recently published on NPM a small JavaScript library for validating MMSIs and parsing them to extract details about the country … [Read more…]<\/a><\/span><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[16],"tags":[23,24,21,22],"_links":{"self":[{"href":"https:\/\/www.munderwood.ca\/index.php\/wp-json\/wp\/v2\/posts\/289"}],"collection":[{"href":"https:\/\/www.munderwood.ca\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.munderwood.ca\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.munderwood.ca\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.munderwood.ca\/index.php\/wp-json\/wp\/v2\/comments?post=289"}],"version-history":[{"count":10,"href":"https:\/\/www.munderwood.ca\/index.php\/wp-json\/wp\/v2\/posts\/289\/revisions"}],"predecessor-version":[{"id":299,"href":"https:\/\/www.munderwood.ca\/index.php\/wp-json\/wp\/v2\/posts\/289\/revisions\/299"}],"wp:attachment":[{"href":"https:\/\/www.munderwood.ca\/index.php\/wp-json\/wp\/v2\/media?parent=289"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.munderwood.ca\/index.php\/wp-json\/wp\/v2\/categories?post=289"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.munderwood.ca\/index.php\/wp-json\/wp\/v2\/tags?post=289"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}