Board index FlightGear Development Aircraft

Dual control for Boeing 777

Questions and discussion about creating aircraft. Flight dynamics, 3d models, cockpits, systems, animation, textures.

Re: Dual control for Boeing 777

Postby Hyde » Sun Apr 03, 2016 12:35 pm

Hooray,

I simply couldn't have time to touch canvas.
I have to begin to study again since I still don't understand the display mechanism.
Let me read the wiki first.

Hyde
Hyde
 
Posts: 724
Joined: Fri Aug 12, 2011 2:09 pm
Location: Peachtree city, GA
Callsign: N407DS
Version: GIT
OS: Fedora 25

Re: Dual control for Boeing 777

Postby Hooray » Sun Apr 03, 2016 12:38 pm

I agree, like I said, if you are still struggling with the basics, it is far too difficult to port the ND/PFD (or any MFD) accordingly.
My suggestion would be to start with the most basic "instrument", or even just the HUD and make that dual-control capable.
Once you understand how that works, things will become much more straightforward.

In fact, adding a custom "radio-altimeter" instrument that is using Canvas might be the easiest way, because it will only require a single property to be synchronized between the master/slave instances.

The slave instance would then need to use the property from the master.
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: 12707
Joined: Tue Mar 25, 2008 9:40 am
Pronouns: THOU

Re: Dual control for Boeing 777

Postby Hyde » Sun Apr 03, 2016 11:34 pm

Hooray,

I notice that the canvas popup is working.
Image

I can work on this screen but could you tell what is missing to display in the ND indicator?
Hyde
 
Posts: 724
Joined: Fri Aug 12, 2011 2:09 pm
Location: Peachtree city, GA
Callsign: N407DS
Version: GIT
OS: Fedora 25

Re: Dual control for Boeing 777

Postby Hooray » Sun Apr 03, 2016 11:39 pm

a placement for the canvas texture that is to be replaced by the dynamic Canvas texture - assuming that you are using a different 3D model for the AI/MP model here (?), you would need to look up the cockpit/ND model and use the same mode/texture mapping to make the Canvas texture show up in the copilot's cockpit - the instructions to do that can be found in the wiki - however, they're largely based on the 747/777 markup, i.e. your own XML code :D

In other words, you could just as well look at your own cockpit model and copy the relevant XML code from it.

http://wiki.flightgear.org/Canvas_ND_Fr ... ep_by_Step
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: 12707
Joined: Tue Mar 25, 2008 9:40 am
Pronouns: THOU

Re: Dual control for Boeing 777

Postby Hyde » Mon Apr 04, 2016 12:36 pm

@AndersG

TDM can transfer the string data?
When I set the string variable to TDM then program does not run without error message.
Or syntax is different?
Hyde
 
Posts: 724
Joined: Fri Aug 12, 2011 2:09 pm
Location: Peachtree city, GA
Callsign: N407DS
Version: GIT
OS: Fedora 25

Re: Dual control for Boeing 777

Postby AndersG » Mon Apr 04, 2016 3:56 pm

No, IIRC there is no support for that since the underlying message property itself is a string and the string value would need to be reencoded into it.
Callsign: SE-AG
Aircraft (uhm...): Submarine Scout, Zeppelin NT, ZF Navy free balloon, Nordstern, Hindenburg, Short Empire flying-boat, ZNP-K, North Sea class, MTB T21 class, U.S.S. Monitor, MFI-9B, Type UB I submarine, Gokstad ship, Renault FT.
AndersG
 
Posts: 2524
Joined: Wed Nov 29, 2006 10:20 am
Location: Göteborg, Sweden
Callsign: SE-AG
OS: Debian GNU Linux

Re: Dual control for Boeing 777

Postby Hyde » Mon Apr 04, 2016 5:30 pm

AndersG wrote in Mon Apr 04, 2016 3:56 pm:No, IIRC there is no support for that since the underlying message property itself is a string and the string value would need to be reencoded into it.

I have to think of another way, then.

