Author |
Topic |
eric.carden
Aquilotto
USA
220 Posts |
Posted - 12/04/2012 : 21:55:29
|
quote: Originally posted by Coolwind
If we are talking about displaying the blue arrow, 5 degrees are far enough accurate. It is supposed to give only an hint , visually. I am not keen on overloading calculations for an approximated direction used only as a visual reference on a small screen.
I'm slowly chugging away on this as I have spare time, and it's close to being able to share. I've noticed, though, that with a +/-5 degree precision, the blue arrow is distractingly "jumpy" at times. The slightest change in the ideal/true direction can cause a swing of double the precision, or 10 degrees, which is very visible and a bit unnerving.
A precision of +/-1 degree doesn't have this jumpiness and only takes a little more calculation. While making this fix, I've eliminated some unnecessary/useless calculations of this direction, so in the end, even though the new calculation takes longer, it's done so much less often that the code may overall be FASTER. So I plan to submit the change with +/-1 degree precision, a thing that's easily changed in the future if we decide it's needed.
Eric |
|
|
Coolwind
Moderator
Italy
8957 Posts |
Posted - 13/04/2012 : 11:42:24
|
Which useless calculations have you taken off? Please make this change perfectly reversable in option or I cannot merge it in 3.1.. |
|
|
eric.carden
Aquilotto
USA
220 Posts |
Posted - 13/04/2012 : 16:43:28
|
I'm making it perfectly reversible. I'll add some commit comments, too, so that you don't have to remember what you're about to read.
There's a "for" loop that steps through the glider's speed range, starting at minimum sink speed and ending at the ideal speed-to-fly (STF). In each iteration, BestCruiseTrack (BCT, the direction pointed to by the blue arrow) was calculated. BCT wasn't read/used within this loop, though, so my change puts the BCT calculation outside/after the loop, thus calculating BCT only once - after the ideal STF is found. For a case where the ideal STF is 20 kts above minimum sink speed, this means that BCT will now only be calculated 10% as often as in the current code.
Also, I found that the BCT-calculating MacCreadyAltitude (MCA) function is rarely called in such a way that BCT is updated - only for the current task waypoint (or for the current ground track when not flying a task or goto). The vast majority of MCA calls don't request a BCT update, yet BCT was calculated (and cached). So since I expect the new BCT calculation method to be slower than the old one, I just removed BCT from the cache and only calculate BCT when the MCA call requests that BCT be updated.
Eric |
|
|
Coolwind
Moderator
Italy
8957 Posts |
Posted - 22/04/2012 : 00:55:57
|
Now the point is that your fix is deep inside the calculation engine. I need to find time to examine and understand it, otherwise I cannot merge it.
|
|
|
eric.carden
Aquilotto
USA
220 Posts |
Posted - 13/05/2012 : 02:58:08
|
Here are two photos demonstrating the difference made by this fix. (The first photo is v3.0b; the second, my fixed version). The scenario is a hang glider (my personal polar) about 7 mi. from goal lacking a little less than 500' altitude with a 14 kt direct crosswind and MC = 3 kts. The v3.0b blue arrow steers you 40 degrees more (4X as large an angle) off a straight line to goal than(as) it should.
|
Edited by - eric.carden on 13/05/2012 03:04:08 |
|
|
Coolwind
Moderator
Italy
8957 Posts |
Posted - 13/05/2012 : 11:40:26
|
I see two different situations there, with your aircraft heading to two different directions. So we cannot compare anything.
If you want to show us how the calculation is changing the result, position the aircraft on a waypoint, create the wind, the speed, and make the picture of it of both versions. So we can compare apples with apples..
|
|
|
eric.carden
Aquilotto
USA
220 Posts |
Posted - 13/05/2012 : 15:31:08
|
Heading has no effect on the blue arrow, so this is an "apples to apples" comparison. Just before taking each photo, I rotated to a heading exactly on the blue arrow just so that LK would do the angle measuring for me. :-)
Eric |
|
|
Coolwind
Moderator
Italy
8957 Posts |
Posted - 13/05/2012 : 18:32:08
|
I strongly doubt that the second picture is showing a correct calculation for a paraglider. 7 miles away, at that speed, only 13 degrees correction in the wind? You will be brought downwind faster than you can recalculate anything!
|
|
|
bo.
Pterodattilo
843 Posts |
Posted - 13/05/2012 : 23:48:19
|
Im curious about how these calculations are working, so I'll give it a try:
In this setting the hang glider only needs to climb about 500 ft, or 150 m to reach the destination. If the 3 knot (1,5m/s) thermal is found, then the required altitude is reached in 100 seconds. During those 100 seconds, the glider will drift 700 meters downwind (14 knot = approx 7 m/s). If i get the trigonometry right, drifting downwind 700 m perpendicularly to the TP direction which is about 11,3km away should result in roughly 4 degrees shift.. Hmm, thats not much. I probably messed up somewhere, probably by not considering the headwind which is slowing down the glider while making up for the lost ground. But 13 degrees sounds much better than 53 degrees under these circumstances!
(pardon the conversion to metric units..) |
|
|
eric.carden
Aquilotto
USA
220 Posts |
Posted - 14/05/2012 : 00:24:05
|
quote: Originally posted by Coolwind
I strongly doubt that the second picture is showing a correct calculation for a paraglider. 7 miles away, at that speed, only 13 degrees correction in the wind? You will be brought downwind faster than you can recalculate anything!
The purpose of the blue arrow is to point out the ideal TRACK, not the ideal HEADING. The ideal HEADING would indeed be much more than 13 degrees off a straight path to goal in this scenario. |
|
|
eric.carden
Aquilotto
USA
220 Posts |
Posted - 14/05/2012 : 00:32:52
|
quote: Originally posted by bo.
Im curious about how these calculations are working, so I'll give it a try....
You pretty much nailed it, Bo! :-) The only thing you're missing isn't entirely intuitive. The task arrival altitude (~-150m in this case) is how high you'd be relative to your safety arrival altitude if you went on an ideal-speed glide (for the given MC setting) straight towards goal without finding any lift (or sink) on the way there. If you intend to gain this lacking altitude on the way to goal, though, you'll suffer a less-than-direct route (because of the wind and thermal drift) and will end up actually having to gain more than just 150m to make goal. The slower and lower-performance the glider, the weaker the thermals, and the stronger the crosswind; the more extra altitude you'll need to make goal. |
|
|
Coolwind
Moderator
Italy
8957 Posts |
Posted - 14/05/2012 : 07:17:56
|
Maybe that is working in flatlands with wind. In the mountains with winds you dont fly following a blue indicator, and you are not drifted kms downwind a mountain. Never happened to me, since it seems that the thermals are "sticky" to the mountain tops, and bended only. |
|
|
bo.
Pterodattilo
843 Posts |
Posted - 14/05/2012 : 12:25:04
|
quote: Originally posted by eric.carden
[quote] You pretty much nailed it, Bo! :-) The only thing you're missing isn't entirely intuitive. The task arrival altitude (~-150m in this case) is how high you'd be relative to your safety arrival altitude if you went on an ideal-speed glide (for the given MC setting) straight towards goal without finding any lift (or sink) on the way there. ...
Ok, good! We seem to have the same understanding of this feature. I did think about safety altitude, but rejected that, since I did no see the Safety alt. indicator below the arrival altitude (or was this added after 3.0b?). Are you sure that safety altitude applies here? It should only apply to Landables/Airports, unless of course you choose to also have safety altitude for all TPs. |
|
|
AlphaLima
Moderator
Germany
1978 Posts |
Posted - 14/05/2012 : 13:42:23
|
quote: Originally posted by Coolwind
Maybe that is working in flatlands with wind. In the mountains with winds you dont fly following a blue indicator, and you are not drifted kms downwind a mountain. Never happened to me, since it seems that the thermals are "sticky" to the mountain tops, and bended only.
Yes it is useful in the flatland's. On Saturday I had a final glide of 40km with 35km crosswind. The blue arrow showed the best heading with respect to wind and it was good to see how the impact was. However it does not make sense to make it verry accurate +/-5° or +/- 10% is far enugh, also for GA this could be interesting. I'm not sure if the impact of speed makes a big difference than. BTW I see no reason why the blue arrow only exist in TASK should be available for every of the(multi) target's. AL |
Edited by - AlphaLima on 14/05/2012 13:55:53 |
|
|
parapenT1sta
Pterodattilo
Portugal
1864 Posts |
Posted - 16/05/2012 : 05:47:09
|
Eric,
I think you should post images with the same time, position... but using different versions of LK8000. On those pictures we have almost 8 minutes difference...
|
|
|
Topic |
|