Home PageFacebookRSS News Feed
PocketGPS
Web
SatNav,GPS,Navigation
Pocket GPS World - SatNavs | GPS | Speed Cameras: Forums

Pocket GPS World :: View topic - Help With POI OV2 Format
 Forum FAQForum FAQ   SearchSearch   UsergroupsUsergroups   ProfileProfile   Log in for private messagesLog in for private messages   Log inLog in 

Help With POI OV2 Format

 
Post new topic   Reply to topic    Pocket GPS World Forum Index -> TomTom Software-Only Products
View previous topic :: View next topic  
Author Message
babybob
Occasional Visitor


Joined: Nov 27, 2004
Posts: 33
Location: uk

PostPosted: Sun Nov 28, 2004 12:10 am    Post subject: Help With POI OV2 Format Reply with quote

Hello

I am looking at starting a freeware addon for tomtom mobile and it involves creating custom OV2 databases from lists of lat/long locations.

I can see that tomtom provide and convertor from txt to OV2, and that there are plenty of other converters around, however non of these are going to work on a windows smartphone.

Could someone point me in the right direction for creating my own txt -> OV2 convertor? I can't find anything about the format used in OV2.

Thanks for any help
Brian
www.bbpsoftware.co.uk
Back to top
View user's profile Send private message Visit poster's website
lbendlin
Pocket GPS Staff
Pocket GPS Staff


Joined: 02/11/2002 22:41:59
Posts: 11878
Location: Massachusetts, USA

PostPosted: Sun Nov 28, 2004 1:06 am    Post subject: Re: Help With POI OV2 Format Reply with quote

babybob wrote:
however non of these are going to work on a windows smartphone


Why not? It's the same ARM processor as the Pocket PC, so all non GUI programs work equally well on both machines. And if the GUI is programmed dynamically then even the GUI programs can be swapped. (For the fun of it, try to run TomTom Mobile on the Pocket PC, and you see what I mean)

The OV2 format is described in the SDK documentation which can be downloaded from the TomTom site.
_________________
Lutz

Report Map Errors here:
TomTom/TeleAtlas NAVTEQ
Back to top
View user's profile Send private message Send e-mail
babybob
Occasional Visitor


Joined: Nov 27, 2004
Posts: 33
Location: uk

PostPosted: Sun Nov 28, 2004 8:54 am    Post subject: Reply with quote

Hello

Thanks for the reply. So is there already a convertor that will work on an ARM processor?

Also I could not find the sdk mentioned anywhere on the tomtom site?

Thanks
Brian
Back to top
View user's profile Send private message Visit poster's website
lbendlin
Pocket GPS Staff
Pocket GPS Staff


Joined: 02/11/2002 22:41:59
Posts: 11878
Location: Massachusetts, USA

PostPosted: Sun Nov 28, 2004 1:48 pm    Post subject: Reply with quote

Check this thread

http://pocketgpsworld.com/modules.php?name=Forums&file=viewtopic&t=12652&highlight=sdk
_________________
Lutz

Report Map Errors here:
TomTom/TeleAtlas NAVTEQ
Back to top
View user's profile Send private message Send e-mail
babybob
Occasional Visitor


Joined: Nov 27, 2004
Posts: 33
Location: uk

PostPosted: Sun Nov 28, 2004 5:03 pm    Post subject: Bit of help with binary file format Reply with quote

Thanks for your help so far. Ive found the tomtom sdk documentation but am struggling to convert the long/lat into binary. When I try I dont get the right hex values (checked by converting some of the speedcam files using my test convertor)

The tomtom doc says:

Quote:
Coordinates are stored as 4−byte integers representing a WGS84 longitude or latitude, multiplied by
100.000 and rounded to the nearest integer. As such, an X−coordinate should always be a value between
−18.000.000 and +18.000.000, and a Y−coordinate should be a value between −9.000.000 and +9.000.000.


so I tried:

-4.21648 * 100

then rounded the result to the nearest integer:

= -422

However if I then write it to a binary file I get these bytes:

5A FE FF FF

The example OV2 file i got the original lat long from however has:

F1 90 F9 FF

Maybe Im being really dumb, as Im not used to working with binary files. Could someone give me a full example.

Thanks
Brian Norman[/b]
Back to top
View user's profile Send private message Visit poster's website
lbendlin
Pocket GPS Staff
Pocket GPS Staff


Joined: 02/11/2002 22:41:59
Posts: 11878
Location: Massachusetts, USA

PostPosted: Sun Nov 28, 2004 6:41 pm    Post subject: Reply with quote

you need to multiply by 100000 , not just by 100
_________________
Lutz

