Board index FlightGear Development Nasal

cockpit-view: from --config format to --addon format  Topic is solved

Nasal is the scripting language of FlightGear.

Re: cockpit-view: from --config format to --addon format

Postby AndersG » Tue Nov 28, 2017 8:19 pm

You'll also need the same for all ordinary aircraft (if you want to keep the MP model cockpit view part) - which leads to ugly duplication of information as that is already present in the -set file but unavailable for MP/AI models as the -set file isn't loaded - or even known for them. This and to some extent the fact that there were some opposition to/concern about being "spied on" on the MP network is why it didn't go into FlightGear all those years ago.
Last edited by AndersG on Tue Nov 28, 2017 8:21 pm, edited 1 time in total.
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: cockpit-view: from --config format to --addon format

Postby Hooray » Tue Nov 28, 2017 8:21 pm

how about moving the corresponding info into dedicated files that are explicitly loaded for AI models, too ?
That way, it would be easy for aircraft developers to refactor their -set.xml file to move the info to a separate file that can be picked up by the script ?
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: cockpit-view: from --config format to --addon format

Postby ThomasS » Wed Nov 29, 2017 7:31 am

I see. Until now I didn't deal with MP, but you are right, this should be considered. Maybe a first step is a small extension to the core code to have the information of the origin of the AI/MP model (eg. the -set.xml file) available in the property tree. This provides access from Nasal to both the xml file but also the file location for finding any further (dedicated) files. I'll give it a try on my local system and on success I'll try to convince one of the core developers to commit it to the core code.
ThomasS
 
Posts: 94
Joined: Sun Sep 11, 2016 2:21 pm
Location: West of EDDK
Version: 2018.2.1
OS: Linux,MacOS,Windows

Re: cockpit-view: from --config format to --addon format

Postby wkitty42 » Wed Nov 29, 2017 10:00 pm

somehow i've lost the trail, here... i've used the cockpit-view addon to hop from AI craft to AI craft to watch them flying from their perspective... i don't recall if i also did this on MP to hop from MP craft to MP craft... i don't think i did because i don't do MP that often... it would be nice to be able to silently hitch a ride on MP craft... the funny thing is the pilots wouldn't even know :lol:
"You get more air close to the ground," said Angalo. "I read that in a book. You get lots of air low down, and not much when you go up."
"Why not?" said Gurder.
"Dunno. It's frightened of heights, I guess."
User avatar
wkitty42
 
Posts: 9146
Joined: Fri Feb 20, 2015 4:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 20.04

Re: cockpit-view: from --config format to --addon format

Postby Hooray » Wed Nov 29, 2017 10:06 pm

I also fail to see why this needs C++ changes ? Would it not suffice to simply make aircraft load the corresponding property stuff using a separate file that is simply "included" to avoid the data duplication issue ? That way, aircraft developers could explicitly "opt in" and decide for themselves if they want to support the use-case or not.
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: cockpit-view: from --config format to --addon format

Postby AndersG » Wed Nov 29, 2017 10:19 pm

Regarding inclusion - I think it might be the case that the 3d model XML files (despite being PropertyList:s) are not loaded into the (AI/MP's subtree of) the main property tree - so it might be difficult to create and populate properties using an included PropertyList-file - which OTOH would be straight forward for splitting view definitions (or whatever you want to use to place the camera) from the -set file.
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: cockpit-view: from --config format to --addon format

Postby ThomasS » Thu Nov 30, 2017 5:42 am

Thats exactly the reason why I think a C++ change is needed. As far as I can see AI aircraft are just loaded into the scene with runtime information like position in the property tree. But no model information in the property tree. So regardless of where the additional information is stored, it will not be available through the property tree after the AI model was loaded. I didn't check MP up to now, maybe MP aircraft are loaded differently.
ThomasS
 
Posts: 94
Joined: Sun Sep 11, 2016 2:21 pm
Location: West of EDDK
Version: 2018.2.1
OS: Linux,MacOS,Windows

Re: cockpit-view: from --config format to --addon format

Postby wkitty42 » Thu Nov 30, 2017 7:46 am

ahhhh... you're talking about exposing more of the properties than are already exposed... that's something that has twisted me for a while... i'd like to see a lot more information in the property tree for the AI craft... like their origin and destination airports, takeoff and landing times from the schedules, which craft and livery, and more things like that... there's work being done to add lights to the AI craft... so far they work pretty well but with access to other properties, they would be much better... it would also be nice for the AI craft to use flight plans... FG can already create routes from origin to destination and it would be nice for the AI craft to fly routes like we do instead of their simplistic ballistic path... having flown quite many hours in the UFO tailing AI craft, sometimes it would be nice to simply do up a flight plan (which should be the same as the one the AI craft would use) and fly that at the same speed as the AI... if we're 1000 feet off the craft's right side, we should be able to stay there all the way to the destination...
"You get more air close to the ground," said Angalo. "I read that in a book. You get lots of air low down, and not much when you go up."
"Why not?" said Gurder.
"Dunno. It's frightened of heights, I guess."
User avatar
wkitty42
 
Posts: 9146
Joined: Fri Feb 20, 2015 4:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 20.04

Previous

Return to Nasal

Who is online

Users browsing this forum: No registered users and 3 guests