libnova v 0.15.0

- Main Page
- Related Pages
- Modules
- Data Structures
- Files
- Examples

Functions
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 More...
void | ln_zonedate_to_date (struct ln_zonedate *zonedate, struct ln_date *date)
| convert ln_zonedate to ln_date More...
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 More...
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

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

convert ln_date to ln_zonedate, zero zone info

Parameters

  zonedate | Ptr to zonedate
  gmtoff | Offset in seconds from UT
  date | Ptr to date

Converts a ln_date (UT) to a ln_zonedate (local time).

References ln_date::days, ln_zonedate::days, ln_zonedate::gmtoff, ln_date::hours, ln_zonedate::hours, ln_get_date(), ln_get_julian_day(), ln_date::minutes, ln_zonedate::minutes, ln_date::months, ln_zonedate::months, ln_date::seconds, ln_zonedate::seconds, ln_date::years, and ln_zonedate::years.

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

degrees to hours

radians to hours

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

Referenced by ln_equ_to_hequ().

void ln_zonedate_to_date | ( | struct ln_zonedate * | zonedate,
|  | struct ln_date * | date
| ) |  |

convert ln_zonedate to ln_date

Parameters

  zonedate | Ptr to zonedate
  date | Ptr to date

Converts a ln_zonedate (local time) to a ln_date (UT).

References ln_date::days, ln_zonedate::days, ln_zonedate::gmtoff, ln_date::hours, ln_zonedate::hours, ln_get_date(), ln_get_julian_day(), ln_date::minutes, ln_zonedate::minutes, ln_date::months, ln_zonedate::months, ln_date::seconds, ln_zonedate::seconds, ln_date::years, and ln_zonedate::years.

Referenced by ln_get_julian_local_date().