+ Reply to Thread
Page 2 of 2 FirstFirst 1 2
Results 11 to 16 of 16

Navigation & GPS Systems: Converter (Decimal Degrees to Degrees Minutes Seconds ) for PC

  1. #11
    -=Almazick=-
    Guest

    Re: Converter (Decimal Degrees to Degrees Minutes Seconds ) for PC

    Why would you even want them to be calculated manually? I have GPS and the
    only way to enter the address is by getting Lat/Long from map software
    (Decimal points) then convert them all to DMS and after all this I have to
    enter it to GPS software. Don't be so smart a*s when you say something like
    this. I don't have so much time to convert 20-30 addresses manually. Sure
    I can use the formula for minutes and seconds which is very easy but it is
    time consuming. That's why we use the computers to help us people to get
    the job faster.



    "Edmund" <com> wrote in message
    news:bqclek$1vaq1i$news.uni-berlin.de... 



  2. #12
    KBH
    Guest

    Re: Converter (Decimal Degrees to Degrees Minutes Seconds ) for PC

    > I'm looking for calculator for Latitude Longitude Conversion Decimal
    Degrees 

    The following runs in the TP7 programming language:

    {$N+}

    {KBH Code}

    Var
    sb: string;

    Procedure Dgtodms;
    Var
    a: string;
    cod: integer;
    ddg, d, m, s, ma: double;
    Begin
    cod:= 0;
    While (cod = 0) Do
    Begin
    Write(' Input decimal degrees: ');
    ReadLn(a);
    Val(a, ddg, cod);
    If (cod <> 0) Then Break;
    d:= Int(ddg);
    ma:= Frac(ddg) * 60;
    m:= Int(ma);
    s:= Frac(ma) * 60;
    WriteLn;
    WriteLn(d:6:0, ' Degrees', d:20:0, ' Degrees');
    WriteLn(m:6:0, ' Minutes', ma:28:7,' Minutes');
    WriteLn(s:12:5, ' Seconds', cod:20, ' Seconds');
    WriteLn;
    End;
    End;

    Procedure Dmstodg;
    Var
    a: string;
    d, m, s: 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);
    WriteLn;
    WriteLn(d:17:9, ' Degrees');
    WriteLn;
    End;
    End;

    Begin
    WriteLn;
    WriteLn(' [Enter "q" to quit at any step]');
    sb:= 'd';
    While (sb = 'd') Or (sb = 'dms') Do
    Begin
    WriteLn;
    Write(' Enter "d" for d-to-dms, enter "dms" for dms-to-d: ');
    ReadLn(sb);
    If (sb <> 'd') And (sb <> 'dms') Then Break;
    WriteLn;
    If (sb = 'd') Then Dgtodms;
    If (sb = 'dms') Then Dmstodg;
    End;
    ReadLn;
    End.

    And really it includes a lot of little details just to make a user interface
    with error trapping...



    http://pages.prodigy.net/halsteadinvest/kbh-gps.htm




  3. #13
    KBH
    Guest

    Re: Converter (Decimal Degrees to Degrees Minutes Seconds ) for PC

    Well, why not have a single-set of inputs that accepts any degree format and
    then outputs all three degree formats ?

    Just enter zero for any input step that does not apply to the format going
    in...

    The following KBH code runs in the TP7 programming language:

    {$N+}

    {KBH Code}

    Var
    sb: string;

    Procedure Dmstoall;
    Var
    a: string;
    d, m, s, mm, mmm: 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);
    mm:= Frac(d) * 60;
    s:= Frac(mm) * 60;
    mmm:= Int(mm);
    WriteLn;
    WriteLn(d:15:9, ' Degrees', d:9:0, ' Degrees', d: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.90 -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.

     



  4. #14
    KBH
    Guest

    Re: Converter (Decimal Degrees to Degrees Minutes Seconds ) for PC

    > Well, why not have a single-set of inputs that accepts any degree format
    and 

    Version 0.90 has an error in the code. This is version 0.91 :

    {$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.


     



  5. #15
    Dave
    Guest

    Re: Converter (Decimal Degrees to Degrees Minutes Seconds ) for PC

    "-=Almazick=-" <net> writes: 

    Are you sure you need to convert it to DMS? The GPS receivers and
    software that I've dealt with always had the option of reading input in
    decimal degrees.

    Dave

  6. #16
    Kent
    Guest

    Re: Converter (Decimal Degrees to Degrees Minutes Seconds ) for PC

    There's a free one for the palm pilot called Navigate that does this.
    Also computes distance and bearing between two points.

    On Sat, 29 Nov 2003 07:38:16 GMT, Peter <com> wrote:
     



    ----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
    http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
    ---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---


 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48