Skip to content

Commit

Permalink
Merge naif.h into solarsystem.h and site update
Browse files Browse the repository at this point in the history
  • Loading branch information
attipaci committed Nov 11, 2024
1 parent d5d00f3 commit a974089
Show file tree
Hide file tree
Showing 9 changed files with 23 additions and 39 deletions.
5 changes: 2 additions & 3 deletions .cproject
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
<storageModule moduleId="org.eclipse.cdt.core.settings">
<cconfiguration id="cdt.managedbuild.toolchain.gnu.base.2126916097">
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.toolchain.gnu.base.2126916097" moduleId="org.eclipse.cdt.core.settings" name="Default">
<macros>
<stringMacro name="CALCEPH_SUPPORT" type="VALUE_TEXT" value="1"/>
</macros>
<externalSettings/>
<extensions>
<extension id="org.eclipse.cdt.core.GNU_ELF" point="org.eclipse.cdt.core.BinaryParser"/>
Expand All @@ -28,6 +25,8 @@
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="gnu.c.compiler.option.preprocessor.def.symbols.490761690" name="Defined symbols (-D)" superClass="gnu.c.compiler.option.preprocessor.def.symbols" useByScannerDiscovery="false" valueType="definedSymbols">
<listOptionValue builtIn="false" value="DEFAULT_SOLSYS=3"/>
<listOptionValue builtIn="false" value="THREAD_LOCAL=__thread"/>
<listOptionValue builtIn="false" value="USE_CSPICE=1"/>
<listOptionValue builtIn="false" value="USE_CALCEPH=1"/>
</option>
<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.1061272597" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
</tool>
Expand Down
3 changes: 3 additions & 0 deletions .settings/org.eclipse.cdt.core.prefs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ eclipse.preferences.version=1
environment/project/cdt.managedbuild.toolchain.gnu.base.2126916097/CALCEPH_SUPPORT/delimiter=\:
environment/project/cdt.managedbuild.toolchain.gnu.base.2126916097/CALCEPH_SUPPORT/operation=append
environment/project/cdt.managedbuild.toolchain.gnu.base.2126916097/CALCEPH_SUPPORT/value=1
environment/project/cdt.managedbuild.toolchain.gnu.base.2126916097/CSPICE_SUPPORT/delimiter=\:
environment/project/cdt.managedbuild.toolchain.gnu.base.2126916097/CSPICE_SUPPORT/operation=append
environment/project/cdt.managedbuild.toolchain.gnu.base.2126916097/CSPICE_SUPPORT/value=1
environment/project/cdt.managedbuild.toolchain.gnu.base.2126916097/append=true
environment/project/cdt.managedbuild.toolchain.gnu.base.2126916097/appendContributed=true
org.eclipse.cdt.core.formatter.alignment_for_arguments_in_method_invocation=16
Expand Down
29 changes: 0 additions & 29 deletions include/naif.h

This file was deleted.

16 changes: 16 additions & 0 deletions include/solarsystem.h
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,22 @@ int cspice_remove_kernel(const char *filename);

# ifdef __NOVAS_INTERNAL_API__

/// NAIF ID for the geocenter
#define NAIF_EARTH 399

/// NAIF ID for the Moon
#define NAIF_MOON 301

/// NAIF_ID for the Sun
#define NAIF_SUN 10

/// NAIF ID for the Solar-System Barycenter (SSB)
#define NAIF_SSB 0

/// NAIF ID for the Earth-Moon Barycenter (EMB)
#define NAIF_EMB 3


/**
* The function to use to provide planet ephemeris data.
*
Expand Down
1 change: 0 additions & 1 deletion src/naif.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@

#define __NOVAS_INTERNAL_API__ ///< Use definitions meant for internal use by SuperNOVAS only
#include "novas.h"
#include "naif.h"

/**
* Converts a NAIF ID to a NOVAS major planet ID. It account for the different IDs used for Sun, Moon and SSB.
Expand Down
2 changes: 1 addition & 1 deletion src/solsys-calceph.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
#define __NOVAS_INTERNAL_API__ ///< Use definitions meant for internal use by SuperNOVAS only
#include "novas.h"
#include "calceph.h"
#include "naif.h"
#include "novas-naif.h"

#define CALCEPH_MOON 10 ///< Moon in CALCEPH
#define CALCEPH_SUN 11 ///< Sun in CALCEPH
Expand Down
1 change: 0 additions & 1 deletion src/solsys-cspice.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
#define USE_CSIPCE 1 ///< NOVAS cspice integration prototypes
#define __NOVAS_INTERNAL_API__ ///< Use definitions meant for internal use by SuperNOVAS only
#include "novas.h"
#include "naif.h"

#include "cspice/SpiceUsr.h"
#include "cspice/SpiceZpr.h" // for reset_c
Expand Down
2 changes: 1 addition & 1 deletion test/src/test-errors.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
#include <math.h>
#include <string.h>

#define __NOVAS_INTERNAL_API__ ///< Use definitions meant for internal use by SuperNOVAS only
#include "novas.h"
#include "naif.h"

static int check(const char *func, int exp, int error) {
if(error != exp) {
Expand Down
3 changes: 0 additions & 3 deletions test/src/test-super.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,8 @@
#include <unistd.h>
#include <libgen.h>



#define __NOVAS_INTERNAL_API__ ///< Use definitions meant for internal use by SuperNOVAS only
#include "novas.h"
#include "naif.h"

#define J2000 2451545.0
#define DAY 86400.0
Expand Down

0 comments on commit a974089

Please sign in to comment.