Fix azimuth_long_path

* Return the correct long path azimuth (thanks P.J. Rovero, KK1D)
* Update configure.ac to use our fixed locator.c if hamlib <= 1.2.9
pull/2/head
Stelios Bounanos 2009-06-30 16:26:07 +01:00
rodzic d11f6fe0ee
commit f25b5d1c72
2 zmienionych plików z 3 dodań i 3 usunięć

Wyświetl plik

@ -252,8 +252,8 @@ AC_FLDIGI_PKG_CHECK([hamlib], [hamlib >= 1.2.4], [yes], [yes],
[use hamradio control libraries @<:@autodetect@:>@],
[ENABLE_HAMLIB])
# We compile our own copy of hamlib's locator.c if hamlib is not available
# or if it is version <= 1.2.8, which has a broken qrb function
AX_COMPARE_VERSION([$pkg_hamlib_version], [le], [1.2.8], [need_locator_c=yes], [need_locator_c=no])
# or if it is version <= 1.2.9, which has a broken azimuth_long_path function
AX_COMPARE_VERSION([$pkg_hamlib_version], [le], [1.2.9], [need_locator_c=yes], [need_locator_c=no])
AM_CONDITIONAL([NEED_HAMLIB_LOCATOR], [test "$need_locator_c" = "yes"])
### libintl

Wyświetl plik

@ -587,7 +587,7 @@ double HAMLIB_API distance_long_path(double distance) {
*/
double HAMLIB_API azimuth_long_path(double azimuth) {
return 360.0 - azimuth;
return azimuth + (azimuth <= 180.0 ? 180.0 : -180.0);
}
/*! @} */