Board index FlightGear Development Aircraft

J-3Cub FG1000 Errors

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

J-3Cub FG1000 Errors

Postby Stevenj279 » Tue Aug 11, 2020 2:21 am

I recently downloaded the J-3 Cub aircraft that included a variant with the FG1000 MFD/PFD glass cockpit displays. When I loaded the Cub in FG 2018.3.5 and when attempting to load either type of display nothing happens and the following error appears in the Nasal console:

Nasal runtime error: No such member: toggle_fg1000_PFD at /sim/bindings/menu/binding[106], line 1

and the same for the MFD, but references binding[107], line 1

One thing I have also noted with the few other aircraft with the FG1000, it seems that some type of error most always occurs - I am relatively new to FG, but believe I know enough to ensure that it is configured properly. In fact, I can successfully fly a wide variety of aircraft, both fixed wing and rotary, but seem to have no luck seeing a functioning FG1000 in the few that have it.

Any insight would be greatly appreciated - I would really like to have a functional Moving Map Display using FG1000, and ultimately be able to add it's capabilities to other aircraft (once I can see it actually working).
Williamsburg, VA
Win 7 Pro 64-bit, Intel Core i7-4700MQ 2.40 GHz
32 Gb Ram, 500 GB SSD, 2 TB SCSI HDD, NVIDIA GeForce GTX 780M
Stevenj279
 
Posts: 46
Joined: Fri Jul 24, 2020 12:26 am

Re: J-3Cub FG1000 Errors

Postby stuart » Tue Aug 11, 2020 4:08 pm

Hi Steven,

Have you tried a more recent version of FG? For example 2020.2?

I don't recall if the J3Cub is compatible with the 2018.3 release.

-Stuart
G-MWLX
User avatar
stuart
Moderator
 
Posts: 1584
Joined: Wed Nov 29, 2006 9:56 am
Location: Edinburgh
Callsign: G-MWLX

Re: J-3Cub FG1000 Errors

Postby wlbragg » Tue Aug 11, 2020 5:18 pm

As stuart said, I developed and tested it against 2019, so it may be 2018 isn't new enough for the Glass cockpit.
Kansas(2-27-15)/Ohio/Midwest scenery development.
KEQA (2-27-15), 3AU, KRCP Airport Layout
Intel i5 3570K AMDRX480
User avatar
wlbragg
 
Posts: 5642
Joined: Sat Aug 25, 2012 11:31 pm
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Linux/AMDRX480

Re: J-3Cub FG1000 Errors

Postby Stevenj279 » Tue Aug 11, 2020 10:57 pm

Thanks Gents - I didn't see 2020.2 but am downloading 2020.1.3 (executable) right now and will give it a shot. Quick question: Is this executable version full-featured? Or is the version(s) that need to be compiled required?
Williamsburg, VA
Win 7 Pro 64-bit, Intel Core i7-4700MQ 2.40 GHz
32 Gb Ram, 500 GB SSD, 2 TB SCSI HDD, NVIDIA GeForce GTX 780M
Stevenj279
 
Posts: 46
Joined: Fri Jul 24, 2020 12:26 am

Re: J-3Cub FG1000 Errors

Postby Stevenj279 » Wed Aug 12, 2020 12:16 am

Otay! Seems to be working in the newer version - Thanks again!

I'm looking at the MFD with the moving map - the map being displayed appears to be an Operational Navigational Chart (ONC).

