File tree Expand file tree Collapse file tree 3 files changed +21
-1
lines changed
main/java/uk/me/g4dpz/satellite
test/java/uk/me/g4dpz/satellite Expand file tree Collapse file tree 3 files changed +21
-1
lines changed Original file line number Diff line number Diff line change @@ -124,13 +124,21 @@ public TLE(final TLE tle) {
124
124
this .createddate = tle .createddate ;
125
125
}
126
126
127
+ public TLE (final String [] tle ) throws IllegalArgumentException {
128
+ this (tle , false );
129
+ }
130
+
127
131
/**
128
132
* Constructor.
129
133
*
130
134
* @param tle the three line elements
131
135
* @throws IllegalArgumentException here was something wrong with the TLE
132
136
*/
133
- public TLE (final String [] tle ) throws IllegalArgumentException {
137
+ public TLE (final String [] tle , boolean nilStart ) throws IllegalArgumentException {
138
+
139
+ if (nilStart ) {
140
+ tle [0 ] = tle [0 ].substring (2 );
141
+ }
134
142
135
143
if (null == tle ) {
136
144
throw new IllegalArgumentException ("TLE was null" );
Original file line number Diff line number Diff line change @@ -80,6 +80,11 @@ protected AbstractSatelliteTestBase() {
80
80
"1 33139U 06026MX 09359.84164805 .10408321 74078-5 34039-2 0 6397" ,
81
81
"2 33139 064.8768 254.5588 0010700 285.2081 074.8503 16.45000000 91112" };
82
82
83
+ protected static final String [] NIL_START_TLE = {
84
+ "0 AO-51 [+]" ,
85
+ "1 28375U 04025K 09105.66391970 .00000003 00000-0 13761-4 0 3643" ,
86
+ "2 28375 098.0551 118.9086 0084159 315.8041 043.6444 14.40638450251959" };
87
+
83
88
protected static final String LATITUDE = "52.4670" ;
84
89
protected static final String LONGITUDE = "-2.022" ;
85
90
protected static final int HEIGHT_AMSL = 200 ;
Original file line number Diff line number Diff line change @@ -72,6 +72,13 @@ public void testCopyConstructor() {
72
72
checkData (tleCopy );
73
73
}
74
74
75
+ @ Test
76
+ public void testNilStartTLE () {
77
+
78
+ final TLE tle = new TLE (NIL_START_TLE , true );
79
+ checkData (tle );
80
+ }
81
+
75
82
@ Test
76
83
public void testTLEReadDeepSpace () {
77
84
final String [] theTLE = {
You can’t perform that action at this time.
0 commit comments