![]() |
SuperNOVAS C++ API v1.6
High-precision C/C++ astrometry library
|
| C99 | C++11 |
|---|---|
|
#include <novas.h>
cat_entry star;
object source;
observer loc;
novas_timespec time;
novas_frame frame;
sky_pos app;
// IERS Earth Orientation Parameters...
int leap_seconds = 37;
double dt1 = 0.06256; // [s]
double dx = 103.4; // [mas]
double dy = 396.2; // [mas]
// Define ICRS coordinates
novas_hms_hours("16h 29m 24.45970s"),
novas_dms_degrees("−26d 25m 55.2094s"),
-12.11, -23.30, 5.89, -3.4, &star);
make_cat_object(&star, &source);
// Observer location
make_gps_observer(50.7374, 7.0982, 60.0,
&loc);
// Set time of observation
"2025-02-27T19:57:00.728+0200",
leap_seconds, dut1, &time);
// Observer frame
&loc, &time, dx, dy, &frame);
// apparent coordinates in system
novas_sky_pos(&source, &frame, NOVAS_CIRS, &app);
@ NOVAS_CIRS Celestial Intermediate Reference System: dynamical system of the true equator, with its origin at the... Definition novas.h:871 @ NOVAS_FULL_ACCURACY Use full precision calculations to micro-arcsecond accuracy. Definition novas.h:968 SuperNOVAS types, definitions, and function prototypes. int novas_set_str_time(enum novas_timescale timescale, const char *restrict str, int leap, double dut1, novas_timespec *restrict time) Sets astronomical time in a specific timescale using a string specification. Definition timescale.c:490 double novas_hms_hours(const char *restrict hms) Returns the decimal hours for a HMS string specification. Definition parse.c:246 struct novas_cat_entry cat_entry Basic astrometric data for any sidereal object located outside the solar system. struct novas_sky_pos sky_pos Celestial object's place on the sky; contains the output from place(). short make_cat_entry(const char *restrict name, const char *restrict catalog, long cat_num, double ra, double dec, double pm_ra, double pm_dec, double parallax, double rad_vel, cat_entry *source) Fully populates the data structure for a catalog source, such as a star, with all parameters provided... Definition target.c:331 int make_gps_observer(double latitude, double longitude, double height, observer *obs) Initializes an observer data structure for a ground-based observer with the specified GPS / WGS84 loc... Definition observer.c:277 int make_cat_object(const cat_entry *star, object *source) Populates and object data structure with the data for a catalog source. Definition target.c:486 int novas_sky_pos(const object *restrict object, const novas_frame *restrict frame, enum novas_reference_system sys, sky_pos *restrict out) Calculates an apparent location on sky for the source. Definition frames.c:838 double novas_dms_degrees(const char *restrict dms) Returns the decimal degrees for a DMS string specification. Definition parse.c:455 int novas_make_frame(enum novas_accuracy accuracy, const observer *obs, const novas_timespec *time, double xp, double yp, novas_frame *frame) Sets up a observing frame for a specific observer location, time of observation, and accuracy require... Definition frames.c:521 A set of parameters that uniquely define the place and time of observation. Definition novas.h:1898 A structure, which defines a precise instant of time that can be extpressed in any of the astronomica... Definition novas.h:1804 |
#include <supernovas.h>
using namespace supernovas;
// IERS Earth Orientation Parameters...
// Define ICRS coordinates
"16h 29m 24.45970s", "−26d 25m 55.2094s")
.to_source();
// Observer location
auto obs = Site::from_GPS(50.7374, 7.0982, 60.0)
.to_observer(eop);
// Set time of observation
Time t("2026-03-14T13:43:00.728+0200", eop,
// Observer frame
auto frame = obs.frame_at(t);
// apparent coordinates in system
auto app = source.apparent_in(frame).cirs();
Defines the astrometric parameters of a sidereal source, such as a star, a Galactic cloud,... Definition supernovas.h:2042 Angle parallax() const Returns the parallax of the source. Definition CatalogEntry.cpp:300 static Site from_GPS(double longitude, double latitude, double altitude=0.0) Returns an observing site for its geodetic GPS location. Definition Site.cpp:394 Precise astronomical time specification, supporting all relevant astronomical timescales (UT1,... Definition supernovas.h:1750 static constexpr double mas [rad] 1 millisecond of arc in radians Definition supernovas.h:176 static constexpr double s [s] 1 second (standard unit of time) Definition supernovas.h:146 static constexpr double yr [s] 1 tropical calendar year in seconds (at J2000) Definition supernovas.h:160 static constexpr double ms [s] 1 millisecond in seconds Definition supernovas.h:145 Definition supernovas.h:32 |
Copyright (C) 2026 Attila Kovács