3
$\begingroup$

I am trying to compute lunar parallax using the position of the star Regulus on February 19th of this year. I get different answers depending on how I specify the date.

Here are the particulars:

 star = regulus = Entity["Star", "Regulus"];
 date1 = DateObject[{2019, 2, 19, 0, 0, 27}, TimeZone -> -5]
 date2 = DateObject[{2019, 2, 19, 5, 0, 27}, TimeZone -> "GMT"]
 (* Note: explicit 5 with GMT *)

 date1 == date2                              (* True *)
 AbsoluteTime@date1 == AbsoluteTime@date2    (* True *)

I then define EntityProperties for retrieving Regulus's azimuth and altitude coordinates using both dates:

altitudeProperty1 = 
  EntityProperty["Star", "Altitude", {"Date" -> date1}];
azimuthProperty1 = 
  EntityProperty["Star", "Azimuth", {"Date" -> date1}];
altitudeProperty2 = 
  EntityProperty["Star", "Altitude", {"Date" -> date2}];
azimuthProperty2 = 
  EntityProperty["Star", "Azimuth", {"Date" -> date2}];

Querying StarData with these properties yields different results:

StarData[star, {azimuthProperty1, altitudeProperty1}]
StarData[star, {azimuthProperty2, altitudeProperty2}]

The answers produced are different:

Computed Results

I believe the first answer to be correct as checked by Stellarium and NAOJ. Interestingly, changing the "5" in date2 to "0", while leaving the TimeZone as "GMT", fixes the problem (leads to identical correct results).

(Using the Star entity instead of StarData produces identical results.)

My question is: am I misunderstanding how TimeZones work or is this a problem with MMA?

Note: I am running MMA 12.0.0.0 on a MacBook Pro with OSX 10.13.4.

$\endgroup$
  • $\begingroup$ Also changing GMT to 0, also fixes it. Something inside StarData treats string timezones differently I guess. $\endgroup$ – swish Sep 13 '19 at 22:44

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.