Page 2 of 47 FirstFirst 12345612 ... LastLast
Results 11 to 20 of 468

Thread: New Code Contribution

                  
   
  1. #11
    DCEmu Rookie
    Join Date
    Dec 2005
    Posts
    242
    Rep Power
    68

    Default

    Quote Originally Posted by rhygin View Post
    @MIB.42
    As you are supporting deniska in the improvement of MapThis! I thought I might address this in this thread too
    I was going to use MapThis! to do some geocaching but noticed that the format of the POIs is slightly different when entering them in MapThis! compared to the format given for the caches:
    Format in MapThis is:
    N 52.5486111°, E 13.4194444°
    What I would need for geocaching is the WGS84 format like this:
    N 52°32.916667', E 13°25.166667'.

    Is it possible for you to implement a function to toggle between these two formats into one of your next releases?


    I have already googled a bit to try and find out how to calculate the three different values DD, DM and DMS.
    This is what I found:
    Given the lon. in DD E13.41944444°
    Take the part after the decimal point and multiply with 60 gives you DM:
    0.41944445 * 60 = 25,166667
    So DM value is then E13° 25.166667'
    Now take the part after the decimal point and multiply with 60 to get DMS:
    0.16667 * 60 = 10
    So DMS value is then E13° 25' 10''

    Vice versa calculation looks like this:
    Given the lon. in DMS E13° 25' 10''
    Take the second and divide by 60 to get DM
    10 / 60 = 0,16666666666666666666666666666667
    So DM value is then E13° 25.166667'
    For the DMS value calcultion is as follows:
    Divide the minutes by 60 and add the seconds devided by 3600
    (25 / 60) + (10 / 3600) = 13.41944444
    So we get the DD value now is E13.41944444°


    It would be super if You could enter POIs in all three values, and if you could also toggle the display to show all three depending on which one you want.
    If I read you correctly, this is just expression of degrees with fractions vs. components. I have done this many times so it shouldn't be a problem. I'll look at this unless deniska has done this already...

  2. #12
    PSP Coder deniska's Avatar
    Join Date
    Jul 2005
    Posts
    1,557
    Rep Power
    76

    Default

    just updated the code with you changes and posted the new generic beta version at 0.4 release thread... it includes the most recent source code..


    As far as DMS goes, you should be able to toggle lat/lon display to DMS by adding DMS=1 to the config.txt file


    Feel free to improve it though... ;-)

  3. #13
    DCEmu Newbie
    Join Date
    Jan 2007
    Posts
    40
    Rep Power
    0

    Default

    @deniska
    Using DMS=1 works fine
    Now we can display the coordinates as DD,dddd° (without option DMS)
    and DD° MM,mmm'(with option DMS=1)

    The only thing missing now would be to display them as DD° MM' SS'' (degrees minutes seconds)
    And of course to be able to add POIs directly in these formats with the "ADD POIs" function in MapThis!.

    @MIB.42
    Maybe You could help out here a little

  4. #14
    DCEmu Rookie
    Join Date
    Dec 2005
    Posts
    242
    Rep Power
    68

    Default

    Quote Originally Posted by rhygin View Post
    @deniska
    Using DMS=1 works fine
    Now we can display the coordinates as DD,dddd° (without option DMS)
    and DD° MM,mmm'(with option DMS=1)

    The only thing missing now would be to display them as DD° MM' SS'' (degrees minutes seconds)
    And of course to be able to add POIs directly in these formats with the "ADD POIs" function in MapThis!.

    @MIB.42
    Maybe You could help out here a little
    I'll add DMS=2 to do that. Let you know when it's done.

  5. #15
    DCEmu Newbie
    Join Date
    Jan 2007
    Posts
    40
    Rep Power
    0

    Default

    @MIB.42
    Thaks a lot.
    Could you also implement the possibility to add POIs directly in these formats with the "ADD POIs" function in the MapThis! Menu(the one that pops up when you press start - Add POIs)?

  6. #16
    DCEmu Rookie
    Join Date
    Dec 2005
    Posts
    242
    Rep Power
    68

    Default

    Quote Originally Posted by rhygin View Post
    @MIB.42
    Thanks a lot.
    Could you also implement the possibility to add POIs directly in these formats with the "ADD POIs" function in the MapThis! Menu(the one that pops up when you press start - Add POIs)?
    The display is done using the DDMMSS format. There is also a new menupoint from the START menu saying "Change DMS Format"... I will be looking at the Add POIs issue next...

  7. #17
    DCEmu Rookie
    Join Date
    Dec 2005
    Posts
    242
    Rep Power
    68

    Default

    Quote Originally Posted by rhygin View Post
    @MIB.42
    Thaks a lot.
    Could you also implement the possibility to add POIs directly in these formats with the "ADD POIs" function in the MapThis! Menu(the one that pops up when you press start - Add POIs)?
    I need some clarification here. May I ask :

    - Why would you want to manually enter the long/lat values when MapThis fills that info out for you?

    Also, I don't know if you are aware of this, but you can manually edit the _MY_POIS file in the _map directory.
    The format for each line is : lon,lat,name,descr

    I could make some changes, so that instead of the present :
    65.432109877,-87.5432109,Name of the Place,Description of the Place

    it could be
    65°43'35",-87°54'47",Name of the Place,Description of the Place

    ... needless to say, both would be accepted...

    ?!

  8. #18
    DCEmu Rookie
    Join Date
    Dec 2005
    Posts
    242
    Rep Power
    68

    Default New code drop

    Deniska,

    Here is the new code drop :

    - New bigfont.png to replace dollar sign with degree
    - Little font (msx) 'degree' related changes ( graphics.cpp or main.cpp )
    - Change DMS format (0-2) and associtaed menus and displays to support dd.ddddd ddmm.mmmm and ddmmss
    - Added ms_write_log function to enable logging. config.txt can have DEBUGLOG=1
    - Added plenty of sanity checks in all attached cpp files including logging the problems ( if DEBUGLOG is set )
    - display_message X button state clear
    - prevent "stuck maps" if map preference coordinates are invalid
    - HOLD button check for disabling joystick

  9. #19
    DCEmu Newbie
    Join Date
    Jan 2007
    Posts
    40
    Rep Power
    0

    Default

    Quote Originally Posted by MIB.42 View Post
    I need some clarification here. May I ask :

    - Why would you want to manually enter the long/lat values when MapThis fills that info out for you?

    Also, I don't know if you are aware of this, but you can manually edit the _MY_POIS file in the _map directory.
    The format for each line is : lon,lat,name,descr

    I could make some changes, so that instead of the present :
    65.432109877,-87.5432109,Name of the Place,Description of the Place

    it could be
    65°43'35",-87°54'47",Name of the Place,Description of the Place

    ... needless to say, both would be accepted...

    ?!
    Hi MIB.42
    I am aware that I can edit the _MY_POIS file in the _map directory and that in fact is exactly what I want to do but I would like to be able to use different formats of entering the lat/lon values because I want to do some Geo Caching with MapThis!
    When googling for Geo Caches I noticed that the lat/lon values where given in different values; someties they were given in DD.dddd°, sometimes in DD°MM.mmmm' and sometimes in DD°MM'SS''.
    When Geo Caching you get some lat/lon values and start at the first solve some riddle and add the solution of the riddle to your second lat/lon value this will then be your next waypoint. This of course has to entered into _MY_POIS file in the _map directory to find the next riddle.
    So to give you an example I will use these values for the DD.dddd° format: 52.5486111, -13.4194444
    I would like to be able add this into the _MY_POIS file in three different formats.
    DD.dddd° would be
    52.5486111, -13.4194444
    DD°MM.mmmm' would be
    52.32.916667, -13.25.166667
    DD°MM'SS'' would be
    52°32'55'', -13° 25' 10''

    Hope I could clarify everything now ;-)

  10. #20
    DCEmu Rookie
    Join Date
    Dec 2005
    Posts
    242
    Rep Power
    68

    Default

    Quote Originally Posted by rhygin View Post
    Hi MIB.42
    I am aware that I can edit the _MY_POIS file in the _map directory and that in fact is exactly what I want to do but I would like to be able to use different formats of entering the lat/lon values because I want to do some Geo Caching with MapThis!
    When googling for Geo Caches I noticed that the lat/lon values where given in different values; someties they were given in DD.dddd°, sometimes in DD°MM.mmmm' and sometimes in DD°MM'SS''.
    When Geo Caching you get some lat/lon values and start at the first solve some riddle and add the solution of the riddle to your second lat/lon value this will then be your next waypoint. This of course has to entered into _MY_POIS file in the _map directory to find the next riddle.
    So to give you an example I will use these values for the DD.dddd° format: 52.5486111, -13.4194444
    I would like to be able add this into the _MY_POIS file in three different formats.
    DD.dddd° would be
    52.5486111, -13.4194444
    DD°MM.mmmm' would be
    52.32.916667, -13.25.166667
    DD°MM'SS'' would be
    52°32'55'', -13° 25' 10''

    Hope I could clarify everything now ;-)
    So if I "just" modify the _MY_POIS reading part to enable these 3 different type of reads would be enough?

Page 2 of 47 FirstFirst 12345612 ... LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

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