Board index FlightGear Support Interfacing

Vertical fgpanel

Connecting two computers, using generic protocol, connecting with Matlab?

Re: Vertical fgpanel

Postby Hooray » Fri Mar 13, 2020 6:47 pm

FYI: There's now a set of canvas related unit tests that can be used to learn how a minimal set of canvas related subsystems can be set up in a standalone fashion: https://sourceforge.net/p/flightgear/fl ... Canvas.cxx
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: Vertical fgpanel

Postby dhudach » Fri Mar 13, 2020 6:53 pm

Outstanding. Thanks for the information. Since our previous discussion here I have been checking out the various canvas related links and bookmarking many. In a few months I'm sure I'll be knee deep in fg canvas!! Thanks again.
Flight Instruction Elevator Control: pull back = houses get smaller, push forward = houses get bigger.
dhudach
 
Posts: 118
Joined: Tue Apr 14, 2015 12:46 am

Re: Vertical fgpanel

Postby dhudach » Fri Mar 13, 2020 7:06 pm

In looking at the test canvas link, I think it would be helpful to have a quick example how to compile; linux directory structure, environment perhaps. I know that cmake is used extensively, but is it possible to start building some of these features essentially with raw g++ and options? If not, then possibly a cmake example that gets things going. For me, not knowing much about cmake and building flightgear, a relatively simple, working setup would make a world of difference. Possibly this is not practical. If so, then some guidance where and how to get started building some of these things. Thanks again.
Flight Instruction Elevator Control: pull back = houses get smaller, push forward = houses get bigger.
dhudach
 
Posts: 118
Joined: Tue Apr 14, 2015 12:46 am

Re: Vertical fgpanel

Postby Hooray » Fri Mar 13, 2020 8:09 pm

it would be possible, but depending on your goals, you will sooner or later want to have a full checkout of the repository, and a corresponding build environment.
At least on Linux, scripted compilation should get you going pretty quickly (if you have the bandwidth).

Another option would be a docker container with a pre-downloaded environment, possibly including pre-built binaries and checked out source trees, analogous to this:

http://wiki.flightgear.org/Howto:Buildi ... via_Docker
Image

Walking you through the process of manually building via g++ would be comparatively tedious in my opinion, cmake is not complicated to use.
All that is needed is actually documented in the wiki, and it can be automatically handled by the build script.

cmake will really just need to be configured once, at which point it will create unix makefiles (on Linux), which will in turn invoke g++, while handing dependencies and platform differences.

Obviously, if you want to take things step by step, you could start with a trivial "hello world" style example using just cmake, and then take it from there.

You could start really simple by looking for "demo" (example) projects covering cmake and g++, for example: https://github.com/qedsoftware/cmake-demo

I suppose, youtube will also have dozens of videos walking you through the details of setting up a simple cmake project from scratch, i.e. with your background, that should not take you much more than 20-30 minutes to work through, at which point you'll know the basics, and should be able to make heads and tails of simgear/flightgear and its cmake build system: https://www.youtube.com/results?search_ ... ke+c%2B%2B



For the flightgear specifics, I would refer you to the wiki (search for cmake)

Again, covering flightgear/simgear stuff at this time doesn't make much sense until you have built some basic "hello world"-style programs first.

The other really useful prerequisite is obviously some basic familiarity with git, which you can also get by referring to github/youtube respectively.
I would suggest to only look at fg specifics once git&cmake are sufficiently familiar - and again, our docs are pretty good in that regard actually (wiki), and who knows, maybe you'll even consider getting involved in improving our wiki docs along the way ? :D
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: Vertical fgpanel

Postby dhudach » Fri Mar 13, 2020 8:28 pm

Ok, excellent information. Prior to setting up and running the download and compile script, I tried to build flightgear manually using some of the information I found on the various flightgear pages. It probably comes as no surprise that I had some issues. That's when I discovered download and compile. I managed to get it to build for me. In doing so, it populated all of the source directories so with some effort and time, I should be able to figure out what I need to do. I guess from a practical standpoint if I get stuck at that point and can describe my efforts and issues clearly enough, asking for help to get to the next steps makes sense. As with most things like this, finding the starting point, creating the "Hello World" stub can be the most difficult. I thank you again for pointing me to the pages and documentation. I am looking forward to advancing these projects !!
Flight Instruction Elevator Control: pull back = houses get smaller, push forward = houses get bigger.
dhudach
 
Posts: 118
Joined: Tue Apr 14, 2015 12:46 am

Re: Vertical fgpanel

Postby Hooray » Fri Mar 13, 2020 10:18 pm

if you have the d&c script working, it's actually all done - the complicated thing that remains is navigating the source trees to see where to make changes, and then finding the corresponding build trees to rebuild FlightGear to see your changes take effect.

I agree that we could probably walk you through the whole experience rather easily - personally, I am not sure how exactly the d&c script is set up in terms of directory structures.

Anyway, building a simple hello world-style demo/example using cmake will still be a helpful experience so that you know what it entails to configure/build and reconfigure/rebuild/install a cmake based application

Keep in mind that with FG, there are quite a few 3rd party dependencies involved, i.e. libraries that the project needs, which is why just running "g++" or "make" will simply not suffice - or rather, if you know how to make it suffice, you sooner or later end up scripting the whole thing anyway ;-)
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: Vertical fgpanel

Postby dhudach » Fri Mar 13, 2020 10:41 pm

