MapPoint Forums

MapForums

Community of VE/MapPoint Users and Developers




mappoint lat/lon

This is a discussion on mappoint lat/lon within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; I log some coördinates from GPS.. $GPGGA,062417,5111.8695,N,00425.7264,E,1,03,3.4,4. 8,M,47.1,M,,*4C I extract the lat = 00425.7264 and lon = 5111.8695 I put ...


Go Back   MapPoint Forums > Map Forums > MapPoint 2006/2009 Discussion

Register Blogs FAQ Members List Calendar Search Today's Posts Mark Forums Read



Click here to register

Reply

 

LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 05-08-2003
Junior Member
Yellow Belt
 
Join Date: Mar 2003
Posts: 18
mappoint lat/lon

I log some coördinates from GPS..

$GPGGA,062417,5111.8695,N,00425.7264,E,1,03,3.4,4. 8,M,47.1,M,,*4C

I extract the lat = 00425.7264
and lon = 5111.8695

I put in code :
Set wwLoc = mainMap.GetLocation(lat,lon)

And what do I get: Run-time error '-2147.......(8007....) : The parameter is incorrect..

What is it that I do wrong?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #2 (permalink)  
Old 05-08-2003
Senior Member
Black Belt
 
Join Date: Jul 2002
Posts: 5,138
mappoint lat/lon

I don't know about your code, but I think you will need to convert to decimal format for MapPoint, that's what I use.

i.e. 5111.8695 N = 51.19783 N = latitude

You are in Antwerp, yes?

BTW u hav your lat and long reversed.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3 (permalink)  
Old 05-09-2003
Junior Member
Yellow Belt
 
Join Date: Mar 2003
Posts: 18
Re: mappoint lat/lon

Quote:
Originally Posted by Chris_s
I don't know about your code, but I think you will need to convert to decimal format for MapPoint, that's what I use.

i.e. 5111.8695 N = 51.19783 N = latitude

You are in Antwerp, yes?

BTW u hav your lat and long reversed.
Oh yeah.. but it's correct in my code, sorry.

Indeed, I am in Antwerp..

So I have to convert to the decimal format... any idea how to do that in VB 6? cause I am very new to VB...

Many Tnx
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4 (permalink)  
Old 05-09-2003
Senior Member
Black Belt
 
Join Date: Jul 2002
Posts: 5,138
mappoint lat/long

Here's a function I wrote to do just that, you pass the value in GPS NMEA format and the function returns the decimal format.

Use like this assuming you have the NMEA value for lat in a string:-

lngDecimalLatitude = gpsConvert(strNMEAlatitude)

Use again for Long

Copy and paste into VB6 and it should look better when the colours are correct.



Private Function gpsConvert(ByVal sngTemp As Single) As Single ' converts GPS format to Infomap format
Dim intDegrees As Integer
intDegrees = Int(sngTemp / 100)
gpsConvert = intDegrees + (sngTemp - (intDegrees * 100)) / 60 ' sngTemp - (intdegrees * 100) removes the whole degrees,
'then devide by 60 to get decimals of a degree, then add the whole degrees back on to get degrees and decimals of a degree
End Function



Chris
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
lat or lon, mappoint


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT -5. The time now is 11:22 AM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
MP2K Magazine
Visitor Map


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 49 50 51 52 53 54