Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

LAT LONG CONVERTER ?

13 views
Skip to first unread message

data...@yahoo.com

unread,
May 21, 2012, 11:38:10 AM5/21/12
to

recommend a degrees decimal minutes to decimal degrees converter ?

Ian Clifton

unread,
May 22, 2012, 5:24:12 AM5/22/12
to
data...@yahoo.com writes:

> recommend a degrees decimal minutes to decimal degrees converter ?

This conversion is so trivial that I think the answer depends on what
you want to do, and how conveniently—are you looking for a web page to
do a couple of conversions occasionally, or do you have a million
coordinates to convert?
--
Ian ◎

empt...@hotmail.com

unread,
Aug 28, 2012, 8:37:43 PM8/28/12
to
Here is KBH code that runs in TP7 and would also run in Delphi Console Mode with minor changes:


{$N+}

{KBH Code}

Var
sb: string;

Procedure Dmstoall;
Var
a: string;
d, m, s, mm, mmm, dd: double;
cod: integer;
Begin
cod:= 0;
While (cod = 0) Do
Begin
Write(' Input degrees: ');
ReadLn(a);
Val(a, d, cod);
If (cod <> 0) Then Break;
Write(' Input minutes: ');
ReadLn(a);
Val(a, m, cod);
If (cod <> 0) Then Break;
Write(' Input seconds: ');
ReadLn(a);
Val(a, s, cod);
If (cod <> 0) Then Break;
m:= m + (s / 60);
d:= d + (m / 60);
dd:= Int(d);
mm:= Frac(d) * 60;
s:= Frac(mm) * 60;
mmm:= Int(mm);
WriteLn;
WriteLn(d:15:9, ' Degrees', dd:9:0, ' Degrees', dd:10:0,'
Degrees');
WriteLn(mm:40:7, ' Minutes', mmm:10:0, ' Minutes');
WriteLn(s:64:5, ' Seconds');
WriteLn;
End;
End;

Begin
WriteLn;
WriteLn(' Any Degree Format Input v0.91 -KBH
Applications, 2003');
WriteLn;
WriteLn(' [Enter "q" to quit at any step]');
sb:= 'd';
While (sb = 'd') Do
Begin
WriteLn;
Write(' Enter "d" to input any degree format or enter "q" to quit: ');
ReadLn(sb);
If (sb <> 'd') Then Break;
WriteLn;
If (sb = 'd') Then Dmstoall;
End;
ReadLn;
End.


http://www.kbhscape.com/gps.htm

0 new messages