Board index FlightGear Development Canvas

A320neo Canvas ND

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.

A320neo Canvas ND

Postby muekoe » Mon Feb 10, 2014 9:54 am

Hi all,

I downloaded FG 3.0 rc3 some days ago and yesterday, I started to implement the new canvas ND. After some little problems, it works well. At least the basic implementation. As you can see at the screenshot, the ND is shown and it is possible to show/not to show airports, fixes and VOR stations via the buttons.

Image

But now I'm stuck on the range selector. In my a320neo.flightdeck.xml (where all buttons and knobs are defined) I have this:

Code: Select all
<animation>
        <type>pick</type>
        <object-name>nd-range</object-name>
        <action>
            <button>0</button>
            <repeatable>true</repeatable>
         <binding>
            <command>property-cycle</command>
            <property>/instrumentation/nd/range</property>
            <value>10</value>
            <value>20</value>
            <value>40</value>
            <value>80</value>
            <value>160</value>
            <value>320</value>
         </binding>
            <binding>
                <command>nasal</command>
                <script>a320neo.efis.ctl_func("range",1);</script>
            </binding>
        </action>
    </animation>


Code: Select all
<animation>
      <type>rotate</type>
      <object-name>nd-range</object-name>
      <property>instrumentation/nd/range</property>
      <interpolation>
         <entry><ind>10</ind><dep>0</dep></entry>
         <entry><ind>20</ind><dep>45</dep></entry>
         <entry><ind>40</ind><dep>90</dep></entry>
         <entry><ind>80</ind><dep>135</dep></entry>
         <entry><ind>160</ind><dep>180</dep></entry>
         <entry><ind>320</ind><dep>225</dep></entry>
      </interpolation>
      <axis>
         <x1-m>-0.4668</x1-m>
         <y1-m>-0.1718</y1-m>
         <z1-m>0.1452</z1-m>
         <x2-m>-0.4808</x2-m>
         <y2-m>-0.1718</y2-m>
         <z2-m>0.1419</z2-m>
      </axis>
   </animation>


The knob animation works, the property value instrumentation/nd/range changes as expected. But no change on ND. I guess it is up to this lines:

Code: Select all
<binding>
  <command>nasal</command>
  <script>a320neo.efis.ctl_func("range",1);</script>
</binding>


I have no idea, where this function belongs to and what I have to change to get it work. Any ideas?

At the moment, I try to understand all the dependancies. But I have to read a lot. I started to make updates for this aircraft some months ago and I'm far away from being an experienced aircraft developer. :wink:

Greetings!
muekoe
 
Posts: 58
Joined: Fri Apr 12, 2013 5:54 am
Location: Germany
Callsign: D-MUEK, LH788
Version: 3.0

Re: A320neo Canvas ND

Postby Gijs » Mon Feb 10, 2014 9:58 am

Can you show your ND.nas file? If you just copied the one from the 777, the range properties will be /instrumentation/efis[n]/inputs/range-nm
Airports: EHAM, EHLE, KSFO
Aircraft: 747-400
User avatar
Gijs
Moderator
 
Posts: 9363
Joined: Tue Jul 03, 2007 2:55 pm
Location: Amsterdam/Delft, the Netherlands
Callsign: PH-GYS
Version: Git
OS: Windows 10

Re: A320neo Canvas ND

Postby muekoe » Mon Feb 10, 2014 10:06 am

Wow, you are fast :D

The ND.nas ist the same as in the 777. I only changed the initial value to 10.

When I use the range selector, the /instrumentation/efis/inputs/range-nm doesn't change. It always shows 10.
muekoe
 
Posts: 58
Joined: Fri Apr 12, 2013 5:54 am
Location: Germany
Callsign: D-MUEK, LH788
Version: 3.0

Re: A320neo Canvas ND

Postby Gijs » Mon Feb 10, 2014 10:11 am

Of course it doesn't! Your xml reads <property>instrumentation/nd/range</property> ;-) Either change that, or change the ND.nas file to match your properties. I don't know what that nasal script is doing in your binding, but you don't need it for the ND.
Airports: EHAM, EHLE, KSFO
Aircraft: 747-400
User avatar
Gijs
Moderator
 
Posts: 9363
Joined: Tue Jul 03, 2007 2:55 pm
Location: Amsterdam/Delft, the Netherlands
Callsign: PH-GYS
Version: Git
OS: Windows 10

Re: A320neo Canvas ND

Postby muekoe » Mon Feb 10, 2014 10:26 am

:oops:

Thanks a lot. Sometimes it is so easy.

If I have more questions (and I guess I will) I ask again. :wink:
muekoe
 
Posts: 58
Joined: Fri Apr 12, 2013 5:54 am
Location: Germany
Callsign: D-MUEK, LH788
Version: 3.0

