Board index FlightGear Development Canvas

NavDisplay & MapStructure discussion (previously via PM)

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.

Re: NavDisplay & MapStructure discussion (previously via PM)

Postby Hooray » Sun Jun 08, 2014 5:35 pm

according to some recent commits, there's now an explicit "update" flag that we should be able to use then
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: 11329
Joined: Tue Mar 25, 2008 8:40 am

Re: NavDisplay & MapStructure discussion (previously via PM)

Postby hvengel » Mon Jun 09, 2014 12:38 am

My thanks as well I am only days away from pushing a major change to the P-51D so this came just in time.
hvengel
Retired
 
Posts: 1128
Joined: Sun Dec 24, 2006 4:35 am
Location: Minden Nevada

Re: NavDisplay & MapStructure discussion (previously via PM)

Postby Soitanen » Fri Jun 20, 2014 2:16 pm

BUG:
TAS in upper left corner now shows IAS. It uses /velocities/airspeed-kt (as I think, but can't find section, where this value applies to tas object in svg file).
It needs to be switched to /instrumentation/airspeed-indicator/true-speed-kt (if presented). JSBSim have variable for true airspeed, but ND Displayed is used not only by JSBSim planes.
Boeing 737-300. Reworked cockpit, FDM, autopilot and much more. WIP.
Boeing 737-800. WIP. Canvas PFD and ND.
Antonov An-24B. Made from scratch. Very good FDM. 3D model by Adrian. WIP.
Project Russia (some cities, based on OSM with custom objects).
Soitanen
 
Posts: 489
Joined: Sat Jun 16, 2012 6:50 am
Location: Saint-Petersburg, Russia
Version: git
OS: Linux Mint 17

Re: NavDisplay & MapStructure discussion (previously via PM)

Postby Hooray » Fri Jun 20, 2014 4:21 pm

check navdisplay.styles in $FG_ROOT/Nasal/canvas/map
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: 11329
Joined: Tue Mar 25, 2008 8:40 am

Re: NavDisplay & MapStructure discussion (previously via PM)

Postby Soitanen » Fri Jun 20, 2014 5:52 pm

Hooray: thanks! Found it in line 206. So, what's the best way? Expect, that aircraft have working airspeed-indicator or make nasal-based re-calculation to TAS in every frame?
Boeing 737-300. Reworked cockpit, FDM, autopilot and much more. WIP.
Boeing 737-800. WIP. Canvas PFD and ND.
Antonov An-24B. Made from scratch. Very good FDM. 3D model by Adrian. WIP.
Project Russia (some cities, based on OSM with custom objects).
Soitanen
 
Posts: 489
Joined: Sat Jun 16, 2012 6:50 am
Location: Saint-Petersburg, Russia
Version: git
OS: Linux Mint 17

Re: NavDisplay & MapStructure discussion (previously via PM)

Postby Hooray » Fri Jun 20, 2014 6:02 pm

that would be one possibility, even though I believe that a property rule might be the better option here, because it would not introduce more Nasal code...
But I guess it's your call - or just ask Hyde/Gijs what they'd prefer / be willing to commit
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: 11329
Joined: Tue Mar 25, 2008 8:40 am

Re: NavDisplay & MapStructure discussion (previously via PM)

Postby Johan G » Fri Jun 20, 2014 6:23 pm

I think this and similar problems will be coming up for more or less every aircraft as the properties differ between FDM:s and sometimes even between aircraft.
Low-level flying — It's all fun and games till someone looses an engine. (Paraphrased from a YouTube video)
Improving the Dassault Mirage F1 (Wiki, Forum, GitLab. Work in slow progress)
Johan G
Moderator
 
Posts: 5509
Joined: Fri Aug 06, 2010 5:33 pm
Location: Sweden
Callsign: SE-JG
IRC name: Johan_G
Version: 3.0.0
OS: Windows 7, 32 bit

Re: NavDisplay & MapStructure discussion (previously via PM)

Postby Soitanen » Fri Jun 20, 2014 6:31 pm

My mind - aircraft, which will use NavDisplay must have airspeed-indicator, created as built-in instrument, so I prefer to select airspeed indicator as source (which is close to reality).
Boeing 737-300. Reworked cockpit, FDM, autopilot and much more. WIP.
Boeing 737-800. WIP. Canvas PFD and ND.
Antonov An-24B. Made from scratch. Very good FDM. 3D model by Adrian. WIP.
Project Russia (some cities, based on OSM with custom objects).
Soitanen
 
Posts: 489
Joined: Sat Jun 16, 2012 6:50 am
Location: Saint-Petersburg, Russia
Version: git
OS: Linux Mint 17

Re: NavDisplay & MapStructure discussion (previously via PM)

Postby Gijs » Fri Jun 20, 2014 7:54 pm

We could implement a way for individual aircraft to feed the ND with their own properties. However, standardizing the properties would make more sense, also for other use cases (bindings for input devices, dialogs etc.). That is even more important for the PFD, since there are dozens of different autopilot properties being used in FlightGear.

Therefore I've changed it to /instrumentation/airspeed-indicator/true-speed-kt for now (also got rid of a remaining getprop). Any aircraft that's taking itself serious should have an airspeed indicator ;-)

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

Re: NavDisplay & MapStructure discussion (previously via PM)

Postby Hooray » Fri Jun 20, 2014 7:57 pm

Gijs wrote in Fri Jun 20, 2014 7:54 pm:We could implement a way for individual aircraft to feed the ND with their own properties.


