Merge pull request #470 from ArjanOnwezen/prepadding-MMSI-in-AIS

Prepadded MMSI in AIS app with zeros, so it's always 9 chars long
This commit is contained in:
Erwin Ried 2022-01-17 10:35:07 +01:00 committed by GitHub
commit f42479c190
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -59,7 +59,7 @@ static float latlon_float(const int32_t normalized) {
static std::string mmsi(
const ais::MMSI& mmsi
) {
return to_string_dec_uint(mmsi, 9);
return to_string_dec_uint(mmsi, 9, '0'); // MMSI is always is always 9 characters pre-padded with zeros
}
static std::string navigational_status(const unsigned int value) {