7
$\begingroup$

Bug introduced in 10.0 and fixed in 10.2

MoonPosition is new in 10.0


With this question, I noticed some some weird results of MoonPosition. Consider the following code:

dateSunEclipse = DateObject[{2015,03,20,10,32,09},TimeZone->1];
dateSunEclipse0 = DateObject[{2015,03,20,9,32,09},TimeZone->0];
MoonPosition[dateSunEclipse, CelestialSystem -> "Equatorial"];
MoonPosition[dateSunEclipse, CelestialSystem -> "Equatorial"];

{Quantity[23.883, "HoursOfRightAscension"], Quantity[0.365, "AngularDegrees"]}

{Quantity[23.843, "HoursOfRightAscension"], Quantity[0.166, "AngularDegrees"]}

We expect the two expressions return the same result. Indeed SunPosition works as expected.

SunPosition[dateSunEclipse, CelestialSystem -> "Equatorial"]
SunPosition[dateSunEclipse0, CelestialSystem -> "Equatorial"]

{Quantity[23.967, "HoursOfRightAscension"], Quantity[-0.217, "AngularDegrees"]}

{Quantity[23.967, "HoursOfRightAscension"], Quantity[-0.217, "AngularDegrees"]}

Is this a "bug"?

Workaround. It's better to always TimeZoneConvert the input of MoonPosition.

MoonPosition[TimeZoneConvert[dateSunEclipse, 0], 
 CelestialSystem -> "Equatorial"]
MoonPosition[TimeZoneConvert[dateSunEclipse0, 0], 
 CelestialSystem -> "Equatorial"]

{Quantity[23.843, "HoursOfRightAscension"], Quantity[0.166, "AngularDegrees"]}

{Quantity[23.843, "HoursOfRightAscension"], Quantity[0.166, "AngularDegrees"]}

UPDATE FROM WOLFRAM

There seems to be an issue with TimeZone when used with MoonPosition. I have reported it to our developers and they will be working to fix the issue. I would like to thank you once again for bringing this issue to our attention. In future, if you run into any other behavior problems or have any questions please do not hesitate to contact me.

$\endgroup$
  • 1
    $\begingroup$ May be related to the SunPosition issues I reported a year ago here. It really took quite some effort convincing the WRI developer they had a bug there. $\endgroup$ – Sjoerd C. de Vries Apr 18 '15 at 22:26
  • $\begingroup$ @SjoerdC.deVries It is possible they miss to fix MoonPosition? The "slow response issue" for SunPositionis is still current? On my machine/network SunPosition is faster than MoonPosition... $\endgroup$ – unlikely Apr 18 '15 at 23:13
  • $\begingroup$ Possible. I suggest you contact support@wolfram.com. Not much we can do here $\endgroup$ – Sjoerd C. de Vries Apr 19 '15 at 9:25
  • $\begingroup$ Fixed in the development version; thank you for reporting it! $\endgroup$ – ilian May 18 '15 at 20:40
  • $\begingroup$ @ilian, it'd have been better to post your status update as an answer instead of an edit to the question. Just sayin'… :) $\endgroup$ – J. M. is away May 18 '15 at 22:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.