libnova v 0.15.0
General Conversion Functions

Functions

void ln_date_to_zonedate (struct ln_date *date, struct ln_zonedate *zonedate, long gmtoff)
 convert ln_date to ln_zonedate, zero zone info
void ln_zonedate_to_date (struct ln_zonedate *zonedate, struct ln_date *date)
 convert ln_zonedate to ln_date
double LIBNOVA_EXPORT ln_rad_to_deg (double radians)
 radians to degrees
double LIBNOVA_EXPORT ln_deg_to_rad (double degrees)
 degrees to radians
double LIBNOVA_EXPORT ln_hms_to_deg (struct ln_hms *hms)
 hours to degrees
void LIBNOVA_EXPORT ln_deg_to_hms (double degrees, struct ln_hms *hms)
 degrees to hours
double LIBNOVA_EXPORT ln_hms_to_rad (struct ln_hms *hms)
 hours to radians.
double LIBNOVA_EXPORT ln_dms_to_deg (struct ln_dms *dms)
 dms to degrees
void LIBNOVA_EXPORT ln_deg_to_dms (double degrees, struct ln_dms *dms)
 degrees to dms
double LIBNOVA_EXPORT ln_dms_to_rad (struct ln_dms *dms)
 dms to radians
void LIBNOVA_EXPORT ln_rad_to_dms (double radians, struct ln_dms *dms)
 radians to dms
void LIBNOVA_EXPORT ln_hequ_to_equ (struct lnh_equ_posn *hpos, struct ln_equ_posn *pos)
 human readable equatorial position to double equatorial position
void LIBNOVA_EXPORT ln_equ_to_hequ (struct ln_equ_posn *pos, struct lnh_equ_posn *hpos)
 human double equatorial position to human readable equatorial position
void LIBNOVA_EXPORT ln_hhrz_to_hrz (struct lnh_hrz_posn *hpos, struct ln_hrz_posn *pos)
 human readable horizontal position to double horizontal position
void LIBNOVA_EXPORT ln_hrz_to_hhrz (struct ln_hrz_posn *pos, struct lnh_hrz_posn *hpos)
 double horizontal position to human readable horizontal position
const char LIBNOVA_EXPORT * ln_hrz_to_nswe (struct ln_hrz_posn *pos)
 returns direction of given azimuth - like N,S,W,E,NSW,...
void LIBNOVA_EXPORT ln_hlnlat_to_lnlat (struct lnh_lnlat_posn *hpos, struct ln_lnlat_posn *pos)
 human readable long/lat position to double long/lat position
void LIBNOVA_EXPORT ln_lnlat_to_hlnlat (struct ln_lnlat_posn *pos, struct lnh_lnlat_posn *hpos)
 double long/lat position to human readable long/lat position
void LIBNOVA_EXPORT ln_add_secs_hms (struct ln_hms *hms, double seconds)
 add seconds to hms
void LIBNOVA_EXPORT ln_add_hms (struct ln_hms *source, struct ln_hms *dest)
 add hms to hms
double LIBNOVA_EXPORT ln_range_degrees (double angle)
 puts a large angle in the correct range 0 - 360 degrees
double LIBNOVA_EXPORT ln_range_radians (double angle)
 puts a large angle in the correct range 0 - 2PI radians

Detailed Description

Conversion from one libnova type to another.

Function Documentation

◆ ln_add_hms()

void LIBNOVA_EXPORT ln_add_hms ( struct ln_hms * source,
struct ln_hms * dest )

add hms to hms

References ln_hms::hours, ln_add_hms(), ln_hms::minutes, and ln_hms::seconds.

Referenced by ln_add_hms(), and ln_add_secs_hms().

◆ ln_add_secs_hms()

void LIBNOVA_EXPORT ln_add_secs_hms ( struct ln_hms * hms,
double seconds )

add seconds to hms

References ln_hms::hours, ln_add_hms(), ln_add_secs_hms(), ln_hms::minutes, and ln_hms::seconds.

Referenced by ln_add_secs_hms().

◆ ln_date_to_zonedate()

void ln_date_to_zonedate ( struct ln_date * date,
struct ln_zonedate * zonedate,
long gmtoff )

◆ ln_deg_to_dms()

void LIBNOVA_EXPORT ln_deg_to_dms ( double degrees,
struct ln_dms * dms )

◆ ln_deg_to_hms()

void LIBNOVA_EXPORT ln_deg_to_hms ( double degrees,
struct ln_hms * hms )

degrees to hours

radians to hours

References ln_hms::hours, ln_deg_to_hms(), ln_range_degrees(), ln_hms::minutes, and ln_hms::seconds.

Referenced by ln_deg_to_hms(), and ln_equ_to_hequ().

◆ ln_deg_to_rad()

◆ ln_dms_to_deg()

double LIBNOVA_EXPORT ln_dms_to_deg ( struct ln_dms * dms)

◆ ln_dms_to_rad()

double LIBNOVA_EXPORT ln_dms_to_rad ( struct ln_dms * dms)