Report Map Errors here:
TomTom/TeleAtlas NAVTEQ
Back to top
View user's profile Send private message Send e-mail
babybob
Occasional Visitor


Joined: Nov 27, 2004
Posts: 33
Location: uk

PostPosted: Sun Nov 28, 2004 7:07 pm    Post subject: oops Reply with quote

yes I forgot that 100.00 was not in uk format. I thought it was a decimal, but tomtom would mean the . as a , in uk format.

Thanks!
Brian
Back to top
View user's profile Send private message Visit poster's website
lbendlin
Pocket GPS Staff
Pocket GPS Staff


Joined: 02/11/2002 22:41:59
Posts: 11878
Location: Massachusetts, USA

PostPosted: Sun Nov 28, 2004 7:17 pm    Post subject: Reply with quote

UK format? 100.00 ?

Anyhow, the period is a group separator, not the decimal delimiter.
_________________
Lutz

Report Map Errors here:
TomTom/TeleAtlas NAVTEQ
Back to top
View user's profile Send private message Send e-mail
babybob
Occasional Visitor


Joined: Nov 27, 2004
Posts: 33
Location: uk

PostPosted: Sun Nov 28, 2004 9:33 pm    Post subject: Still not getting it right Reply with quote

Sorry to be a pain, but this is still not quite right.

I am using this:

-4.21648,50.41288,"SPECS:1A@30"

Which when converted by WinOV2 gives:

02 19 00 00 00 F1 90 F9 FF 87 EC 4C 00 53 50 45 43 53 3A 31 41 40 33 30
00

But my code gives:

02 19 00 00 00 F0 90 F9 FF 88 EC 4C 00 0B 53 50 45 43 53 3A 31 41 40 33
30 00

The code im doing in c# is al follows:


Code:
      private void writeOVP()
      {
         BinaryWriter bw = new BinaryWriter(File.Create(@"C:\temp\Brian.ov2"));
         byte bType = 2;
         byte bTerminator = 0;
         int iBaseLength = 14;
         
         decimal dLong = -4.21648M;
         decimal dLat = 50.41288M;
         
         int iLong = Convert.ToInt32(Math.Round(dLong * 100000,0));
         int iLat = Convert.ToInt32(Math.Round(dLat * 100000,0));

         string sLocationDesc = "SPECS:1A@30";
         int iLength = iBaseLength + sLocationDesc.Length;
         bw.Write(bType);
         bw.Write(iLength);
         bw.Write(iLong);
         bw.Write(iLat);
         bw.Write(sLocationDesc);
         bw.Write(bTerminator);
         bw.Close();

      }


I thought it might be how the rounding was done, but there should be no rounding as the lat/long * 100.00 is an integer anyway?

Any ideas appreciated

Thanks
Brian
Back to top
View user's profile Send private message Visit poster's website
lbendlin
Pocket GPS Staff
Pocket GPS Staff


Joined: 02/11/2002 22:41:59
Posts: 11878
Location: Massachusetts, USA

PostPosted: Sun Nov 28, 2004 9:46 pm    Post subject: Reply with quote

There are some small rounding differences, but they are negligible. 0xF0 instead of 0xF1, for example.

Your problem is the extra 0x0B - what's that supposed to do? Is it possible that

bw.Write(sLocationDesc);

writes not just the string but also the string length?
_________________
Lutz

Report Map Errors here:
TomTom/TeleAtlas NAVTEQ
Back to top
View user's profile Send private message Send e-mail
babybob
Occasional Visitor


Joined: Nov 27, 2004
Posts: 33
Location: uk

PostPosted: Mon Nov 29, 2004 8:20 am    Post subject: Reply with quote

yes you were right, the binarywrite method for a string prefixes the string with its length. Thanks yet again, now maybe I can get on with the rest of the project!

Brian
Back to top
View user's profile Send private message Visit poster's website







Posted: Today    Post subject: Pocket GPS Advertising

Back to top
Display posts from previous:   
Post new topic   Reply to topic    Pocket GPS World Forum Index -> TomTom Software-Only Products All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Make a Donation



CamerAlert Database

Click here for the PocketGPSWorld.com Speed Camera Database

Download Speed Camera Database
22.043 (17 Apr 24)



WORLDWIDE SPEED CAMERA SPOTTERS WANTED!

Click here to submit camera positions to the PocketGPSWorld.com Speed Camera Database


12mth Subscriber memberships awarded every week for verified new camera reports!

Submit Speed Camera Locations Now


CamerAlert Apps



iOS QR Code






Android QR Code







© Terms & Privacy


GPS Shopping