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 Hooray » Wed Mar 09, 2016 7:22 pm

AndersG wrote in Wed Mar 09, 2016 8:13 am:These two things, sending state and merging back copilot input are both demonstrated in the ZLT-NT. I would note, though, that it would be a serious amount of work to do this for something as advanced as an airliner cockpit (however, adding a more convenient and terse API on top of the current mechanism could help somewhat) and that it would be likely to surpass by far the amount of information the MP protocol can carry for one player.


If the aircraft has a corresponding flight recorder config, a piece of Nasal code could parse that and use it to dynamically create matching sync/replication channels for different avionics and instruments, for now on top of mp_broadcast.nas - and in the future, maybe using HLA.
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: 11376
Joined: Tue Mar 25, 2008 8:40 am

Re: Dual control for Boeing 777

Postby biloute974 » Sun Mar 13, 2016 3:47 pm

Hi,


the dual control fully works for 777 ?
Intel I7 7700 - 16Gb DDR4 - Nvidia GTX970 - FG 2017.4.0 from D&C
biloute974
 
Posts: 191
Joined: Mon Feb 23, 2015 8:49 am
Callsign: U974
Version: 2016.1.0
OS: Mint 17.2

Re: Dual control for Boeing 777

Postby Hyde » Sun Mar 13, 2016 5:47 pm

No.
Since no indication on PFD or ND, not attractive to use dual control. :cry:
I haven't added anything since then.
Hyde
 
Posts: 728
Joined: Fri Aug 12, 2011 1:09 pm
Location: Peachtree city, GA
Callsign: N407DS
Version: GIT
OS: Fedora 25

Re: Dual control for Boeing 777

Postby biloute974 » Sun Mar 13, 2016 7:21 pm

HI,

ok thanks :)
Intel I7 7700 - 16Gb DDR4 - Nvidia GTX970 - FG 2017.4.0 from D&C
biloute974
 
Posts: 191
Joined: Mon Feb 23, 2015 8:49 am
Callsign: U974
Version: 2016.1.0
OS: Mint 17.2

Re: Dual control for Boeing 777

Postby Hooray » Sun Mar 13, 2016 9:58 pm

Hyde wrote in Sun Mar 13, 2016 5:47 pm:No.
Since no indication on PFD or ND, not attractive to use dual control. :cry:


Could you please elaborate on that ?
Note that most Canvas MFDs, including the PFD/ND, can generally be made dual-pilot aware as long as the feature is ex.plicitly implemented.
Usually, this means that relevant properties need to be encoded and replicated/synchronized across multiple fgfs clients.

In fact, the ND code in particular is using a simple driver hash to encapsulate aircraft specific properties, which makes it possible to even drive NDs using AI traffic (think tanker.nas, fox2.nas and/or even Bombable aircraft).

If you want other cockpit switches to take effect, that needs to be specifically implemented.

But in general, it is quite doable (despite probably a bit tedious given the complexity of an airliner cockpit) - but the degree of work is similar to that required for implementing a proper flight recorder config - and like I said, it could in fact be using such a configuration to automatically come up with a lookup table of relevant properties and a synchronization mechanism
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: 11376
Joined: Tue Mar 25, 2008 8:40 am

Re: Dual control for Boeing 777

Postby Hyde » Tue Mar 15, 2016 2:16 am

I can not explain precisely because I don't fully understand what is multiplay.

Currently I have no idea what I should do.
I noticed that current 777 MP model does not work (animate) speed brake, landing light, taxi light, nose landing gear steering, elevator trim and so on...

So could you lecture me one thing that I want to animate "speed brake". That will help farther implementation I think.

Speed brake property is /surface-positions/speedbrake-norm.
I add <float n="5" alias="/surface-positions/speedbrake-norm"/> to 777-set-common.xml in the /sim/multiplay/generic

But it does not work.
What else should I do?
Hyde
 
Posts: 728
Joined: Fri Aug 12, 2011 1:09 pm
Location: Peachtree city, GA
Callsign: N407DS
Version: GIT
OS: Fedora 25

