Board index FlightGear Development Canvas

Canvas NavDisplay wind info  Topic is solved

Canvas is FlightGear's new fully scriptable 2D drawing system that will allow you to easily create new instruments, HUDs and even GUI dialogs and custom GUI widgets, without having to write C++ code and without having to rebuild FlightGear.

Canvas NavDisplay wind info

Postby tikibar » Fri Oct 24, 2014 4:24 pm

I'm looking into adding the Canvas Boeing ND to the 747-8 and maybe the 757-200. Before I get started with it, I want to ask about the wind information that used to appear in the upper left corner. In 2.12 (as seen on the wiki page), wind speed and direction were shown and the direction was graphically depicted with a small white arrow. In 3.0, the numbers show, but the arrow is gone. In 3.2+, the numbers are gone too. Is there a setting that needs to be made to show the wind info, or is that a needed fix deeper in the nasal scripts?

Cheers,
John
Boeing 747-8 (rename folder to 747-8i)
Boeing 757-200/300 (rename folder to 757-200)
Boeing 767-300/ER (rename folder to 767-300)
McDonnell Douglas MD-11 (rename folder to MD-11)
User avatar
tikibar
 
Posts: 515
Joined: Mon Mar 05, 2012 6:05 am
Location: Los Angeles
Callsign: CHT0009
OS: Ubuntu 14.04

Re: Canvas NavDisplay wind info

Postby Hooray » Fri Oct 24, 2014 4:27 pm

IIRC, there were some discussions here about adjusting the heuristics to match the real thing, you can probably look at the code to see how it's supposed to work: https://gitorious.org/fg/fgdata/source/ ... tyles#L820 (also see 846+)

You'll see that there are some conditions in place that hide/show the wind/windArrow symbols depending on some getprop/calculations.
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 11437
Joined: Tue Mar 25, 2008 8:40 am

Re: Canvas NavDisplay wind info  

Postby Gijs » Fri Oct 24, 2014 4:51 pm

Normal wind measuring devices (like a windvane, anonemeter etc.) don't work when they're on a (fast) moving platform. The real thing computes the wind direction and speed based on the difference between heading and track of the aircraft. When you are standing still, or moving slowly (taxiing, initial takeoff roll), the difference between the two is always zero, even tough the wind direction and heading are not necessarily zero! That's why the wind data is not shown at low aircraft speeds.

When the calculated wind speed itself is very low, it's of little importance and hence not shown either. The real instruments starts showing above 6kts and hides the info when the speed drops below 4kts. In order to simplify the simulation, we're using a single value (4kt).
Airports: EHAM, EHLE, KSFO
Aircraft: 747-400
User avatar
Gijs
Moderator
 
Posts: 9386
Joined: Tue Jul 03, 2007 2:55 pm
Location: Amsterdam/Delft, the Netherlands
Callsign: PH-GYS
Version: Git
OS: Windows 10

Re: Canvas NavDisplay wind info

Postby tikibar » Fri Oct 24, 2014 4:56 pm

I think I understand. It looks like it only shows when the aircraft speed > 100 and the wind speed > 4. I only checked it by sitting parked on the ramp. So the wind should appear once I'm up and moving.

I noticed another thing while looking at the code. The advanced weather system doesn't bound its wind direction output to 1-360 degrees. I've corrected this on the old style nav displays I have working in the 747-8 and 757 using a while loop to add or subtract 360 until it falls in the bounds. The canvas code does this with an if statement, but sometimes +/- 360 isn't enough to get it back in the 1-360 range. This can be fixed by changing lines 829 and 830 to:
Code: Select all
while(windDir < 0.5) windDir += 360;
while(windDir > 360.5) windDir -= 360;


Thanks for you quick replies, Hooray and Gijs.
Boeing 747-8 (rename folder to 747-8i)
Boeing 757-200/300 (rename folder to 757-200)
Boeing 767-300/ER (rename folder to 767-300)
McDonnell Douglas MD-11 (rename folder to MD-11)
User avatar
tikibar
 
Posts: 515
Joined: Mon Mar 05, 2012 6:05 am
Location: Los Angeles
Callsign: CHT0009
OS: Ubuntu 14.04

Re: Canvas NavDisplay wind info

Postby Hooray » Fri Oct 24, 2014 6:12 pm

none of this should be difficult to fix/adjust or customize - as long as people understand Nasal hashes, new features can be easily added - so whatever your plans were for the 757/747-800, the ND code should be functional - and easy to extend according to your requirements. For now, it should suffice to extend the Boeing style - but eventually, you may also add features specific to certain Boeing models. But none of this should require any major changes to the corresponding Nasal files, which are really just simple "containers" for hashes with entries and SVG animation logic implemented using timers and listeners. The code isn't very elegant, or even optimized, currently - but it is pretty accessible, even without having to be an expert in object-oriented programming.
It is generally still a good idea to communicate any planned changes upfront, so that Gijs, Hyde and other maintainers are aware of related work.
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 11437
Joined: Tue Mar 25, 2008 8:40 am

Re: Canvas NavDisplay wind info

Postby tigert » Mon Nov 10, 2014 4:44 pm

Yeah. Our G1000 in the DA40 shows two arrows: headwind and crosswind component of the wind, which is useful too. Newer software versions of the G1000 have a pointing arrow option too.

There's indeed point in not showing the wind info when the aircraft is not moving - as far as I know, it is calculated by comparing airspeed and heading with groundspeed and ground track - and those calculations make little sense unless you are airborne.

Does the 744 actually show wind vector when you are in takeoff/landing roll by the way? Would it even work? Or is it only shown when your wheels are off the ground (the aircraft should have a "weight on wheels" switch for that)

//T
tigert
 
Posts: 106
Joined: Sat Nov 08, 2014 9:57 am

Re: Canvas NavDisplay wind info

Postby Gijs » Mon Nov 10, 2014 4:55 pm

It is shown on the ground (as long as the speed requirements are met). See this video for the proof: https://www.youtube.com/watch?feature=p ... 81uk#t=158
Of course it will not be very accurate during the ground run, so better not solely rely on the arrow. In FlightGear we're cheating though, as we're simply displaying the actual wind data ;-)
Airports: EHAM, EHLE, KSFO
Aircraft: 747-400
User avatar
Gijs
Moderator
 
Posts: 9386
Joined: Tue Jul 03, 2007 2:55 pm
Location: Amsterdam/Delft, the Netherlands
Callsign: PH-GYS
Version: Git
OS: Windows 10

Re: Canvas NavDisplay wind info

Postby tigert » Tue Nov 11, 2014 7:01 pm

How would it actually work, assuming it does not just show bogus data? The wind shouldnt cause significant drift compared to the groundspeed and track when the wheels are on the ground - and any wind measuring that would work on ground would not make sense in air.. Hmm. Curious! :)

//T
tigert
 
Posts: 106
Joined: Sat Nov 08, 2014 9:57 am


Return to Canvas

Who is online

Users browsing this forum: No registered users and 1 guest