Board index FlightGear Support Interfacing

QtJSBSim to FlightGear and CesiumJS

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

QtJSBSim to FlightGear and CesiumJS

Postby daveculp » Fri Apr 27, 2018 10:30 am

Here's a screenshot of QtJSBSim using two different out-the-window viewers, FlightGear and CesiumJS. I just got the FlightGear connection working tonight, and it's still a bit fickle for some reason, but I'll get the kinks out.

Image
User avatar
daveculp
 
Posts: 505
Joined: Sun Feb 24, 2013 2:50 am
Location: Las Vegas, USA
Callsign: DCulp
Version: 2017.3.1
OS: Ubuntu 17.10

Re: QtJSBSim to FlightGear and CesiumJS

Postby legoboyvdlp » Fri Apr 27, 2018 10:33 am

Very interesting... so essentially QTJSBSIM is running a copy of JSBSIM which is being fed to FlightGera and Cesium at the same time?
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: QtJSBSim to FlightGear and CesiumJS

Postby daveculp » Fri Apr 27, 2018 10:43 am

Yes, it makes an interesting comparison. Each viewer has it pluses and minuses. The CesiumJS viewer is a web app displayed on a Qt browser widget. The HUD is overlayed on the browser widget. The FlightGear viewer has a few advantages: more configurability, proper airport terrain height, and a cockpit. Actually a cockpit could be added to the CesiumJS viewer, but that would be a lot of work.
User avatar
daveculp
 
Posts: 505
Joined: Sun Feb 24, 2013 2:50 am
Location: Las Vegas, USA
Callsign: DCulp
Version: 2017.3.1
OS: Ubuntu 17.10

Re: QtJSBSim to FlightGear and CesiumJS

Postby daveculp » Sat Apr 28, 2018 1:48 am

This is the segfault I'm getting. Does anyone recognize the property "arrival-time-sec"?

Code: Select all
Thread 1 "fgfs" received signal SIGSEGV, Segmentation fault.
0x00005555563dccd3 in find_child<char const*> (
    begin=begin@entry=0x5555567a898d "arrival-time-sec",
    end=end@entry=0x5555567a899d "", index=index@entry=0,
    nodes=<error reading variable: Cannot access memory at address 0x40>)
    at /home/dave/FG/simgear/simgear/props/props.cxx:321
321   find_child (Itr begin, Itr end, int index, const PropertyList& nodes)
(gdb) continue
Continuing.
Couldn't get registers: No such process.
Couldn't get registers: No such process.
(gdb) [Thread 0x7fffab437700 (LWP 23981) exited]
[Thread 0x7fffabc38700 (LWP 23980) exited]
[Thread 0x7fffe4da0700 (LWP 23978) exited]
[Thread 0x7fffc96be700 (LWP 23977) exited]
[Thread 0x7fffc9ebf700 (LWP 23976) exited]
[Thread 0x7fffd168d700 (LWP 23972) exited]
[Thread 0x7fffd1e8e700 (LWP 23971) exited]
[Thread 0x7fffd268f700 (LWP 23970) exited]
[Thread 0x7fffd2e90700 (LWP 23969) exited]
[Thread 0x7fffd3691700 (LWP 23968) exited]
[Thread 0x7fffdd652700 (LWP 23962) exited]

Program terminated with signal SIGSEGV, Segmentation fault.
The program no longer exists.



EDIT: Found it. AIAircraft.cxx, line 362, in the announcePositionToController() function. I have AI turned off in my defaults.xml file, so this function should never be called, AFAICT.
User avatar
daveculp
 
Posts: 505
Joined: Sun Feb 24, 2013 2:50 am
Location: Las Vegas, USA
Callsign: DCulp
Version: 2017.3.1
OS: Ubuntu 17.10

Re: QtJSBSim to FlightGear and CesiumJS

Postby wkitty42 » Sat Apr 28, 2018 4:35 pm

make sure you have AI turned off in the launcher, too... if you are using it, that is...
"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: QtJSBSim to FlightGear and CesiumJS

Postby daveculp » Sun Apr 29, 2018 12:28 am

Thanks wkitty42. I'm not using the launcher for this, but you suggestion reminded me to check the nasal scripts that may or may not be running. I removed the route manager and tutorial scripts. That didn't work. I'll try some other tricks.
User avatar
daveculp
 
Posts: 505
Joined: Sun Feb 24, 2013 2:50 am
Location: Las Vegas, USA
Callsign: DCulp
Version: 2017.3.1
OS: Ubuntu 17.10

Re: QtJSBSim to FlightGear and CesiumJS

Postby wkitty42 » Sun Apr 29, 2018 1:54 am

does the .fgfsrc file come into play? if so, make sure you set AI off in there as well...

i don't know if you have access to FG's property tree when running the way you do... if so, you might check in there to ensure that AI is all turned off... you might also want to back up and delete the FG autosave file which may be turning things back on...
"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: QtJSBSim to FlightGear and CesiumJS

Postby daveculp » Sun Apr 29, 2018 6:24 am

Thanks wkitty42. I'll check that too. Good ideas. Today I rebuilt FG and dl'd a new fgdata snapshot. I then ran FG without turning anything off. It worked fine. So, I suppose I'll have to be careful about what I turn off. Maybe I can disable one system at a time and do a test flight before disabling another system. I have a feeling the problem is that one system was expecting another one to be enabled when it wasn't. Just a guess.
User avatar
daveculp
 
Posts: 505
Joined: Sun Feb 24, 2013 2:50 am
Location: Las Vegas, USA
Callsign: DCulp
Version: 2017.3.1
OS: Ubuntu 17.10


Return to Interfacing

Who is online

Users browsing this forum: No registered users and 1 guest