<!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.18783">
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT size=2 face=Arial>Done</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>#!/usr/bin/perl<BR>use Geo::Ellipsoid;<BR>open
(file, "/maint/scripts/sample.txt");<BR>print ("Content-type:
text/html\n\n");<BR>print "<?xml version=\"1.0\" encoding=\"UTF-8\"?>
\n";<BR>print "<kml xmlns=\"<A
href="http://earth.google.com/kml/2.0\">http://earth.google.com/kml/2.0\</A>">
\n";<BR>print "<Folder>\n";<BR>print
"<name>Track457</name>\n";<BR>while (<file>)<BR>{<BR>@data =
split(/\t/);<BR>$geo = Geo::Ellipsoid->new(ellipsoid=>'WGS84',
units=>'degrees',distance_units=>'kilometer');<BR>$x_km =
($data[49]*1.852);<BR>$y_km = ($data[50]*1.852);<BR>@pos = $geo->location(
-37.652865, 144.874274, $x_km, $y_km );<BR>$lat2 = $pos[0];<BR>$lon2 =
$pos[1];<BR>print "<Placemark>\n";<BR>print
"<name></name>";<BR>print "<LookAt>\n";<BR>print
"<longitude>".$lon2."</longitude>\n";<BR>print
"<latitude>".$lat2."</latitude>\n";<BR>print
"</LookAt>\n";<BR>print
"<styleUrl>root://styles#default+icon=0x307</styleUrl>\n";<BR>print
"<Style>\n";<BR>print "<LabelStyle>\n";<BR>print
"<scale>0.7</scale>\n";<BR>print "</LabelStyle>\n";<BR>print
"<IconStyle>\n";<BR>print "<scale>0.8</scale>";<BR>print
"<heading>".$data[52]."</heading>";<BR>print
"<Icon>\n";<BR>print
"<href>root://icons/palette-2.png</href>\n";<BR>print
"</Icon>\n";<BR>print "</IconStyle>\n";<BR>print
"</Style>\n";<BR>print "<Point>\n";<BR>print
"<extrude>1</extrude>\n";<BR>print
"<altitudeMode>relativeToGround</altitudeMode>\n";<BR>print
"<coordinates>";<BR>print "$lon2,$lat2,0";<BR>print "</coordinates>
\n";<BR>print "</Point>\n";<BR>print "</Placemark>\n";<BR>}<BR>print
"</Folder>\n";<BR>print "</kml>
\n";
</FONT></DIV></BODY></HTML>