...
 
Commits (7)
......@@ -101,6 +101,7 @@ palPrenut.c \
palPv2el.c \
palPv2ue.c \
palPvobs.c \
palRanorm.c \
palRdplan.c \
palRefco.c \
palRefro.c \
......@@ -131,8 +132,8 @@ palTest_SOURCES = palTest.c
palTest_LDADD = libpal.la
# A target for making the SUN documentation. We do not do this automatically
palsun.tex: $(PUBLIC_C_FILES)
palsun.tex: $(PUBLIC_C_FILES) palOne2One.c
-rm -f palsun.tex all.c
cat $(PUBLIC_C_FILES) > all.c
cat $^ > all.c
${STARCONF_DEFAULT_PREFIX}/bin/sst/prolat in=all.c out=palsun.tex single=no page=no atask=no document=no
-rm all.c
PAL - Positional Astronomy Library
==================================
[![DOI](https://zenodo.org/badge/12517/Starlink/pal.svg)](http://dx.doi.org/10.5281/zenodo.17212)
[![DOI](https://zenodo.org/badge/5487324.svg)](https://zenodo.org/badge/latestdoi/5487324)
The PAL library is a partial re-implementation of Pat Wallace's popular SLALIB
library written in C using a Gnu GPL license and layered on top of the IAU's
......@@ -74,3 +74,6 @@ The description paper for PAL is: ["_PAL: A Positional Astronomy Library_"](http
Jenness, T. & Berry, D. S., in _Astronomical Data Anaysis Software and Systems XXII_,
Friedel, D. N. (ed), ASP Conf. Ser. **475**, p307.
PAL is registered with the ASCL as [ascl:1606.002](http://ascl.net/1606.002).
Please consider citing the ADASS paper or the ASCL entry if you make use of this software.
......@@ -3,7 +3,7 @@
<!-- component.xml. Generated from component.xml.in by configure. -->
<component id="pal" support="S">
<version>0.9.7</version>
<version>0.9.8</version>
<path>libext/pal</path>
<description>Positional Astronomy Library</description>
<abstract><p>
......
......@@ -2,7 +2,7 @@ dnl Process this file with autoconf to produce a configure script
AC_REVISION($Revision: 27534 $)
dnl Initialisation: package name and version number
AC_INIT([pal],[0.9.7],[starlink@jiscmail.ac.uk])
AC_INIT([pal],[0.9.8],[starlink@jiscmail.ac.uk])
AC_CONFIG_AUX_DIR([build-aux])
dnl Require autoconf-2.50 at least
......@@ -37,6 +37,12 @@ AC_SEARCH_LIBS([strlcpy], [bsd])
AS_IF([test "x$ac_cv_search_strlcpy" = "x-lbsd"], [AC_CHECK_HEADERS([bsd/string.h])])
AC_CHECK_FUNCS([strlcpy])
dnl Windows might not have str[n]casecmp
AC_CHECK_FUNCS(strcasecmp)
AC_CHECK_FUNCS(strncasecmp)
AC_CHECK_FUNCS(_stricmp)
AC_CHECK_FUNCS(_strnicmp)
# Need the math library
AC_CHECK_LIB([m],[sin])
......
starlink-pal (0.9.8-1) unstable; urgency=medium
* Update VCS fields to use salsa.d.o
* New upstream version 0.9.8. Rediff patches, update symbols file
* Push Standards-Version to 4.2.1. Change some URLs to https
* Push compat to 11
-- Ole Streicher <olebole@debian.org> Sun, 02 Sep 2018 15:43:52 +0200
starlink-pal (0.9.7-3) unstable; urgency=low
* Link test program to -lm to fix test link failure
......
......@@ -3,9 +3,7 @@ Section: science
Priority: optional
Maintainer: Debian Astronomy Team <debian-astro-maintainers@lists.alioth.debian.org>
Uploaders: Ole Streicher <olebole@debian.org>
Build-Depends: autotools-dev,
debhelper (>= 9),
dh-autoreconf,
Build-Depends: debhelper (>= 11),
liberfa-dev (>= 1.1.0)
Build-Depends-Indep: ghostscript,
latex2html,
......@@ -13,7 +11,7 @@ Build-Depends-Indep: ghostscript,
texlive-font-utils,
texlive-latex-extra,
texlive-science
Standards-Version: 4.0.0
Standards-Version: 4.2.1
Homepage: http://starlink.eao.hawaii.edu/starlink
Vcs-Browser: https://salsa.debian.org/debian-astro-team/starlink-pal
Vcs-Git: https://salsa.debian.org/debian-astro-team/starlink-pal.git
......
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: PAL
Upstream-Author: Tim Jenness <t.jenness@jach.hawaii.edu>
Source: http://starlink.jach.hawaii.edu/starlink
......
......@@ -10,5 +10,5 @@ Format: PDF
Files: /usr/share/doc/*/sun???.pdf.gz
Format: HTML
Index: /usr/share/doc/libstarlink-pal-doc/index.html
Files: /usr/share/doc/libstarlink-pal-doc/*.html
Index: /usr/share/doc/libstarlink-pal-dev/index.html
Files: /usr/share/doc/libstarlink-pal-dev/*.html
......@@ -102,6 +102,7 @@ libstarlink_pal.so.0 libstarlink-pal0 #MINVER#
palPv2el@Base 0.1.0
palPv2ue@Base 0.1.0
palPvobs@Base 0.1.0
palRanorm@Base 0.9.8
palRdplan@Base 0.1.0
palRefco@Base 0.3.0
palRefcoq@Base 0.5.0
......
......@@ -11,7 +11,7 @@ Subject: "pal" is a quite short name for a library that is so specific as
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index c698cf1..54882db 100644
index c838703..c41b238 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,17 +1,17 @@
......@@ -46,7 +46,7 @@ index c698cf1..54882db 100644
endif
# install pal as "star/pal.h"
@@ -128,7 +128,7 @@ TESTS = palTest
@@ -129,7 +129,7 @@ TESTS = palTest
check_PROGRAMS = palTest
palTest_SOURCES = palTest.c
......@@ -54,4 +54,4 @@ index c698cf1..54882db 100644
+palTest_LDADD = libstarlink_pal.la
# A target for making the SUN documentation. We do not do this automatically
palsun.tex: $(PUBLIC_C_FILES)
palsun.tex: $(PUBLIC_C_FILES) palOne2One.c
......@@ -7,10 +7,10 @@ Subject: Remove timestamp from latex2html
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Makefile.am b/Makefile.am
index 136b577..fffda7d 100644
index 19dc017..863bb2d 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -126,7 +126,7 @@ doc: @STARDOCS@.pdf @STARDOCS@/index.html
@@ -127,7 +127,7 @@ doc: @STARDOCS@.pdf @STARDOCS@/index.html
pdflatex $^ && pdflatex $^
@STARDOCS@/index.html: @STARDOCS@.tex
......
......@@ -11,7 +11,7 @@ Subject: Do not depend on the starlink's automake,
create mode 100644 acinclude.m4
diff --git a/Makefile.am b/Makefile.am
index 54882db..136b577 100644
index c41b238..19dc017 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -11,10 +11,9 @@ libstarlink_pal_la_CPPFLAGS = $(ERFA_CPPFLAGS)
......@@ -26,7 +26,7 @@ index 54882db..136b577 100644
dist_pkgdata_DATA = COPYING COPYING.LESSER README.md
# Make all library code position independent. This is handy for creating
@@ -122,7 +121,13 @@ PRIVATE_C_FILES = \
@@ -123,7 +122,13 @@ PRIVATE_C_FILES = \
pal1Atms.c \
pal1Atmt.c
......@@ -105,7 +105,7 @@ index 0000000..3c2355a
+AC_DEFUN([STAR_CHECK_PROGS], [])
+
diff --git a/configure.ac b/configure.ac
index 10ff801..dc7d0ff 100644
index bf2bead..b1a9675 100644
--- a/configure.ac
+++ b/configure.ac
@@ -8,7 +8,7 @@ AC_CONFIG_AUX_DIR([build-aux])
......
......@@ -9,6 +9,6 @@ Reference:
Year: 2013
Volume: 475
Pages: 307
URL: http://adsabs.harvard.edu/abs/2013ASPC..475..307J
Eprint: http://aspbooks.org/publications/475/307.pdf
URL: https://adsabs.harvard.edu/abs/2013ASPC..475..307J
Eprint: https://aspbooks.org/publications/475/307.pdf
Repository: https://github.com/Starlink/pal
......@@ -4,6 +4,11 @@ The Starlink Positional Astronomy Library (PAL) is a C implementation of the
SLALIB API. It is distributed under the GPL and uses the SOFA library wherever
possible.
V0.9.8
- Add palRanorm (thanks to Christopher Jordan)
- Fix compiler issue on Windows
V0.9.7
- Enable light deflection in palAmpqk.
......
......@@ -155,6 +155,10 @@ static void star__strellcpy( char * dest, const char * src, size_t size ) {
#define star_strellcpy(dest, src, size) star__strellcpy(dest, src, size)
#endif
#if HAVE__STRICMP || defined(_WIN32) || defined(_WIN64)
#define strcasecmp _stricmp
#endif
#include "pal.h"
#include "palmac.h"
......
......@@ -83,11 +83,19 @@
*-
*/
#if HAVE_CONFIG_H
# include <config.h>
#endif
#include "pal.h"
#include "pal1sofa.h"
#include <string.h>
#if HAVE__STRNICMP || defined(_WIN32) || defined(_WIN64)
# define strncasecmp _strnicmp
#endif
void palPreces ( const char sys[3], double ep0, double ep1,
double *ra, double *dc ) {
......
/*
*+
* Name:
* palRanorm
* Purpose:
* Reduce angle to be within [0, 2*pi) (single precision)
* Language:
* Starlink ANSI C
* Type of Module:
* Library routine
* Invocation:
* float palRanorm ( float angle );
* Arguments:
* angle = float (Given)
* Angle to be reduced (radians)
* Description:
* The result is "angle" expressed in the range 0 to 2*pi.
* Authors:
* TIMJ: Tim Jenness
* PTW: Patrick T. Wallace
* CHJ: Christopher H. Jordan
* {enter_new_authors_here}
* History:
* 2018-08-27 (CHJ):
* Initial version
* Adapted from the Fortran SLALIB library authored by Patrick Wallace.
* {enter_further_changes_here}
* Copyright:
* Copyright (C) 1995 Rutherford Appleton Laboratory
* All Rights Reserved.
* Licence:
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 3 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be
* useful, but WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301, USA.
* Bugs:
* {note_any_bugs_here}
*-
*/
#include <math.h>
#include "pal.h"
#include "palmac.h"
float palRanorm ( float angle ) {
float reduced;
reduced = fmodf(angle, PAL__D2PI);
if (reduced < 0.0) reduced += PAL__D2PI;
return reduced;
}
......@@ -924,6 +924,9 @@ static void t_range( int *status ) {
}
static void t_ranorm( int *status ) {
vvd ( (double)palRanorm ( -0.1f ), 6.183185307179587,
1.0e-5, "palRanorm", "1", status );
vvd ( palDranrm ( -0.1 ), 6.183185307179587,
1e-12, "palDranrm", "2", status );
}
......
This diff is collapsed.