2 # show the station details
4 # Copyright (c) 1998 - Dirk Koopman G1TLH
6 # Modifications by Iain Philipps G0RDI, 07-Dec-1998
9 my ($self, $line) = @_;
10 my @f = split /\s+/, uc $line;
14 push @f, $self->call unless @f;
16 if (@f == 1 && uc $f[0] eq 'ALL') {
17 return (1, $self->msg('e6')) if ($self->priv < 6);
18 my @calls = DXUser::get_all_calls();
19 foreach $call (@calls) {
20 my $ref = DXUser->get_current($call);
23 my $long = $ref->long;
24 my $sort = $ref->sort || "";
25 my $name = $ref->name || "";
26 my $qth = $ref->qth || "";
27 my $homenode = $ref->homenode || "";
28 my $qra = $ref->qra || "";
29 my $latlong = DXBearing::lltos($lat, $long) if $lat && $long;
30 $latlong = "" unless $latlong;
32 push @out, sprintf "%-9s %s %-12.12s %-27.27s %-9s %s %s", $call, $sort, $name, $qth, $homenode, $latlong, $qra;
36 my $ref = DXUser->get_current($call);
38 my $name = $ref->name;
41 my $long = $ref->long;
42 my $node = $ref->node;
43 my $homenode = $ref->homenode;
44 my $lastin = $ref->lastin;
45 my $latlong = DXBearing::lltos($lat, $long) if $lat || $long;
46 my $last = DXUtil::cldatetime($lastin) if $ref->lastin;
48 $qra = DXBearing::lltoqra($lat, $long) if !$qra && ($lat || $long);
50 my ($dx, $bearing, $miles);
52 my ($hlat, $hlong) = ($self->user->lat, $self->user->long);
53 ($hlat, $hlong) = DXBearing::qratoll($self->user->qra) if $self->user->qra && !$hlat && !$hlong;
54 if (!$hlat && !$hlong) {
55 $from = "From $main::mycall";
56 $hlat = $main::mylatitude;
57 $hlong = $main::mylongitude;
59 ($bearing, $dx) = DXBearing::bdist($hlat, $hlong, $lat, $long);
60 $miles = $dx * 0.62133785;
63 my $cref = Route::get($call);
64 my $seek = join(',', $cref->parents) if $cref;
67 push @out, "User : $call (at $seek)";
69 push @out, "User : $call";
71 push @out, "Name : $name" if $name;
72 push @out, "Last Connect : $last" if $last;
73 push @out, "QTH : $qth" if $qth;
74 push @out, "Location : $latlong ($qra)" if $latlong || $qra ;
75 push @out, sprintf("Heading : %.0f Deg %.0f Mi. %.0f Km.", $bearing, $miles, $dx) if $latlong;
76 push @out, "Home Node : $homenode" if $homenode;
78 push @out, $self->msg('usernf', $call);