Skip to content

Add start point of route to the created track - #643

Open
jrheinlaender wants to merge 1 commit into
rgleason:masterfrom
jrheinlaender:master-jrh-track1pt
Open

Add start point of route to the created track#643
jrheinlaender wants to merge 1 commit into
rgleason:masterfrom
jrheinlaender:master-jrh-track1pt

Conversation

@jrheinlaender

Copy link
Copy Markdown

The start point of the calculated weather route was not included in the created track.

@quinton-hoole

quinton-hoole commented May 4, 2026

Copy link
Copy Markdown

Thanks @jrheinlaender !

Rather than cut 'n paste all that duplicate code, could we not rather wrap it all up in a method, and call that method for the start point, as well as all other points? I think that would be tidier and avoid future bugs (where for example the piece of duplicated code is updated with in one , but not another.

@jrheinlaender
jrheinlaender force-pushed the master-jrh-track1pt branch from 6be30f2 to 6ac0f21 Compare May 4, 2026 19:10
@quinton-hoole

Copy link
Copy Markdown

Thanks @jrheinlaender ! That looks much better.

You'll probably want to replace this:

add_waypoint_to_track(
      newPath, routemapoverlay.GetConfiguration().StartLat,
      heading_resolve(routemapoverlay.GetConfiguration().StartLon),
      routemapoverlay.GetConfiguration().StartTime);

With something like this, to avoid all the duplicate method calls, and make the code more readable.

auto cfg = routemapoverlay.GetConfiguration();
add_waypoint_to_track(
      newPath, cfg.StartLat, heading_resolve(cfg.StartLon), cfg.StartTime);

@jrheinlaender
jrheinlaender force-pushed the master-jrh-track1pt branch from 6ac0f21 to 5c7ccd1 Compare May 5, 2026 03:04
@quinton-hoole

Copy link
Copy Markdown

Thanks for that. Code looks great now. And thanks for putting up with my nit picking 😁

@quinton-hoole

Copy link
Copy Markdown

@rgleason will have to merge this. My permissions were revoked, for some reason.

@jrheinlaender

Copy link
Copy Markdown
Author

Thanks for that. Code looks great now. And thanks for putting up with my nit picking 😁

That's fine. Productive criticism is always welcome.

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.

2 participants