View previous topic :: View next topic |
Author |
Message |
whelanp Occasional Visitor
Joined: Mar 08, 2006 Posts: 8
|
Posted: Wed Mar 08, 2006 6:32 pm Post subject: Favourites DAT format |
|
|
Hello All
Can anyone shed any light on the format of the binary file used to store favourites. I find it really annoying I cannot create this file without using the Favourites importer. Currently it is the only reason I have a windows install!!
Is there some script that can convert the csv favourites file to the favourites dat. Or does any one know how the dat is created??
Would be cool to have
Thanks in advance
Paul "Hill Walker"
Oh and I use Destinator PN |
|
Back to top |
|
|
glynny Occasional Visitor
Joined: Nov 17, 2005 Posts: 28 Location: Solihull UK
|
Posted: Fri Mar 17, 2006 2:16 am Post subject: DAT files |
|
|
This seems to be the holy grail of Destinator.
I've searched for about 2 months to find the answer & nada.
Best I found were some hexidecimal editors that would read it - but it's still a jumble of numbers & letters.
If you can find out you may even get to change some of the inbuilt POI - so then you can delete some of the really useful ones like mountain Passes & yaght basins.
Glynny _________________ Acer N35
Destinator 3
I can never think of anything clever to put here..... |
|
Back to top |
|
|
Jonisinimo Occasional Visitor
Joined: Feb 16, 2006 Posts: 3 Location: Germany
|
Posted: Sat Mar 18, 2006 1:16 am Post subject: |
|
|
Hello,
in the german forum is a tool that can convert favourite data from formats: .dat, .csv, .asc into the formats: .dat, .csv, .asc.
Adress:
http://www.pocketnavigation.de/board/tid77293-sid.htm
You can find there following link:
I2C Format Konverter (Formatkonvertierung DAT, CSV,ASC) auf PC
For simple converting use the version 1.72.
Also you can find the source code of a VBA-macro which reads the relevant data from DPN-favourites. In this code you can find the known data format of the favourite database. The VBA-code is running under Excel.
Adress:
http://www.pocketnavigation.de/board/thread.php?postid=608868#post608868
Jonisinimo |
|
Back to top |
|
|
glynny Occasional Visitor
Joined: Nov 17, 2005 Posts: 28 Location: Solihull UK
|
Posted: Sat Mar 18, 2006 2:04 am Post subject: |
|
|
impressive - well done _________________ Acer N35
Destinator 3
I can never think of anything clever to put here..... |
|
Back to top |
|
|
whelanp Occasional Visitor
Joined: Mar 08, 2006 Posts: 8
|
Posted: Tue Mar 21, 2006 2:15 pm Post subject: |
|
|
Thanks Guys
Pity I did't pay more attention in German class. |
|
Back to top |
|
|
whelanp Occasional Visitor
Joined: Mar 08, 2006 Posts: 8
|
Posted: Tue Mar 21, 2006 2:37 pm Post subject: |
|
|
Can anyone please convert the comments to english for me?
Thanks I want to code it up as a java app.
Regards
Paul
Code: |
Option Explicit
Type Favorit
DestinatorText As String
Name As String
Bemerkung As String
Nummer As String
Strasse As String
Stadt As String
unbekannt As String
PLZ As String
'Nach der PLZ stehen immer folgende Daten in der *.DAT Datei
'im Hex Format: 00 00 00 00 00 01 DD 02 12 3C 00 00 00
'Diese Werte lese ich als Dummy Werte ein
dummy1(1 To 10) As Byte
LonCoord1 As Double
LatCoord1 As Double
LonCoord2 As Double
LatCoord2 As Double
'Nach der letzten Koordinate stehen immer noch 16 bytes in der *.DAT Datei
'Diese Werte lese ich als Dummy Werte ein
dummy2(1 To 16) As Byte
End Type
Sub readfavorit()
Dim FavoritenData(1 To 10) As Favorit
Dim i As Long
Dim StartPos As Long
Dim EndPos As Long
Open "D:\MY FAVORITES.dat" For Binary Access Read As #1
StartPos = 1
i = 0
Do While Not EOF(1)
i = i + 1
With FavoritenData(i)
.DestinatorText = StringUnicodeEinlesen(StartPos, EndPos)
StartPos = EndPos
.Name = StringUnicodeEinlesen(StartPos, EndPos)
StartPos = EndPos
.Bemerkung = StringUnicodeEinlesen(StartPos, EndPos)
StartPos = EndPos
.Nummer = StringUnicodeEinlesen(StartPos, EndPos)
StartPos = EndPos
.Strasse = StringUnicodeEinlesen(StartPos, EndPos)
StartPos = EndPos
.Stadt = StringUnicodeEinlesen(StartPos, EndPos)
StartPos = EndPos
.unbekannt = StringUnicodeEinlesen(StartPos, EndPos)
StartPos = EndPos
.PLZ = StringUnicodeEinlesen(StartPos, EndPos)
StartPos = EndPos
Get #1, StartPos, .dummy1
StartPos = StartPos + 10
Get #1, StartPos, .LonCoord1
StartPos = StartPos + 8
Get #1, StartPos, .LatCoord1
StartPos = StartPos + 8
Get #1, StartPos, .LonCoord2
StartPos = StartPos + 8
Get #1, StartPos, .LatCoord2
StartPos = StartPos + 8
Get #1, StartPos, .dummy2
StartPos = StartPos + 16
|
|
|
Back to top |
|
|
glynny Occasional Visitor
Joined: Nov 17, 2005 Posts: 28 Location: Solihull UK
|
Posted: Tue Mar 21, 2006 10:08 pm Post subject: Translation |
|
|
Try http://babelfish.altavista.com/
It's not foolproof but it will certainly give you the gist of whats being said.
Hope it helps
Glynny _________________ Acer N35
Destinator 3
I can never think of anything clever to put here..... |
|
Back to top |
|
|
TheRock Regular Visitor
Joined: Aug 24, 2005 Posts: 126
|
Posted: Wed Mar 22, 2006 1:14 pm Post subject: |
|
|
translation:
'Nach der PLZ stehen immer folgende Daten in der *.DAT Datei
'im Hex Format: 00 00 00 00 00 01 DD 02 12 3C 00 00 00
in the *.dat-file the zip-code is always followed by 00 00 00 00 00 01 DD 02 12 3C 00 00 00 in HEX-format
'Diese Werte lese ich als Dummy Werte ein
I read these data as dummy-data
'Nach der letzten Koordinate stehen immer noch 16 bytes in der *.DAT Datei
after the last coordinate there are always another 16 bytes in the *.dat-file.
'Diese Werte lese ich als Dummy Werte ein
I read these data as dummy-data _________________ D7
loox n500 |
|
Back to top |
|
|
ed_m Occasional Visitor
Joined: Jan 01, 2004 Posts: 11
|
Posted: Thu May 25, 2006 10:15 pm Post subject: |
|
|
hi all... now just imagine for a moment i have no idea what i'm talking about.
my wife got a gnav10 from somewhere or other and now i'm trying to program some favourites on the laptop.
i created a new category on the unit today and entered a few favourite points
1) not sure how to use the activesync interface but used the browse option to go and find a dat file of the same name as the favourites category i created.
2) i used the german poicon utility to convert it to csv and yup its the stuff i programmed on the unit
3) modified the csv and converted back to dat.. copied it back where i found it...
4) the category no longer appears on the unit.
basic questions:
am i missing some configuration or header for the dat file?
am i putting it in the right place?
etc.
good to find people on here getting to grips with hacking this unit about!
i have a technical & software background so i shouldnt get scared by big words.. just obviously dont know the ins & outs as well as i oughta.
ed |
|
Back to top |
|
|
ed_m Occasional Visitor
Joined: Jan 01, 2004 Posts: 11
|
Posted: Fri May 26, 2006 12:12 pm Post subject: |
|
|
ok.. more fool i
the addition of a .dat file extension worked a treat.
assumed the convertor would have done that, silly me.
that combined with windows trying its best not to display file extensions had me fooled. |
|
Back to top |
|
|
ToMMY2k Occasional Visitor
Joined: Jul 03, 2006 Posts: 3
|
Posted: Wed Jul 12, 2006 8:46 pm Post subject: |
|
|
Hi All,
Did anyone actually get this working?
Id love to know how, as Im stumped!
Cheers,
Tom |
|
Back to top |
|
|
ed_m Occasional Visitor
Joined: Jan 01, 2004 Posts: 11
|
Posted: Thu Jul 13, 2006 9:41 am Post subject: |
|
|
...yes i did.
was all a bit last minute.
will see if i can remember the procedure over the weekend. |
|
Back to top |
|
|
ToMMY2k Occasional Visitor
Joined: Jul 03, 2006 Posts: 3
|
Posted: Thu Jul 13, 2006 4:41 pm Post subject: |
|
|
If you could that would be great!
I did make a start on attepting to run the VB but Im no VB progammer (Perl is what I do). I didnt get very far.
Cheers,
Tom |
|
Back to top |
|
|
ed_m Occasional Visitor
Joined: Jan 01, 2004 Posts: 11
|
Posted: Thu Jul 13, 2006 8:57 pm Post subject: |
|
|
ok.... best bet is to take one of your current POI favourites groups and convert it to see the format.
copy DAT file from unit
i'm using microsoft activesync to talk to the satnav, browse the files can't remember the path offhand but you should be able to find NAME.dat where NAME is the heading of your favourites group.
this file contains the POI/waypoints within that group, copy it locally.
Convert DAT to CSV
i ended up using POIcon207 after errors with earlier versions (downloads linked above).
opening it you'll want to use the aktion section, click einlesen to open a window that allows you to read the file.
click quelle & browse to the dat file and open it, then click start to read the data in and ok to the next question. if its happy you'll get a 'daten wird eingelesen' message (data was read in).
close the window (schliessen)
using the andern button in the aktion section you can browse through the waypoints & edit them (i think).
to write the file in a more sensible format click schreiben (write) and on the right hand side select .CSV and ziel to browse where you'd like the file to go.. and put a filename in the box.
click start and you should get 'daten wird geschreiben' (you can work that one out).
schliesen & schliesen and you can go open your CSV in excel or similar.
Edit / Create CSV
you'll see col 1 contains the name, C & D contain lat and long... and others have address info etc.
so now you know the format you can go build your own csv file with your own waypoints. i used multimap to centre on the places then pasted the url into excel and wrote a formula to pull out the lat & long data.
i havent tried leaving the lat & long blank and putting only postcodes in (cos i can do that on the unit manually!).
Convert CSV to DAT
once you have your csv file with the waypoints in reverse the above process to convert it back to a dat file. use einlesen to load the file having selected .csv, and schreiben to write the file as a dat.
Copy back to unit
copy it back onto the device and it should appear in your favourites as a new group.
not terribly detailed but hopefully enough. |
|
Back to top |
|
|
ToMMY2k Occasional Visitor
Joined: Jul 03, 2006 Posts: 3
|
Posted: Sat Jul 15, 2006 10:32 am Post subject: |
|
|
ah man I feel really bad...thanks for spending the time to write all that! I did actually mean did anyone get the VB script working from the germal gps website.
Cheers,
Tom |
|
Back to top |
|
|
|
Posted: Today Post subject: Pocket GPS Advertising |
|
|
We see you’re using an ad-blocker. We’re fine with that and won’t stop you visiting the site.
Have you considered making a donation towards website running costs?. Or you could disable your ad-blocker for this site. We think you’ll find our adverts are not overbearing!
|
|
Back to top |
|
|
|