Python/Windows: added rotation and refraction unit tests.

Also had to adjust a couple of error thresholds.
Windows version of Python calculates slightly different
numbers than Linux version. Perhaps a difference in
runtime libraries?
This commit is contained in:
Don Cross
2019-12-18 10:19:26 -05:00
parent e168f37ac5
commit 69463e04cf
2 changed files with 8 additions and 2 deletions

View File

@@ -218,6 +218,12 @@ echo.Running Python tests.
test.py time
if errorlevel 1 (exit /b 1)
test.py refraction
if errorlevel 1 (exit /b 1)
test.py rotation
if errorlevel 1 (exit /b 1)
test.py apsis
if errorlevel 1 (exit /b 1)

View File

@@ -896,7 +896,7 @@ def Test_EQD_HOR(body):
check_eqd = astronomy.RotateVector(irot, vec_hor)
diff = VectorDiff(check_eqd, vec_eqd)
print('Test_EQD_HOR {}: OFDATE inverse rotation diff = {}'.format(body.name, diff))
if diff > 1.0e-15:
if diff > 2.0e-15:
print('Test_EQD_HOR: EXCESSIVE OFDATE INVERSE HORIZONTAL ERROR.')
sys.exit(1)
@@ -907,7 +907,7 @@ def Test_EQD_HOR(body):
check_eqj = astronomy.RotateVector(yrot, vec_hor)
diff = VectorDiff(check_eqj, vec_eqj)
print('Test_EQD_HOR {}: J2000 inverse rotation diff = {}'.format(body.name, diff))
if diff > 3.0e-15:
if diff > 4.0e-15:
print('Test_EQD_HOR: EXCESSIVE J2000 INVERSE HORIZONTAL ERROR.')
sys.exit(1)