Skip to content

Commit a7a8815

Browse files
committed
Tweak frames API
1 parent c0c63e2 commit a7a8815

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -468,7 +468,7 @@ location, you can proceed from the `sky_pos` data you obtained above (in whichev
468468
double az, el; // [deg] local azimuth and elevation angles to populate
469469
470470
// Convert the apparent position in CIRS on sky to horizontal coordinates
471-
novas_app_to_hor(NOVAS_CIRS, apparent.ra, apparent.dec, &obs_frame, novas_standard_refraction, &az, &el);
471+
novas_app_to_hor(&obs_frame, NOVAS_CIRS, apparent.ra, apparent.dec, novas_standard_refraction, &az, &el);
472472
```
473473

474474
Above we converted the apparent coordinates, assuming they were calculated in CIRS, to refracted azimuth and

include/novas.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -1120,12 +1120,12 @@ int novas_geom_posvel(const object *source, const novas_frame *frame, enum novas
11201120

11211121
int novas_sky_pos(const object *object, const novas_frame *frame, enum novas_reference_system sys, sky_pos *output);
11221122

1123-
int novas_app_to_hor(enum novas_reference_system sys, double ra, double dec, const novas_frame *frame, RefractionModel ref_model,
1123+
int novas_app_to_hor(const novas_frame *frame, enum novas_reference_system sys, double ra, double dec, RefractionModel ref_model,
11241124
double *az, double *el);
11251125

11261126
int novas_app_to_geom(const novas_frame *frame, enum novas_reference_system sys, double ra, double dec, double dist, double *geom_icrs);
11271127

1128-
int novas_hor_to_app(double az, double el, const novas_frame *frame, RefractionModel ref_model, enum novas_reference_system sys,
1128+
int novas_hor_to_app(const novas_frame *frame, double az, double el, RefractionModel ref_model, enum novas_reference_system sys,
11291129
double *ra, double *dec);
11301130

11311131
int novas_make_transform(const novas_frame *frame, enum novas_reference_system from_system, enum novas_reference_system to_system,

src/frames.c

+4-4
Original file line numberDiff line numberDiff line change
@@ -624,10 +624,10 @@ int novas_sky_pos(const object *object, const novas_frame *frame, enum novas_ref
624624
* refraction correction for Earth's atmosphere. If no such model is provided the calculated
625625
* elevation will be the astrometric elevation without a refraction correction.
626626
*
627+
* @param frame Observer frame, defining the time and place of observation (on Earth).
627628
* @param sys Astronomical coordinate system in which the observed position is given.
628629
* @param ra [h] Observed apparent right ascension (R.A.) coordinate
629630
* @param dec [deg] Observed apparent declination coordinate
630-
* @param frame Observer frame, defining the time and place of observation (on Earth).
631631
* @param ref_model An appropriate refraction model, or NULL to calculate unrefracted elevation.
632632
* Depending on the refraction model, you might want to make sure that the
633633
* weather parameters were set when the observing frame was defined.
@@ -642,7 +642,7 @@ int novas_sky_pos(const object *object, const novas_frame *frame, enum novas_ref
642642
* @sa novas_optical_refraction()
643643
* @sa novas_hor_to_app();
644644
*/
645-
int novas_app_to_hor(enum novas_reference_system sys, double ra, double dec, const novas_frame *frame, RefractionModel ref_model,
645+
int novas_app_to_hor(const novas_frame *frame, enum novas_reference_system sys, double ra, double dec, RefractionModel ref_model,
646646
double *az, double *el) {
647647
static const char *fn = "novas_app_to_hor";
648648
const novas_timespec *time;
@@ -715,9 +715,9 @@ int novas_app_to_hor(enum novas_reference_system sys, double ra, double dec, con
715715
* refraction correction for Earth's atmosphere. If no such model is provided, the provided
716716
* elevation value will be assumed to be an astrometric elevation without a refraction correction.
717717
*
718+
* @param frame Observer frame, defining the time and place of observation (on Earth).
718719
* @param az [deg] Observed azimuth angle. It may be NULL if not required.
719720
* @param el [deg] Observed elevation angle. It may be NULL if not required.
720-
* @param frame Observer frame, defining the time and place of observation (on Earth).
721721
* @param ref_model An appropriate refraction model, or NULL to assume unrefracted elevation.
722722
* Depending on the refraction model, you might want to make sure that the
723723
* weather parameters were set when the observing frame was defined.
@@ -731,7 +731,7 @@ int novas_app_to_hor(enum novas_reference_system sys, double ra, double dec, con
731731
* @sa novas_app_to_hor()
732732
* @sa novas_make_frame()
733733
*/
734-
int novas_hor_to_app(double az, double el, const novas_frame *frame, RefractionModel ref_model, enum novas_reference_system sys,
734+
int novas_hor_to_app(const novas_frame *frame, double az, double el, RefractionModel ref_model, enum novas_reference_system sys,
735735
double *ra, double *dec) {
736736
static const char *fn = "novas_hor_to_app";
737737
const novas_timespec *time;

0 commit comments

Comments
 (0)