2 # set the latitude and longtitude field
4 # Copyright (c) 1998 - Dirk Koopman
9 my ($self, $line) = @_;
10 my $call = $self->call;
13 # remove leading and trailing spaces
17 return (1, $self->msg('loce1')) if !$line;
18 return (1, $self->msg('loce3', uc $line)) if DXBearing::is_qra($line);
19 return (1, $self->msg('loce2', $line)) unless $line =~ /\d+ \d+ [NnSs] \d+ \d+ [EeWw]/o;
21 $user = DXUser->get_current($call);
24 my ($lat, $long) = DXBearing::stoll($line);
27 DXProt::broadcast_all_ak1a(DXProt::pc41($call, 3, $line), $DXProt::me);
28 unless ($user->qra && DXBearing::is_qra($user->qra) ) {
29 my $qra = DXBearing::lltoqra($lat, $long);
34 return (1, $self->msg('loc', $line));
36 return (1, $self->msg('namee2', $call));