Hooray wrote in Sun Apr 03, 2016 11:39 pm:a placement for the canvas texture that is to be replaced by the dynamic Canvas texture - assuming that you are using a different 3D model for the AI/MP model here (?), you would need to look up the cockpit/ND model and use the same mode/texture mapping to make the Canvas texture show up in the copilot's cockpit - the instructions to do that can be found in the wiki - however, they're largely based on the 747/777 markup, i.e. your own XML code :D

In other words, you could just as well look at your own cockpit model and copy the relevant XML code from it.

http://wiki.flightgear.org/Canvas_ND_Fr ... ep_by_Step

Yes, model is apparently AI/MP model. How can I make placement on AI/MP model?
nd_display.cpt.addPlacement({"node": "ND.screenL"});
This does not work.

Thanks,
Hyde
Hyde
 
Posts: 724
Joined: Fri Aug 12, 2011 2:09 pm
Location: Peachtree city, GA
Callsign: N407DS
Version: GIT
OS: Fedora 25

Re: Dual control for Boeing 777

Postby Hooray » Mon Apr 04, 2016 6:02 pm

it needs the exact same setup logic that your main aircraft is using - so if it a separate -set.xml file, you need to use the same setup logic that you are using on the main aircraft. The only difference will be the driver hash, which will use MP properties instead
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: 12707
Joined: Tue Mar 25, 2008 9:40 am
Pronouns: THOU

Re: Dual control for Boeing 777

Postby Hyde » Wed Apr 06, 2016 12:37 am

@Hooray
Can't I use the same ND.nas?
If not, what should be changed?
I've already got the MP property except for string data.

@AndersG
Could you lecture me how to get transferred string on co-pilot side?
I tried but not succeeded.
Small example is suffice.

Thanks,
Hyde
Hyde
 
Posts: 724
Joined: Fri Aug 12, 2011 2:09 pm
Location: Peachtree city, GA
Callsign: N407DS
Version: GIT
OS: Fedora 25

Re: Dual control for Boeing 777

Postby AndersG » Thu Apr 07, 2016 10:00 pm

Send it as any other MP enabled string, IIRC there are a few generic MP enabled string properties? Just make sure you pick one that isn't in use already.
MP strings are horribly space inefficient, though, so if you have any way to change your system to use/send a value of another type, do consider it.

(Some dual control components and mp_broadcast do use MP strings despite this, for two reasons: i) the ability to encode arbitrarily sized information in binary; and ii) unlike other types string values are not interpolated by the MP playback system. Additionally, these string values will be constantly changing or for mp_broadcast the empty string when idle. Sending a constant or rarely changing string value over MP is extremely wasteful.)
Callsign: SE-AG
Aircraft (uhm...): Submarine Scout, Zeppelin NT, ZF Navy free balloon, Nordstern, Hindenburg, Short Empire flying-boat, ZNP-K, North Sea class, MTB T21 class, U.S.S. Monitor, MFI-9B, Type UB I submarine, Gokstad ship, Renault FT.
AndersG
 
Posts: 2524
Joined: Wed Nov 29, 2006 10:20 am
Location: Göteborg, Sweden
Callsign: SE-AG
OS: Debian GNU Linux

Re: Dual control for Boeing 777

Postby Hooray » Thu Apr 07, 2016 10:11 pm

Note that Richard is working on a MPI-based system, called Emesary, which can help greatly simplify these things, and it's currently being prototyped using Nasal:

https://sourceforge.net/p/flightgear/ma ... /34985731/
Richard wrote:I've just finished porting my Emesary system to Nasal.

There is a set of notes here
http://chateau-logic.com/content/emesar ... flightgear
that explains the whole thing with a worked example.

Emesary is a simple and efficient class based interobject communcation
system to allow decoupled disparate parts of a system to function
together without knowing about each. It allows decoupling and removal of
dependencies by using notifications to cause actions or to query values.

This is in my git repository in my commit, together with the changes to
the AI carriers to add ACLS (carrier ILS).
https://sourceforge.net/u/r-harrison/fg ... 34c537f66/

