Skip to content

Commit

Permalink
More example tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
attipaci committed Jan 12, 2025
1 parent 11f3c0e commit c72f0fd
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 3 deletions.
3 changes: 2 additions & 1 deletion examples/example-calceph.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
* ```
*/

#define _POSIX_C_SOURCE 199309L ///< for clock_gettime()

#include <stdio.h>
#include <stdlib.h>
#include <time.h>
Expand All @@ -38,7 +40,6 @@

int main() {
// SuperNOVAS aariables used for the calculations ------------------------->
cat_entry star = CAT_ENTRY_INIT; // catalog information about a sidereal source
object source; // observed source
observer obs; // observer location
novas_timespec obs_time; // astrometric time of observation
Expand Down
5 changes: 3 additions & 2 deletions examples/example-cspice.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* files.
*
* You will need access to the NAIF CSPICE library (unversioned `libcspice.so` or else
* `libcspice.a`) and C headers (`cspice/*.h`), and the SuperNOVAS `libsolsys-cspice.so`
* `libcspice.a`) and C headers (under `cspice/`), and the SuperNOVAS `libsolsys-cspice.so`
* (or `libsolsys-cspice.a`) module.
*
* To compile CSPICE as a shared (.so) library, you may want to check out the GitHub
Expand All @@ -24,6 +24,8 @@
* ```
*/

#define _POSIX_C_SOURCE 199309L ///< for clock_gettime()

#include <stdio.h>
#include <stdlib.h>
#include <time.h>
Expand All @@ -43,7 +45,6 @@

int main() {
// SuperNOVAS aariables used for the calculations ------------------------->
cat_entry star = CAT_ENTRY_INIT; // catalog information about a sidereal source
object source; // observed source
observer obs; // observer location
novas_timespec obs_time; // astrometric time of observation
Expand Down
2 changes: 2 additions & 0 deletions examples/example-high-z.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
*
*/

#define _POSIX_C_SOURCE 199309L ///< for clock_gettime()

#include <stdio.h>
#include <stdlib.h>
#include <time.h>
Expand Down
2 changes: 2 additions & 0 deletions examples/example-orbital.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
* ```
*/

#define _POSIX_C_SOURCE 199309L ///< for clock_gettime()

#include <stdio.h>
#include <stdlib.h>
#include <time.h>
Expand Down
2 changes: 2 additions & 0 deletions examples/example-star.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
* ```
*/

#define _POSIX_C_SOURCE 199309L ///< for clock_gettime()

#include <stdio.h>
#include <stdlib.h>
#include <time.h>
Expand Down

0 comments on commit c72f0fd

Please sign in to comment.