Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TurnInstructions in TCX #323

Closed
wants to merge 1 commit into from
Closed

Conversation

marq24
Copy link
Contributor

@marq24 marq24 commented Feb 4, 2020

adding Elements to the TCX export so that suporting devices can provide instructions - with the limitation that only LEFT|RIGHT|STAIGHT is supported. Also no support for roundabout exits (will cause issues on left side traffic countries)

Just was made aware yesterday, that TCX also support some sort of simple TurnInstructions via the <CoursePoint> Element - so I have added some code to support this...

But there is no need for a instant/urgent release

adding <CoursePoint> Elements to the TCX export so that suporting devices can provide instructions - with the limitation that only LEFT|RIGHT|STAIGHT is supported. Also no support for roundabout exits (will cause issues on left side traffic countries)
@maxibor
Copy link

maxibor commented Jul 20, 2020

Any update on this PR? That would be a very addition :)

@maxibor
Copy link

maxibor commented Jul 21, 2020

@TheGreatRefrigerator
Copy link
Contributor

Ping @marq24 @TheGreatRefrigerator @TimMcCauley @Unraveler

@maxibor Please don't do that. 2 of them don't work on this anymore and the one that created this pull request is a voluntary external contributer.
I just came back from vacation yesterday and had hundreds of mails to go through.

If it is not progressing fast enough you could try to implement these changes into current development branch.

Otherwise i will do it when i have the time.

Best regards

@TheGreatRefrigerator TheGreatRefrigerator self-assigned this Jul 21, 2020
@maxibor
Copy link

maxibor commented Jul 21, 2020

Ooops, sorry @TheGreatRefrigerator .
I'm definitely not an AngularJS dev, but ORS is such a nice routing tool that I got a bit too excited ;)

@TheGreatRefrigerator
Copy link
Contributor

These cases are fine ;)
See multi-case single operation:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/switch

TheGreatRefrigerator added a commit that referenced this pull request Jul 22, 2020
adding <CoursePoint> Elements to the TCX export,
so that suporting devices can provide instructions,
with the limitation that only LEFT|RIGHT|STAIGHT is supported.
Also no support for roundabout exits
(will cause issues on left side traffic countries)

refers to #323

Co-authored-by: Amandus Butzer <amandusbutzer@gmx.de>
@TheGreatRefrigerator
Copy link
Contributor

Will be out with next release

@TheGreatRefrigerator
Copy link
Contributor

Please validate if this works for you in the new release

@maxibor
Copy link

maxibor commented Jul 23, 2020

Hi @TheGreatRefrigerator
Did a quick test tonight, it seems to be working.
Will do a better test this weekend. GIS code testing is quite cool: it involves going a bicycle ride 😆
Awesome update ! Thanks again @TheGreatRefrigerator and @marq24 !

@maxibor
Copy link

maxibor commented Aug 28, 2020

After some more testing this summer, I found three things that could be improved:

  • The start point of the route should be changed to:
<CoursePoint>
        <Name>Start of r</Name>
        <Time>2020-08-28T14:33:40Z</Time>
        <Position>
          <LatitudeDegrees>50.93494</LatitudeDegrees>
          <LongitudeDegrees>11.58884</LongitudeDegrees>
        </Position>
        <PointType>Generic</PointType>
        <Notes>Start of route</Notes>
      </CoursePoint>

instead of the current

<CoursePoint>
				<Name>
					Head south
				</Name>
				<Time>
					2010-01-01T11:02:08.387Z
				</Time>
				<Position>
					<LatitudeDegrees>
						50.933105
					</LatitudeDegrees>
					<LongitudeDegrees>
						11.587556
					</LongitudeDegrees>
				</Position>
				<PointType>
					Generic
				</PointType>
                                <Notes>
					Head south on Am Planetarium
				</Notes>
			</CoursePoint>
  • Same for End of route
<CoursePoint>
        <Name>End of rou</Name>
        <Time>2020-08-28T14:45:30Z</Time>
        <Position>
          <LatitudeDegrees>50.93035</LatitudeDegrees>
          <LongitudeDegrees>11.58325</LongitudeDegrees>
        </Position>
        <PointType>Generic</PointType>
        <Notes>End of route</Notes>
      </CoursePoint>

instead of

<CoursePoint>
				<Name>
					Arrive at
				</Name>
				<Time>
					2010-01-01T11:09:26.488Z
				</Time>
				<Position>
					<LatitudeDegrees>
						50.927661
					</LatitudeDegrees>
					<LongitudeDegrees>
						11.578167
					</LongitudeDegrees>
				</Position>
				<Notes>
					Arrive at Lutherstraße, straight ahead
				</Notes>
			</CoursePoint>
  • The <Name> attribute should be changed to the actual name of the street/landmark (when not null) (from landmark.feature here?) instead of the full instruction.

so this

<CoursePoint>
				<Name>
					Lutherstra
				</Name>
				<Time>
					2010-01-01T11:09:26.488Z
				</Time>
				<Position>
					<LatitudeDegrees>
						50.926729
					</LatitudeDegrees>
					<LongitudeDegrees>
						11.580889
					</LongitudeDegrees>
				</Position>
				<PointType>
					Left
				</PointType>
				<Notes>
					Turn left onto Lutherstraße
				</Notes>
			</CoursePoint>

instead of this

<CoursePoint>
				<Name>
					Turn left
				</Name>
				<Time>
					2010-01-01T11:09:26.488Z
				</Time>
				<Position>
					<LatitudeDegrees>
						50.926729
					</LatitudeDegrees>
					<LongitudeDegrees>
						11.580889
					</LongitudeDegrees>
				</Position>
				<PointType>
					Left
				</PointType>
				<Notes>
					Turn left onto Lutherstraße
				</Notes>
			</CoursePoint>

The reason: it seems that GPS devices have adapted the way Garmin/RideWithGPS have implemented the turn by turn instructions/Coursepoints, and do not display the start, end, and street name correctly (though the turn instructions are working).

Otherwise great work, I rode 700+ km guided by the ORS tcx, and the turn by turn navigation was 🥇

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants