Board index FlightGear Development Aircraft

CRJ700 family goes canvas

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

Re: CRJ700 family goes canvas

Postby D-ECHO » Thu Jan 02, 2020 3:07 pm

@tdammers, oops didn't realize the access hat been set to read-only. All team members should have "Admin" rights now
D-ECHO
 
Posts: 2462
Joined: Sat May 09, 2015 1:31 pm
Pronouns: Bea (she/her)
Version: next

Re: CRJ700 family goes canvas

Postby tdammers » Thu Jan 02, 2020 3:36 pm

Cool, thanks!
tdammers
 
Posts: 391
Joined: Wed Dec 13, 2017 11:35 am
Callsign: NL256
IRC name: nl256

Re: CRJ700 family goes canvas

Postby jsb » Wed Aug 26, 2020 10:02 pm

Finally I managed to upload a release candidate to https://github.com/d-jsb/CRJ700-family
Lots of things have changed, many details were added so don't be frustrated if things are not as easy or obvious as before. Most outstanding upgrade is the canvas based EFIS (PFD, MFD, EICAS). You can pop out each screen into a window. The display selectors on the sidepanels and pedestal panel are also implemented.
Updating the documentation is an open issue, the checklists and one or two tutorials should be quite ok, but I did not verify them lately...
FDM got some overhaul, the approach config used wrong weights leading to much too high lift on landing - should be better now but you need to adjust the trim before takeoff and you really have to pull at Vr to rotate.

Have fun :)
jsb
 
Posts: 285
Joined: Sat Oct 25, 2014 9:17 pm
Location: Hamburg, Germany
Callsign: D-JSB
Version: next
OS: Win7/Linux

Re: CRJ700 family goes canvas

Postby legoboyvdlp » Fri Aug 28, 2020 12:39 pm

I appreciate seeing the jsbsim FDM :)

There is a nasal error, on the off-chance you are not aware of it:

Code: Select all
Nasal runtime error: undefined symbol: update_pass_signs
  167.05 [ALRT]:nasal        at C:/Users/redpa/Documents/FlightGear/Custom Aircraft/CRJ700-family/Nasal/master.nas, line 231
  167.06 [ALRT]:nasal        called from: C:/Users/redpa/Documents/FlightGear/Custom Aircraft/CRJ700-family/Nasal/master.nas, line 22
  167.06 [ALRT]:nasal        called from: C:/Users/redpa/Documents/FlightGear/Custom Aircraft/CRJ700-family/Nasal/master.nas, line 30


Unfortunately there's something causing large frame drops which weren't there before in the CRJ700 - it's hard to say what's causing it though.
User avatar
legoboyvdlp
 
Posts: 7981
Joined: Sat Jul 26, 2014 2:28 am
Location: Northern Ireland
Callsign: G-LEGO
Version: next
OS: Windows 10 HP

Re: CRJ700 family goes canvas

Postby tdammers » Fri Aug 28, 2020 5:31 pm

My guess would be some of the canvas stuff - the old CRJ uses absolutely no canvas at all, and much of the PFD and MFD functionality is done in XML, whereas canvas tends to be Nasal-driven.

Judging from the E-Jet, keeping the Nasal code for updating a canvas display fast enough is quite a challenge, and Nasal doesn't exactly have advanced debugging and profiling toolchains available, so it's often a matter of trial-and-error (and with a lot of statistical noise).
tdammers
 
Posts: 391
Joined: Wed Dec 13, 2017 11:35 am
Callsign: NL256
IRC name: nl256

Re: CRJ700 family goes canvas

Postby jsb » Fri Aug 28, 2020 8:02 pm

legoboyvdlp wrote in Fri Aug 28, 2020 12:39 pm:I appreciate seeing the jsbsim FDM :)

There is a nasal error, on the off-chance you are not aware of it:

Code: Select all
Nasal runtime error: undefined symbol: update_pass_signs
  167.05 [ALRT]:nasal        at C:/Users/redpa/Documents/FlightGear/Custom Aircraft/CRJ700-family/Nasal/master.nas, line 231
  167.06 [ALRT]:nasal        called from: C:/Users/redpa/Documents/FlightGear/Custom Aircraft/CRJ700-family/Nasal/master.nas, line 22
  167.06 [ALRT]:nasal        called from: C:/Users/redpa/Documents/FlightGear/Custom Aircraft/CRJ700-family/Nasal/master.nas, line 30


Unfortunately there's something causing large frame drops which weren't there before in the CRJ700 - it's hard to say what's causing it though.


Never noticed that one before, thanks for reporting, I will have a look.
Could you quantify the drop in framerate (e.g. old rate vs. new rate)? I spent quite some time and thoughts on minimizing the canvas updates but maybe that does not work in all cases?
jsb
 
Posts: 285
Joined: Sat Oct 25, 2014 9:17 pm
Location: Hamburg, Germany
Callsign: D-JSB
Version: next
OS: Win7/Linux

Re: CRJ700 family goes canvas

Postby jsb » Fri Aug 28, 2020 8:28 pm

Also I noted with "next" / nightly, that the EICAS control panel does not work, presumably due to an issue with emesary or fgcommand. It works for me with 2020.2.1 though
jsb
 
Posts: 285
Joined: Sat Oct 25, 2014 9:17 pm
Location: Hamburg, Germany
Callsign: D-JSB
Version: next
OS: Win7/Linux

Re: CRJ700 family goes canvas

Postby legoboyvdlp » Fri Aug 28, 2020 10:14 pm

The nightly is 2020.2.1; are you compiling on next? If so, yes, the fix to removecommand() appears to be causing a runtime error in emesary (because removecommand() actually works now :D )
User avatar
legoboyvdlp
 
Posts: 7981
Joined: Sat Jul 26, 2014 2:28 am
Location: Northern Ireland
Callsign: G-LEGO
Version: next
OS: Windows 10 HP

Re: CRJ700 family goes canvas

Postby jsb » Sat Aug 29, 2020 8:30 am

Right, the nightly is 2020.2.1 and works. Compiling next shows the error at runtime. I did not read the changes on removecommand yet...
jsb
 
Posts: 285
Joined: Sat Oct 25, 2014 9:17 pm
Location: Hamburg, Germany
Callsign: D-JSB
Version: next
OS: Win7/Linux

Re: CRJ700 family goes canvas

Postby Hyphow » Wed Sep 30, 2020 11:24 pm

Hello jsb & tdammers,
First of all, thank you for your iteration of the CRJ-700family, this is a beautiful, quite functionnal and lovely to fly airplane. I flew about 10 hours on the yasim - no canvas version from 2019, on FG 2019.1.1 ... No problem whatshowever.
Since I installed the 2020.1.1 version, after some reading here on the forum, I download and installed the latest version of the CRJ on d-jsb repository: https://github.com/d-jsb/CRJ700-family

When I select this version of the CRJ in the launcher the plane loads succesfully but the canvas doesn't seem to work. It opens like that:
Image

I can start the plane, but the PFD, MFD, & EICAS display this message: "No source".
I wonder what is the issue here. Maybe the 2020.1.1 should be incriminated? Is it a stable version? I downloaded it here: http://download.flightgear.org/builds/2020.1/?C=M;O=A
My ICAO flight numbers stand like that: XXX5015
When I fly GA planes, my callsign is: F-HYPH

FG 2020.3.18/ / Windows 10, 64bits / 1 To HDD + 256 Go SSD / Intel Core I7-8750H 2,20GHz / GTX 1060 6Go GDDR5 / RAM DDR4 8Go /Thrustmaster Airbus TCA
User avatar
Hyphow
 
Posts: 44
Joined: Thu Apr 09, 2020 9:13 pm
Location: Paris-Orly (FR)
Callsign: F-HYPH or XXX5015
IRC name: Gaëtan
Version: 2020.3.11

Re: CRJ700 family goes canvas

Postby tdammers » Thu Oct 01, 2020 3:48 pm

I'm seeing the same thing actually. It seems that there are some Nasal errors that cause the EFIS code to crash, and after that, the displays don't get updated anymore.

I'll look into it when I can make the time.
tdammers
 
Posts: 391
Joined: Wed Dec 13, 2017 11:35 am
Callsign: NL256
IRC name: nl256

Re: CRJ700 family goes canvas

Postby Hooray » Thu Oct 01, 2020 4:25 pm

tdammers wrote in Fri Aug 28, 2020 5:31 pm:Judging from the E-Jet, keeping the Nasal code for updating a canvas display fast enough is quite a challenge, and Nasal doesn't exactly have advanced debugging and profiling toolchains available, so it's often a matter of trial-and-error (and with a lot of statistical noise).


Speaking in general, you may want to look at Richard's F15 and the corresponding fgdata helpers he's been adding to $FG_ROOT/Nasal
Broadly speaking, you'll probably want to use his MFD framework, too - because it provides a straightforward mechanism (interfacing boundaries) to separate state retrieval/updating of canvas properties and actual rendering.

