#246667 - 17/01/2005 16:26
GPSApp users: MapsOnUs got good.
|
carpal tunnel
Registered: 20/12/1999
Posts: 31597
Loc: Seattle, WA
|
For those using GPSApp on their empegs, you probably already know that MapsOnUs is pretty much the only way you can use the web to get routes into the empeg.
In the past, creating a route with MapsOnUs was tricky for me, because it would sometimes do strange things, such as:
- Calling a freeway onramp an "unnamed road" instead of just saying "Take I-80 West".
- Confusing small roads with highways; A freeway onramp that appeared on many of my routes was called "highway 193". When there's no highway by that name anywhere near there.
- Making a route line that cut across blank terrain, even though the highway line was nearby. In these cases I had to hand-position an intermediate "correction" destination by clicking on the map. Big pain.
- Misdirecting you on small residential roads (like the ones near my house).
Anyone else get that behavior in the past?
Well, anyway, I just punched in a new set of directions (hadn't needed to for the last few months), and suddenly MapsOnUs is working flawlessly. All the problems I'd had before are corrected now. Yay! I don't know if it's because their database has been updated, or they've fixed code bugs, or what, I'm just glad to see it working that way.
And the Python parser script still seems to work fine on their output page.
Just wanted to put that in here for anyone else using GPSApp. Enjoy!
|
Top
|
|
|
|
#246668 - 19/01/2005 10:45
Re: GPSApp users: MapsOnUs got good.
[Re: tfabris]
|
carpal tunnel
Registered: 25/06/1999
Posts: 2993
Loc: Wareham, Dorset, UK
|
Quote: Calling a freeway onramp an "unnamed road" instead of just saying "Take I-80 West"
This is a good indicator that the underlying maps have good node granularity, a good thing.
Quote: - Making a route line that cut across blank terrain, even though the highway line was nearby. In these cases I had to hand-position an intermediate "correction" destination by clicking on the map. Big pain.
- Misdirecting you on small residential roads (like the ones near my house).
This sort of behaviour shows that their route-matrix construction algorithm has defects: the second one typically shows that it is returning too many choices of matrix and the app that does the choice of route has got poor controls on choice of route criteria (also shown in the "missed highway" symptom above).
If the routing app now behaves better, then it's pretty obvious they've been working on the routing app.
_________________________
One of the few remaining Mk1 owners... #00015
|
Top
|
|
|
|
#246669 - 08/02/2005 16:49
Re: GPSApp users: MapsOnUs got good.
[Re: tfabris]
|
carpal tunnel
Registered: 30/10/2000
Posts: 4931
Loc: New Jersey, USA
|
I was just checking out Google Maps. Looks like there are coordinates in the HTML source. Doesn't appear to be turn-by-turn at first glance.
_________________________
-Rob Riccardelli 80GB 16MB MK2 090000736
|
Top
|
|
|
|
#246670 - 09/02/2005 02:08
Re: GPSApp users: MapsOnUs got good.
[Re: robricc]
|
carpal tunnel
Registered: 20/12/1999
Posts: 31597
Loc: Seattle, WA
|
Ooo. Didn't know about this. Interesting little app. Having a go at it...
|
Top
|
|
|
|
#246671 - 14/02/2005 18:51
Re: GPSApp users: MapsOnUs got good.
[Re: robricc]
|
enthusiast
Registered: 27/09/1999
Posts: 200
Loc: Berkeley, CA
|
Google Maps is based on technology developed (and sold to Google) by some friends of mine. (Tony- That was the other startup in the house in Berkeley)
It's a long shot, but I'll see if I can get them to sneak in some gpsapp-friendly output.
-Z
_________________________
-Zandr Mk.IIa #010101243 currently getting a 500GB SSD. More spares in the shed.
|
Top
|
|
|
|
#246672 - 14/02/2005 19:12
Re: GPSApp users: MapsOnUs got good.
[Re: n6mod]
|
carpal tunnel
Registered: 20/12/1999
Posts: 31597
Loc: Seattle, WA
|
|
Top
|
|
|
|
#246673 - 09/03/2005 15:48
Re: GPSApp users: MapsOnUs got good.
[Re: n6mod]
|
enthusiast
Registered: 20/08/2002
Posts: 340
Loc: Pittsburgh, PA
|
It's already there in a somewhat friendly format. The vector that is drawn for the directions seems to be an encoded string of actual coordinates. They simply decode it, scale it and draw it with some javascript foo.
I haven't had time to really play with gpsapp in a while, but the attached file was able to parse the google maps data. I got directions, clicked on the 'link to this page' and saved the page as plain html.
Then I fed it into the parser and it spit out something that looks like it would be a valid input file for gpsapp. It doesn't strip down the turn-by-turn descriptions yet, so gpsapp will probably repeat itself like 'turn left at turn left at that street' and quite a bit of code was simply cut and pasted from parse_mapsonus.
edit: updated the script to add the destination address as the last waypoint.
Attachments
250948-parse_google.py (575 downloads)
Edited by jaharkes (09/03/2005 16:08)
_________________________
40GB - serial #40104051 gpsapp
|
Top
|
|
|
|
#246674 - 09/03/2005 17:19
Re: GPSApp users: MapsOnUs got good.
[Re: jaharkes]
|
carpal tunnel
Registered: 20/12/1999
Posts: 31597
Loc: Seattle, WA
|
|
Top
|
|
|
|
#246675 - 29/10/2005 16:12
Re: GPSApp users: MapsOnUs got good.
[Re: jaharkes]
|
carpal tunnel
Registered: 20/12/1999
Posts: 31597
Loc: Seattle, WA
|
Oh. My. God.
I could KISS YOU.
It works. Turns and all.
I simply edited my batch file and replaced "parse_mapsonus.py" with "parse_google.py" and ran it, and IT WORKED.
GAAAAAAAAAAAAAAH THIS IS SO COOL.
AAAAAAAAAAAAAAAAA!!!!!
<head explodes>
|
Top
|
|
|
|
#246676 - 01/11/2005 00:11
Re: GPSApp users: MapsOnUs got good.
[Re: tfabris]
|
carpal tunnel
Registered: 13/02/2002
Posts: 3212
Loc: Portland, OR
|
/me disassembles monitor and wipes tfabris head off the inside.
|
Top
|
|
|
|
#246677 - 01/11/2005 08:11
Re: GPSApp users: MapsOnUs got good.
[Re: canuckInOR]
|
carpal tunnel
Registered: 20/12/1999
Posts: 31597
Loc: Seattle, WA
|
Quick question.
When using the Google maps route I tried, my position was offset from the map, north and east by several meters, more than I would usually account for with consumer GPS accuracy and map data difficulties.
If I find that my position is always consistently off by X number of meters north and east, is there a way I can configure GPSapp to compensate? Like an offset command in its configurations info in config.ini?
|
Top
|
|
|
|
#246678 - 01/11/2005 14:46
Re: GPSApp users: MapsOnUs got good.
[Re: tfabris]
|
enthusiast
Registered: 20/08/2002
Posts: 340
Loc: Pittsburgh, PA
|
It could be that Google's coordinates are already in the WGS84 (gps) coordinate system. Typically map data in the US is in NAD27 coordinates.
In the parse_google.py file, there is a function 'decodePolyline'. It contains a line where we convert from NAD27toWGS84 which might not be necessary if they already did the conversion for us. The difference between the two coordinate systems tends to be about 200 meters.
You could replace coord=NAD27toWGS84(Coord(lat*SCALE,lon*SCALE)) with coord=Coord(lat*SCALE,lon*SCALE) and see if that does the trick.
_________________________
40GB - serial #40104051 gpsapp
|
Top
|
|
|
|
#246679 - 01/11/2005 17:40
Re: GPSApp users: MapsOnUs got good.
[Re: jaharkes]
|
carpal tunnel
Registered: 20/12/1999
Posts: 31597
Loc: Seattle, WA
|
Hm. Not sure if the difference I'm seeing is as big as 200 meters. But I'll give it a shot and see. Thanks.
|
Top
|
|
|
|
#246680 - 01/11/2005 18:12
Re: GPSApp users: MapsOnUs got good.
[Re: jaharkes]
|
carpal tunnel
Registered: 20/12/1999
Posts: 31597
Loc: Seattle, WA
|
Okay, I've tried to make that change in the code a bunch of different times now, and it fails completely, no route file is generated. I don't know why it's failing because I don't see any console errors output. I'm pasting the text exactly as you wrote it, exactly in place of the existing line. So I don't know what's wrong, but I can't try this.
|
Top
|
|
|
|
#246681 - 01/11/2005 21:08
Re: GPSApp users: MapsOnUs got good.
[Re: tfabris]
|
old hand
Registered: 09/01/2002
Posts: 702
Loc: Tacoma,WA
|
This might be worth a try:
def NAD27toWGS84(coord): return ConvertDatum(coord, Datum_WGS84, Datum_WGS84)
(change the existing NAD27toWGS84 function), then you keep the coord= line the way it was before.
|
Top
|
|
|
|
#246682 - 01/11/2005 22:08
Re: GPSApp users: MapsOnUs got good.
[Re: siberia37]
|
carpal tunnel
Registered: 20/12/1999
Posts: 31597
Loc: Seattle, WA
|
Nope, same error. No route file gets generated when I change that function as you showed.
|
Top
|
|
|
|
#246683 - 02/11/2005 04:27
Re: GPSApp users: MapsOnUs got good.
[Re: tfabris]
|
pooh-bah
Registered: 02/06/2000
Posts: 1996
Loc: Gothenburg, Sweden
|
Shot in the blue, not knowing exactly how/with what you edit the file, but might it be an introduction of a non-Unix style linefeed upsetting the script?
_________________________
/Michael
|
Top
|
|
|
|
#246684 - 02/11/2005 11:41
Re: GPSApp users: MapsOnUs got good.
[Re: mtempsch]
|
carpal tunnel
Registered: 19/01/2002
Posts: 3584
Loc: Columbus, OH
|
Heh...same thing I thought.
_________________________
~ John
|
Top
|
|
|
|
#246685 - 02/11/2005 11:53
Re: GPSApp users: MapsOnUs got good.
[Re: jaharkes]
|
carpal tunnel
Registered: 24/01/2002
Posts: 3937
Loc: Providence, RI
|
Quote: It could be that Google's coordinates are already in the WGS84 (gps) coordinate system. Typically map data in the US is in NAD27 coordinates.
This suggests yes, as did a quick check of my house.
|
Top
|
|
|
|
#246686 - 02/11/2005 14:28
Re: GPSApp users: MapsOnUs got good.
[Re: mtempsch]
|
carpal tunnel
Registered: 20/12/1999
Posts: 31597
Loc: Seattle, WA
|
Quote: might it be an introduction of a non-Unix style linefeed upsetting the script?
First thing I checked. Taking the existing, working script, editing and resaving with the CR/LF pairs (no textual edits), and running it, works.
Only editing that function in the ways suggested cause it to fail. Not the CR/LF issue.
|
Top
|
|
|
|
#246687 - 02/11/2005 14:29
Re: GPSApp users: MapsOnUs got good.
[Re: Daria]
|
carpal tunnel
Registered: 20/12/1999
Posts: 31597
Loc: Seattle, WA
|
Quote: This suggests yes, as did a quick check of my house.
Ah, good. Now if we could just get that python script to work without the data conversion, we'd be in good shape.
|
Top
|
|
|
|
#246688 - 02/11/2005 14:56
Re: GPSApp users: MapsOnUs got good.
[Re: tfabris]
|
carpal tunnel
Registered: 24/01/2002
Posts: 3937
Loc: Providence, RI
|
I suppose in a bit I will look.
|
Top
|
|
|
|
#246689 - 02/11/2005 14:57
Re: GPSApp users: MapsOnUs got good.
[Re: tfabris]
|
carpal tunnel
Registered: 18/01/2000
Posts: 5683
Loc: London, UK
|
Quote:
Quote: This suggests yes, as did a quick check of my house.
Ah, good. Now if we could just get that python script to work without the data conversion, we'd be in good shape.
Python is whitespace sensitive. The code snippet above doesn't have any leading whitespace. Did you make sure that the body of the function was indented under the name?
_________________________
-- roger
|
Top
|
|
|
|
#246691 - 02/11/2005 17:16
Re: GPSApp users: MapsOnUs got good.
[Re: Daria]
|
carpal tunnel
Registered: 20/12/1999
Posts: 31597
Loc: Seattle, WA
|
Okay, that works!
But it looks to be exactly like the modification you supplied above.
I tried to make the whitespace match exatly when I made the modifications, but perhaps I just got it wrong.
Now it's off to try a little drive and see if the coordinates match the real world better. THANK YOU!
|
Top
|
|
|
|
#246693 - 02/11/2005 17:42
Re: GPSApp users: MapsOnUs got good.
[Re: tfabris]
|
carpal tunnel
Registered: 20/12/1999
Posts: 31597
Loc: Seattle, WA
|
Okay, fantastic, the modified version of the script is correct. Without the NAD27 to WGS84 data conversion, the car's position on the map route is perfectly nailed. Fantastic! Now for the next problem. Every single turn is wrong. Every single turn tells me (for example) to go left when it's clearly right. Also, as I execute that turn, it doesn't advance me to the next waypoint. I'm pretty sure this is because the Google Maps data has some kind of a "hiccup" in the data points at each turn location. This happened before when we tried to use another mapping program. instead of a turn looking like this... Code:
| | | O-------
If you magnifiy it really small, in the data points it acutally looks like this: Code:
| | | O--|------- \ | \| |
Is there any way we can fix that in the script?
|
Top
|
|
|
|
#246694 - 02/11/2005 17:55
Re: GPSApp users: MapsOnUs got good.
[Re: tfabris]
|
carpal tunnel
Registered: 20/12/1999
Posts: 31597
Loc: Seattle, WA
|
No wait!!!!!
It's simpler than that.
That was the problem with the other mapping program. With this one it's not nearly as thorny an issue. The problem is that each turn contains two data points that are the exact same point. For example:
52 -4942 252 -4957 253 -5154 253 -5154 Take the Stewart St. exit 166 to Denny Way 246 -5177 234 -5307 233 -5328
That should be VERY EASY to fix in the script, right?
|
Top
|
|
|
|
#246695 - 02/11/2005 19:03
Re: GPSApp users: MapsOnUs got good.
[Re: tfabris]
|
carpal tunnel
Registered: 24/01/2002
Posts: 3937
Loc: Providence, RI
|
Quote: No wait!!!!!
It's simpler than that.
That was the problem with the other mapping program. With this one it's not nearly as thorny an issue. The problem is that each turn contains two data points that are the exact same point. For example:
52 -4942 252 -4957 253 -5154 253 -5154 Take the Stewart St. exit 166 to Denny Way 246 -5177 234 -5307 233 -5328
That should be VERY EASY to fix in the script, right?
For anyone but you, apparently
|
Top
|
|
|
|
#246696 - 02/11/2005 19:25
Re: GPSApp users: MapsOnUs got good.
[Re: Daria]
|
carpal tunnel
Registered: 20/12/1999
Posts: 31597
Loc: Seattle, WA
|
Hey, I don't know python. Not my fault! And I know my editor didn't have anything to do with it because I've successfully edited the old MapsOnUs python script to add more text phrases to strip out of the turn directions. I'm guessing it was a whitespace-sensitivity issue (despite my attempts to match the whitespace correctly). Anyway... Does anyone know where in the script one might handle that correction?
|
Top
|
|
|
|
|
|