Skip to content

Commit

Permalink
fix typo on MMSI variable name
Browse files Browse the repository at this point in the history
  • Loading branch information
aldas committed Jan 3, 2022
1 parent 03882e1 commit f4d3e51
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions dsc.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ type DSC struct {
// MMSI of ship in distress (10 digits or empty)
// > The call content is next described as having a "self-identification" element. This is simply the sending
// > station's MMSI, encoded like the address element. This identifies who sent the message.
MSSI string
MMSI string

// DistressCause is The cause of the distress (2 digits or empty)
DistressCause string
Expand All @@ -117,7 +117,7 @@ func newDSC(s BaseSentence) (DSC, error) {
CommandTypeOrTeleCommand2: p.String(4, "type of communication or second telecommand"),
PositionOrCanal: p.String(5, "position or canal"),
TimeOrTelephoneNumber: p.String(6, "time or telephone"),
MSSI: p.String(7, "MSSI"),
MMSI: p.String(7, "MMSI"),
DistressCause: p.String(8, "distress cause"),
Acknowledgement: strings.TrimSpace(p.EnumString(
9,
Expand Down
6 changes: 3 additions & 3 deletions dsc_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ func TestDSC(t *testing.T) {
CommandTypeOrTeleCommand2: "00",
PositionOrCanal: "1423108312",
TimeOrTelephoneNumber: "2019",
MSSI: " ",
MMSI: " ",
DistressCause: " ",
Acknowledgement: "S",
ExpansionIndicator: " E ",
Expand All @@ -40,7 +40,7 @@ func TestDSC(t *testing.T) {
CommandTypeOrTeleCommand2: "00",
PositionOrCanal: "1423108312",
TimeOrTelephoneNumber: "0236",
MSSI: "3381581370",
MMSI: "3381581370",
DistressCause: " ",
Acknowledgement: "S",
ExpansionIndicator: " ",
Expand All @@ -57,7 +57,7 @@ func TestDSC(t *testing.T) {
CommandTypeOrTeleCommand2: "26",
PositionOrCanal: "1423108312",
TimeOrTelephoneNumber: "1902",
MSSI: " ",
MMSI: " ",
DistressCause: " ",
Acknowledgement: "B",
ExpansionIndicator: " E ",
Expand Down
4 changes: 2 additions & 2 deletions dse.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ type DSE struct {
TotalNumber int64 // total number of sentences, 01 to 99
Number int64 // number of current sentence, 01 to 99
Acknowledgement string // Acknowledgement (R=Acknowledge request, B=Acknowledgement, S=Neither (end of sequence))
MSSI string // MMSI of vessel (10 digits)
MMSI string // MMSI of vessel (10 digits)
DataSets []DSEDataSet
}

Expand Down Expand Up @@ -56,7 +56,7 @@ func newDSE(s BaseSentence) (DSE, error) {
TotalNumber: p.Int64(0, "total number of sentences"),
Number: p.Int64(1, "sentence number"),
Acknowledgement: p.EnumString(2, "acknowledgement", AcknowledgementAutomaticDSE, AcknowledgementRequestDSE, AcknowledgementQueryDSE),
MSSI: p.String(3, "MSSI"),
MMSI: p.String(3, "MMSI"),
DataSets: nil,
}
datasetFieldCount := len(p.Fields) - 4
Expand Down
4 changes: 2 additions & 2 deletions dse_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ func TestDSE(t *testing.T) {
TotalNumber: 1,
Number: 1,
Acknowledgement: AcknowledgementAutomaticDSE,
MSSI: "3380400790",
MMSI: "3380400790",
DataSets: []DSEDataSet{
{Code: "00", Data: "46504437"},
},
Expand All @@ -32,7 +32,7 @@ func TestDSE(t *testing.T) {
TotalNumber: 1,
Number: 1,
Acknowledgement: AcknowledgementAutomaticDSE,
MSSI: "3380400790",
MMSI: "3380400790",
DataSets: []DSEDataSet{
{Code: "00", Data: "46504437"},
{Code: "01", Data: "16501437"},
Expand Down

0 comments on commit f4d3e51

Please sign in to comment.