2222
2323public class TestCoordinates {
2424 PACoordinates paCoordinates ;
25+ TestLib testLib ;
2526
2627 public TestCoordinates () {
2728 paCoordinates = new PACoordinates ();
29+ testLib = new TestLib ();
2830 }
2931
3032 public void testAngleToFromDecimalDegrees () {
31- TestLib testLib = new TestLib ();
32-
3333 double decimalDegrees = paCoordinates .angleToDecimalDegrees (182 , 31 , 27 );
3434
3535 testLib .setTestName ("Decimal Degrees for 182d 31m 27s" ).Assert (182.524167 , PAUtil .round (decimalDegrees , 6 ));
@@ -41,8 +41,6 @@ public void testAngleToFromDecimalDegrees() {
4141 }
4242
4343 public void testRightAscensionToFromHourAngle () {
44- TestLib testLib = new TestLib ();
45-
4644 HourAngle hourAngle = paCoordinates .rightAscensionToHourAngle (18 , 32 , 21 , 14 , 36 , 51.67 , false , -4 , 22 , 4 , 1980 ,
4745 -64 );
4846
@@ -59,8 +57,6 @@ public void testRightAscensionToFromHourAngle() {
5957 }
6058
6159 public void testEquatorialCoordinatesToFromHorizonCoordinates () {
62- TestLib testLib = new TestLib ();
63-
6460 HorizonCoordinates horizonCoordinates = paCoordinates .equatorialCoordinatesToHorizonCoordinates (5 , 51 , 44 , 23 ,
6561 13 , 10 , 52 );
6662
@@ -82,17 +78,13 @@ public void testEquatorialCoordinatesToFromHorizonCoordinates() {
8278 }
8379
8480 public void testMeanObliquityOfTheEcliptic () {
85- TestLib testLib = new TestLib ();
86-
8781 double meanObliquityOfTheEcliptic = PAUtil .round (paCoordinates .meanObliquityOfTheEcliptic (6 , 7 , 2009 ), 8 );
8882
8983 testLib .setTestName ("Mean Obliquity of the Ecliptic for 7/6/2009" ).Assert (23.43805531 ,
9084 meanObliquityOfTheEcliptic );
9185 }
9286
9387 public void testEclipticCoordinateToFromEquatorialCoordinate () {
94- TestLib testLib = new TestLib ();
95-
9688 EquatorialCoordinatesRA equatorialCoordinatesRA = paCoordinates .eclipticCoordinateToEquatorialCoordinate (139 ,
9789 41 , 10 , 4 , 52 , 31 , 6 , 7 , 2009 );
9890
@@ -116,8 +108,6 @@ public void testEclipticCoordinateToFromEquatorialCoordinate() {
116108 }
117109
118110 public void testEquatorialCoordinateToFromGalacticCoordinate () {
119- TestLib testLib = new TestLib ();
120-
121111 GalacticCoordinates galacticCoordinates = paCoordinates .equatorialCoordinateToGalacticCoordinate (10 , 21 , 0 , 10 ,
122112 3 , 11 );
123113
@@ -141,8 +131,6 @@ public void testEquatorialCoordinateToFromGalacticCoordinate() {
141131 }
142132
143133 public void testAngleBetweenTwoObjects () {
144- TestLib testLib = new TestLib ();
145-
146134 Angle angle = paCoordinates .angleBetweenTwoObjects (5 , 13 , 31.7 , -8 , 13 , 30 , 6 , 44 , 13.4 , -16 , 41 , 11 ,
147135 AngleMeasure .HOURS );
148136
@@ -152,8 +140,6 @@ public void testAngleBetweenTwoObjects() {
152140 }
153141
154142 public void testRisingAndSetting () {
155- TestLib testLib = new TestLib ();
156-
157143 RiseSet riseSet = paCoordinates .risingAndSetting (23 , 39 , 20 , 21 , 42 , 0 , 24 , 8 , 2010 , 64 , 30 , 0.5667 );
158144
159145 testLib .setTestName (
@@ -164,8 +150,6 @@ public void testRisingAndSetting() {
164150 }
165151
166152 public void testCorrectForPrecession () {
167- TestLib testLib = new TestLib ();
168-
169153 RightAscensionDeclination rightAscensionDeclination = paCoordinates .correctForPrecession (9 , 10 , 43 , 14 , 23 , 25 ,
170154 0.923 , 1 , 1950 , 1 , 6 , 1979 );
171155
@@ -180,8 +164,6 @@ public void testCorrectForPrecession() {
180164 }
181165
182166 public void testNutationInEclipticLongitudeAndObliquity () {
183- TestLib testLib = new TestLib ();
184-
185167 Nutation nutation = paCoordinates .nutationInEclipticLongitudeAndObliquity (1 , 9 , 1988 );
186168
187169 testLib .setTestName ("Nutation in Ecliptic Longitude and Obliquity for Greenwich Date 9/1/1988" )
@@ -190,8 +172,6 @@ public void testNutationInEclipticLongitudeAndObliquity() {
190172 }
191173
192174 public void testCorrectForAberration () {
193- TestLib testLib = new TestLib ();
194-
195175 Aberration aberration = paCoordinates .correctForAberration (0 , 0 , 0 , 8 , 9 , 1988 , 352 , 37 , 10.1 , -1 , 32 , 56.4 );
196176
197177 testLib .setTestName (
@@ -202,8 +182,6 @@ public void testCorrectForAberration() {
202182 }
203183
204184 public void testRefraction () {
205- TestLib testLib = new TestLib ();
206-
207185 RightAscensionDeclination correctedCoordinates = paCoordinates .atmosphericRefraction (23 , 14 , 0 , 40 , 10 , 0 ,
208186 CoordinateType .TRUE , 0.17 , 51.2036110 , 0 , 0 , 23 , 3 , 1987 , 1 , 1 , 24 , 1012 , 21.7 );
209187
@@ -216,8 +194,6 @@ public void testRefraction() {
216194 }
217195
218196 public void testParallax () {
219- TestLib testLib = new TestLib ();
220-
221197 RightAscensionDeclination correctedCoordinates = paCoordinates .correctionsForGeocentricParallax (22 , 35 , 19 , -7 ,
222198 41 , 13 , CoordinateType .TRUE , 1.019167 , -100 , 50 , 60 , 0 , -6 , 26 , 2 , 1979 , 10 , 45 , 0 );
223199
@@ -230,8 +206,6 @@ public void testParallax() {
230206 }
231207
232208 public void testHeliographicCoordinates () {
233- TestLib testLib = new TestLib ();
234-
235209 HeliographicCoordinates heliographicCoordinates = paCoordinates .heliographicCoordinates (220 , 10.5 , 1 , 5 , 1988 );
236210
237211 testLib .setTestName ("Heliographic Coordinates" )
@@ -240,16 +214,12 @@ public void testHeliographicCoordinates() {
240214 }
241215
242216 public void testCarringtonRotationNumber () {
243- TestLib testLib = new TestLib ();
244-
245217 int carringtonRotationNumber = paCoordinates .carringtonRotationNumber (27 , 1 , 1975 );
246218
247219 testLib .setTestName ("Carrington Rotation Number" ).Assert (1624 , carringtonRotationNumber );
248220 }
249221
250222 public void testSelenographicCoordinates1 () {
251- TestLib testLib = new TestLib ();
252-
253223 SelenographicCoordinates1 selenographicCoordinates1 = paCoordinates .selenographicCoordinates1 (1 , 5 , 1988 );
254224
255225 testLib .setTestName ("Selenographic Coordinates (1)" )
@@ -259,8 +229,6 @@ public void testSelenographicCoordinates1() {
259229 }
260230
261231 public void testSelenographicCoordinates2 () {
262- TestLib testLib = new TestLib ();
263-
264232 SelenographicCoordinates2 selenographicCoordinates2 = paCoordinates .selenographicCoordinates2 (1 , 5 , 1988 );
265233
266234 testLib .setTestName ("Selenographic Coordinates (2)" )
0 commit comments