Re: A320neo Canvas ND

Postby Gijs » Mon Feb 10, 2014 10:29 am

Most of the time the hardest problems turn out to have the simplest solution :-)

Keep them coming! We're still actively developing this, so other people's experiences are greatly appreciated.

Cheers,
Gijs
Airports: EHAM, EHLE, KSFO
Aircraft: 747-400
User avatar
Gijs
Moderator
 
Posts: 9363
Joined: Tue Jul 03, 2007 2:55 pm
Location: Amsterdam/Delft, the Netherlands
Callsign: PH-GYS
Version: Git
OS: Windows 10

Re: A320neo Canvas ND

Postby Hooray » Wed Feb 12, 2014 7:42 am

@mueko: Congrats & thanks for the update, you seem to belong to the few people who had no problems integrating the ND - we would greatly appreciate it if you could briefly review the instructions in the wiki and help refine them if there's anything that's missing/unclear - even if you cannot directly improve the article, you could let us know if there are any improvements you have in mind.
Specifically: http://wiki.flightgear.org/Canvas_ND_Fr ... r_aircraft

Thank you!
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: 11326
Joined: Tue Mar 25, 2008 8:40 am

Re: A320neo Canvas ND

Postby muekoe » Wed Feb 12, 2014 12:56 pm

Thanks for congrats Hooray. :D Until now, the wiki article helps a lot. But there is a lot of work to do. I will for sure give feedback, when I finished some more things, like the Airbus specific implemetation. I guess that's the most interesting part. ;)
muekoe
 
Posts: 58
Joined: Fri Apr 12, 2013 5:54 am
Location: Germany
Callsign: D-MUEK, LH788
Version: 3.0

Re: A320neo Canvas ND

Postby Hooray » Wed Feb 12, 2014 2:08 pm

I would suggest to disregard the Airbus-specific implementation until the NavDisplay/MapStructure frameworks have matured a little more - i.e. maybe given it 10-12 weeks. The thing is, even if you were to come up with a 100% correct/working A320 implementation now, the framework itself would not yet be sufficiently generalized - some of the recent additions are making things more complicated here, such as the inflated update() method, the Boeing-specific constructor and hard-coded assumptions in the newMFD() method.

None of this is really difficult, but these things need to be tackled first - otherwise, we'll have too many "construction sites" eventually.

Also, working on different Boeing-centric implementations will help us generalize things a bit more, which will surely come in handy once supporting other airliners.

What I am saying is this: We appreciate any help in maintaining and updating these frameworks, but currently these are not yet as flexible (aircraft-agnostic) as they need to be.
So it would be better to wait a little here and provide plenty of feedback in the meantime - if you really want to, you can get involved in the ND/MapStructure efforts themselves, but I would not yet suggest to come up with a totally new ND implementation - unless you're also prepared/willing to do the necessary groundwork, i.e. Nasal-space refactoring - the latter will mostly affect the new/newMFD/update functions - so not too difficult to understand if you are interested. :D

Otherwise, I would just suggest to watch the whole effort - The Boeing-ND stuff still needs quite a bit of work, and once more things are completed, we can better finalize the underlying frameworks.
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: 11326
Joined: Tue Mar 25, 2008 8:40 am

Re: A320neo Canvas ND

Postby muekoe » Fri Feb 14, 2014 5:15 pm

Hi, sorry for late reply. I guess you are right, it's better to wait a little bit. Meantime, I try to understand the framework a bit better, so maybe later, I can help with a few things. :wink:
muekoe
 
Posts: 58
Joined: Fri Apr 12, 2013 5:54 am
Location: Germany
Callsign: D-MUEK, LH788
Version: 3.0

Re: A320neo Canvas ND

Postby Hooray » Fri Feb 14, 2014 5:34 pm

Please DO let us know if anything is particularly unclear, so that we can further improve the docs. To understand how things are hanging together there it MAY help to start with MapStructure, especially the simple layers like NDB or FIX - the MapStructure article has meanwhile grown quite a bit, so should contain some useful info - however, it isn't strictly necessary to understand everything there. MapStructure is primarily all about "maps", i.e. to manage symbols like navaids or traffic (other aircraft). All the other symbols are solely managed inside navdisplay.mfd - and it would be an exaggeration to call this a "framework" for the time being ... it's actually just a massive hash with a handful of sub-hashes, and another massive update() loop - so not too difficult to understand actually. What's currently done inside the update() loop is also done via those hash entries - just in a slightly more organized fashion (but not much more efficient currently)
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: 11326
Joined: Tue Mar 25, 2008 8:40 am


Return to Canvas

Who is online

Users browsing this forum: No registered users and 1 guest