AAPlus is a cross-language & cross-platform wrapper library for AA+ (Astronomical Algorithms+), a high-precision C++ implementation of Jean Meeus's astronomical algorithms originally developed by PJ Naughter. This project provides:
- A C language interface to the AA+ C++ framework
- A C# (P/Invoke) wrapper for seamless integration with .NET applications
- A Python wrapper module for seamless integration with Python applications
The goal is to make AA+ functionality accessible from C, C# and Python environments, enabling high-precision astronomical calculations in both native and managed codebases.
- Clean C interface layered over the C++ implementation
- P/Invoke-based C# wrapper for .NET applications
- Ctypes-based Python wrapper module for Python applications
- Access to key AA+ modules: Sun, Moon, planets, coordinate transformations, etc.
- Cross-platform support: Works on both Windows & Linux
AAPlus/
├── AAPlusLib/ -> .NET P/Invoke C# bindings as a .NET netstandard library project
├── caaplus/ -> Original AA+ C++ source by PJ Naughter extended with C-language wrapper as a Visual C++ project
├── python/ -> Python module and test code
├── test/ -> Example C# console application
├── README.md -> this file
└── aaplus.sln -> Visual Studio 2022 solution file
git clone https://github.com/laheller/aaplus.git-
Windows
Simply openaaplus.slnin Visual Studio 2022 (Community Edition) that has both C++ and C# workloads installed & build. It should create thecaaplus.dlllibrary. -
Linux
Make sure that the 64bit (and optionally the 32bit) GNU C++ compilers and build tools are installed.
cd aaplus/caaplus
./build32.sh # builds the 32bit shared library, produces i386/libcaaplus.so
./build64.sh # builds the 64bit shared library, produces amd64/libcaaplus.soAdd the compiled native library (.dll, .so) to your project output directory, where the main output .NET binary is located.
Reference the AAPlusLib project or simply include the AAPlus.cs source file in your project.
This project is licensed under the same terms as the original AA+ library. Please refer to the original copyright.
AA+ framework by PJ Naughter
C and C# wrappers by Ladislav Heller