<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=iso-8859-1" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.6001.19046">
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT size=2 face=Arial>Worked it out </FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>$dist = sprintf("%06.2f",$dist);<BR>$bearing =
sprintf("%06.2f",$bearing);</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>3 leading - zero padded , 2 trailing </FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>- Andrew - </FONT></DIV>
<BLOCKQUOTE
style="BORDER-LEFT: #000000 2px solid; PADDING-LEFT: 5px; PADDING-RIGHT: 0px; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px"
dir=ltr>
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV
style="FONT: 10pt arial; BACKGROUND: #e4e4e4; font-color: black"><B>From:</B>
<A title=vk4tec@tech-software.net
href="mailto:vk4tec@tech-software.net">Andrew Rich</A> </DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A title=vk4tec@tech-software.net
href="mailto:vk4tec@tech-software.net">Andrew Rich</A> ; <A
title=aprssig@tapr.org href="mailto:aprssig@tapr.org">TAPR APRS Mailing
List</A> </DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Thursday, May 05, 2011 12:32
AM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> Re: [aprssig] perl
Geo::Ellipsoid</DIV>
<DIV><BR></DIV>
<DIV><FONT size=2 face=Arial>Wonder is someone can help</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>I want to format a number in perl </FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>3 leading 0 padded </FONT></DIV>
<DIV><FONT size=2 face=Arial>2 trailing decimal places</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>Do I have to treat to the left of the decimal
point and to the right as two seperates ?</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>I want 3.4565443 to look like
"003.456"</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>Working on some GPS code</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>Using sprintf </FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>This puts 3 leading and zero pads:-</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>$dist = sprintf("%3d",$dist);<BR>$bearing =
sprintf("%3d",$bearing);</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>This puts two trailing :-</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>print "RNG =
".sprintf("%.2f",$dist)."\n";<BR>print "BRG =
".sprintf("%.2f",$bearing)."\n";</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>How do i put them together ? </FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV> </DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>- Andrew VK4TEC -</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<BLOCKQUOTE
style="BORDER-LEFT: #000000 2px solid; PADDING-LEFT: 5px; PADDING-RIGHT: 0px; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV
style="FONT: 10pt arial; BACKGROUND: #e4e4e4; font-color: black"><B>From:</B>
<A title=vk4tec@tech-software.net
href="mailto:vk4tec@tech-software.net">Andrew Rich</A> </DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A title=aprssig@tapr.org
href="mailto:aprssig@tapr.org">TAPR APRS Mailing List</A> </DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Wednesday, May 04, 2011 8:14
AM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> [aprssig] perl
Geo::Ellipsoid</DIV>
<DIV><BR></DIV>
<DIV><FONT size=2 face=Arial>Hello</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>I have an idea, although not new, but
novel</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>I am taking a small netbook and LINUX and a
GPS.</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>I now have the flexibility to do anything with
it.</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>I can program and make the netbook do what ever
I want.</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>One thing I am playing with is the perl
Geo::Ellispoid module.</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>This allows me to get range and bearing, and
also I am working on ETA code as well.</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>- Andrew - </FONT></DIV>
<P>
<HR>
<P></P>_______________________________________________<BR>aprssig mailing
list<BR>aprssig@tapr.org<BR>https://www.tapr.org/cgi-bin/mailman/listinfo/aprssig<BR></BLOCKQUOTE></BLOCKQUOTE></BODY></HTML>