CppEphem
|
Interested in contributing? Checkout the issues and projects pages to see what features have been suggested, or to suggest your own!
The purpose of this package is to leverage the Standards Of Fundamental Astronomy (SOFA) package in order to compute several astrophysical quantities regarding the positions of objects. CppEphem wraps the SOFA functions in easy to use classes, so that astronomers can quickly and easily compute the quantities they need in their own programs.
Here is a list of purposes I wish this code to serve:
More features will be implemented as time permits. If there is any feature that you would like to see implemented feel free to contact the author or submit an issue and I'll look into it.
The following is a list of currently fully implemented, compiled executables which can be run from the command line:
convcoord
and are considered deprecated.To obtain the code, it should be as simple as cloning the repository from github:
Once the code is downloaded, the advised method for compiling the code is via cmake
. To compile via cmake
use the following instructions:
Now run cmake
with your desired configuration options to build the code:
NOTE: "-Dprefix=" and "-DCMAKE_INSTALL_PREFIX=" will have equivalent behavior of specifying the directory where the code will be installed into.
OPTIONAL: You can now test that the code actually works
-DCMAKE_INSTALL_PREFIX
during the initial run of cmake). You should make sure to update your $PATH
and LD_LIBRARY_PATH
if installing the code to a non-standard location:NOTE: The code has grown to a point where it is no longer feasible to maintain two build systems. Because of this, it has been decided to depricate the autotools build system and remove it completely in a future version.
To install via autotools, you should be able to build the software very easily using the standard "./configure -> make -> make install" method. Here is a bit more detail.
First, download the repository as described above in "Downloading the code". Second, make sure that the "configure" file exists in the top directory. If not, then do:
Third, configure the software (note the "prefix" option is optional):
Fourth, build the code:
Finally, to install the code in an accesible manner (i.e. so that your PATH and (DY)LD_LIBRARY_PATH environment variables know where the executables and libraries are) type:
And that should do it.
If you run into a problem installing when using cmake
and the -Dprefix=
option along the following form:
Make sure that you pass the full path to the installation directory (i.e. don't use relative paths with '~/
').
To uninstall the code, it is advised to first run
in the top directory in order to remove the executables from your base install directory. Then you can delete the downloaded git repository.
Note: This only works if the code was compiled with autotools, since cmake does not support make uninstall
.
The author above had no connection or involvement in the development of the SOFA software. Their software is included in this package because it is the standard provided by the International Astronomical Union (IAU). I dont claim to own their code. You can view the readme file in the sofa directory for more information on this software. (Can I not be sued now?)
In all seriousness, the SOFA software package is a rather impressive and phenominally useful piece of code. I am really grateful to the authors of that package for putting it together.