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"]}
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.
Comments
Post a Comment