◆ ln_equ_to_hequ()

void LIBNOVA_EXPORT ln_equ_to_hequ ( struct ln_equ_posn * pos,
struct lnh_equ_posn * hpos )

human double equatorial position to human readable equatorial position

Examples
mars.c, and transforms.c.

References ln_equ_posn::dec, lnh_equ_posn::dec, ln_deg_to_dms(), ln_deg_to_hms(), ln_equ_to_hequ(), ln_equ_posn::ra, and lnh_equ_posn::ra.

Referenced by ln_equ_to_hequ().

◆ ln_hequ_to_equ()

void LIBNOVA_EXPORT ln_hequ_to_equ ( struct lnh_equ_posn * hpos,
struct ln_equ_posn * pos )

human readable equatorial position to double equatorial position

Examples
transforms.c.

References ln_equ_posn::dec, lnh_equ_posn::dec, ln_dms_to_deg(), ln_hequ_to_equ(), ln_hms_to_deg(), ln_equ_posn::ra, and lnh_equ_posn::ra.

Referenced by ln_hequ_to_equ().

◆ ln_hhrz_to_hrz()

void LIBNOVA_EXPORT ln_hhrz_to_hrz ( struct lnh_hrz_posn * hpos,
struct ln_hrz_posn * pos )

human readable horizontal position to double horizontal position

References ln_hrz_posn::alt, lnh_hrz_posn::alt, ln_hrz_posn::az, lnh_hrz_posn::az, ln_dms_to_deg(), and ln_hhrz_to_hrz().

Referenced by ln_hhrz_to_hrz().

◆ ln_hlnlat_to_lnlat()

void LIBNOVA_EXPORT ln_hlnlat_to_lnlat ( struct lnh_lnlat_posn * hpos,
struct ln_lnlat_posn * pos )

human readable long/lat position to double long/lat position

Examples
transforms.c.

References ln_lnlat_posn::lat, lnh_lnlat_posn::lat, ln_dms_to_deg(), ln_hlnlat_to_lnlat(), ln_lnlat_posn::lng, and lnh_lnlat_posn::lng.

Referenced by ln_hlnlat_to_lnlat().

◆ ln_hms_to_deg()

double LIBNOVA_EXPORT ln_hms_to_deg ( struct ln_hms * hms)

hours to degrees

References ln_hms::hours, ln_hms_to_deg(), ln_hms::minutes, and ln_hms::seconds.

Referenced by ln_hequ_to_equ(), and ln_hms_to_deg().

◆ ln_hms_to_rad()

double LIBNOVA_EXPORT ln_hms_to_rad ( struct ln_hms * hms)

hours to radians.

References ln_hms::hours, ln_hms_to_rad(), ln_hms::minutes, and ln_hms::seconds.

Referenced by ln_hms_to_rad().

◆ ln_hrz_to_hhrz()

void LIBNOVA_EXPORT ln_hrz_to_hhrz ( struct ln_hrz_posn * pos,
struct lnh_hrz_posn * hpos )

double horizontal position to human readable horizontal position

Examples
transforms.c.

References ln_hrz_posn::alt, lnh_hrz_posn::alt, ln_hrz_posn::az, lnh_hrz_posn::az, ln_deg_to_dms(), and ln_hrz_to_hhrz().

Referenced by ln_hrz_to_hhrz().

◆ ln_hrz_to_nswe()

const char LIBNOVA_EXPORT * ln_hrz_to_nswe ( struct ln_hrz_posn * pos)

returns direction of given azimuth - like N,S,W,E,NSW,...

References ln_hrz_posn::az, and ln_hrz_to_nswe().

Referenced by ln_hrz_to_nswe().

◆ ln_lnlat_to_hlnlat()

void LIBNOVA_EXPORT ln_lnlat_to_hlnlat ( struct ln_lnlat_posn * pos,
struct lnh_lnlat_posn * hpos )

double long/lat position to human readable long/lat position

References ln_lnlat_posn::lat, lnh_lnlat_posn::lat, ln_deg_to_dms(), ln_lnlat_to_hlnlat(), ln_lnlat_posn::lng, and lnh_lnlat_posn::lng.

Referenced by ln_lnlat_to_hlnlat().

◆ ln_rad_to_deg()

double LIBNOVA_EXPORT ln_rad_to_deg ( double radians)

◆ ln_rad_to_dms()

void LIBNOVA_EXPORT ln_rad_to_dms ( double radians,
struct ln_dms * dms )

radians to dms

References ln_deg_to_dms(), ln_rad_to_deg(), and ln_rad_to_dms().

Referenced by ln_rad_to_dms().

◆ ln_range_degrees()

◆ ln_range_radians()

double LIBNOVA_EXPORT ln_range_radians ( double angle)

puts a large angle in the correct range 0 - 2PI radians

References ln_range_radians().

Referenced by ln_get_lunar_bright_limb(), and ln_range_radians().

◆ ln_zonedate_to_date()