<%
Set DataConn = Server.CreateObject("ADODB.Connection")
DataConn.ConnectionTimeout = Session("DataConn_ConnectionTimeout")
DataConn.CommandTimeout = Session("DataConn_CommandTimeout")
DataConn.Open Session("DataConn_ConnectionString"), Session("DataConn_RuntimeUserName"), Session("DataConn_RuntimePassword")
Set cmdTemp = Server.CreateObject("ADODB.Command")
Set DataCommand1 = Server.CreateObject("ADODB.Recordset")
cmdTemp.CommandText = "SELECT LastOfLat AS Lat, LastOfLong AS `Long`, LastOfTime AS `Time` FROM DailyDesc"
cmdTemp.CommandType = 1
Set cmdTemp.ActiveConnection = DataConn
DataCommand1.Open cmdTemp, , 0, 1
%>
| Date/Time |
Day |
Latitude |
Longitude |
Miles From Start |
Miles To Guadeloupe |
Daily Miles |
<% old = 0 %>
<% Do while not DataCommand1.EOF %>
| &mlon=<%= DataCommand1("Long") %>&msym=bigdot&mlabel=&murl=&lat=<%= DataCommand1("Lat") %>&lon=<%= DataCommand1("Long") %>&wid=18.000&ht=6.500&conf=mapnew.con&map.x=211&map.y=180
"><%= DataCommand1("Time") %> |
<%= Int(DataCommand1("Time"))-dateserial(1999,9,12) %> |
<%= DataCommand1("Lat") %> |
<%= DataCommand1("Long") %> |
<%
Lat1 = DataCommand1("Lat")
Long1 =(DataCommand1("Long"))
Lat2 = 28.250
Long2 = -16.833
Avg = (Lat1 + Lat2) / 2
DegFrom = 90 - Avg
Rad = DegFrom * 3.14159 / 180
Dist = Int((((Lat1 - Lat2) * 68.7) ^ 2 + ((Long1 - Long2) * 68.7 * Sin(Rad)) ^ 2)^ 0.5 )
Lat2 = 16.217 'Guadelopue
Long2 = -61.533
'Lat2 = 17.0 'Antigua
'Long2 = -61.733
Avg = (Lat1 + Lat2) / 2
DegFrom = 90 - Avg
Rad = DegFrom * 3.14159 / 180
DistToGo = Int((((Lat1 - Lat2) * 68.7) ^ 2 + ((Long1 - Long2) * 68.7 * Sin(Rad)) ^ 2)^ 0.5 )
If Old=0 then
Daily=""
else
Daily=DistToGo-Old
end if
Old=DistToGo
%>
<% = Dist %> |
<% = DistToGo %> |
<% = Daily %> |
<% DataCommand1.MoveNext
Loop %>
Times are GMT (Greenwich Mean Time) Zulu.
|