Pages

03 November, 2022

Planet positions for the Multi Face GPS Clock

Another update, this time to add:

  • Azimuth and elevation for inner and outer planets relative to your present location. The inner planet screen shows Venus and Mercury and alternates also every 10 seconds between showing the position of the sun and the moon. The % illumination is also shown along with an estimate of apparent magnitude
  • The combined local time and UTC display now has an option to show ISO week number, defined to start on Mondays. (It is my understanding that the week number in the US is different, as Sunday is the first day of the week)
  • A new calendar screen now shows Gregorian (western), Julian (eastern) as well as Islamic and Jewish dates. The calculation of the Jewish calendar is tough for the Arduino Mega and takes some 5-6 seconds
  • A screen showing GPS Info has also been included. This screen shows the number of satellites in view (line 0), the number of satellites in use for position fix and their average signal to noise ratio (line 1), the mode and status indicators (line 2), and the Horizontal Dilution of Precision, Hdop, and its characterization in plain text (line 3).
Sources:










5 comments:

  1. Hi Sverre

    Firstly, an excellant project, thank you for posting it.

    I too noticed that the Arduino calculated magnitude of Mercury is not the same as that calculated on the heavens-above.com website. The
    discrepancy is largest when Mercury is at its dimmest. For example, the heavens-above.com website on 16 april 2024
    reports Mercury's magnitude as +4.0, whilst the Arduino code reports it as +1.0. The fix for this is to change line 286
    in clock_z_planets.h from

    if (object_number == 0) magnitude = -0.36 + 5 * log10(r * R) + 0.027 * phase_angle; //Mercury


    to


    if (object_number == 0) magnitude = -0.42 + 5 * log10(r * R) + 0.038 * phase_angle - 0.000273 * phase_angle * phase_angle + 0.000002 * phase_angle * phase_angle * phase_angle; //Mercury


    Now the Arduino calculated value will agree with (the correct) heavens-above.com value to within 0.1 magnitude for all brightnesses.

    (The author of the original clock_z_planets.h had neglected the very important last 2 terms in the above equation).

    Mercury really does get very very dim at certain times of the year.

    I found this formula from the publication 'Astronimical Algorithms' (Second Edition), Chapter 41, Page 286. There are copies of this book floating around on the web.

    Richard

    ReplyDelete
    Replies
    1. Thanks a lot Richard, much appreciated. I'll implement this shortly

      Delete
    2. Hi Sverre

      In a similar fashion to Mercury, the Arduino calculated magnitude could be quite far out compared to the heavens-above.com website. For example, on 21 March 2025 the heavens-above.com website reports Venus's magnitude as -4.0, whilst the Arduino calculated value is -5.6.

      Again, the fix for this is to change line 287 in clock_z_planets.h from

      if (object_number == 1) magnitude = -4.34 + 5 * log10(r * R) + 0.013 * phase_angle; //Venus

      to

      if (object_number == 1) magnitude = -4.40 + 5 * log10(r * R) + 0.0009 * phase_angle + 0.000239 * phase_angle * phase_angle - 0.00000065 * phase_angle * phase_angle * phase_angle; //Venus

      Now the Arduino calculated value and the heavens-above.com value agree to within 0.1 magnitude for all magnitudes.

      Again, this formula comes from the publication 'Astronomical Algorithms' (Second Edition), Chapter 41, Page 286.

      Richard

      Delete
    3. Thanks again, Richard. I looked up Meeus p. 286 and found some smaller corrections for Mars and Jupiter aqlso. All the corrections are now in my experimental version, and will be in the next release, along with improved code for estimating sunrise/set times which agrees with timeanddate.com within a minute. See libraries at end of https://github.com/la3za/Multi-Face-GPS-Clock/wiki

      Delete
    4. Please join the groups.io discussion group for the Multi Face GPS Clock and related projects: https://groups.io/g/Multi-Face-GPS-Clock/

      Delete