AstroRoutines 1.0.2
dotnet add package AstroRoutines --version 1.0.2
NuGet\Install-Package AstroRoutines -Version 1.0.2
<PackageReference Include="AstroRoutines" Version="1.0.2" />
<PackageVersion Include="AstroRoutines" Version="1.0.2" />
<PackageReference Include="AstroRoutines" />
paket add AstroRoutines --version 1.0.2
#r "nuget: AstroRoutines, 1.0.2"
#addin nuget:?package=AstroRoutines&version=1.0.2
#tool nuget:?package=AstroRoutines&version=1.0.2
AstroRoutines
An unoffical .NET Standard 2.0 translation of C Library of the Standards of Fundamental Astronomy (SOFA) software libraries from International Astronomical Union (IAU), provides a collection of subroutines that implement official IAU algorithms for astronomical computations.
This package is based on SOFA ANSI C Release 19 (2023-10-11) and distributed under Apache-2.0 license and SOFA. Please refer to https://www.iausofa.org/ for details regarding the SOFA releases.
Packages
Features
- Native managed C# implementation
- Cross-platform
- Method signatures are close to original C library, all you need is to remove iau prefix from method name and add ref or out keyword in Returned parameters (if any)
Requirements
.NET Standard 2.0 (.NET Framework 4.6.1 - .NET Framework 4.8.1, .NET Core 2.0 - 9.0) for using the library (AstroRoutines)
.NET 8.0+ for running unit tests (AstroRoutines.UnitTests)
Please check (https://learn.microsoft.com/en-us/dotnet/standard/net-standard?tabs=net-standard-2-0) for details of .NET Standard 2.0.
Criteria of package release
Each release version passed all tests in AstroRoutines.UnitTests (247 as of 2025-06-20).
Brief of variation from original software (IAU SOFA C Library Release 19)
Explained as requested by SOFA Software License.
AstroRoutines
- Rewritten from C to C# 7.3 (.NET Standard 2.0)
- Converts unmanaged features such as pointers to managed C# equivlaent
- Applied some C# syntax candy
- Remaining things such as logic, constants, dataset (as gigantic arrays) are otherwise identical to the original software
AstroRoutines.UnitTests
- Envolved from console test program to xUnit test project
- Each t_XXX function is converted to a test method TestXXX
- Instead of writing result to console, message is written to ITestOutputHelper
- Rewritten from C to C# 12.0 (.NET 8.0)
- Testing data and logic are otherwise identical to the original software
What is SOFA?
SOFA operates under the auspices of the International Astronomical Union (IAU) to provide algorithms and software for use in astronomical computing. The initiative is managed by an international panel, the SOFA Board, appointed through IAU Division A. The Board obtains the latest IAU-approved models and theories from the fundamental-astronomy community, implements them as computer code and checks them for accuracy. SOFA works closely with all the Commissions of the Division and with the International Earth Rotation and Reference Systems Service (IERS).
The SOFA Collection consists of two libraries of routines, one coded in Fortran 77 the other in ANSI C. There is a suite of vector/matrix routines and various utilities that underpin the astronomy algorithms, which include routines for the following:
Astrometry Calendars Time Scales Ecliptic Coordinates Earth Rotation and Sidereal Time Ephemerides (medium precision) Fundamental Arguments Galactic Coordinates Geocentric/Geodetic Transformations Precession, Nutation and Polar Motion Star Catalog Conversion
Source: (https://www.iausofa.org/background.html)
Copyright
This project is distributed under Apache-2.0 license, please check LICENSE file for details.
Software Routines from the IAU SOFA Collection were used. Copyright © International Astronomical Union Standards of Fundamental Astronomy (http://www.iausofa.org).
Using SOFA software is free of charge under the terms and conditions of the SOFA licence, whose text is stated in:
- SOFA-LICENSE.md in this repository
- COnstant SOFA_LICENSE_TEXT in library AstroRoutines
- https://www.iausofa.org/tandc.html.
Alternatives to this package
Attila Abrudán's World Wide Astronomy (https://github.com/abrudana/wwa/)
FAQ
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
v1.0.2
- Add documentation comments
- Flatten namespace AstroRoutines.Structs into AstroRoutines
- Rename some public constants in AR class
v1.0.1
- Set target framework as netstandard2.0 for better compatibility
v1.0.0
- Initial release