Re: Dual control for Boeing 777

Postby Hooray » Tue Mar 15, 2016 7:57 pm

absolute paths don't work for MP-enabled animations - they need to be relative (i.e. no leading slashes).
Otherwise, there's fairly good examples all over fgdata, and especially look at AndersG's 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: 11376
Joined: Tue Mar 25, 2008 8:40 am

Re: Dual control for Boeing 777

Postby AndersG » Tue Mar 15, 2016 9:34 pm

Additionally, the -set.xml file is not loaded at the MP/AI model's side at all so you would need to set up local aliases there (probably from the nasal/load block in the model XML file) or change your animations to use the generic properties directly. The aliases installed should probably be cleaned up when the model goes away, but I'll admit to not doing that either..
Btw, and IIRC, you need the leading '/' for the -set file alias attribute as you have above.
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: 2448
Joined: Wed Nov 29, 2006 9:20 am
Location: Göteborg, Sweden
Callsign: SE-AG
OS: Debian GNU Linux

Re: Dual control for Boeing 777

Postby Hyde » Sun Mar 20, 2016 7:11 pm

Thanks for the info.
Now I could get the animation.
Image
I will add more and more properties.

One question.
Can I use the local property such as indicated-airspeed-kt or indicated-altitude-ft directly instead of capt's property from TDM for the indicators?
If I use capt's property, movement is sticky. If I can use local property, can reduce the transmit data and movement will be smooth.
Hyde
 
Posts: 728
Joined: Fri Aug 12, 2011 1:09 pm
Location: Peachtree city, GA
Callsign: N407DS
Version: GIT
OS: Fedora 25

Re: Dual control for Boeing 777

Postby AndersG » Sun Mar 20, 2016 7:34 pm

Hyde wrote in Sun Mar 20, 2016 7:11 pm:One question.
Can I use the local property such as indicated-airspeed-kt or indicated-altitude-ft directly instead of capt's property from TDM for the indicators?
If I use capt's property, movement is sticky. If I can use local property, can reduce the transmit data and movement will be smooth.


You can for some instruments. IIRC, I have used that for altimeters and variometers, which were unproblematic. It is possible that airspeed might also be ok, but it might not be as the copilot "aircraft" is kept co-located with the main aircraft via frame by frame teleportation - so it could well be that the FG airspeed instrument doesn't sense any airspeed for the copilot at all..
The update rates of properties sent by the TDM components are by necessity rather slow. For a property that needs "real-time" updates you could also use one of the generic MP property - that would make it update smoothly (partly via interpolation on the receiving side).
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: 2448
Joined: Wed Nov 29, 2006 9:20 am
Location: Göteborg, Sweden
Callsign: SE-AG
OS: Debian GNU Linux

Re: Dual control for Boeing 777

Postby Hyde » Sat Mar 26, 2016 8:04 pm

Thank you, now I understand how to transfer the property.
I could animate just Altitude, Airspeed, Heading information on the PFD and stby indicators.
You can use dual control but only observation mode so far. Use dualctrl branch for testing.
AndersG wrote in Sun Mar 20, 2016 7:34 pm:For a property that needs "real-time" updates you could also use one of the generic MP property - that would make it update smoothly

Could you lecture me how to do that? I could use it for animation in the Model/777-xxx.xml file and made all the exterior movable object animated. But for the indicator, I couldn't. When I use <property alias = "...."/>, capt side stops animation ether. But using TDM is fine.

And as you see my previous post, ND can not be displayed at all.
I have no idea how to run it.
@Hooray, what should I do first?
Hyde
 
Posts: 728
Joined: Fri Aug 12, 2011 1:09 pm
Location: Peachtree city, GA
Callsign: N407DS
Version: GIT
OS: Fedora 25

Re: Dual control for Boeing 777

Postby Hooray » Sat Mar 26, 2016 8:14 pm

