Files
astronomy/generate
Don Cross 462f172e6d Kotlin: restored original series calculations.
Changing series calculations to use `sumOf` caused
test failures for Jupiter's moons, compared to the other
languages. I don't understand why, but it is losing about
5 decimal places of accuracy:

    First  file: temp/c_check.txt
    Second file: temp/k_check.txt
    Tolerance = 6.700e-15

                lnum                 a_value                 b_value     factor       diff  name
      OK       59558 -3.7992709399390907e-04 -3.7992709399390658e-04  411.52263  1.026e-15  helio_x
      OK       70088 -1.2672603312645981e-03 -1.2672603312646005e-03  411.52263  9.816e-16  helio_y
      OK      122819  1.0937502621531685e-04  1.0937502621531790e-04  411.52263  4.294e-16  helio_z
      OK        2427  2.0269124415104024e+01  2.0269124415104031e+01    0.01730  1.229e-16  sky_j2000_ra
      OK       96711 -1.3269907232295576e+01 -1.3269907232295552e+01    0.00556  1.382e-16  sky_j2000_dec
      OK      321094  1.9426425943521761e+00  1.9426425943521755e+00    2.61780  1.744e-15  sky_j2000_dist
      OK      302748  3.5388201408771312e+02  3.5388201408771533e+02    0.00275  6.086e-15  sky_hor_az
      OK      121119 -2.2454039277279009e+01 -2.2454039277279151e+01    0.00556  7.895e-16  sky_hor_alt
    FAIL      462886  3.2838700693197847e-05  3.2838701021405780e-05  354.60993  1.164e-10  jm_x
    FAIL       18898  4.1298198258838197e-05  4.1298197961707834e-05  354.60993  1.054e-10  jm_y
    FAIL       18898  6.5401658638156675e-05  6.5401658496812707e-05  354.60993  5.012e-11  jm_z
    FAIL       18898 -1.9369714715980919e-04 -1.9369714599049137e-04  100.00000  1.169e-10  jm_vx
    FAIL      462886  2.0741129523130840e-04  2.0741129628185288e-04  100.00000  1.051e-10  jm_vy
    FAIL      462886 -7.0200557604537683e-05 -7.0200557103467577e-05  100.00000  5.011e-11  jm_vz

    Score = 1.169e-10
    ctest(Diff): EXCEEDED ERROR TOLERANCE.

Restored the original loop logic and now it is back within tolerance:

    First  file: temp/c_check.txt
    Second file: temp/k_check.txt
    Tolerance = 6.700e-15

                lnum                 a_value                 b_value     factor       diff  name
      OK       59558 -3.7992709399390907e-04 -3.7992709399390658e-04  411.52263  1.026e-15  helio_x
      OK       70088 -1.2672603312645981e-03 -1.2672603312646005e-03  411.52263  9.816e-16  helio_y
      OK      122819  1.0937502621531685e-04  1.0937502621531790e-04  411.52263  4.294e-16  helio_z
      OK        2427  2.0269124415104024e+01  2.0269124415104031e+01    0.01730  1.229e-16  sky_j2000_ra
      OK       96711 -1.3269907232295576e+01 -1.3269907232295552e+01    0.00556  1.382e-16  sky_j2000_dec
      OK      321094  1.9426425943521761e+00  1.9426425943521755e+00    2.61780  1.744e-15  sky_j2000_dist
      OK      302748  3.5388201408771312e+02  3.5388201408771533e+02    0.00275  6.086e-15  sky_hor_az
      OK      121119 -2.2454039277279009e+01 -2.2454039277279151e+01    0.00556  7.895e-16  sky_hor_alt
      OK       92717  4.1268347083494783e-03  4.1268347083494774e-03  223.21429  1.936e-16  jm_x
      OK       45091 -8.0149190392649894e-03 -8.0149190392649929e-03   79.42812  2.756e-16  jm_y
      OK      135377  1.5470777280065808e-03  1.5470777280065804e-03  223.21429  9.680e-17  jm_z
      OK      216836  4.5725777238332412e-03  4.5725777238332394e-03  126.58228  2.196e-16  jm_vx
      OK      351647  5.1351566793199944e-03  5.1351566793199962e-03  126.58228  2.196e-16  jm_vy
      OK      351647  2.5217607180929289e-03  2.5217607180929298e-03  126.58228  1.098e-16  jm_vz

    Score = 6.086e-15
