--- gcb-1.07.orig/gc.c +++ gcb-1.07/gc.c @@ -12,10 +12,10 @@ * * Usage examples: * - * gc n 35.19n97.27w 0s0e (Moore to Prime/Equator) - * gc n 35.19N97.27W 38.51n77.02W (Moore to Washington D.C., mixed case) - * gc n 33.56n118.24w 55.45n37.35e (L.A. to Moscow) - * gc n 35N70W 35N71W (No decimal points used, all uppercase) + * gcb n 35.19n97.27w 0s0e (Moore to Prime/Equator) + * gcb n 35.19N97.27W 38.51n77.02W (Moore to Washington D.C., mixed case) + * gcb n 33.56n118.24w 55.45n37.35e (L.A. to Moscow) + * gcb n 35N70W 35N71W (No decimal points used, all uppercase) * * Modified the program to incorporate short and long path information * from the Satellite Handbook. This version also takes into consideration @@ -23,7 +23,7 @@ * antipodal points, which are easily calculated. These last points were * made in discussions with John Allison who makes the nice MAPIT program. * - * Compile GNU C with: cc -O gc.c -o gc -lm + * Compile GNU C with: cc -O gc.c -o gcb -lm */ /* Includes */ @@ -101,7 +101,7 @@ char *s; double *lat, *lon; { - register char *i, *t, *e; + register char *i, *t=NULL, *e; e = s + strlen(s); for (i = s; i < e; ++i) { @@ -148,7 +148,7 @@ *lat = -89.9; } -void main(argc, argv) +int main(argc, argv) int argc; char **argv; { @@ -157,17 +157,15 @@ int units; if (argc != 4) { - fprintf(stderr, "\nUsage: gc units station1 station2\n\n" \ - "This program computes Great Circle Bearing and Range\n" \ + fprintf(stderr, "\nUsage: gcb units station1 station2\n\n" \ + "This program computes long/short radio path\n" \ "given the latitude and longitude (degrees and minutes).\n\n" \ "You must input the lat/long of the two stations.\n" \ "The output will then be relative from station1 to station2.\n\n" \ "Input the two station lat/longs using the following format:\n\n" \ "\tdd.mmHddd.mmG lead/lagging zeros can be left out.\n\n" \ - "d = Degrees, m = Minutes, H = Hemisphere (N or S), " \ - "G = Greenwich (W or E)\n\n" \ - "units is 'n' for Nautical, 'k' for kilometers, and 's' for " \ - "Statute.\n\n"); + "d = Degrees, m = Minutes, H = Hemisphere (N or S), G = Greenwich (W or E)\n\n" \ + "units is 'n' for Nautical, 'k' for kilometers, and 's' for Statute.\n\n"); exit(1); } @@ -261,10 +259,10 @@ /* Computations complete, show answer */ - printf("Short Path Bearing is %03.0f Degrees for %.0f %s\n", + printf("Short Radio Path is %03.0f Degrees for %.0f %s\n", azsp, distsp, Units[units].text); - printf(" Long Path Bearing is %03.0f Degrees for %.0f %s\n", + printf(" Long Radio Path is %03.0f Degrees for %.0f %s\n", azlp, distlp, Units[units].text); exit(0); --- gcb-1.07.orig/Makefile +++ gcb-1.07/Makefile @@ -0,0 +1,12 @@ +CC = gcc +PROG = gcb +CFLAGS = -O2 -Wall + +$(PROG): + $(CC) $(CFLAGS) -o $(PROG) gc.c -lm + +install: + install -s -o root -g root $(PROG) $(DESTDIR)/usr/bin + +clean: + rm -f gc $(PROG) --- gcb-1.07.orig/debian/dirs +++ gcb-1.07/debian/dirs @@ -0,0 +1 @@ +usr/bin --- gcb-1.07.orig/debian/README.Debian +++ gcb-1.07/debian/README.Debian @@ -0,0 +1,21 @@ +gcb for Debian +-------------- +Gcb is a misleading name, it has nothing to do with great circles, as +you will find out shortly. + +The short radio path between 2 radio stations is a curve along the globe +drawn using the earth's center as a midpoint. Short paths are not only +the shortest route, propagation via this path will most commonly take +place in daylight. + +The long path is simply the radio path with both stations having their +antenna turned 180 degrees. Propagation is almost always via the dark +side of the earth. + +Please note that gcb is not very accurate. Gcb assumes that the earth +is a perfect circle. In reality, earth is ellipsoid or pear-shaped. This +means that there will be small calculation errors. However, for antenna +directions and simple distance calculations as used by hamradio operators, +you should be okay. + +Joop Stakenborg , Tue, 30 Sep 2003 15:50:55 +0100 --- gcb-1.07.orig/debian/rules +++ gcb-1.07/debian/rules @@ -0,0 +1,83 @@ +#!/usr/bin/make -f +# -*- makefile -*- +# Sample debian/rules that uses debhelper. +# This file was originally written by Joey Hess and Craig Small. +# As a special exception, when this file is copied by dh-make into a +# dh-make output file, you may use that output file without restriction. +# This special exception was added by Craig Small in version 0.37 of dh-make. + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + + + + +CFLAGS = -Wall -g + +ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) + CFLAGS += -O0 +else + CFLAGS += -O2 +endif + +configure: configure-stamp +configure-stamp: + dh_testdir + # Add here commands to configure the package. + + touch configure-stamp + + +build: build-stamp + +build-stamp: configure-stamp + dh_testdir + + # Add here commands to compile the package. + $(MAKE) + touch build-stamp + +clean: + dh_testdir + dh_testroot + rm -f build-stamp configure-stamp + + # Add here commands to clean up after the build process. + [ ! -f Makefile ] || $(MAKE) clean + dh_clean + +install: build + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + + # Add here commands to install the package into debian/gcb. + $(MAKE) install DESTDIR=$(CURDIR)/debian/gcb + + +# Build architecture-independent files here. +binary-indep: build install +# We have nothing to do by default. + +# Build architecture-dependent files here. +binary-arch: build install + dh_testdir + dh_testroot + dh_installchangelogs + dh_installdocs + dh_installexamples +# dh_install + dh_installman debian/gcb.1 debian/gcb.fr.1 + dh_link + dh_strip + dh_compress + dh_fixperms + dh_installdeb + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install configure --- gcb-1.07.orig/debian/control +++ gcb-1.07/debian/control @@ -0,0 +1,22 @@ +Source: gcb +Section: hamradio +Priority: optional +Maintainer: Debian QA Group +Build-Depends: debhelper (>= 4.0.0) +Standards-Version: 3.7.3 + +Package: gcb +Architecture: any +Depends: ${shlibs:Depends} +Description: Utility to calculate long and short path to a location + Gcb computes long and short path given the latitude and longitude + (degrees and minutes). You must input the lat/long of the two stations. + The output will then be relative from station1 to station2. + . + Gcb is used by hamradio operators as a tool for pointing the antenna + in the right direction, either by using the short (daylight) propagation + path or using the long path, which is almost always via the dark side + of the earth. + . + Gcb believes the earth to be a perfect circle, which means there will be + small calculation errors. --- gcb-1.07.orig/debian/docs +++ gcb-1.07/debian/docs @@ -0,0 +1 @@ +README --- gcb-1.07.orig/debian/gcb.fr.1 +++ gcb-1.07/debian/gcb.fr.1 @@ -0,0 +1,34 @@ +.TH GCB 1 +.SH NOM +gcb \- calcule un long et un court chemin pour un emplacement +.SH SYNOPSIS +.B gcb units station1 station2 +.SH DESCRIPTION +.B Gcb +calcule la distance d'un long/court chemin et renvoie la latitude et la longitude (en degrés et en minutes). +Vous devez donner les latitudes/longitudes des deux stations. +Le résultat sera alors la distance de la station1 à la station2. + +Entrez les latitudes/longitudes des deux stations sous le format suivant: +ddd.mmHddd.mmG, les zéros de début/fin peuvent être omis. + +d = Degrés, m = Minutes, H = Hémisphère (N ou S), +G = Greenwich (O ou E) + +Les unités sont 'n' pour les miles nautiques, 'k' pour les kilomètres, et 's' pour les miles terrestres américains (Statute Miles) + +.SH EXEMPLES +gcb n 35.19n97.27w 0s0e (Moore à Premier Méridien/Equator) + +gcb n 35.19N97.27W 38.51n77.02W (Moore à Washington D.C., casse mélangée) + +gcb n 33.56n118.24w 55.45n37.35e (L.A. à Moscow) + +gcb n 35N70W 35N71W (Sans point de séparation, tout en majuscule) + +.SH VOIR AUSSI +/usr/share/doc/gcb/README.debian + +.SH AUTEUR +Cette page de manuel a été écrite par Joop Stakenborg , +pour le système d'exploitation Debian GNU/Linux. --- gcb-1.07.orig/debian/copyright +++ gcb-1.07/debian/copyright @@ -0,0 +1,6 @@ +This package was debianized by Joop Stakenborg pa3aba@debian.org on +Sun, 13 Dec 1998 21:09:57 +0100. + +It was downloaded from ftp://ftp.ucsd.edu/hamradio/packet/misc + +Copyright: Public Domain. --- gcb-1.07.orig/debian/compat +++ gcb-1.07/debian/compat @@ -0,0 +1 @@ +4 --- gcb-1.07.orig/debian/changelog +++ gcb-1.07/debian/changelog @@ -0,0 +1,98 @@ +gcb (1:1.07-3) unstable; urgency=low + + * Retiring - set the package maintainer to Debian QA Group. + + -- Joop Stakenborg Sun, 01 Nov 2009 19:17:14 +0000 + +gcb (1:1.07-2) unstable; urgency=low + + * French manual page by Tom KASZEMACHER , thanks! + + -- Joop Stakenborg Wed, 07 May 2008 20:29:24 +0200 + +gcb (1:1.07-1) unstable; urgency=low + + * No longer package as debian-native. + * Closely follow the source package and name it gc. + * Move to debhelper. + + -- Joop Stakenborg Fri, 24 Mar 2006 10:37:32 +0100 + +gcb (1.07.3) unstable; urgency=low + + * Correct some strings in the output, so we can get rid of the bearing + phrases. We use radio short/long path from now on. + + -- Joop Stakenborg Sun, 16 Nov 2003 09:44:02 +0100 + +gcb (1.07.2) unstable; urgency=low + + * Explain what short/long path is in README.debian. + * Adapt the package description, so gcb's limitations are clear. + * Closes: #203178. + + -- Joop Stakenborg Tue, 30 Sep 2003 15:35:12 +0200 + +gcb (1.07.1) unstable; urgency=low + + * Rename the package. Closes: #183087. + * Make this package debian-native: many changes to the code and renaming + of the binary, package and source tree, which are all debian-specific. + * Conflicts with gc for now. + + -- Joop Stakenborg Mon, 7 Jul 2003 17:11:21 +0200 + +gc (1.07-8) unstable; urgency=low + + * Update standards version. + * Lintian fixes. + + -- Joop Stakenborg Sun, 22 Dec 2002 11:28:22 +0100 + +gc (1.07-7) unstable; urgency=low + + * Remove libc6-dev fron the Build-Depends line as per debian policy. + + -- Joop Stakenborg Tue, 10 Jul 2001 21:44:01 +0200 + +gc (1.07-6) unstable; urgency=low + + * Add build-depends. Closes: #84853. + * Update standards version. + + -- Joop Stakenborg Wed, 14 Feb 2001 19:38:16 +0100 + +gc (1.07-5) unstable; urgency=low + + * Changed the name of the binary to gcb in manual page and when the program + is called without an argument (closes: #70053) + + -- Joop Stakenborg Sun, 1 Oct 2000 20:54:08 +0200 + +gc (1.07-4) unstable; urgency=low + + * Fixed lintian warnings. + * Updated standards version. + * Fixed compiler warnings. + + -- Joop Stakenborg Fri, 28 Jul 2000 09:42:26 +0200 + +gc (1.07-3) unstable; urgency=low + + * Fixed link to the upstream readme in the manual page. + + -- Joop Stakenborg Wed, 1 Dec 1999 21:10:08 +0100 + +gc (1.07-2) unstable; urgency=low + + * Updated standards version. + * FHS. + + -- Joop Stakenborg Thu, 14 Oct 1999 18:05:54 +0200 + +gc (1.07-1) unstable; urgency=low + + * Initial Release. + * Manual page added. + + -- Joop Stakenborg Sun, 13 Dec 1998 21:09:57 +0100 --- gcb-1.07.orig/debian/gcb.1 +++ gcb-1.07/debian/gcb.1 @@ -0,0 +1,37 @@ +.TH GCB 1 +.SH NAME +gcb \- calculate long and short path to a location +.SH SYNOPSIS +.B gcb units station1 station2 +.SH DESCRIPTION +.B Gcb +computes long/short path distance and heading +given the latitude and longitude (degrees and minutes). +You must input the lat/long of the two stations. +The output will then be relative from station1 to station2. + +Input the two station lat/longs using the following format: +ddd.mmHddd.mmG, lead/lagging zeros can be left out. + +d = Degrees, m = Minutes, H = Hemisphere (N or S), +G = Greenwich (W or E) + +Units is 'n' for Nautical, 'k' for kilometers, and 's' for +Statute. + + +.SH EXAMPLES +gcb n 35.19n97.27w 0s0e (Moore to Prime/Equator) + +gcb n 35.19N97.27W 38.51n77.02W (Moore to Washington D.C., mixed case) + +gcb n 33.56n118.24w 55.45n37.35e (L.A. to Moscow) + +gcb n 35N70W 35N71W (No decimal points used, all uppercase) + +.SH SEE ALSO +/usr/share/doc/gcb/README.debian + +.SH AUTHOR +This manual page was written by Joop Stakenborg , +for the Debian GNU/Linux system.