That would be trivial to support, see the implementation of the options hash and/or MapStructure styling. So it's just a matter of looking for an optional hash that overrides certain defaults.
I think we once also prototyped this for Soitanen's radio work, where he wanted to be able to use different nav[x] devices for each ND !?
Please feel free to add this as a feature request to the wiki and/or issue tracker so that we don't forget about it.

BTW: Philosopher implemented a neat little helper to create temporary hashes with keys set to sane defaults, he used it for adding styling support, but the same helpers could be used for custom properties obviously.
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: 11329
Joined: Tue Mar 25, 2008 8:40 am

Re: NavDisplay & MapStructure discussion (previously via PM)

Postby hvengel » Fri Jun 20, 2014 8:46 pm

Gijs wrote in Fri Jun 20, 2014 7:54 pm:...Therefore I've changed it to /instrumentation/airspeed-indicator/true-speed-kt for now (also got rid of a remaining getprop). Any aircraft that's taking itself serious should have an airspeed indicator ;-) ...


But almost no IRL aircraft have a TRUE airspeed indicator, which is what this appears to be for, but all aircraft will have an indicated airspeed gauge which is a very different animal than a true airspeed gauge. If this is indicated airspeed than get rid of the "true-".
hvengel
Retired
 
Posts: 1128
Joined: Sun Dec 24, 2006 4:35 am
Location: Minden Nevada

Re: NavDisplay & MapStructure discussion (previously via PM)

Postby Gijs » Fri Jun 20, 2014 9:00 pm

The real display actually displays true airspeed. And FlightGear's built-in airspeed indicator provides it (when the aircraft is equipped with an indicator), so why not use it? Note that we're talking about the navigation display here, not the primary airspeed indicator. That one is displayed on.the PFD (primary flight display) and does show indicated airspeed.
Airports: EHAM, EHLE, KSFO
Aircraft: 747-400
User avatar
Gijs
Moderator
 
Posts: 9364
Joined: Tue Jul 03, 2007 2:55 pm
Location: Amsterdam/Delft, the Netherlands
Callsign: PH-GYS
Version: Git
OS: Windows 10

Re: NavDisplay & MapStructure discussion (previously via PM)

Postby Hooray » Sat Jun 21, 2014 2:21 pm

have you had a chance to review our changes yet ? I am just asking in case you need help fixing some issue on the MapStructure side of things - testing-wise, the functionality can also be tested via the new map-canvas.xml dialog (equipment) menu. Functionality should be mostly identical, but ND-specific stuff needs obviously to be tested using the 747-400 or 777-200. IIRC, the WXR/storms layer may need to be reviewed, because that's something that you developed originally, but which we ported to MapStructure. The other layers ported by Philosopher were mostly tested already by Hyde.
I'd just like to avoid any major problems/bugs - also, to ensure that the MapStructure framework can be more widely adopted in 3.2, i.e. by people developing their own layers, or variations of existing layers through custom styling.

Besides, the recent GUI work committed by TheTom means that we can phase out the PUI map-canvas.xml dialog and create the whole dialog procedurally using a native canvas window, because we really only need two types of widgets: buttons and checkboxes, which are both supported now, thanks to the new "Aircraft Center".

Regarding the PFD, I'd prefer not to add too much to that code, until it is sufficiently generalized, too - currently, it's suffering from very real design limitations, and we cannot easily support multiple instances, or different aircraft. Before anybody adopts/integrates the 747 PFD code, please do get in touch so that we can coordinate the necessary steps. It is not necessarily much work, and not even very difficult - but it may take a few iterations to be sufficiently generic. But anybody who understands basic Nasal OOP, and maybe even Canvas, should be able to work through the necessary steps within 3-4 weekends. We wouldn't be changing any functionality, it would be just about refactoring, generalization and modularization - very much in line with the original ND restructuring efforts. In other words, I'd urge anybody interested in a Canvas-based PFD to get in touch first, and not to use the code directly "as is".
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: 11329
Joined: Tue Mar 25, 2008 8:40 am

Re: NavDisplay & MapStructure discussion (previously via PM)

Postby Soitanen » Sun Jul 06, 2014 6:30 pm

Another bug or non-realized feature:
Wind pointer, heading and speed. Now Arrow disappears at speed, less than 100 kts. But not only arrow, but heading and speed must disappeaar too. And arrow, heading and speed must appear only if windspeed is greater than 6 kt, and must disappear, if windspeed is less than 4 kt. If it is between 4 and 6 kt it will have previous state (to show or not to show).
Boeing 737-300. Reworked cockpit, FDM, autopilot and much more. WIP.
Boeing 737-800. WIP. Canvas PFD and ND.
Antonov An-24B. Made from scratch. Very good FDM. 3D model by Adrian. WIP.
Project Russia (some cities, based on OSM with custom objects).
Soitanen
 
Posts: 489
Joined: Sat Jun 16, 2012 6:50 am
Location: Saint-Petersburg, Russia
Version: git
OS: Linux Mint 17

Re: NavDisplay & MapStructure discussion (previously via PM)

Postby Hooray » Sun Jul 06, 2014 6:43 pm

Gijs said a couple of days ago elsewhere that he was going to take a look - if in doubt, send him a PM to ensure that he doesn't miss such things.
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: 11329
Joined: Tue Mar 25, 2008 8:40 am

PreviousNext

Return to Canvas

Who is online

Users browsing this forum: No registered users and 12 guests