Commit 870e7d47 authored by Jeroen Vreeken's avatar Jeroen Vreeken
Browse files

Add configure check for libnova

Use external libnova instead of locally build.
(Upstream libnova has aberration fix as of Jul 9 2015)
parent 217e8375
......@@ -33,15 +33,9 @@ help:
echo "golden repository (on eris.camras.nl)."
libnova/libnova.h: lib/libnova.la
libnova.la: lib/libnova.la
lib/libnova.la:
cd libnova-0.13.0 && ./configure -enable-static -disable-shared --prefix=${CURDIR} $(CONF_HOST) && $(MAKE) && $(MAKE) install
clean: subdirs_CLEAN
rm -rf lib/*
rm -rf include/libnova
cd libnova-0.13.0 ; $(MAKE) clean || true
# Rules for building a release
......@@ -80,13 +74,7 @@ rel_ctrl: rel_trace rel_log rel_command
echo " Done"
rel_libnova: rel_clone_dir
@echo "****** Building libnova"; \
(cd $(REL_BUILD_DIR)/libnova-0.13.0 ; ./configure -enable-static -disable-shared --prefix=$(REL_BUILD_DIR) $(CONF_HOST); $(MAKE); $(MAKE) install) >/dev/null; \
echo " Done"
rel_cons: rel_trace rel_libnova rel_log rel_command
rel_cons: rel_trace rel_log rel_command
@echo "****** Building console"; \
$(MAKE) -C $(REL_BUILD_DIR)/console >/dev/null; \
echo " Done"
......
......@@ -3,6 +3,8 @@ BUILDSYS=@BUILDSYS@
BUILD_CONSOLE=@BUILD_CONSOLE@
BUILD_CONSOLE_HTTPD=@BUILD_CONSOLE_HTTPD@
BUILD_CONSOLE_J2000=@BUILD_CONSOLE_J2000@
BUILD_CONSOLE_SATTRACKER=@BUILD_CONSOLE_SATTRACKER@
BUILD_CONSOLE_J2000_INDI=@BUILD_CONSOLE_J2000_INDI@
BUILD_ETHERCAT=@BUILD_ETHERCAT@
......
......@@ -12,17 +12,17 @@ AS_IF([echo "$HOSTSYS_TMP" | grep "arm"],[HAVE_ARM=1],[HAVE_ARM=0])
#
AC_ARG_ENABLE([ethercat],
[AS_HELP_STRING([--disable-ethercat], [Enable/Disable Ethercat @<:@yes@:>@])],
[AS_HELP_STRING([--disable-ethercat], [Enable/Disable Ethercat master @<:@yes@:>@])],
[:],
[enable_ethercat=yes])
AC_ARG_ENABLE([vesp],
[AS_HELP_STRING([--disable-vesp], [Enable/Disable vesp @<:@yes@:>@])],
[AS_HELP_STRING([--disable-vesp], [Enable/Disable vesp bus @<:@yes@:>@])],
[:],
[enable_vesp=yes])
AC_ARG_ENABLE([am335x],
[AS_HELP_STRING([--disable-am335x], [Enable/Disable am335x @<:@yes@:>@])],
[AS_HELP_STRING([--disable-am335x], [Enable/Disable am335x blocks @<:@yes@:>@])],
[:],
[enable_am335x=yes])
......@@ -83,9 +83,27 @@ AS_CASE(["$with_libindi"],
[AC_CHECK_LIB(indi,IDLog,[HAVE_LIBINDI=1],[HAVE_LIBINDI=0])]
[AC_CHECK_HEADERS([libindi/indidevapi.h])]
)
#AS_IF([test "$ac_cv_header_linindi_indidevapi_h" != yes],[HAVE_LIBINDI=0],[])
#######################################################################
#
# Check for libnova
#
AC_ARG_WITH([libnova],
[AS_HELP_STRING([--with-libnova],
[use nova library @<:@default=check@:>@])],
[],
[with_libnova=check])
AS_CASE(["$with_libnova"],
[yes],
[AC_CHECK_LIB(nova,ln_get_version,[HAVE_LIBNOVA=1])]
[AC_CHECK_HEADERS([libnova/libnova.h])],
[no],
[],
[AC_CHECK_LIB(nova,ln_get_version,[HAVE_LIBNOVA=1],[HAVE_LIBNOVA=0])]
[AC_CHECK_HEADERS([libnova/libnova.h])]
)
#######################################################################
#
......@@ -101,12 +119,19 @@ AS_IF([test "$BUILD_CONSOLE" == "yes" && test "$HAVE_LIBWEBSOCKETS" == "1"],
[AC_SUBST(BUILD_CONSOLE_HTTPD,["yes"])],
[AC_SUBST(BUILD_CONSOLE_HTTPD,[""])])
AS_IF([test "$BUILD_CONSOLE" = "yes" && test "$HAVE_LIBINDI" = "1"],
AS_IF([test "$BUILD_CONSOLE" = "yes" && test "$HAVE_LIBNOVA" = "1"],
[AC_SUBST(BUILD_CONSOLE_J2000,["yes"])],
[AC_SUBST(BUILD_CONSOLE_J2000,[""])])
AS_IF([test "$BUILD_CONSOLE" = "yes" && test "$HAVE_LIBNOVA" = "1"],
[AC_SUBST(BUILD_CONSOLE_SATTRACKER,["yes"])],
[AC_SUBST(BUILD_CONSOLE_SATTRACKER,[""])])
AS_IF([test "$BUILD_CONSOLE_J2000" = "yes" && test "$HAVE_LIBINDI" = "1"],
[AC_SUBST(BUILD_CONSOLE_J2000_INDI,["yes"])],
[AC_SUBST(BUILD_CONSOLE_J2000_INDI,[""])])
AS_IF([test "$enable_ethercat" = "yes"],
[AC_SUBST(BUILD_ETHERCAT,["yes"])],
[AC_SUBST(BUILD_ETHERCAT,[""])])
......@@ -147,10 +172,17 @@ AS_IF([test "$BUILD_CONSOLE_HTTPD" != ""],
AC_MSG_NOTICE([ console_httpd: yes]),
AC_MSG_NOTICE([ console_httpd: no]))
AS_IF([test "$BUILD_CONSOLE_J2000" != ""],
AC_MSG_NOTICE([ console_j2000_tracker: yes]),
AC_MSG_NOTICE([ console_j2000_tracker: no]))
AS_IF([test "$BUILD_CONSOLE_J2000_INDI" != ""],
AC_MSG_NOTICE([ console_j2000_indi: yes]),
AC_MSG_NOTICE([ console_j2000_indi: no]))
AS_IF([test "$BUILD_CONSOLE_SATTRACKER" != ""],
AC_MSG_NOTICE([ console_sattracker: yes]),
AC_MSG_NOTICE([ console_sattracker: no]))
AS_IF([test "$BUILD_ETHERCAT" != ""],
AC_MSG_NOTICE([ ethercat: yes]),
......
......@@ -11,8 +11,12 @@ CONSOLE_TARGETS += $(DIR)/command_shell
CONSOLE_TARGETS += $(DIR)/console_moontracker
CONSOLE_TARGETS += $(DIR)/trace_proxy
CONSOLE_TARGETS += $(DIR)/trace_log
ifdef BUILD_CONSOLE_J2000
CONSOLE_TARGETS += $(DIR)/console_j2000tracker
CONSOLE_TARGETS += $(DIR)/console_j2000tracer
endif
CONSOLE_TARGETS += $(DIR)/log_proxy
CONSOLE_TARGETS += $(DIR)/spg_auth
CONSOLE_TARGETS += $(DIR)/console_idle
......@@ -22,7 +26,10 @@ CONSOLE_TARGETS += $(DIR)/console_manual
CONSOLE_TARGETS += $(DIR)/console_weather
CONSOLE_TARGETS += $(DIR)/console_dt_model
CONSOLE_TARGETS += $(DIR)/await_controller
ifdef BUILD_CONSOLE_SATTRACKER
CONSOLE_TARGETS += $(DIR)/console_sattracker
endif
ifdef BUILD_CONSOLE_HTTPD
CONSOLE_TARGETS += $(DIR)/console_httpd
......@@ -59,30 +66,26 @@ $(DIR)/command_shell: $(DIR)/command_shell.o
CONSOLE_SRCS += $(DIR)/command_shell.c
$(DIR)/console_moontracker.o: CFLAGS += -Wall -O3
$(DIR)/console_moontracker.o: libnova/libnova.h
$(DIR)/console_moontracker_LDFLAGS += -lcommand -lm -laa
$(DIR)/console_moontracker: libcommand.la libaa.la
$(DIR)/console_moontracker: $(DIR)/console_moontracker.o
CONSOLE_SRCS += $(DIR)/console_moontracker.c
$(DIR)/console_j2000tracker.o: CFLAGS += -Wall -O3
$(DIR)/console_j2000tracker.o: libnova/libnova.h
$(DIR)/console_j2000tracker_LDFLAGS += -lcommand -lm -lnova -ltrace
$(DIR)/console_j2000tracker: libcommand.la libtrace.la libnova.la
$(DIR)/console_j2000tracker: libcommand.la libtrace.la
$(DIR)/console_j2000tracker: $(DIR)/console_j2000tracker.o
CONSOLE_SRCS += $(DIR)/console_j2000tracker.c
$(DIR)/console_j2000tracer.o: CFLAGS += -Wall -O3
$(DIR)/console_j2000tracesr.o: libnova/libnova.h
$(DIR)/console_j2000tracer_LDFLAGS += -lm -lnova -lutils
$(DIR)/console_j2000tracer: libutils.la libnova.la
$(DIR)/console_j2000tracer: libutils.la
$(DIR)/console_j2000tracer: $(DIR)/console_j2000tracer.o
CONSOLE_SRCS += $(DIR)/console_j2000tracer.c
$(DIR)/console_j2000_indi.o: CFLAGS += -Wall -O3
$(DIR)/console_j2000_indi.o: libnova/libnova.h
$(DIR)/console_j2000_indi_LDFLAGS += -lm -lindi -lindidriver -lnova -lutils
$(DIR)/console_j2000_indi: libutils.la libnova.la
$(DIR)/console_j2000_indi: libutils.la
$(DIR)/console_j2000_indi: $(DIR)/console_j2000_indi.o
CONSOLE_SRCS += $(DIR)/console_j2000_indi.c
......@@ -147,9 +150,8 @@ $(DIR)/spg_auth: $(DIR)/spg_auth.o
CONSOLE_SRCS += $(DIR)/spg_auth.c
$(DIR)/console_sattracker.o: CFLAGS += -Wall -O3
$(DIR)/console_sattracker.o: libnova/libnova.h
$(DIR)/console_sattracker_LDFLAGS += -lcommand -lnova -lpredict
$(DIR)/console_sattracker: libcommand.la libpredict.la libnova.la
$(DIR)/console_sattracker: libcommand.la libpredict.la
$(DIR)/console_sattracker: $(DIR)/console_sattracker.o
CONSOLE_SRCS += $(DIR)/console_sattracker.c
......
......@@ -105,6 +105,27 @@ struct ln_hms track_hms;
struct ln_dms track_dms;
/* Reverse of ln_get_equ_aber() */
static void get_equ_mean_from_aber(struct ln_equ_posn * position, double JD, struct ln_equ_posn * mean_position)
{
struct ln_equ_posn mean;
ln_get_equ_aber(position, JD, &mean);
mean_position->ra = position->ra - (mean.ra - position->ra);
mean_position->dec = position->dec - (mean.dec - position->dec);
if (mean_position->dec > 90.0) {
mean_position->dec = 180.0 - mean_position->dec;
mean_position->ra -= 180.0;
}
while (mean_position->ra < 0.0) {
mean_position->ra += 360.0;
}
while (mean_position->ra >= 360.0) {
mean_position->ra -= 360.0;
}
}
void a2coord(char *ara, char *adec, struct ln_hms *ra, struct ln_dms *dec)
......@@ -276,7 +297,7 @@ void output(struct status_server *stat_srv)
ln_get_equ_from_hrz (&hrz, &dwingeloo_pos, JD, &equ_pos_prec);
/* Calculate inverse precession */
ln_get_equ_prec2(&equ_pos_prec, JD, JD2000, &equ_pos_aber);
ln_get_equ_mean_from_aber(&equ_pos_aber, JD, &equ_pos);
get_equ_mean_from_aber(&equ_pos_aber, JD, &equ_pos);
ln_deg_to_hms(equ_pos.ra, &hms);
ln_deg_to_dms(equ_pos.dec, &dms);
......
......@@ -37,9 +37,6 @@
#include <errno.h>
#include <stdbool.h>
#include <libnova/julian_day.h>
#include <libnova/refraction.h>
#include <command/command.h>
#include <aalib/aalib.h>
......@@ -76,14 +73,6 @@ struct compensation_switch compensation_switches[] = {
struct weather *weather;
struct lnh_lnlat_posn dwingeloo;
struct ln_lnlat_posn dwingeloo_pos;
struct ln_equ_posn object;
struct ln_equ_posn object_prec;
struct ln_equ_posn object_aber;
struct ln_hms track_hms;
struct ln_dms track_dms;
static int handle_cmd(char *name, char *val)
{
......
......@@ -37,9 +37,6 @@
#include <errno.h>
#include <stdbool.h>
#include <libnova/julian_day.h>
#include <libnova/refraction.h>
#include <command/command.h>
#include <aalib/aalib.h>
......@@ -76,14 +73,6 @@ struct compensation_switch compensation_switches[] = {
struct weather *weather;
struct lnh_lnlat_posn dwingeloo;
struct ln_lnlat_posn dwingeloo_pos;
struct ln_equ_posn object;
struct ln_equ_posn object_prec;
struct ln_equ_posn object_aber;
struct ln_hms track_hms;
struct ln_dms track_dms;
static int handle_cmd(char *name, char *val)
{
......
Makefile
config.h
config.log
config.status
doc/Makefile
examples/.deps/
examples/.libs/
examples/Makefile
examples/asteroid
examples/comet
examples/lunar
examples/mars
examples/sun
examples/transforms
libtool
lntest/.deps/
lntest/.libs/
lntest/Makefile
lntest/libnovaconfig
lntest/lntest
src/.deps/
src/.libs/
src/Makefile
src/aberration.lo
src/airmass.lo
src/angular_separation.lo
src/apparent_position.lo
src/asteroid.lo
src/comet.lo
src/dynamical_time.lo
src/earth.lo
src/elliptic_motion.lo
src/heliocentric_time.lo
src/hyperbolic_motion.lo
src/julian_day.lo
src/jupiter.lo
src/libnova.la
src/libnova/Makefile
src/lunar.lo
src/mars.lo
src/mercury.lo
src/neptune.lo
src/nutation.lo
src/parabolic_motion.lo
src/parallax.lo
src/pluto.lo
src/precession.lo
src/proper_motion.lo
src/refraction.lo
src/rise_set.lo
src/saturn.lo
src/sidereal_time.lo
src/solar.lo
src/transform.lo
src/uranus.lo
src/utility.lo
src/venus.lo
src/vsop87.lo
stamp-h1
libNova Team
============
Liam Girdwood <liam@gnova.org>
Juan Carlos Remis <jcremis@cajaespana.es>
Petr Kubanek <petr@kubanek.net>
BugFixes
========
Bug fixes and reports have been supplied by
Petr Kubanek,
Danie Malan,
Herbert Straub,
Asrita Chetan,
John R. Thorstensen,
Kimura Fuyuki,
Kirill Ponomarew,
Pablo Martikian,
Paul Ray,
Pedro Abelleira Seco,
Guillermo Ballester Valor,
Peter Williams,
Radu Corlan,
Daniel Schultze,
Kevin Ross,
Stephane Lamoliatte,
Kevin Ivarsen
This diff is collapsed.
ChangeLog
*********** release of 0.13.0
20090514
heliocentric_time.h:
heliocentric_time.c:
test.c:
Added heliocentric time corrections calculations.
Petr Kubanek
20090420
julian_day.h:
Removed "#ifndef __WIN32__" to make ln_get_date_from_timet function available in win32
ln_types.h:
Changed tv_sec type from long to time_t to match standard definition
Clarified field documentation for ln_nutation
julian_day.c:
Removed "#ifndef __WIN32__" to make ln_get_date_from_timet function available in win32
Remove platform-dependent code form ln_get_date_from_sys. The function now simply makes a call to gettimeofday() - a Win32 implementation is supplied in utility.c, and this function is no longer limited to one-second precision under Windows.
nutation.c:
Fixed two values in nutation coefficients table
Fixed method used to compute longitude/obliquity offsets. The general form of the calculation is supposed to be, e.g., coeff*sin(D+M+MM+F+O), not coeff*(sin(D) + sin(M) + sin(MM) + ...)
Added correct computation for mean ecliptic (Meeus eq 22.2)
(These fixes also fix ln_get_apparent_sidereal_time, and affect:
ln_get_solar_equ_coords
ln_get_solar_ecl_coords
ln_get_equ_from_ecl (possibly needs true ecliptic rather than mean)
ln_get_ecl_from_equ (possibly needs true ecliptic rather than mean)
)
utility.c:
Fixed gettimeofday Win32 implementation:
should not add timezone offset - _ftime_s and gettimeofday both work in terms of seconds since Jan 1 1970, UTC
Added some explicit casts to remove compile warnings
Cleaned up implementations of ln_deg_to_hms, ln_rad_to_hms, ln_deg_to_dms, and ln_rad_to_hms
patch provided by Kevin Ivarsen, applied by Petr Kubanek
20090323
Fixed issues while compling on Sun/Solaris (acosl, round, ..)
Petr Kubanek
*********** release of 0.12.3
20090114
Another fix of MS Windows support
patch provided by Stephane Lamoliatte, applied by Petr Kubanek
20081008
Fixed MS Windows support
patch provided by Stephane Lamoliatte, applied by Petr Kubanek
*********** release of 0.12.2
20080516
Fixed bug #1838539.
Petr Kubanek
20080413
Fixed bug #1940972.
Petr Kubanek
20071127
Fixed bug #1838359.
Petr Kubanek
20071115
Fixed time.h issues.
Petr Kubanek
20070709
Fixed bug in julian_day.c, reported by Michael Richmod.
Petr Kubanek
20070125
fixed
[ 1644739 ] DEC coordinate error in ln_get_equ_pm_epoch
Petr Kubanek
*********** release of 0.12.1
20070117
Bug-fix of RST.
-src/rise_set.c
check_coords function, rewrite H1 checks, fix some nasty bugs which
were there.
-lntest/test.c
Additional tests for RST functions (hyp_future_rst_test).
Fix RST tests - error will be displayed if libnova calculates wrong
circumpolar value.
Petr Kubanek
20070117
Future functions, which calculated next rises.
-src/rise_set.c
-src/libnova/rise_set.h
Add _next_rst_future functions.
-src/elliptic_motion.c
-src/libnova/elliptic_motion.h
-src/parabolic_motion.c
-src/libnova/parabolic_motion.h
-src/hyperbolic_motion.c
-src/libnova/hyperbolic_motion.h
Add _next functions (and their variants).
-lntest/test.c
Add test for new functions (ell_rst_test, body_future_rst_test
functions).
Petr Kubanek
20070116
libnova is now ported to Win32 with the following changes.
-src/julian_day.c
Added preprocessing directive for POSIX header (sys/time.h) exclusion for Win32 compilation.
Changed ln_get_date_from_sys to be compatible with Win32.
-src/misc.c
Added preprocessing directive for POSIX header (unistd.h) exclusion for Win32 compilation.
Changed libnova.h include to libnova/libnova.h.
-src/utility.c
Added preprocessing directive for POSIX header (unistd.h) exclusion for Win32 compilation.
Added functions gettimeofday, gmtime_r, and strtok_r to substitute for their POSIX coupterparts.
Added functions cbrt, nan, and round to subsistute, in C89, for their C99 counterparts.
-src/libnova/ln_types.h
Added definitions of struct timeval and struct timezone to subtitute in Win32 for their POSIX counterparts.
-src/libnova/utility.h
Added include of time.h.
Added declarations of new functions noted in this change under src/utility.c
Daniel Schultze
20070116
-src/rise_set.c
-src/libnova/rise_set.h
Add various _next_ & _horizon functions.
Add ln_get_motion_body_rst_horizon function.
Fix dynamic time diffs in rst functions - remove dynamical time
correction from object_rst, where it's not needed, use it only for
nr, nt and ns corrections (interpolation coeficient) in body &
motion_body variants.
Add dm corrections for object calculation, as 0.01 is ~ 10 minutes.
-src/elliptic_motion.c
-src/libnova/elliptic_motion.h
-src/parabolic_motion.c
-src/libnova/parabolic_motion.h
-src/hyperbolic_motion.c
-src/libnova/hyperbolic_motion.h
Change _rst calculation to use generic motion_body code.
Add _horizont functions.
-lntest/test.c
Change Arcturus test times.
Add test for Venus RST.
Add tests for _next functions.
Petr Kubanek
20070115
-lntest/test.c
Add test for Venus RST.
Petr Kubanek
20070112
-src/rise_set.c
-src/libnova/rise_set.h
Replace "horizont" with correct "horizon" (typo).
Add ln_get_object_rst_horizon function.
-src/solar.c
-src/libnova/solar.c
-src/mercury.c
-src/venus.c
-src/lunar.c
-src/libnova/lunar.h
-src/mars.c
-src/jupiter.c
-src/saturn.c
-src/urans.c
-src/neptune.c
-src/pluto.c
Replace "horizont" with correct "horizon" (typo).
-src/elliptic_motion.c
-src/parabolic_motion.c
-src/hyperbolic_motion.c
Return -1 when object is never visible.
Petr Kubanek
20060901
-src/transform.h
Change code how az is calculated if dec = +- 90.
-lntest/test.c
Add tests for ln_get_hrz_from_equ when dec = +- 90.
Petr Kubanek
20060611
-lntest/test.c
Add TNO test, which explain MPO Epoch (which have anomaly, and hence
to fit to Libnova perihelion-pass epoch, M/n have to be substracted)
-src/elliptic_motion.c
Change atan2 to asin, and put correct parameters.
Petr Kubanek
20060316
-src/dynamical_time.c
-src/utility.c
-lntest/test.c
Updated dynamical time constants from US Navy.
Fixed bug in interpolation.
Fix suppilied by HG Zaunick
Liam Girdwood
*********** release of 0.12.0
20060215
-src/julina_day.c
-src/libnova/julian_day.h