Where is the actual map within the file structure? In fg1000.nas, it references the EIS-J3Cub.svg graphic file, but that does not contain the actual map graphic, only the placeholder (I'm assuming...bad thing to do...;-) ).
Williamsburg, VA
Win 7 Pro 64-bit, Intel Core i7-4700MQ 2.40 GHz
32 Gb Ram, 500 GB SSD, 2 TB SCSI HDD, NVIDIA GeForce GTX 780M
Stevenj279
 
Posts: 46
Joined: Fri Jul 24, 2020 12:26 am

Re: J-3Cub FG1000 Errors

Postby stuart » Wed Aug 12, 2020 3:46 pm

Hi Steven,

Glad it's working.

The maps are downloaded on-the-fly from various online resources. For example OpenAIP.

-Stuart
G-MWLX
User avatar
stuart
Moderator
 
Posts: 1584
Joined: Wed Nov 29, 2006 9:56 am
Location: Edinburgh
Callsign: G-MWLX

Re: J-3Cub FG1000 Errors

Postby Stevenj279 » Wed Aug 12, 2020 6:47 pm

Thanks Stuart - Is there a way to load a static map instead? It would still be in svg format, but would give me the ability to tailor it to my needs.
Williamsburg, VA
Win 7 Pro 64-bit, Intel Core i7-4700MQ 2.40 GHz
32 Gb Ram, 500 GB SSD, 2 TB SCSI HDD, NVIDIA GeForce GTX 780M
Stevenj279
 
Posts: 46
Joined: Fri Jul 24, 2020 12:26 am

Re: J-3Cub FG1000 Errors

Postby stuart » Thu Aug 13, 2020 1:42 pm

It would be possible with some Nasal code changes.

What exactly are you wanting to display?
G-MWLX
User avatar
stuart
Moderator
 
Posts: 1584
Joined: Wed Nov 29, 2006 9:56 am
Location: Edinburgh
Callsign: G-MWLX

Re: J-3Cub FG1000 Errors

Postby Stevenj279 » Thu Aug 13, 2020 11:55 pm

What I'm trying to do is to add my own overlays onto the MFD map display instead of having them retrieved in real-time via http. For example, take a high-res pic of an area of the earth and add my own polygons, such as simple flight routes, alternate routes, annotated areas (maybe surrounded by a box) such as can be done in Google Earth with kml object files. The aircraft would still need to be depicted and moving within the map during flight. Being able to do that would be a great first step, then modifications/enhancements could later include the ability to turn on or off these overlays via the buttons in the FG1000 MFD. Hoping this is possible...
Williamsburg, VA
Win 7 Pro 64-bit, Intel Core i7-4700MQ 2.40 GHz
32 Gb Ram, 500 GB SSD, 2 TB SCSI HDD, NVIDIA GeForce GTX 780M
Stevenj279
 
Posts: 46
Joined: Fri Jul 24, 2020 12:26 am

Re: J-3Cub FG1000 Errors

Postby stuart » Fri Aug 14, 2020 8:14 pm

Hi Steven,

Yes, it's possible, but to do so you'd need to modify the FG1000 and create a new canvas map layer with the graphics you want to use.

Or you could do something like create a local web server service Slippy Map tiles.

It would be a fairly steep learning curve if you've not messed around the internals of FlightGear before, but you'd learn a huge amount about FlightGear scripting in Nasal in the process.

-Stuart
G-MWLX
User avatar
stuart
Moderator
 
Posts: 1584
Joined: Wed Nov 29, 2006 9:56 am
Location: Edinburgh
Callsign: G-MWLX

Re: J-3Cub FG1000 Errors

Postby Hooray » Tue Aug 18, 2020 10:20 am

Like Stuart said, this is perfectly possible, and does not require any C++ changes (no patching/rebuilding).

However, I would suggest NOT to prototype this using the FG1000, but rather just use the existing map-canvas.xml dialog and add your new layer there.
New MapStructure layers can be easily created by taking existing ones and using them as template. Depending on your background, this might take only a few minutes - for instance, if you have previously coded in JavaScript, C or C++ it's all pretty straightforward.


For prototyping purposes, that will suffice - and will be much more lightweight.
Once you have a new MapStructure layer, it can be also easily used by the FG1000.

But for development/testing purposes, do yourself a favor and ignore the FG1000, it's far too complex unless you happen to have a strong background in software engineering/computer science, because it's using a ton of abstraction layer, whereas the "pure MapStructure" path would merely be about using MVC and OOP in a JavaScript-like programming language, and comes with a ton of examples, too.

http://wiki.flightgear.org/Canvas_MapStructure_Layers
http://wiki.flightgear.org/MapStructure
http://wiki.flightgear.org/Canvas_Radar
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: 11885
Joined: Tue Mar 25, 2008 8:40 am

Re: J-3Cub FG1000 Errors

Postby stuart » Tue Aug 18, 2020 10:42 am

Good suggestion Hooray. Much easier to develop on map-canvas initially. Steven - once you've got something working on map-canvas, drop me a line and I can plumb it into a custom version of FG1000 if you want.

-Stuart
G-MWLX
User avatar
stuart
Moderator
 
Posts: 1584
Joined: Wed Nov 29, 2006 9:56 am
Location: Edinburgh
Callsign: G-MWLX

Re: J-3Cub FG1000 Errors

Postby Hooray » Tue Aug 18, 2020 11:28 am

Stevenj279 wrote in Thu Aug 13, 2020 11:55 pm:What I'm trying to do is to add my own overlays onto the MFD map display instead of having them retrieved in real-time via http. For example, take a high-res pic of an area of the earth and add my own polygons, such as simple flight routes, alternate routes, annotated areas (maybe surrounded by a box) such as can be done in Google Earth with kml object files.


FWIW, I believe KML is a rather simple ZIP compressed XML format (?) - If so, it would be fairly straightforward to process those files using existing Nasal/fgcommand tooling.
In other words, writing a parser to load a set of KML files and render them as overlays should be perfectly possible, if that's what you'd like to do.

As a matter of fact, James and other senior contributors have been suggesting to add support for ESRI shape files (vector data) to the Canvas system for many years, since that's the kind of feature that'd be required to implement modern avionics. I believe the osgEarth port even included GDAL/OGR, so that it'd be pretty straightforward to implement a dedicated canvas element from scratch. I haven't checked in a while, but I seem to recall that the scenery folks are now also using GDAL (?). I suppose Stuart, James or Scott would be in a better position to tell if GDAL is already a required depdendency - but if that's the case, coming up with a ReaderWriter plugin would indeed be fairly straightforward for someone with a background in C++/OSG.


The aircraft would still need to be depicted and moving within the map during flight. Being able to do that would be a great first step, then modifications/enhancements could later include the ability to turn on or off these overlays via the buttons in the FG1000 MFD. Hoping this is possible...


All of this is absolutely possible, but it will indeed be much easier to prototype the new layer(s) by using just map-canvas.xml, and once you have something that feel comfortable sharing, just get in touch with Stuart to review/integrate this properly, the corresponding work is rather straightforward thanks to the structure of ... "MapStructure" :lol:


EDIT: Yes, it seems I was right: GDAL is already being looked up when configuring/building FlightGear: https://sourceforge.net/p/flightgear/fl ... s.txt#l439
And GDAL also comes with KML support: https://gdal.org/drivers/vector/kml.html
Note that GDAL comes with support for a ton of file formats, including ESRI, OSM, and geo-referenced PDF

In the context of the FG1000, Stuart actually mentioned on several occasions that he'd need to extend the Canvas system (the core) to implement support for more sophisticated features like EFBs - e.g. rendering approach charts, PDF files etc:

Internally, GDAL is also being used by osgEarth: http://docs.osgearth.org/en/latest/refe ... /gdal.html

To learn more about creating your own native Canvas elements (e.g. for GDAL support), see:

http://wiki.flightgear.org/Canvas_Sandbox
http://wiki.flightgear.org/Canvas_Development
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: 11885
Joined: Tue Mar 25, 2008 8:40 am


Return to Aircraft

Who is online

Users browsing this forum: No registered users and 5 guests