Skip to content

Commit

Permalink
make_on_surface() to leave humidity undefined to maintain ABI compati…
Browse files Browse the repository at this point in the history
…bility with 1.0
  • Loading branch information
attipaci committed Nov 17, 2024
1 parent c04b6b0 commit 150cc7c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
7 changes: 7 additions & 0 deletions include/novas.h
Original file line number Diff line number Diff line change
Expand Up @@ -815,6 +815,7 @@ typedef struct {
* refraction model is employed.
*
* @sa observer
* @sa make_on_surface()
*/
typedef struct {
double latitude; ///< [deg] geodetic (ITRS) latitude; north positive
Expand All @@ -830,6 +831,7 @@ typedef struct {
*
* @sa observer
* @sa IN_SPACE_INIT
* @sa make_in_space()
*/
typedef struct {
double sc_pos[3]; ///< [km] geocentric (or [AU] ICRS barycentric) position vector (x, y, z)
Expand All @@ -846,6 +848,11 @@ typedef struct {
/**
* Observer location.
*
* @sa make_observer()
* @sa make_observer_at_geocenter()
* @sa make_observer_on_earth()
* @sa make_observer_in_space()
* @sa make_solar_system_observer()
*/
typedef struct {
enum novas_observer_place where; ///< observer location type
Expand Down
11 changes: 7 additions & 4 deletions src/novas.c
Original file line number Diff line number Diff line change
Expand Up @@ -6840,6 +6840,7 @@ int make_planet(enum novas_planet num, object *planet) {
* @sa make_observer_at_geocenter()
* @sa make_observer_on_surface()
* @sa make_observer_in_space()
* @sa make_solar_system_observer()
*/
short make_observer(enum novas_observer_place where, const on_surface *loc_surface, const in_space *loc_space, observer *obs) {
static const char *fn = "make_observer";
Expand Down Expand Up @@ -6956,9 +6957,9 @@ int make_observer_in_space(const double *sc_pos, const double *sc_vel, observer
* the given parameters.
*
* Note, that because this is an original NOVAS C routine, it does not have an argument to set
* a humidity value (e.g. for radio refraction). As such the call will set humidity to 0.0.
* To set the humidity, set the output structure's field after calling this funcion. Its unit
* is [%], and so the range is 0.0--100.0.
* a humidity value (e.g. for radio refraction). As such, the humidity value remains undefined
* after this call. To set the humidity, set the output structure's field after calling this
* funcion. Its unit is [%], and so the range is 0.0--100.0.
*
* @param latitude [deg] Geodetic (ITRS) latitude in degrees; north positive.
* @param longitude [deg] Geodetic (ITRS) longitude in degrees; east positive.
Expand All @@ -6981,7 +6982,9 @@ int make_on_surface(double latitude, double longitude, double height, double tem
loc->height = height;
loc->temperature = temperature;
loc->pressure = pressure;
loc->humidity = 0.0;

// FIXME starting v2.0 set humidity to 0.0
//loc->humidity = 0.0;

return 0;
}
Expand Down

0 comments on commit 150cc7c

Please sign in to comment.