Board index FlightGear Support Interfacing

WebPanel ... what am I missing  Topic is solved

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

WebPanel ... what am I missing

Postby dhudach » Mon Apr 15, 2019 6:49 pm

I am trying to get webpanel working. I've done some searching and checked a few of the tutorials, but I am stumped. On start in settings, I have --httpd=8080. For flying the Cessna 172 which was in the initial FG install, it's in Aircraft/c172p and the web panel file system path is: Aircraft/c172p/WebPanel/c172p-webpanel.html.

I fire up FG and select the Cessna 172. Based on what I've read, 'aircraft-dir' needs to be in the url. So I assumed 'aircraft-dir' means c172p in the above case. So I tried localhost:8080/c172p/WebPanel/c172p-webpanel.html and I get a 404 response. Hmmm. I tried a variation: localhost:8080/Aircraft/c172p/WebPanel/c172p-webpanel.html. Again a 404 response. The only time I get a response is when I used the actual word 'aircraft-dir' and ignore the c172p path element: localhost:8080/aircraft-dir/WebPanel/c172p-webpanel.html and then I only see a black horizontal bar across the top.

I tried another plane that is downloaded into my home directory, SenecaII. When I used the naming convention that seemed to work with the 172, I did get a response, but only some empty gray boxes but not the instrument cluster that I expected to see.

So I guess I assumed that logic would apply in the use of aircraft-dir to mean c172p, SenecaII, c310 - the actual directory of the name of the plane in the Aircraft folder. But I guess that's not the case. Seeing that it appears that FG will assign the url to localhost:8080/aircraft-dir/WebPanel/webpanelfilename.html, is there a simple reason someone might guess why I'm not seeing the instrument panel that I should be seeing in the browser. I really have done a lot of searching on this and haven't come up when an answer. I am using Firefox and I'm sure javascript is enabled. Possibly is it a javascript version/browser issue? I'm running Linux Mint and Chrome browser is not the speediest on Linux nowadays. Is there another browser I should try? I did try http://localhost:8080/aircraft-dir/WebP ... panel.html on Chrome and I got the same black, horizontal bar at the top of the screen, the same as Firefox.

Is my logic correct in the 8080 url that in all cases it shall be aircraft-dir/WebPanel/ followed by the html file name that I'm trying to reference?


Thanks in advance.
Dave
dhudach
 
Posts: 75
Joined: Mon Apr 13, 2015 11:46 pm

Re: WebPanel ... what am I missing

Postby dhudach » Tue Apr 16, 2019 9:41 am

I have even gone over the guide on Phi here: http://wiki.flightgear.org/Phi and with --httpd=8080 in my start up settings, I can see the screenshot here: localhost:8080/screenshot. But I get a 404 response here: localhost:8080. If I try this:

Once FlightGear is up and running we can access the Phi user interface from the main menu in FlightGear. Select Equipment > Map (opens in browser) or launch a web browser and enter the URL.

I receive a 404 response. So other than the screen shot, I am at a loss how to get this working in a browser. I wouldn't mind some assistance on this.

Thank you,
Dave
dhudach
 
Posts: 75
Joined: Mon Apr 13, 2015 11:46 pm

Re: WebPanel ... what am I missing

Postby wlbragg » Tue Apr 16, 2019 4:24 pm

Try a different port such as
--httpd=5500
Kansas(2-27-15)/Ohio/Midwest scenery development.
KEQA (2-27-15), 3AU, KRCP Airport Layout
User avatar
wlbragg
 
Posts: 4909
Joined: Sat Aug 25, 2012 11:31 pm
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Debain/nVGT640

Re: WebPanel ... what am I missing

Postby dhudach » Wed Apr 17, 2019 1:22 am

I tried 5500, basically the same result. In doing some reading on Phi, and in looking at fgfs log, I could see that the document root is set to Phi. I created that folder and instead of a 404 error at localhost:8080 (or localhost:5500) that I was getting, I get a directory listing. So that tells me that I'm hitting the server. But I am at a loss why I am not seeing the instrument panel that I thought I should see with webpanel. In other words, with 8080 or 5500, I see a black horizontal bar at the top of the web page. Urls are localhost:8080/aircraft-dir/c172p-webpanel.html and following the suggestion localhost:5500/aircraft-dir/c172p-webpanel.html.

If I look at the html source in the browser, I see some references to java script files. Should those files be in any of the flightgear directories under /usr/share/games/flightgear? I don't see any of the .js files in the flightgear folders.

Thanks,
Dave
dhudach
 
Posts: 75
Joined: Mon Apr 13, 2015 11:46 pm

Re: WebPanel ... what am I missing: SOLVED  

Postby dhudach » Wed Apr 17, 2019 5:14 pm

I think I got Phi working. When FG installed from the launchpad site listed on the FG download page (https://launchpad.net/~saiarcot895/+arc ... flightgear), it didn't install Phi. So I found it in Synaptic Package Manager and it wasn't installed. I installed it and now everything seems to be working.
dhudach
 
Posts: 75
Joined: Mon Apr 13, 2015 11:46 pm


Return to Interfacing

Who is online

Users browsing this forum: AhrefsBot [Bot] and 2 guests