#138641 - 02/03/2003 02:38
Re: How to get routes for GPSapp?
[Re: Yang]
|
journeyman
Registered: 12/01/2003
Posts: 64
Loc: Germany
|
Yang,
do you have any idea why the last turn from a greenflag route converted with your script is not further converted from the mapsonus script?
I played around a little bit: it seems not to be the route information (the last turn and the end point are in the right format) but the route shape information. The mapsonus script seems to expect something different at the end of the route.
Any idea?
Juergen
|
Top
|
|
|
|
#138642 - 02/03/2003 09:04
Re: How to get routes for GPSapp?
[Re: fossi]
|
addict
Registered: 14/01/2002
Posts: 443
Loc: Raleigh, NC
|
No idea.. I looked through the parse_mapsonus.py script and found a reference to it not being able to parse the last point on the shape data, so it just appends the last turn point. In the case of the greenflag data, this is the same point. Changing the script doesn't make a difference in the output either.
|
Top
|
|
|
|
#138643 - 02/03/2003 10:11
Re: How to get routes for GPSapp?
[Re: Yang]
|
journeyman
Registered: 12/01/2003
Posts: 64
Loc: Germany
|
Played a little bir around and found 2 work-arounds:
1. for the last turn set the follwing number from 1 to 2 - but integration in the script is quite tricky
2. repeating the line with the last turn increasing the turn number - integration in the script is simple, just add the folling line before the end line:
print OUTFILE "TURN $turn $lon $lat $turn 1 0 0 0 0.0 $desc\n";
print OUTFILE "END ......
This works.
Juergen
|
Top
|
|
|
|
#138644 - 02/03/2003 10:37
Re: How to get routes for GPSapp?
[Re: fossi]
|
addict
Registered: 14/01/2002
Posts: 443
Loc: Raleigh, NC
|
format for the turn statment: TURN # lng lat ptNdx #pts turnDeg outHdg inHdg km text-instructions
the 1 in the turn line corresponds with the number of points in the shape data corresponding with the turn.. I'm not sure why the second method works. If you get a script to work, post it (noting your change in the comments at the top). Without a good way of testing it, I can't be sure I made the change correctly.
I think the best solution, is to have the perl script do everything, and use python to do coordinate conversion.
|
Top
|
|
|
|
#138646 - 26/05/2003 23:15
Re: How to get routes for GPSapp?
[Re: fossi]
|
enthusiast
Registered: 22/09/2002
Posts: 249
Loc: Germany, Cologne
|
Thank to Yang for warping me here.
I've read some postings here and are a little bit confused. So does anybody has a step-for-step guide for letting my empeg print german maps on the screen? I don't know exactly if I need the python-script after I converted the german maps with this other script. Maybe some german maps exist in a "You-can-copy-this-easily-to-your-empeg"-form :-).
That would be helpful, too.
Rolf
_________________________
Connecting Empeg via Bluetooth or Wireless LAN http://empeg.rowi.net*** Proud owner of the European Worst Install Trophy 2003 ! *** RoWi
|
Top
|
|
|
|
#138647 - 27/05/2003 06:51
Re: How to get routes for GPSapp?
[Re: rowitech]
|
addict
Registered: 14/01/2002
Posts: 443
Loc: Raleigh, NC
|
Rather than write a new version of the python script, we just wrote a perl script (I don't know python unfortunately) to convert Greenflag maps into a format the python script could convert. This makes it a two step process, but it works.
|
Top
|
|
|
|
#138648 - 27/05/2003 07:50
Re: How to get routes for GPSapp?
[Re: Yang]
|
enthusiast
Registered: 22/09/2002
Posts: 249
Loc: Germany, Cologne
|
Just converted the HTML-Output from greenflag.com with greenflag2mapsonus.pl and got few lines:
TURN 0 6.955939 50.941739 0 1 0 0 0 0.0
END 6.954339 50.941589 {MARK.END} End Point (Destination reached)
MIN 0
I input RATINGEN to KÖLN so I expected a bit more than only one turn. Could the output be ok? If I can read these lines, they say that you turn at 6.955939/50.941739 in direction (left or right, don't know). Then, at 6.954339/50.941589 I'm there, that's it. Ok, so far so good. I could imagine writing a PHP-Script that runs on my site (rowi.net) asking for name, converting and output this file to the user. So you can override those convertings. BUT, I could also imagine that this isn't fair to greenflag.com and could be punished, am I right?
If not, I'm glad to provide this service if you are happy to use it.
Rolf
_________________________
Connecting Empeg via Bluetooth or Wireless LAN http://empeg.rowi.net*** Proud owner of the European Worst Install Trophy 2003 ! *** RoWi
|
Top
|
|
|
|
#138649 - 27/05/2003 08:19
Re: How to get routes for GPSapp?
[Re: rowitech]
|
addict
Registered: 14/01/2002
Posts: 443
Loc: Raleigh, NC
|
Make sure you select step-by-step maps under the directions style, otherwise it will only give you a single map. The Mapsonus routes are taken from the raw GPS data they give, but the Greenflag data is actually taken from the URL's to each turn image.
|
Top
|
|
|
|
#138650 - 27/05/2003 08:26
Re: How to get routes for GPSapp?
[Re: rowitech]
|
addict
Registered: 14/01/2002
Posts: 443
Loc: Raleigh, NC
|
I could imagine writing a PHP-Script that runs on my site (rowi.net) asking for name, converting and output this file to the user. So you can override those convertings. BUT, I could also imagine that this isn't fair to greenflag.com and could be punished, am I right?
If not, I'm glad to provide this service if you are happy to use it. By reading their copywrite notice here, it's pretty clear that you can't incorporate their website into annother one.
|
Top
|
|
|
|
#138651 - 27/05/2003 10:02
Re: How to get routes for GPSapp?
[Re: Yang]
|
enthusiast
Registered: 22/09/2002
Posts: 249
Loc: Germany, Cologne
|
Yes, I selected the Step-by-Step-Function. So probably the output is ok.
I was quite sure that I'm not allowed for this, but I've seen a little chance to be allowed publishing this as non-profit. But if I'm unsure (and I am) I won't do this.
Rolf
_________________________
Connecting Empeg via Bluetooth or Wireless LAN http://empeg.rowi.net*** Proud owner of the European Worst Install Trophy 2003 ! *** RoWi
|
Top
|
|
|
|
#138652 - 27/05/2003 16:29
Re: How to get routes for GPSapp?
[Re: rowitech]
|
addict
Registered: 14/01/2002
Posts: 443
Loc: Raleigh, NC
|
Ahh.. they changed the html on me. Here's an updated copy of the script.. It doesn't capture all of the directions (such as turns 8 and 11) but it gets the coordinates now.
Edit: Looking at the turns, they aren't onto streets, so they really don't need to be included. GPSapp only lists the streets to turn onto, so including the sign's etc doesn't fit. I can add them anyway, but it'll look wierd.
Attachments
161051-green.zip (39 downloads)
Edited by Yang (27/05/2003 16:49)
|
Top
|
|
|
|
#138653 - 28/05/2003 13:44
Re: How to get routes for GPSapp?
[Re: Yang]
|
enthusiast
Registered: 22/09/2002
Posts: 249
Loc: Germany, Cologne
|
Yepp! Thanks a lot, it works.
Very interesting that the end-output is very very small and guides me home. There should be an easy way, klick and go, to get such data to the empeg. More easy than now ;-).
Rolf
_________________________
Connecting Empeg via Bluetooth or Wireless LAN http://empeg.rowi.net*** Proud owner of the European Worst Install Trophy 2003 ! *** RoWi
|
Top
|
|
|
|
#138654 - 28/05/2003 16:46
Re: How to get routes for GPSapp?
[Re: rowitech]
|
addict
Registered: 14/01/2002
Posts: 443
Loc: Raleigh, NC
|
That's been discussed before, but until there's annother problem to solve first, and that's having a predefined installation location. Work can be done to streamline some of the problems, such as having green.pl automaticly run the mapsonus->GPSapp convert utility, etc..
|
Top
|
|
|
|
#138655 - 30/05/2003 05:30
Re: How to get routes for GPSapp?
[Re: Yang]
|
enthusiast
Registered: 22/09/2002
Posts: 249
Loc: Germany, Cologne
|
Ok, today my hands typed a script while looking at the clouds. Maybe it helps somebody. You can put the output (HTML) from Greenflag into a box, shake, and get the route for your empeg.
I don't know exactly if this is forbidden, so please tell me if it is, so it will be erased. But since I'm not copying some data myself it should be ok.
Look at http://empeg.rowi.net and click on GPSapp-converter.
Thank you very much for GPSapp, green.pl, convert.py, ...
I just put them together.
Rolf
_________________________
Connecting Empeg via Bluetooth or Wireless LAN http://empeg.rowi.net*** Proud owner of the European Worst Install Trophy 2003 ! *** RoWi
|
Top
|
|
|
|
#138656 - 30/05/2003 06:24
Re: How to get routes for GPSapp?
[Re: rowitech]
|
addict
Registered: 14/01/2002
Posts: 443
Loc: Raleigh, NC
|
There shouldn't be a problem, just credit the authors and provide the source code for the scripts you used that you didn't write.
|
Top
|
|
|
|
#138657 - 10/07/2003 05:36
Re: How to get routes for GPSapp?
[Re: rowitech]
|
member
Registered: 18/02/2002
Posts: 179
Loc: Germany
|
Hi,
could it be that we can't use Greenflag any longer since they don't have html output anymore?
Another thing I want to ask: I use the software Map&Guide 9.0 which can generate step by step directions with coordinates for every step. I've attached a html file generated by Map and Guide. Can I convert that for use with gpsapp? This would be a solution that doesn't depend on any web based route planner.
thorsten
Attachments
168210-test.htm (264 downloads)
_________________________
----------------------------
MK1: 00314 (4GB)
MK2a: 030103104 (30GB)
Installed in a BMW 323ti
|
Top
|
|
|
|
#138658 - 10/07/2003 06:28
Re: How to get routes for GPSapp?
[Re: Warp10]
|
carpal tunnel
Registered: 24/01/2002
Posts: 3937
Loc: Providence, RI
|
That information should be sufficient. It's probably simpler to convert to MapsOnUs format and use the existing script to convert to the gpsapp format.
|
Top
|
|
|
|
#138659 - 10/07/2003 06:40
Re: How to get routes for GPSapp?
[Re: Daria]
|
member
Registered: 18/02/2002
Posts: 179
Loc: Germany
|
But how to convert to the mapsonus format?
_________________________
----------------------------
MK1: 00314 (4GB)
MK2a: 030103104 (30GB)
Installed in a BMW 323ti
|
Top
|
|
|
|
#138660 - 10/07/2003 07:52
Re: How to get routes for GPSapp?
[Re: Warp10]
|
carpal tunnel
Registered: 24/01/2002
Posts: 3937
Loc: Providence, RI
|
But how to convert to the mapsonus format?
Well, how would you have converted directly? I assume by writing a script, and again, you'd still be writing a script.
Reserved04, 03 02 and 01 look like they might be UTM coordinates (meters north and east of a zone boundary point), so you could compute meters to next turn by completing the triangle (they're effectively points on a grid).
Someone previously posted a script to convert some format to mapsonus. You can probably use it as an example of what to do. I'm going to have to search, I don't have a copy laying around to look at.
|
Top
|
|
|
|
#138661 - 10/07/2003 07:57
Re: How to get routes for GPSapp?
[Re: Daria]
|
carpal tunnel
Registered: 24/01/2002
Posts: 3937
Loc: Providence, RI
|
Reserved04, 03 02 and 01 look like they might be UTM coordinates (meters north and east of a zone boundary point), so you could compute meters to next turn by completing the triangle (they're effectively points on a grid).
Though thinking about it I think the mapsonus conversion script just uses the coordinates, the point types, the point descriptions, and the points on the lines which are the route, and you don't have a vector representation of the route here, just the waypoints.
|
Top
|
|
|
|
#138662 - 10/07/2003 09:47
Re: How to get routes for GPSapp?
[Re: Daria]
|
member
Registered: 18/02/2002
Posts: 179
Loc: Germany
|
Well sure I have to write a script, but I don't know the mapsonus format. If it is a decimal number, the conversion from degree (x° y' z'') to decimal would be rather simple.
_________________________
----------------------------
MK1: 00314 (4GB)
MK2a: 030103104 (30GB)
Installed in a BMW 323ti
|
Top
|
|
|
|
#138663 - 10/07/2003 13:24
Re: How to get routes for GPSapp?
[Re: Warp10]
|
member
Registered: 18/02/2002
Posts: 179
Loc: Germany
|
Another question: Is the resolution of the degree format sufficient? I mean, how many meters is one "degree-second" (1'')?
_________________________
----------------------------
MK1: 00314 (4GB)
MK2a: 030103104 (30GB)
Installed in a BMW 323ti
|
Top
|
|
|
|
#138664 - 10/07/2003 13:43
Re: How to get routes for GPSapp?
[Re: Warp10]
|
carpal tunnel
Registered: 24/01/2002
Posts: 3937
Loc: Providence, RI
|
If you make a map using mapsonus, and download the raw map, they document the format on that page.
|
Top
|
|
|
|
#138665 - 10/07/2003 13:43
Re: How to get routes for GPSapp?
[Re: Warp10]
|
pooh-bah
Registered: 25/08/2000
Posts: 2413
Loc: NH USA
|
That depends if it's latitude or longitude. East/West there is no fixed amount, as circles of latitude are smaller as you approach the poles. For the longitudinal circles(north/south) 1 minute of arc is almost exactly one (int'l) Nautical Mile which is 1,852 meters. [1 degree of arc is 60.1 Nautical Miles since the world's circumference is (roughly) 21639.007 NM] Of course East/West is the same, if you're on the equator.
I'm sure there's a clever formula somewhere that takes the latitude issue into account, but I don't know it. HTH.
-Zeke
_________________________
WWFSMD?
|
Top
|
|
|
|
#138666 - 10/07/2003 13:47
Re: How to get routes for GPSapp?
[Re: Ezekiel]
|
carpal tunnel
Registered: 24/01/2002
Posts: 3937
Loc: Providence, RI
|
Well, you can always convert to UTM, which puts things in terms of meters, and then convert a point one arc second away, and see how many meters different it is...
|
Top
|
|
|
|
#138667 - 10/07/2003 14:19
Re: How to get routes for GPSapp?
[Re: Daria]
|
pooh-bah
Registered: 25/08/2000
Posts: 2413
Loc: NH USA
|
The formula is very simple, now that I've actually engaged my brain:
Distance (Naut. Mi.) per degree east/west = 60.1*cos(decimal latitude). At the equator, it's 60.1 NM per degree longitude (east/west). At the north & south pole it's zero.
-Zeke
_________________________
WWFSMD?
|
Top
|
|
|
|
#138668 - 10/07/2003 16:07
Re: How to get routes for GPSapp?
[Re: Warp10]
|
addict
Registered: 14/01/2002
Posts: 443
Loc: Raleigh, NC
|
Why can't you use greenflag anymore? Just go to their route planning page, input the source and destination, and when it gives you the route, select the 'step-by-step maps' link under the route map. This will give you maps for each of the turns, and allow my script to extract the coordinates for each turn. The script needs a couple tweaks to get the turn description a little better though. I've attached an updated version of the script, and here's a link to the directions I tested it on: London, UK to Berlin, Germany
Attachments
168342-green2.zip (39 downloads)
|
Top
|
|
|
|
#138669 - 10/07/2003 21:05
Re: How to get routes for GPSapp?
[Re: Warp10]
|
journeyman
Registered: 12/01/2003
Posts: 64
Loc: Germany
|
Hi!
Iis quite simple with MG9 to convert the routes.
First of all you should tell MG9 to only display the coordinates and the description (in this order), nothing more. You should select "detailed route" to display not only the waypoint but also the route shapes.
Second you should save the file as txt-file, not as html. (save them without spaces in the name)
Third you should use my little script "mg2mus.pl" to convert this format to the input format for the parser of gpsapp (parse_mapsonus.py).
The only thing is that I used perl, the gpsapp parser uses phyton. So you need support for both interpreters installed on your system.
Enclosed you find my way to convert the routes. The zip-file includes my script for MG9 (mg2mus.pl), the phyton-script from gpsapp (convert.py), and two of my batch-files. Convert.bat converts a route automatically from the MG9 format to the empeg format, convall.bat converts all txt-files from MG9 in the current directory to the empeg format and transmittes them automatically to the empeg via ftp as soon as the empeg is available (edit the ip-address in the bat-file for your empegs IP). I use this script to generate routes on the PC, start the script convall.bat, later on in the garage turn on my car togehter with the empeg and WLAN interface, then the script on the PC automatically pushes the routes to the empeg if this one is powered up.
Please let me know if this one does help.
Juergen
Attachments
168374-mg2empeg.zip (32 downloads)
|
Top
|
|
|
|
#138670 - 11/07/2003 06:29
Re: How to get routes for GPSapp?
[Re: fossi]
|
member
Registered: 18/02/2002
Posts: 179
Loc: Germany
|
Of course it's quite simple to transform the x°y'z'' representation into a floating point or integer representation of an angle, but I don't know if this is precise enough. It would be great to find out what the "reserved 1,2,3,4" fields in the Map & Guide output are. Like dbrashear mentioned, I also think that this are UTM coordinates. I used a utility to convert the long. & lat. of a point into UTM coordinates to prove that this is true, but the result was not excactly the same as in Reserved 1,2,3 and 4. In Map & Guide, these coordinates are called "Map and Guide coordinates". Maybe we can find out a function that transforms Reserved 1,2,3 and 4 into a gpsapp compatible format, because these values are more precise than x° y' z'' (with z element integer.)
_________________________
----------------------------
MK1: 00314 (4GB)
MK2a: 030103104 (30GB)
Installed in a BMW 323ti
|
Top
|
|
|
|
|
|