Unoffical empeg BBS

Quick Links: Empeg FAQ | RioCar.Org | Hijack | BigDisk Builder | jEmplode | emphatic
Repairs: Repairs

Topic Options
#152111 - 01/04/2003 00:31 GPSapp and Left and Right...
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31597
Loc: Seattle, WA
I think I understand what GPSapp is trying to do, but it seems to do the wrong thing often enough that I'm wondering why.

Here's an example of a path I took today. The map data is slightly off-plumb for one of the roads, but otherwise accurate:



The road name has been fictionalized to protect the innocent.

Anyway, the thing is, as I approached the road, it gave me exactly the wrong turn information. The screen looked like this (simulated):



Note that the white "snap" line correctly shows the roads, the turn, the waypoint, everything. The only variable was that my car wasn't exactly on the map data's road line (gray). And it wasn't off far, either, this was zoomed in pretty far. The innacuracy between map data and actual position was probably less than 50-100 feet.

So... my question is... in which universe is that considered a LEFT turn?

I mean, I would understand it telling me to turn left if I'd gone past Foo Rd and turned around and headed back towards it from the other side. But I don't see how, even if GPSapp was assuming an off-course-and-need-to-re-acquire situation, it could call that a left turn.

I suspect there's something fishy about the algorithm it uses to determine left and right turns, and I think it's more than just the fact that it's trying to be helpful when you're off course.


Attachments
150215-foo.gif (100 downloads)

_________________________
Tony Fabris

Top
#152112 - 01/04/2003 00:32 Re: GPSapp and Left and Right... [Re: tfabris]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31597
Loc: Seattle, WA
(Placeholder post for second picture)


Attachments
150216-foo2.gif (100 downloads)

_________________________
Tony Fabris

Top
#152113 - 01/04/2003 02:12 Re: GPSapp and Left and Right... [Re: tfabris]
StigOE
addict

Registered: 27/10/2002
Posts: 568
So... my question is... in which universe is that considered a LEFT turn?

Uhmm...in an opposite universe...?

Stig

Top
#152114 - 01/04/2003 05:19 Re: GPSapp and Left and Right... [Re: tfabris]
fossi
journeyman

Registered: 12/01/2003
Posts: 64
Loc: Germany
I can see rather the same problem.

My map data seems to be more exactly, I have almost no delta between actual and calculated route.

But I get the same wrong turn informations. In previous gpsapp-versions I got it right but with 0.17 the following problem occurs:

- most of the "continue" situations are presented as "turn right" or "turn left"; they were previously presented correctly or at maximum as "bear left/right"

- sometimes "turn left" is presented as "turn right" or vice versa

Beside that 0.17 is great !

Juergen

Top
#152115 - 01/04/2003 11:05 Re: GPSapp and Left and Right... [Re: fossi]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31597
Loc: Seattle, WA
For the record, this isn't something that just started happening in 0.17, it's been happening in previous versions for me as well.
_________________________
Tony Fabris

Top
#152116 - 01/04/2003 12:18 Re: GPSapp and Left and Right... [Re: tfabris]
jaharkes
enthusiast

Registered: 20/08/2002
Posts: 340
Loc: Pittsburgh, PA
Hmm, as you are not 'at' the turn yet (i.e. the white line is going to the closest point in the route) we're simply using the difference between the incoming and outgoing edges of the turn. If the white line were to point at the turn, it would use the difference between the currently reported GPS heading and the outgoing edge.

The only way I can explain this is if the actual route data is going past the turn and then approaches it from the other side.



Attachments
150343-test.png (104 downloads)

_________________________
40GB - serial #40104051 gpsapp

Top
#152117 - 01/04/2003 12:23 Re: GPSapp and Left and Right... [Re: jaharkes]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31597
Loc: Seattle, WA
The only way I can explain this is if the actual route data is going past the turn and then approaches it from the other side.
Hmmm, good point. Perhaps the map data has some extra fiddly bits, very small (i.e., not visible at regular zoom levels), right at the turn intersection. Maybe the problem is still the map data itself. I will investigate this.

This was done with old map data from MapsOnUs, which we all know isn't necessarily the best. Perhaps the new data using FromSA will be better and not have this problem. I will try it.
_________________________
Tony Fabris

Top
#152118 - 02/04/2003 12:33 Re: GPSapp and Left and Right... [Re: jaharkes]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31597
Loc: Seattle, WA
The only way I can explain this is if the actual route data is going past the turn and then approaches it from the other side.


Okay, three times (in two places yesterday and once this morning), I confirmed that this is NOT the case. GPSapp is definitely telling me to turn left when the map data and the images on the screen clearly show a right turn is necessary. There is definitely something fishy going on with it.

Reason I'm so sure: I re-did my daily commute routes using Siberia's method for creating route data from StreetAtlas. In the past, I had used the MapsOnUs data, with which I had no way of verifying the details of the line segments. With Siberia's method, I'm the one drawing the line segments, so I'm 100 percent certain I did not do a "zig-zag" at those intersections. The intersection was clearly just two plain line segments with a precise corner between them. Exactly as I drew them in the first picture at the top of this thread.

