[aprssig] Programming Language Advice
Andrew Rich
vk4tec at tech-software.net
Thu Jan 15 02:46:04 EST 2009
Perl would be the best
#!/usr/bin/perl
$data = "15/05:30pm 29.4 29.4 19.7 56 6.3 E 19 26 10 14 1008.3 - 0.0"
@ray = split(/ /);
print $ray[1]." ".$ray[5]." "; etc
I use perl for everything
Andrew VK4TEC
----- Original Message -----
From: Ray Wells
To: TAPR APRS Mailing List
Sent: Thursday, January 15, 2009 4:58 PM
Subject: [aprssig] Programming Language Advice
I'm seeking advice from members of the list as to which would be the
best programming language to use to massage a string of data so that
it's suitable to upload as aprs weather info.
This is the data string I have to work with from a nearby professional
weather station that posts the data to the internet.
> 15/05:30pm 29.4 29.4 19.7 56 6.3 E 19 26 10 14 1008.3 - 0.0
Using cut I can extract the fields of interest - 2, 5, 7, 8, 9, 12 and
14 which are temperature, humidty, course, speed, gust, barometer and
total rainfall since 9.00am (that's the standard we use).
I have a shell script to convert course in compass points to degrees,
and I have a perl script to convert the metric figures to imperial, and
round up/down.
I'd like to be able to handle the lot with a single programming language
and end up with a line I can feed to xastir.
The question is, what should I be using, perl or awk? Armed with the
answer I can devote my time in that direction.
Ray vk2tv
_______________________________________________
aprssig mailing list
aprssig at tapr.org
https://www.tapr.org/cgi-bin/mailman/listinfo/aprssig
------------------------------------------------------------------------------
No virus found in this incoming message.
Checked by AVG - http://www.avg.com
Version: 8.0.176 / Virus Database: 270.10.7/1894 - Release Date: 1/14/2009 7:27 PM
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.tapr.org/pipermail/aprssig_lists.tapr.org/attachments/20090115/b0b1e11b/attachment.html>
More information about the aprssig
mailing list