Loading...
Searching...
No Matches
locator.c File Reference
Utility Routines API

QRA locator (Maidenhead grid square) and latitude/longitude bearing conversion interface. More...

`#include <hamlib/config.h>`
`#include <stdlib.h>`
`#include <string.h>`
`#include <ctype.h>`
`#include <math.h>`
`#include <hamlib/rotator.h>`
Include dependency graph for locator.c:

## Macros

#define | RADIAN (180.0 / M_PI)
| Standard definition of a radian.
#define | ARC_IN_KM 111.2
| arc length for 1 degree in kilometers, i.e. 60 Nautical Miles
#define | MAX_LOCATOR_PAIRS 6
| Longest locator to process, e.g. AA00AA00AA00.
#define | MIN_LOCATOR_PAIRS 1
| Shortest locator to process, e.g. AA.

## Functions

double | dms2dec (int degrees, int minutes, double seconds, int sw)
| Convert Degrees Minutes Seconds (DMS) notation to decimal degrees (D.DDD) angle.
double | dmmm2dec (int degrees, double minutes, double seconds, int sw)
| Convert degrees decimal minutes (D M.MMM) notation to decimal degrees (D.DDD) angle.
int | dec2dms (double dec, int *degrees, int *minutes, double *seconds, int *sw)
| Convert a decimal degrees (D.DDD) angle into Degrees Minutes Seconds (DMS) notation.
int | dec2dmmm (double dec, int *degrees, double *minutes, int *sw)
| Convert a decimal degrees (D.DDD) angle into degrees decimal minutes (D M.MMM) notation.
int | locator2longlat (double *longitude, double *latitude, const char *locator)
| Convert QRA locator (Maidenhead grid square) to Longitude/Latitude.
int | longlat2locator (double longitude, double latitude, char *locator, int pair_count)
| Convert longitude/latitude to QRA locator (Maidenhead grid square).
int | qrb (double lon1, double lat1, double lon2, double lat2, double *distance, double *azimuth)
| Calculate the distance and bearing between two points.
double | distance_long_path (double distance)
| Calculate the long path distance between two points.
double | azimuth_long_path (double azimuth)
| Calculate the long path bearing between two points.

## Detailed Description

QRA locator (Maidenhead grid square) and latitude/longitude bearing conversion interface.

Author
  Stephane Fillod
  Nate Bargmann
  Dave Hines
  The Hamlib Group

Date
  2000-2020