tburke / stardroid

Automatically exported from code.google.com/p/stardroid
0 stars 0 forks source link

Assertion failed at testPositions (RaDecTest.java) #17

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
When running tests, both on Eclipse or on terminal, the testPositions test at 
RaDecTest.java yields an AssertionFailedError.

Here's the trace:
junit.framework.AssertionFailedError: expected:<173.25> but 
was:<172.99676513671875>
at 
com.google.android.stardroid.test.units.RaDecTest.testPositions(RaDecTest.java:7
7)
at java.lang.reflect.Method.invokeNative(Native Method)
at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:169)
at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:154)
at 
android.test.InstrumentationTestRunner.onStart(InstrumentationTestRunner.java:52
0)
at 
android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:1447)

I tried to correct it, but I can't understand what the problem really is, since 
it is related to the planet's position.

Thanks for your help!

Original issue reported on code.google.com by pedromfm...@gmail.com on 24 Apr 2013 at 10:11

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
HeliocentricCoordinates seems to use Planet.getOrbitalElements to compute 
astrometric positions for epoch J2000.0, but RaDecTest expects apparent 
positions (accounting for precession etc.) for the given date. In 2009 the 
astrometric and apparent RA differ by about 0.12 deg according to JPL HORIZONS. 
With their approximation formulas for 1800-2050, JPL also estimates an error of 
0.17 deg in Saturn's RA. No wonder this assertion failed.

I suppose RaDecTest should use astrometric reference positions. I didn't find 
code in app/src to compute precession etc.

Original comment by mgarraha on 4 May 2013 at 11:17