2 # show the heading and distance for each callsign or prefix entered
6 # AK1A-compatible output Iain Philipps, G0RDI 16-Dec-1998
8 my ($self, $line) = @_;
9 my @list = split /\s+/, $line; # generate a list of callsigns
13 my $lat = $self->user->lat;
14 my $long = $self->user->long;
15 if (!$long && !$lat) {
16 push @out, $self->msg('heade1');
17 $lat = $main::mylatitude;
18 $long = $main::mylongitude;
23 my @ans = Prefix::extract($l);
28 my ($b, $dx) = DXBearing::bdist($lat, $long, $a->{lat}, $a->{long});
29 my ($r, $rdx) = DXBearing::bdist($a->{lat}, $a->{long}, $lat, $long);
30 push @out, sprintf "%-2s %s: %.0f degs - dist: %.0f mi, %.0f km Reciprocal heading: %.0f degs", $pre, $a->name(), $b, $dx * 0.62133785, $dx, $r;