Order Tray | Contact Us | Home | SIG Lists

[aprssig] HAM::APRS::FAP question

Dick Repasky dick.repasky at gmail.com
Mon Nov 30 13:13:34 UTC 2009


Andrew,

What you get when you parse with the aprs.fi parser is a hash of
key-value pairs. Everything but the value of digipeaters in your VAR1 is
a simple value. digipeaters is a list, and each element in the list is a
hash.

Supposed you parsed with

my %packetdata;
my $retval = parseaprs($packet, \%packetdata);

To get the senders call sign,

$callssid = $packetdata{"srccallsign"};

When you ask for the list of digipeaters you'll get a reference to the list.

$listref = $packetdata{"digipeaters"};

To get a reference to the hash that is the second element in the list

$hashref = ${ $listref }[1];

Then to get the call from that hash

$digicall = ${ $hashref }{"call"};

Good luck,

Dick, KC9JLU

Andrew Rich wrote:
> 
> I have the same APRS parser running as aprs.fi, I am a tad confused now
> how to get the call, lat and lon from the script ?
>  
> Here is a sample screen dump
>  
> How do I reference the lat and lon to be able to place into a MySQL
> table ( I know how to do that bit)
>  
> $VAR1 = {
>           'symbolcode' => '-',
>           'longitude' => '153.228333333333',
>           'symboltable' => '/',
>           'dstcallsign' => 'APU25N',
>           'digipeaters' => [
>                              {
>                                'wasdigied' => 1,
>                                'call' => 'TCPIP'
>                              },
>                              {
>                                'wasdigied' => 0,
>                                'call' => 'qAC'
>                              },
>                              {
>                                'wasdigied' => 0,
>                                'call' => 'T2AUST'
>                              }
>                            ],
>           'body' => '=2731.26S/15313.70E-Steve\'s QTH in Alexandra Hills
> {UIV32N}
> ',
>           'comment' => 'Steve\'s QTH in Alexandra Hills {UIV32N}',
>           'posresolution' => '18.52',
>           'latitude' => '-27.521',
>           'posambiguity' => 0,
>           'messaging' => 1,
>           'origpacket' =>
> 'VK4ISP>APU25N,TCPIP*,qAC,T2AUST:=2731.26S/15313.70E-Steve\'s QTH in
> Alexandra Hills {UIV32N}
> ',
>           'type' => 'location',
>           'srccallsign' => 'VK4ISP',
>           'header' => 'VK4ISP>APU25N,TCPIP*,qAC,T2AUST'
>         };        
>  
>  
> Andrew VK4TEC
>  
>                                     
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> aprssig mailing list
> aprssig at tapr.org
> https://www.tapr.org/cgi-bin/mailman/listinfo/aprssig



More information about the aprssig mailing list