about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEmile <hanemile@protonmail.com>2019-09-25 16:54:19 +0200
committerEmile <hanemile@protonmail.com>2019-09-25 16:54:19 +0200
commitb8102cd64156247b739f6ab9f756912dac1b4348 (patch)
tree6fe816f1b8023690930582f12c3e1e97a8486edc
parentaf44bb03954019d358ae5da7fac4647e2f35d04e (diff)
added a test for an empty international designator
-rw-r--r--convert_test.go46
1 files changed, 46 insertions, 0 deletions
diff --git a/convert_test.go b/convert_test.go
index f3dd2b4..035d4b0 100644
--- a/convert_test.go
+++ b/convert_test.go
@@ -218,6 +218,52 @@ func TestNewTLE(t *testing.T) {
 			wantErr: false,
 		},
 		{
+			name: "CALSPHERE 1             ",
+			args: args{
+				RawTLE: `CALSPHERE 1                                                                       
+1 00900U          19230.92310804  .00000183  00000-0  18763-3 0  9990
+2 00900  90.1493  23.5442 0025413 246.1721 230.7950 13.73262737728795`,
+			},
+			want: TLE{
+				TitleLine: TitleLine{
+					Satname: "CALSPHERE 1             ",
+				},
+				LineOne: LineOne{
+					Linenumber:      1,
+					SatelliteNumber: 900,
+					Classification:  "U",
+					InternationalDesignator: InternationalDesignator{
+						Launchyear:   -1,
+						Launchnumber: -1,
+						Launchpiece:  "",
+					},
+					Epoch: Epoch{
+						Year:        19,
+						Dayfraction: 230.92310804,
+					},
+					Firstderiv:       0.00000183,
+					Secondderiv:      0,
+					BSTAR:            0.00018763,
+					Numberzero:       0,
+					ElementSetNumber: 999,
+					Checksum:         0,
+				},
+				LineTwo: LineTwo{
+					Linenumber:                       2,
+					SatelliteNumber:                  900,
+					Inclination:                      90.1493,
+					RightAscensionOfTheAscendingNode: 23.5442,
+					Eccentricity:                     25413,
+					ArgumentOfPerigee:                246.1721,
+					MeanAnomaly:                      230.795,
+					MeanMotion:                       13.73262737,
+					RevolutionNumberAtEpoch:          72879,
+					Checksum:                         5,
+				},
+			},
+			wantErr: false,
+		},
+		{
 			name: "NewTLE parseLineOne err",
 			args: args{
 				RawTLE: `NOAA 1 [-]