From 8b8c9033879165730ca7601c2364e315782f25c7 Mon Sep 17 00:00:00 2001
From: djk <djk>
Date: Tue, 22 Dec 1998 00:26:14 +0000
Subject: [PATCH] *** empty log message ***

---
 contrib/g0rdi/show/heading.pl | 34 ++++++++++++++++++++++++++++++++++
 1 file changed, 34 insertions(+)
 create mode 100644 contrib/g0rdi/show/heading.pl

diff --git a/contrib/g0rdi/show/heading.pl b/contrib/g0rdi/show/heading.pl
new file mode 100644
index 00000000..aa7bb2f8
--- /dev/null
+++ b/contrib/g0rdi/show/heading.pl
@@ -0,0 +1,34 @@
+#
+# show the heading and distance for each callsign or prefix entered
+#
+# $Id$
+#
+
+my ($self, $line) = @_;
+my @list = split /\s+/, $line;		      # generate a list of callsigns
+
+my $l;
+my @out;
+my $lat = $self->user->lat;
+my $long = $self->user->long;
+if (!$long && !$lat) {
+	push @out, $self->msg('heade1');
+	$lat = $main::mylatitude;
+	$long = $main::mylongitude;
+}
+
+foreach $l (@list) {
+	# prefixes --->
+	my @ans = Prefix::extract($l);
+	next if !@ans;
+	my $pre = shift @ans;
+	my $a;
+	foreach $a (@ans) {
+		my ($b, $dx) = DXBearing::bdist($lat, $long, $a->{lat}, $a->{long});
+		my ($r, $rdx) = DXBearing::bdist($a->{lat}, $a->{long}, $lat, $long);
+		push @out, sprintf "%-9s (%s, %s) Bearing: %.0f Recip: %.0f %.0fKm %.0fMi", uc $l, $pre, $a->name(), $b, $r, $dx, $dx * 0.62133785;
+		$l = "";
+	}
+}
+
+return (1, @out);
-- 
2.43.0