Regarding the ND, it has something called a "driver hash" where all the position/orientation getters are turned into functions that can be overridden for arbitrary purposes - and that is how the ND code can be also used for showing NDs from the perspective of arbitrary AI/MP aircraft - I guess, you would want to take a look at that.

For testing purposes, you could use a standalone ND/map and configure the driver hash to use one of the dual/shared control aircraft in your MP property tree.

For some more background info, see: search.php?st=0&sk=t&sd=d&sr=posts&keywords=NDSourceDriver

But to be perfectly honest, I my suggestion would be to get in touch with artix and send him a heads-up regarding your project, artix is the one most experienced with the kind of changes required (Philosopher being basically n/a), so as long as this is not specific to the 777, but also useful elsewhere (think artix Airbus work), it would be a good idea to get artix involved.

With the pointers I have posted, he should be able to get something working within a few hours of tinkering.

Otherwise, I am afraid, most of us others (including myself) haven't worked with that code in months, and I am not sure if anybody even tried to use other "driver" hashes at all. But artix has got the track record to get this stuff working
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: 11376
Joined: Tue Mar 25, 2008 8:40 am

Re: Dual control for Boeing 777

Postby Hooray » Sat Mar 26, 2016 8:27 pm

I have updated the corresponding paragraph in the ND article on the wiki.

If I were doing this, I would probably proceed by using a standalone map dialog and checking if it still works to show maps/ND for arbitrary AI/MP aircraft. If not, some of the getprop() stuff needs to be fixed up to use the methods (getters) in the NDSourceDriver hash, which is where all the aircraft specific stuff should be encapsulated (hidden). This is intended to help re-implement functionality if needed.
Next, it would be possible to come up with a custom driver hash for MP/dual control aircraft, so that it will use the proper properties automatically.

My estimation is that this would take 1-2 hrs of experimenting with various snippets of code that are to be found on the wiki.

For some background info see the posting/screenshots at: viewtopic.php?f=71&t=24201&p=229073&hilit=#p229073

Note that this basically doing what you want: rendering a map/ND using non-standard properties (i.e. those used by AI/MP aircraft) - i.e. the code does not need to be changed to do this sort of thing, it will simply look at the driver hash and use the getter functions specified there, which is why each ND looks different, each instance is using a different AI aircraft as the "data source":

Image
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: 11376
Joined: Tue Mar 25, 2008 8:40 am

Re: Dual control for Boeing 777

Postby Hyde » Sat Apr 02, 2016 8:10 pm

I've just pushed preliminary dual control system for 777.
This time only observing and canvas does not work but you see most control is animating in copilot plane. OH panel is not touched yet.

If you have any idea to smooth out the PDF indication, lecture me.

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

Re: Dual control for Boeing 777

Postby Hooray » Sat Apr 02, 2016 11:39 pm

Regarding the Canvas related comments in this thread, there should not be anything preventing Canvas-based instruments (=textures) to be updated/synchronized using the dual control/mp_broadcast mechanism.

A Canvas merely is a texture with a placement, so as long as you have a Canvas placement somewhere, you can also add a Canvas texture to it.

To see if there's anything preventing AI models from having Canvas placements, try to add a tooltip placement (see the wiki (Canvas Snippets) for details).
There's also a snippet demonstrating how to load a splash image and use that as a livery/instrument.
If you can get that to work, you should be all set.

However, updating/rendering a full MFD (ND, PFD) across MP definitely will require some work/thinking, and that makes only sense once the underlying concepts are understood.

Thus, my suggestion would be to tinker with a simple "instrument" first, e.g. a display/texture showing the current altitude - that should suffice to illustrate the concept, i.e. having to replicate a property and mirror that to use it for updating a Canvas texture.

Note that Richard's recently posted Emesary work could be really heplful for this sort of thing.
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: 11376
Joined: Tue Mar 25, 2008 8:40 am

PreviousNext

Return to Aircraft

Who is online

Users browsing this forum: AhrefsBot [Bot], YandexBot [Bot] and 3 guests