2022-04-27 21:18:29 -04:00
..
2021-11-12 19:44:56 -05:00
2019-04-23 17:44:56 -04:00
2022-01-04 18:55:20 -05:00
2022-01-04 18:55:20 -05:00
2022-01-04 18:55:20 -05:00
2022-01-04 18:55:20 -05:00
2022-04-02 16:52:54 -04:00
2019-04-08 22:25:38 -04:00
2022-01-04 18:55:20 -05:00
2022-01-04 18:55:20 -05:00
2022-01-04 18:55:20 -05:00

Source Generator

This directory contains code and data for generating the various language implementations of Astronomy Engine.

It is only needed by contributors who want to make enhancements or fix bugs. People who just want to use Astronomy Engine for a given programming langauge can safely ignore this directory and use the source code that has already been generated for that language.


Linux and macOS

Tool setup

The following tools are required for developers:

  • gcc and g++
  • Node.js
  • npm (needed to install other tools like TypeScript, jsdoc2md, ...)
  • Python 3.7+
  • Microsoft .NET 6.0 SDK
  • doxygen
  • xsltproc
  • coreutils
  • Java Developer Kit (JDK), for Kotlin.
    • Hint for quick start: install Android Developer Studio or the Community version of IntelliJ IDEA.
    • Set the environment variable JAVA_HOME to point to the JDK that comes bundled with either.
    • For example, if you install Android Developer Studio to /home/yourname/android_studio, you can add the following to your .bash_aliases file: export JAVA_HOME=/home/yourname/android_studio/jre.

Build process

Once you have all the tools installed and configured, you are ready to proceed.

Change into the generate directory (this directory) and run the bash script ./run to rebuild all code, generate all documentation, and run all the unit tests.


Windows

Tool setup

The following tools are required for developers:

  • Microsoft .NET 6.0 SDK

  • Node.js

  • npm (needed to install other tools like TypeScript, jsdoc2md, ...)

  • Python 3.7+

  • doxygen

  • xsltproc (Follow instructions at https://www.zlatkovic.com/libxml.en.html)

    Hint for 64-bit Windows: You will need to download the following archives from here:

    • iconv-1.14-win32-x86_64.7z
    • libtool-2.4.6-win32-x86_64.7z
    • libxml2-2.9.3-win32-x86_64.7z
    • libxslt-1.1.28-win32-x86_64.7z
    • mingwrt-5.2.0-win32-x86_64.7z

    Use 7-Zip to expand these archives into a newly-created empty directory. Just unzip them all to the same place. Verify that the bin directory beneath your new directory contains xsltproc.exe and a bunch of DLLs. Either copy the contents of bin to somewhere in your PATH, or add this bin directory to your PATH. Verify that you can run xsltproc.exe from the command prompt without any popups about missing DLLs.

  • Java Developer Kit (JDK), for Kotlin.

    • Hint for quick start: install Android Developer Studio or the Community version of IntelliJ IDEA.

    • Set the environment variable JAVA_HOME to point to the JDK that comes bundled with either.

    • For example, if you install IntelliJ IDEA to its default location, you can set your user environment variable JAVA_HOME to the following (adjusting for your actual version):

      C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2021.3.3\jbr

Build process

Once you have all the tools installed and configured, you are ready to proceed.

Change into the generate directory (this directory) and run the batch file run.bat to rebuild all code, generate all documentation, and run all the unit tests.