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 or jurisdiction to which they are assigned.
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, 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 along with its name and (if different) full name.
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ão Tomé and Príncipe, with a code of “ST” and a full name of “São Tomé and Príncipe (Democratic Republic of)”.
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.
- There are a very small number of jurisdictions assigned MID codes by the ITU that do not have ISO codes, such as the Crozet Archipelago, Kerguelen Islands, and Saint Paul and Amsterdam Islands, all part of the French Southern Territories. In these few cases, reasonable adaptations have been assigned. [↩]