The three recent occasions I observed GPSapp telling me to turn left when it should have said right, each time it was almost identical to the illustration I gave above: A very clear, clean, straight turn with no ambuguity. However, this time, with the new StreetAtlas data, my "real world" position matched the map data almost perfectly, enough so that GPSapp shouldn't have been trying to be helpful about re-acquring an off-track situation. Also, it was correctly showing its white line "snapped" to the road line, as I showed in my simulated screen shot above.

I'm wondering... Perhaps it's an indexing thing? Maybe a pointer is off-by-one somewhere, and it's telling me the left/right direction for some turn in the past, or some turn in the future, instead of the one that's highlighted and coming up?

When I observed this happening, the street name is correct for the turn that's coming up, but perhaps it's the calculation for left/right that's gotten desynchronized? In the situations I observed, I could see how it might say that if there were a pointer problem.

For example. Let's say my next turn is Right on Foo road, and the turn after that would be a Left on Bar road. The screen says "Turn LEFT on Foo road", as if it was giving me the correct street name for Foo road, but giving me the incorrect turn instruction from Bar road.

This might also explain the reason I sometimes see a "Turn SHARPLY LEFT" instruction when I'm really just going more or less straight through an intersection. Or seeing a "Bear RIGHT" when it's actually a very sharp right.

That's just a stab in the dark... but hey, I'm trying to be helpful.
_________________________
Tony Fabris

Top
#152119 - 02/04/2003 15:44 Re: GPSapp and Left and Right... [Re: jaharkes]
siberia37
old hand

Registered: 09/01/2002
Posts: 702
Loc: Tacoma,WA
Just a question about the direction problem.. GPSapp seems to be "smart" about which way your supposed to turn depending on where you are. I noticed this because I had a route loaded but I took a different way to get there, where to turn onto the waypoint road I would turn left instead of right (i.e. I overshot the waypoint). It seemed to pick this up and told me to turn left instead of right. Now my question is how does it know this? Does it get your bearing from some GPS data? If so, is it possible that at the time it writes the "Turn XX" the GPS may have calculated the wrong bearing? Is this really our GPS units causing this, does the data from the GPS need to be smoothed to find the bearing? Just curious how this direction stuff works..

Top
#152120 - 02/04/2003 16:00 Re: GPSapp and Left and Right... [Re: siberia37]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31597
Loc: Seattle, WA
I overshot the waypoint). It seemed to pick this up and told me to turn left instead of right.
That's his intent, yes.

My problem is that it sometimes tells me the wrong turning direction, even when I'm still on course and I haven't overshot a waypoint.

Now my question is how does it know this? Does it get your bearing from some GPS data?
Yes. It uses the same information as it does to display your directional arrow on the GPSapp screen. It can see you are traveling "north" for example, because it sees your position from moment to moment.

It can't REALLY tell which direction your car is facing. But it can make a pretty darn good guess, based on the last few location samples.
_________________________
Tony Fabris

Top
#152121 - 02/04/2003 16:24 Re: GPSapp and Left and Right... [Re: tfabris]
jaharkes
enthusiast

Registered: 20/08/2002
Posts: 340
Loc: Pittsburgh, PA
I can't see how it could get it wrong, the code that deals with this is at the end of route.c and I can't see what could be wrong. Is this the same route that has 10 miles left at the endpoint? Are the 'angles' of the incoming and outgoing edge pretty much the way you drew them? i.e. about 280-290 degrees incoming and 5-15 degrees outgoing?

10 - 285 = -275. As -275 is less than -180 we add 360 = 85m which is clearly a right turn. Now precalculated bearings are between -180 and 180, then it would be calculated as 10 - -75 = 85. Same difference. So this should be right and maybe the only way left is if the indexing is off, but that is hard to believe in itself (as it would then always be wrong).
_________________________
40GB - serial #40104051 gpsapp

Top
#152122 - 02/04/2003 16:36 Re: GPSapp and Left and Right... [Re: jaharkes]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31597
Loc: Seattle, WA
Is this the same route that has 10 miles left at the endpoint?
I don't think so. It was two new routes I created using the new version of FromSA from Siberia. If you'd like, I can email them to you. PM me and we'll work it out.

Are the 'angles' of the incoming and outgoing edge pretty much the way you drew them?
In one instance, yes. In two other instances, the angles were even less (about 90 degrees for one, and less than 90 degrees for the other). In two cases, they were right turns that got announced as left turns, and in one case, it was a 90 degree left turn that got announced as a right turn.
_________________________
Tony Fabris

Top
#152123 - 02/04/2003 18:45 Re: GPSapp and Left and Right... [Re: tfabris]
foxtrot_xray
addict

Registered: 03/03/2002
Posts: 687
Loc: Atlanta, Georgia

This might also explain the reason I sometimes see a "Turn SHARPLY LEFT" instruction when I'm really just going more or less straight through an intersection. Or seeing a "Bear RIGHT" when it's actually a very sharp right.

Maybe you're just a REALLY bad driver, and you just haven't realized it yet?

Me, who has a reputation at the local Class 3 railroad near home as being "they guy with the Mini that tryes to run into our engines."
_________________________
Mike 'Fox' Morrey 128BPM@124MPH. Love it! 2002 BRG Mini Cooper

Top