Other than that, Nasal code is typically executed via listeners and timers - thus -depending on your background- you can easily overload the underlying APIs either in Nasal space, or in C++ space to build a hash/STL map with SGTimeStamps to contain details from the Nasal callstack - the latter of which can be obtained by looking at the implementation of the naRuntimeError() API - basically, you can get the file/module name and line number of the ORIGIN of a listener/timer registration, and then take it from there to also get the function.

That way, it is comparatively straightforward to debug/profile even sophisticated Nasal frameworks - then again, I don't disagree with your underlying point at all, i.e. Nasal's debugging support could indeed be much better, and it's a long standing idea to optionally make such diagnostics/metrics and stats available - for starters via properties, and later on, also using dedicated UI dialogs.

Once that data is provided per module/namespace, it can be easily visualized at run time - and in fact, jsb has done some work related to overloading/tracking listeners/timers, as part of the addon framework.

When it comes to creating MFD avionics via the Canvas system the key takeaway really is stop using getprop/setprop (or props.nas) "as is", and instead use a dedicated MFD framework approach, to encapsulate all getting of state (property, navdb etc) - similarly, polling and timers are often not doing what people expect them to do, same goes for listeners which can easily be invoked too frequently.

Sooner or later, it would make sense to do away with listeners and timers to build up whole subsystems in scripting space, and instead expose the SGSubsystemMgr classes in SimGear to scripting space, so that things like avionics can indeed use a proper C++ interface.


http://wiki.flightgear.org/Howto:Reset/ ... leshooting
Image

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

Re: CRJ700 family goes canvas

Postby Hyphow » Sat Oct 03, 2020 4:12 pm

I'm seeing the same thing actually. It seems that there are some Nasal errors that cause the EFIS code to crash, and after that, the displays don't get updated anymore.

I'll look into it when I can make the time.


Hello tdammers, I did the test again but this time with FG 2020.2.1 nightly version. The glass cockpit works with Canvas, bingo! But I have a new bug, + a new problem: The "B" key seems to be mapped with the ground power button in the left top of the head pannel instead of the parking brake. There is no 3D command for the park brake in the cockpit so I simply can't move on the ground at all! :cry: :lol:
Otherwise the plane from d-jsb repository flies pretty good. The FDM and masses seems more realistic than the non-canvas version. It is a real pleasure to fly SID and STARS in full manual mode, without any help from the autopilot.

Regards,
Gaetan.
My ICAO flight numbers stand like that: XXX5015
When I fly GA planes, my callsign is: F-HYPH

FG 2020.3.18/ / Windows 10, 64bits / 1 To HDD + 256 Go SSD / Intel Core I7-8750H 2,20GHz / GTX 1060 6Go GDDR5 / RAM DDR4 8Go /Thrustmaster Airbus TCA
User avatar
Hyphow
 
Posts: 44
Joined: Thu Apr 09, 2020 9:13 pm
Location: Paris-Orly (FR)
Callsign: F-HYPH or XXX5015
IRC name: Gaëtan
Version: 2020.3.11

Re: CRJ700 family goes canvas

Postby jsb » Sun Oct 04, 2020 10:24 pm

Hi Gaetan,
the "B" is mapped to the parking brake which I abuse as the criterion for "ground service available", that is: parking brake set = ground power avail (unfortunately no lovely 3D model of ground power unit included so far).
Once you release the parking break, some fast and invisible ground worker will remove the also invisible ground power unit out of your way ;-)
The 3D lever is missing in the model and I did not consider it important so far... I just type "B" :)
Thanks for the positive feedback on the FDM - please do not expect the autopilot to work nicely (it works, but needs some love / tuning).
Henning
jsb
 
Posts: 285
Joined: Sat Oct 25, 2014 9:17 pm
Location: Hamburg, Germany
Callsign: D-JSB
Version: next
OS: Win7/Linux

Re: CRJ700 family goes canvas

Postby jsb » Sun Oct 04, 2020 10:29 pm

Regarding performance: I wrote the canvas EFIS framework having in mind to minimize the updates done by nasal code, among others by using listeners, disabling updates for display pages not shown on any screen, reducing update frequency etc...
However, I put quite some hardware into my PC so I might not see performance hits so quickly :/
jsb
 
Posts: 285
Joined: Sat Oct 25, 2014 9:17 pm
Location: Hamburg, Germany
Callsign: D-JSB
Version: next
OS: Win7/Linux

PreviousNext

Return to Aircraft

Who is online

Users browsing this forum: No registered users and 14 guests