I agree that the if I am going to even dabble in writing code, it is best to learn what's involved, to kind of learn what's under the hood. And like I said, getting started is always the tricky part. When I wrote my python fgpanel and my SDL/c++ fgpanel, I did crack open a few of the fg source files just to verify some things. So I am kind of familiar with the structure. It's going to be a matter of figuring out how to spin off and build something custom using the framework that's in place. But really, that's almost always the way it works. Your explanations and the information you impart are very important. Thanks again. I will let you know how I'm doing when I get started in a couple months. Thanks again.
Flight Instruction Elevator Control: pull back = houses get smaller, push forward = houses get bigger.
dhudach
 
Posts: 118
Joined: Tue Apr 14, 2015 12:46 am

Re: Vertical fgpanel

Postby Hooray » Fri Mar 13, 2020 10:49 pm

Note that once you know what you are doing, adding a new binary/library to the existing build infrastructure is rather straightforward, and also documented in the wiki.

But you could also just as well look at any of the existing standalone binaries (think stuff in $FG_SRC/utils) and see how they came to be (i.e. refer to the commit logs): https://sourceforge.net/p/flightgear/fl ... ree/utils/

For instance, there are existing utilities whose development got stalled at some point, so that they really boil down to not being much more than a "hello world"-style app, that is built as part of FlightGear: https://sourceforge.net/p/flightgear/fl ... s/traffic/

The whole commit can be seen here: https://sourceforge.net/p/flightgear/fl ... 06de69597/

As you can see, it's just a set of new C++ source files, put into a new directory, alongside a new CMakeLists.txt file, and a new entry to the upper level cmake file.

Again, no rocket science at all ;-)

In other words, whatever you're up to, you could directly modify that directory and add to it - or copy/rename things as needed to add your own little utility.
It will just work ...

Of course, the very instant you begin using other libs/dependencies, you may need to look at some of the other utilities, or rather their cmake files, to see how to add those. And that may also include looking at simgear/flightgear build files. But other than that, it's straightforward actually to have your own "hello world" app and build it alongside fgfs
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: Vertical fgpanel

Postby dhudach » Fri Mar 13, 2020 11:34 pm

Great, thanks again. And I can see where that is the goal, to understand how to add things. The fear of course for the novice builder is that tinkering and building again will break what I've managed to get working. But I've been through that before and when I begin, I'll simply figure out how to create an alternate source structure so that I can build another instance. But these are steps are all part of learning how to do more than just download, compile and fly.
Flight Instruction Elevator Control: pull back = houses get smaller, push forward = houses get bigger.
dhudach
 
Posts: 118
Joined: Tue Apr 14, 2015 12:46 am

Re: Vertical fgpanel

Postby Hooray » Mon Mar 16, 2020 6:04 pm

assuming that you have a working flightgear build, there isn't much of a chance to break things by going to src/utils/traffic and edit the cxx file there - as a matter of fact, I am not even sure if those "utils" are even built by default or if they need to be explicitly enabled.

So, tinkering there should be rather safe actually - also, this isn't any critical stuff at all, it's an optional utility, and you can easily add stuff to it.

And that's exactly how I'd suggest to proceed. If/when your additions are becoming more complex, you can still copy/rename or move things to a dedicated directory.

But for the time being, that's actually a pretty good sandbox environment.

BTW: There's recently been an update/patch to fgpanel involving RPi-hardware and OpenGL ES: https://sourceforge.net/p/flightgear/ma ... /36948957/
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: Vertical fgpanel

Postby wkitty42 » Mon Mar 16, 2020 9:05 pm

fgtraffic used to be built with the rest of FG but i haven't seen it being built in a while on my dnc setup... i've not dug around to find out why but ISTR some cmake file adjustments a year or three back when it stopped being updated... i've just not raised anything about it even though i'm interested in it...
"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: Vertical fgpanel

Postby Hooray » Mon Mar 16, 2020 9:09 pm

thanks, fgtraffic is really just a NOP, i.e. it doesn't serve any particular purpose at all, it never reached any useful state - I really only mentioned it because it is entirely self-contained and extremely simple, i.e. can be used to illustrate how to integrate/build a new tool as part of the FlightGear code base.

Obviously, once you begin adding more simgear/flightgear related functionality, it will make sense to look at other utilities and/or the simgear/flightgear source trees specifically, in order to add the missing bits to implement a new utility.

As things are standing right now, fgtraffic is nothing more than the boilerplate needed to implement a new tool from scratch.
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: Vertical fgpanel

Postby wkitty42 » Mon Mar 16, 2020 9:19 pm

oh... i thought it would depict information of the AI flights... i've never had a chance to look at it...

aside: i also have to go back and redo all of my additional AI traffic logging i had done... it logged a lot more information about an AI craft... i lost it due to a stupid mistake when i was trying to hunt a bug in git and backed up to a commit before i remembered to try to stash my work... it was a week later when i realized what happened... oh well... i've reinvented the wheel several times over the last 30+ years... once more won't hurt too badly...
"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: Vertical fgpanel

Postby dhudach » Thu Mar 19, 2020 12:38 pm

Thanks for the great information. When it's time for me to start working on this, I will definitely refer to these notes. This has been a very helpful discussion!! Thanks again.
Flight Instruction Elevator Control: pull back = houses get smaller, push forward = houses get bigger.
dhudach
 
Posts: 118
Joined: Tue Apr 14, 2015 12:46 am

Re: Vertical fgpanel

Postby Hooray » Mon Apr 06, 2020 6:09 pm

There's now a new article demonstrating how existing subsystems/features can be toggled off at the build system/source code level, exemplified by removing the built-in GUI (called PUI): http://wiki.flightgear.org/FlightGear_and_OpenGL_ES
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

PreviousNext

Return to Interfacing

Who is online

Users browsing this forum: No registered users and 4 guests