Community of VE/MapPoint Users and Developers
This is a discussion on Geodesy: MapStuff Release version 0.9 within the MP2K Magazine Articles forums, part of the Map Forums category; Windsway Company is releasing some Geodesy oriented software as open souce code. This is not a complete application but rather ...
| |||||||
| Register | Blogs | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| Geodesy: MapStuff Release version 0.9 Read the full article: http://www.mp2kmag.com/articles.asp?ArticleID=73 |
| |||
| vDirect rounding problems I think.
Great set of routines. VERY usefull, Thanks for posting them. I have a rounding problem I think. I have a recorded GPS file. For each waypoint in the file the distance between 2 points could be 0 to 50m depending how fast you are driving as the GPS samples every 2 seconds. I need a new datafile that calculates lon/lat for every 1m interval. Using vInverse and vDirect I am able to do this but compairing the sum of the distance to next point for each of my datasets I get conflicting data. When I calc vDirect passing lat1/lon1, azmuth12, and a distance of 1 I get lat2/lon2 in return. But when I use vInverse to determine distance between the 2 points I get a distance between .92 - .98 not a distance of 1. With my 1st dataset the sum of distances is correct so vInvers is working properly. I think the problem may be with my following routines to converting lat lon formats back and forth. Any suggestions????? THX 'convert to oGS format Public Function ConvertNMEA(sNMEA As String) As Double 'input N47.36981 from GPS sentence 'output N47.61635 mappoint format Dim sTmp As String Dim dRetVal As Double sTmp = Left(sNMEA, 1) sNMEA = Mid(sNMEA, 2) If Not IsNumeric(sNMEA) Then Exit Function End If dRetVal = Int(sNMEA / 100) + (sNMEA - Int(sNMEA / 100) * 100) / 60 Select Case sTmp Case "N" 'dRetVal = dRetVal Case "S" dRetVal = "-" & dRetVal Case "E" 'dRetVal = dRetVal Case "W" dRetVal = "-" & dRetVal End Select ConvertNMEA = dRetVal End Function 'convert back to NMEA format 'Thanks Evert Function FormatCoordinate(coordinate, LonOrLat) As String Dim minus As Boolean, before As Integer, after As Integer Dim Zeros As Integer, c As String 'this function needs a nddd,mm.mmmm input (integer) WGS 84 coordinate 'and returns a NMEA complaint string 'NMEA requires a special format 'latitude = ddmm.mmmm (d=degrees, m=minutes) 'longitude = dddmm.mmmm (d=degrees, m=minutes) 'note the difference; longitude needs 3 d's 'we need to give north/south and east/west too with cardinals If LonOrLat <> "lon" And LonOrLat <> "lat" Then FormatCoordinate = "LonOrLat must be 'lon' or 'lat'" Exit Function End If c = CStr(coordinate) 'negative? remember that! If Left(c, 1) = "-" Then minus = True c = Right(c, Len(c) - 1) Else minus = False End If 'convert degrees.minutes to babylonian (60 degrees based) c = Babylonian(c) 'country settings: decimal seperator can be "." or "," c = Replace(c, ",", ".") 'add leading zero's if needed If LonOrLat = "lat" Then Zeros = 4 ElseIf LonOrLat = "lon" Then Zeros = 5 Else FormatCoordinate = "error in FormatCoordinate" Exit Function End If Do before = Len(Left(c, InStr(c, ".") - 1)) If before < Zeros Then c = "0" & c Loop Until before >= Zeros 'add tail zero's if needed Zeros = 4 Do after = Len(Right(c, Len(c) - InStr(c, "."))) If after < Zeros Then c = c & "0" Loop Until after >= Zeros 'if to many digits, then reduce after = Len(Right(c, Len(c) - InStr(c, "."))) If after > Zeros Then c = Left(c, Len(c) - (after - Zeros)) 'add cardinals If LonOrLat = "lat" Then If minus = False Then c = "N" & c Else c = "S" & c End If ElseIf LonOrLat = "lon" Then If minus = False Then c = "E" & c Else c = "W" & c End If Else FormatCoordinate = "error in FormatCoordinate" Exit Function End If FormatCoordinate = c End Function Function Babylonian(c) As String Dim minutes As Variant Dim degrees As Variant 'country settings: decimal seperator can be "." or "," c = Replace(c, ",", ".") degrees = Left(c, InStr(c, ".") - 1) minutes = Right(c, Len(c) - InStr(c, ".")) minutes = minutes / 10 ^ Len(Right(c, Len(c) - InStr(c, "."))) 'convert minutes to babylonian (60 degrees based) minutes = minutes * 60 If minutes < 10 Then minutes = "0" & minutes 'country settings: decimal seperator can be "." or "," minutes = Replace(minutes, ",", ".") If InStr(minutes, ".") = 0 Then minutes = minutes & ".0" End If Babylonian = degrees & minutes End Function |
| ||||
| Geodesy version 0.93 release
Vic recently (9/7) sent out the latest update.. to get on his mailing list, write him at: vfraenc1@nycap.rr.com?subject=Geodesy Geodesy version 0.93 release This is the distribution of the latest version of the Geodesy code set. It contains version 0.93 of the module Mapstuff.bas and version 0.91 of the class module Geodesy.cls. Also included is the new module WICUtilities (version 0.90). Unzip the distribution (Geodesy.zip) into the same folder where the previous version resides. The appropriate files will be overwritten. It is strongly suggested that you read the revision notes in the file Revision093.txt and the general discussion in Geodesy.txt before using this distribution. You are receiving this distribution because you received the previous distribuition and your e-mail address is in my distribution list. If you do not want further revisions to be sent to you, please send me an e-mail and ask to be removed from the list. Put the word GEODESY in the subject line of your request. I would like to hear from any of you that are using GEODESY code. I want to know how you are using the code, how I can make the code better and, most importantly, have you found any bugs. Please thouroughly document bugs so I can try and reproduce them try to fix them. Download: http://www.mp2kmag.com/downloads/Geodesy-0.93.zip
__________________ |
| |||
| correct format
hi, i have one Garmin Emap and returns latitude/longitude in this format latitude 4138.1904 longitude 00444.6535 well, i put in a form the following code: Option Explicit Private Sub Command1_Click() Dim utm As UTMStruct utm.Latitude = Val(Text1.Text) (i put 4138.1904) utm.Longitude = Val(Text2.Text)(i put 00444.6535) utm.geoid = 22 Call LL2UTM(utm) Label3.Caption = Label3.Caption & " " & utm.North Label4.Caption = Label4.Caption & " " & utm.East Label5.Caption = Label5.Caption & " " & utm.geoid Label6.Caption = Label6.Caption & " " & utm.ZoneNumber Label7.Caption = Label7.Caption & " " & utm.ZoneLetter Label8.Caption = Label8.Caption & " " & utm.CentralLongitude Label9.Caption = Label9.Caption & " " & utm.GridSF End Sub ...and returns me negative coordinates and the zonenumber and letter are unsuitables, which is the correct format i`ve to pass to utm.Latitude and utm.longitude? and...geoid= 22 (wgs84) is correct? i'm from spain(30) Thank you so much Diego García Álvarez |
![]() |
| Tags |
| geodesy, mapstuff, release, version |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| MapPoint MatchMaker release 1.0 is now available | Anonymous | News and Announcements | 1 | 08-19-2004 07:00 PM |
| Map-In-A-Box 2.0 Press Release | Anonymous | News and Announcements | 0 | 03-16-2004 10:59 AM |
| GPSTrackP Software Release | dzhong | News and Announcements | 7 | 02-04-2004 09:44 AM |
| GPS NavStar Version 3.0.0 Release | dzhong | News and Announcements | 3 | 12-05-2003 10:09 PM |
| Information on my GEODESY code posted on mp2kmag | victorf | MapPoint 2006/2009 Discussion | 2 | 07-31-2002 10:05 PM |
Southampton flights
Book flights to and from Southampton with Holiday Hypermarket. Choose from a selection of great value flights to and from a range of destinations.
Italy Weather
Check out Italy Weather - Travel Counsellors details information on Italy including, weather, flights and accommodation.
Holidays Thailand
Holidays in Thailand are hugely diverse with wonderful luxury resorts and beaches but also some lovely forested mountains with interesting hill tribes. See dealchecker.co.uk.
Cancun Holidays
Cancun holidays offer beautiful scenery, calm waters and plenty of shopping. Get a taste of the good life while on holiday in Cancun.
Cheap Balearics Holidays
Cheap Balearics holidays are available if you know when to book and who to book with. The Balearics have many fascinating places to visit all year round. The partying never stops.
Compare Prices
Travel.co.uk makes it easy for you to compare prices from hundreds of UK based travel companies.
Sharm el Sheikh Holidays
Visit Egypt! Get info on Sharm El Sheikh holidays, only at On The Beach.