There are many possible applications for Emesary within the system, it
solves the problem of how to connect generic instruments to aircraft
that have different implementations and properties that need to be used.
I've been looking at how to abstract out the interface to the MFD and
NavDisplay.

I have plans to extend this to be able to transmit over mp (probably
layered ontop of mp-broadcast). It would also probably work quite well
with the HLA FOM to give us a way for models to communicate with other
models.

I've not raised a pull request yet as there may be some changes after a
discussion


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: 12707
Joined: Tue Mar 25, 2008 9:40 am
Pronouns: THOU

Re: Dual control for Boeing 777

Postby Hyde » Sat Apr 16, 2016 8:56 pm

I finally understand how to implement the both normal MP variable handling and AndresG's scheme.
Now I've implemented all the controls and most of PFD, MCP indications. Quite nice. Please try.

Before going to OH-panel implementation, I want to get ND display.

@Hooray,
You suggested some another method of Emersary but it does not answer which object should I put canvas on co-pilot side.
Canvas ND is currently connected to object "ND.screenL". What else needed? I'm totally lost.

Hyde
Hyde
 
Posts: 724
Joined: Fri Aug 12, 2011 2:09 pm
Location: Peachtree city, GA
Callsign: N407DS
Version: GIT
OS: Fedora 25

Re: Dual control for Boeing 777

Postby Hooray » Sun Apr 17, 2016 9:44 am

an AI/MP model is an independent entity, so you need to create an independent (=new) ND instance, and then you can use the existing code.
Note that this may need to override some default properties, because the ND will be driven by properties from the master instance, whereas only the master instancce has access to some FDM specific properties, so you need to review if there are implicit property dependencies and override/re-implement those using the NDSourceDriver method (or something similar).

Equally, if you are referring to the main aircraft view and the copilot's ND, you would need to use a separate instance there.

Note that you will need to decide if you want the master (=captain) to control the ND, or if you want to let the copilot (slave) run the ND logic. Either way, you need a way to synchronize/replicate ND-specific events (think mode changes, range selector, WXR button etc).

Personally, I would create an independent instance for each pilot and then replicate events using the switches hash - which should be roughly ~20 properties (IIRC) - that way, each pilot could change settings on each ND independently, and the changes would be propagated correctly.
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: 12707
Joined: Tue Mar 25, 2008 9:40 am
Pronouns: THOU

Re: Dual control for Boeing 777

Postby Hyde » Sun Apr 17, 2016 12:16 pm

Hooray,

All those things are after image is properly displayed on ND model.
Since ND, MFD and CDU are not displayed, this might not be related to Canvas.
These are implemented using nasal. All other indicators including MCP are xml and executed from Models/777-xxx.xml which is invoked from MP.
Nasal program is invoked from 777-fo-set-common.xml that causes different memory entity, MP and local.
If so, where can I put to start nasal program or how can I get MP pointer?

Hyde
Hyde
 
Posts: 724
Joined: Fri Aug 12, 2011 2:09 pm
Location: Peachtree city, GA
Callsign: N407DS
Version: GIT
OS: Fedora 25

Re: Dual control for Boeing 777

Postby Hooray » Sun Apr 17, 2016 12:36 pm

your 777-fo-set-common.xml also needs to loads the ND code and set up the ND, exactly as per the instructions on the wiki.
To see if the code is actually loaded/executed, just add a few print() statements to the Nasal code and see if they show up in the console or not.

Like you say, it makes sense to approach this by step-by-step - e.g. by taking an simple piece of Nasal code, one that simply loads/displays a splash screen texture: http://wiki.flightgear.org/Canvas_Snipp ... ter_Images

Image

Once that works correctly, you can change the code to show the texture on one of the MFD screens.

Next, you can create an actual ND instance and assign that to the ND screen

PS: For better troubleshooting, you should always tell us exactly what you are referring to (e.g. master/slave instance, and captain/copilot displays)
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: 12707
Joined: Tue Mar 25, 2008 9:40 am
Pronouns: THOU

PreviousNext

Return to Aircraft

Who is online

Users browsing this forum: No registered users and 11 guests