Board index FlightGear Development Canvas

pulling ARPT properties for ND/MFD Boeing 777-300

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.

pulling ARPT properties for ND/MFD Boeing 777-300

Postby tldrc » Tue May 24, 2022 3:56 am

Hi,

I am building a frontend ND in Unity game engine (reproducing flightgear displays) for Boeing 777-300.
I need to get the list of elements to be rendered on the ND like the way points and airports so that I can replicated it on my own display outside flight gear.

Most of the data exists as properties and I have been reading through the xml to figure out what properties corresponds to.
The elements that display on the ND seem more complicated to access.
So far I have narrowed it down to these two files
ND.nas
navdisplay.mfd
but I am not sure how to proceed forward.
From what I see, the canvas is drawn with svg elements but I have no idea where to find the screen positions.

Any help would be much appreciated. Thanks.
tldrc
 
Posts: 19
Joined: Wed May 19, 2021 2:49 am

Re: pulling ARPT properties for ND/MFD Boeing 777-300

Postby TheEagle » Tue May 24, 2022 10:12 am

If the ND is drawn from an SVG file, you can get the screen positions from that SVG file.
Cessna 210 (Wiki)
My other aircraft: my wiki profile !
Other: FGTools (GitHub)
World tour: View on SkyVector
Please consider donating $1 / €1 to help me finance a new camera !
User avatar
TheEagle
 
Posts: 3411
Joined: Sat May 01, 2021 3:27 pm
Location: France
Pronouns: You, he
Callsign: F-EAGLE
IRC name: none
Version: Git next
OS: Ubuntu Studio 22.04

Re: pulling ARPT properties for ND/MFD Boeing 777-300

Postby Isaak » Tue May 24, 2022 11:52 am

If I'm not mistaken, the ND is based on the default Boing ND which resides in fgdata. Feel free to ping James on the mailing list as he's done quite some work on it in the past. I 've never managed to look into the ND, but a fix for the various bugs that occur would be appreciated!

If you'd like to get your work merged into the FGAddon 777: please send me a message with your Sourceforge ID and I'll invite you for the 777 dev repo.
Want to support medical research with your pc? Start Folding at Home and join team FlightGear!
Isaak
 
Posts: 768
Joined: Sat Jun 04, 2011 3:52 pm
Location: Hamme, Belgium
Pronouns: he, him
Callsign: OO-ISA
Version: next
OS: Windows 10

Re: pulling ARPT properties for ND/MFD Boeing 777-300

Postby Hooray » Fri May 27, 2022 10:39 am

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: pulling ARPT properties for ND/MFD Boeing 777-300

Postby tldrc » Wed Jun 01, 2022 5:05 am

Hi,

Thanks for the replies.
I have tried looking at the source code of fgqcanvas.

If I understand correctly,
the canvas elements are getting streamed instead of the properties/data (ie airport lat lng).
It looks like this might be what I am looking for, however I am worried that the canvas is not encoded in a common
standard like a jpg or svg which makes it harder for me to use in a non flightgear environment.
I am developing in the Unity game engine.

These are what I have read through
https://wiki.flightgear.org/Canvas
viewtopic.php?p=300990

I need help with setting up the web socket to interface with flightgear (like what the fgqcanvas is doing)
and decoding the data that is getting streamed.

Any other ideas on how I could render my own ND in unity with flightgear as a backend would be much appreciated. Thanks.
tldrc
 
Posts: 19
Joined: Wed May 19, 2021 2:49 am

Re: pulling ARPT properties for ND/MFD Boeing 777-300

Postby Hooray » Wed Jun 01, 2022 7:52 am

if you want to render the ND (any Canvas based display) yourself, see the FGQCanvas approach.
If you want FlightGear to handle the rendering, and merely fetch an updated image, see the built-in httpd and use that for streaming (the screen shot shows a Canvas being displayed in firefox):

https://wiki.flightgear.org/Read_canvas_image_by_HTTP
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


Return to Canvas

Who is online

Users browsing this forum: No registered users and 8 guests