Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
[Semantic Versioning](https://semver.org/spec/v2.0.0.html).


## [1.6.0-rc5] - 2026-04-20
## [Unreleased]

Upcoming feature release, introducing a proper C++ API for the first time, and bringing various other improvements.

Expand Down Expand Up @@ -61,6 +61,8 @@ Upcoming feature release, introducing a proper C++ API for the first time, and b
- #306: `geo_posvel()` changed to return an error (-1) if used for a geodetic observer and debug mode is set to
`NOVAS_DEBUG_EXTRA`, to warn that polar offsets are not included in the calculation.

- #310: Change how CMake detects the need for linking against `libm`.

- Use more precise matrix from Liu et al. (2011) for equatorial / galactic conversions.

- Consolidated equatorial vector transformations, eliminating duplicated code.
Expand Down
8 changes: 4 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,12 @@ project(supernovas
)

# Include required modules
include(CheckLibraryExists)
include(GNUInstallDirs)
include(CMakePackageConfigHelpers)
include(FeatureSummary)


# Build options
option(BUILD_SHARED_LIBS "Build as shared libraries instead of static" OFF)
option(BUILD_DOC "Build HTML documetation" OFF)
Expand Down Expand Up @@ -87,10 +89,8 @@ if(WIN32)
add_compile_definitions(_CRT_SECURE_NO_WARNINGS)
endif()

if(WIN32)
set(MATHLIB "")
else()
find_library(MATH_LIBRARY m REQUIRED)
check_library_exists(m exp "" HAS_MATHLIB)
if(HAS_MATHLIB)
set(MATHLIB m)

# [.pc] Link applications against math lib...
Expand Down
9 changes: 4 additions & 5 deletions examples/c99/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,14 @@ if(NOT PROJECT_NAME)
LANGUAGES C
)

include(CheckLibraryExists)
include(GNUInstallDirs)

find_package(supernovas)

if(WIN32)
set(MATH "")
else()
find_library(MATH_LIBRARY m REQUIRED)
set(MATH m)
check_library_exists(m exp "" HAS_MATHLIB)
if(HAS_MATHLIB)
set(MATHLIB m)
endif()
endif()

Expand Down
9 changes: 4 additions & 5 deletions examples/cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,14 @@ if(NOT PROJECT_NAME)
LANGUAGES CXX
)

include(CheckLibraryExists)
include(GNUInstallDirs)

find_package(supernovas)

if(WIN32)
set(MATH "")
else()
find_library(MATH_LIBRARY m REQUIRED)
set(MATH m)
check_library_exists(m exp "" HAS_MATHLIB)
if(HAS_MATHLIB)
set(MATHLIB m)
endif()
endif()

Expand Down
32 changes: 16 additions & 16 deletions include/novas.h
Original file line number Diff line number Diff line change
Expand Up @@ -3436,7 +3436,7 @@ int novas_sys_to_icrs(enum novas_reference_system sys, const double *in, double
#define NAIF_EMB 3

/// NAIF ID for the barycenter of the Pluto system
#define NAIF_PLUTO_BARYCENTER 9
#define NAIF_PLUTO_BARYCENTER 9


/**
Expand All @@ -3447,24 +3447,24 @@ int novas_sys_to_icrs(enum novas_reference_system sys, const double *in, double
#define NOVAS_DEFAULT_MAX_ITER 100

// On some older platform NAN may not be defined, so define it here if need be
# ifndef NAN
# define NAN (0.0/0.0)
# endif
#ifndef NAN
# define NAN (0.0/0.0) ///< Define NAN (if not in `math.h`)
#endif


# ifndef THREAD_LOCAL
# if __STDC_VERSION__ >= 202311L
# define THREAD_LOCAL thread_local ///< C23 standard for thread-local variables
# elif __STDC_VERSION__ >= 201112L
# define THREAD_LOCAL _Thread_local ///< C11 standard for thread-local variables
# elif __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)
# define THREAD_LOCAL __thread ///< pre C11 gcc >= 3.3 standard for thread-local variables
# elif defined _MSVC_VER
# define THREAD_LOCAL __declspec( thread ) ///< Microsoft Visual C thread local declaration
# else
# define THREAD_LOCAL ///< no thread-local variables
# endif
#ifndef THREAD_LOCAL
# if __STDC_VERSION__ >= 202311L
# define THREAD_LOCAL thread_local ///< C23 standard for thread-local variables
# elif __STDC_VERSION__ >= 201112L
# define THREAD_LOCAL _Thread_local ///< C11 standard for thread-local variables
# elif __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)
# define THREAD_LOCAL __thread ///< pre C11 gcc >= 3.3 standard for thread-local variables
# elif defined _MSVC_VER
# define THREAD_LOCAL __declspec( thread ) ///< Microsoft Visual C thread local declaration
# else
# define THREAD_LOCAL ///< no thread-local variables
# endif
#endif


int novas_trace(const char *restrict loc, int n, int offset);
Expand Down
Loading