-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
fix(nd): wind and speed display update rate for more frequent updates #9829
base: master
Are you sure you want to change the base?
fix(nd): wind and speed display update rate for more frequent updates #9829
Conversation
@@ -532,7 +532,7 @@ class SpeedIndicator extends DisplayComponent<{ bus: EventBus }> { | |||
|
|||
sub | |||
.on('groundSpeed') | |||
.atFrequency(2) | |||
.atFrequency(10) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a question to the maintainers, I had a gander around the codebase to see other values being used with atFrequency
- I went with 10, it does the job but also wanted to make sure this value is sensible
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just looked it up and it seems the wind speed and direction are indeed transmitted every 100ms, so 10Hz is correct. Ground speed and true heading is transmitted every 40ms, and true airspeed every 125ms.
Although this is done at the level of the transmitting unit (i.e. IR/ADR) in the real aircraft
Before changing this, we should really separate the high-frequency SVG parts from the lower frequency SVG parts, meaning the wind indicator (or the complete info section at the top) should get its own |
Sorry, clicked "Close with comment" instead of just "Comment" :) |
Can I get a bit more info on this? Just so I can get started if its a "small" task. |
@bulenteroglu Sure! In the end we should have separate SVG element for the Wind and SpeedIndicator, and leave the rest of the ND as is for now. Look at line 352, it's done similarly there. |
Would it actually redraw at that frequency? Because the values are rounded, I would expect a significantly slower redraw rate (unless the values are actually changing very quickly, which I'd say is rare) |
I wouldn't expect it to be much lower, as we can see in the videos above the wind direction changes quite a lot relative to the aircraft, even more so if it's gusty. It's still a change we need to do in our instruments, so better start doing it now :) |
If we are doing that it would be best practice to just do them in HTML for much better perf. SVGs should generally be static only for best perf in Coherent. |
Fixes #[issue_no]
Summary of Changes
Increased event subscription frequency from 2Hz to 10Hz for wind/speed updates
Video Demo
Demo of braking
https://youtu.be/HNmfSFqwQlA
Demo of taking off
https://youtu.be/2K3j6WIwcJw
References
A380 VIDEO
https://youtu.be/hDh_9MEz-hg?si=lJ4N-CDYFLmz8xo1&t=93
A320 VIDEOS
https://youtu.be/TEi-WX08ov8?si=xCeeyAiIY2FiGs_7&t=36
https://youtu.be/WF7XWAUmOKY?si=SozzSBCR8cKFhM7_&t=539
Look at the ND and watch the wind direction and speed values change
Additional context
Discord username (if different from GitHub): senolitam
Testing instructions
A32NX & A380X
During flight:
Observe wind direction and speed values on Navigation Display (ND)
Values should update more frequently compared to previous behaviour
During landing/braking:
Monitor ground speed values
Speed changes should be more responsive and less delayed during braking
How to download the PR for QA
Every new commit to this PR will cause new A32NX and A380X artifacts to be created, built, and uploaded.