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;
16 return (1, $self->msg('e6')) if ($self->priv < 5);
17 my @calls = DXUser::get_all_calls();
18 foreach $call (@calls) {
19 my $ref = DXUser->get_current($call);
22 my $long = $ref->long;
23 my $latlong = DXBearing::lltos($lat, $long) if $lat && $long;
24 push @out, sprintf "%-9s %s %-12.12s %-27.27s %-9s %s %s", $call, $ref->sort, $ref->name, $ref->qth, $ref->homenode, $latlong, $ref->qra;
28 my $ref = DXUser->get_current($call);
30 my $name = $ref->name;
33 my $long = $ref->long;
34 my $node = $ref->node;
35 my $homenode = $ref->homenode;
36 my $lastin = $ref->lastin;
37 my $latlong = DXBearing::lltos($lat, $long) if $lat || $long;
38 my $last = DXUtil::cldatetime($lastin) if $ref->lastin;
40 $qra = DXBearing::lltoqra($lat, $long) if !$qra && ($lat || $long);
42 my ($dx, $bearing, $miles);
44 my ($hlat, $hlong) = ($self->user->lat, $self->user->long);
45 ($hlat, $hlong) = DXBearing::qratoll($self->user->qra) if $self->user->qra && !$hlat && !$hlong;
46 if (!$hlat && !$hlong) {
47 $from = "From $main::mycall";
48 $hlat = $main::mylatitude;
49 $hlong = $main::mylongitude;
51 ($bearing, $dx) = DXBearing::bdist($hlat, $hlong, $lat, $long);
52 $miles = $dx * 0.62133785;
55 my $cref = DXCluster->get($call);
56 my $seek = $cref->mynode->call if $cref;
59 push @out, "User : $call (at $seek)";
61 push @out, "User : $call";
63 push @out, "Name : $name" if $name;
64 push @out, "Last Connect : $last" if $last;
65 push @out, "QTH : $qth" if $qth;
66 push @out, "Location : $latlong ($qra)" if $latlong || $qra ;
67 push @out, sprintf("Heading : %.0f Deg %.0f Mi. %.0f Km. $from", $bearing, $miles, $dx) if $latlong;
68 push @out, "Home Node : $homenode" if $homenode;
70 push @out, $self->msg('usernf', $call);