-
Notifications
You must be signed in to change notification settings - Fork 272
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
wrong arrival altitude in Map Labels #1424
Comments
Polar, saftey mc, and stf factor are the same? |
Probably all the same by judging the wp altd. |
Polar, saftey mc, and stf factor are the same. |
What does that mean? |
The fix might be trivial, but I simply can't find the part in the code, which calculates the arrival altitude in the map labels. |
So the labels show you the altitude you have above glide ratio at mc 0. But as soon as you add the wind component, it increases where its supposed to decrease. The reachability is calculated here: ( XCSoar/src/Renderer/WaypointRenderer.cpp Line 107 in b1244d8
|
I don't want to give up hunting the bug, but I don't want to predict by when I'll be done. The code is too convoluted for my limited tool set and my abilities. Sorry! |
Dont worry, im angry at this bug. |
Just want to thank you guys for taking this issue seriously. I don’t have the right technical skills to fix this, but my hunch is that somewhere in the label arrival altitude calculation a + got replace with a - in the wind factor calculation. Ramy (who initially reported this issue) |
So the commit that introduces the bug is: e020359 XCSoar/src/Engine/Route/RouteLink.hpp Lines 72 to 73 in e020359
While one could flip those first/second arguments... GetDelta is much older, and was introduced in 2015: ca1ab2c So I think its best to revert e020359 and not change GetDelta(). |
This reverts commit e020359. The GetDelta() function calculates delta between second - first arguments. The old implementation for CalcSpeedups calculated the difference however with first - second argument. This led to bug report XCSoar#1424 that noticed that the reachable labels on the map increased altitude with increasing headwind, instead of the opposite. Fixes XCSoar#1424
This reverts commit e020359. The GetDelta() function calculates delta between second - first arguments. The old implementation for CalcSpeedups calculated the difference however with first - second argument. This led to bug report #1424 that noticed that the reachable labels on the map increased altitude with increasing headwind, instead of the opposite. Fixes #1424
XCSoar versions having the problem
The issue was introduced in 7.34
XCSoar versions not having the problem
Up to 7.33 it worked OK.
System information
Not platform dependent.
Steps to reproduce the behavior
Start XCSoar in Sim mode.
Increase the altitude by clicking on an altitude InfoBox until you see a Waypoint in reach.
Then change Wind manually and observe how the content of "WP AltD" InfoBox changes compared to the altitude shown on the Map Label.
Expected behavior
Up to 7.33 "WP AltD" InfoBox and Map Labels are in sync.
Actual behavior
Do you have any idea what may have caused this?
It seems as if since 7.33 there is a sign error in calculating the arrival altitude in the map label.
Do you have an idea how to solve the issue?
The text was updated successfully, but these errors were encountered: