Board index FlightGear Development New features

Heaven or Hell? Phi sneak preview.

Discussion and requests for new features. Please note that FlightGear developers are volunteers and may or may not be able to consider these requests.

Re: Heaven or Hell? Phi sneak preview.

Postby Alant » Fri Sep 18, 2015 3:25 pm

Torsten

I am trying to make a standalone version of an autpilot panel similar to the Senaca11 autopilot /engine HTML panels.

My panel works fine when it is called from PHI. but I can not get it to be interactive when I call it stand-alone (as in the ZivkoEdge EFIS panel.)

I want the panel to be stand-alone so that it can run on an Android or similar.

Do you have any clues to help me?

Thanks

Alan
Alant
 
Posts: 1219
Joined: Wed Jun 23, 2010 6:58 am
Location: Portugal
Callsign: Tarnish99
Version: latest Git
OS: Windows 10/11

Re: Heaven or Hell? Phi sneak preview.

Postby Soitanen » Tue Sep 22, 2015 8:29 am

Bug with POSITION menu on iPad/Chrome. I want to re-position aircraft via ipad, but I can only select airport, view it's chart, but not to scroll down to select airport. But if I open this page from desktop computer I can scroll down and select proper runway.
Boeing 737-300. Reworked cockpit, FDM, autopilot and much more. WIP.
Boeing 737-800. WIP. Canvas PFD and ND.
Antonov An-24B. Made from scratch. Very good FDM. 3D model by Adrian. WIP.
Project Russia (some cities, based on OSM with custom objects).
Soitanen
 
Posts: 489
Joined: Sat Jun 16, 2012 7:50 am
Location: Saint-Petersburg, Russia
Version: git
OS: Linux Mint 17

Re: Heaven or Hell? Phi sneak preview.

Postby wkitty42 » Tue Sep 22, 2015 4:36 pm

@Soitanen: you might should file this on the bug tracker (link at the top) and make sure you select the phi interface so that it will be seen and handled sooner rather than later ;)
"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: Heaven or Hell? Phi sneak preview.

Postby Alant » Mon Oct 19, 2015 11:46 pm

Thanks (not) for any replies to my request for help.

My general impression with the phi effort is that has great possibilities, but has no documentation and requires an in-depth knowledge of HTML5, CSS, SVG, javascript and countless javascript addons/libraries.

As such it is great for someone who has all of this at his fingertips, but ....

Alan
Alant
 
Posts: 1219
Joined: Wed Jun 23, 2010 6:58 am
Location: Portugal
Callsign: Tarnish99
Version: latest Git
OS: Windows 10/11

Re: Heaven or Hell? Phi sneak preview.

Postby legoboyvdlp » Tue Oct 20, 2015 2:41 am

Well, heck, its a work in progress.
How do you expect documentation if it is not even in the official release yet?
Plus, there are countless tutorials online.
Go ask on the mailing lists for help -- core devels rarely look on these forums. Except for Hooray and Thorsten
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: Heaven or Hell? Phi sneak preview.

Postby Alant » Tue Oct 20, 2015 9:33 am

Yes, that sounds easy.
However, as I said in my post, Phi is using a large number of HTML5 technologies.
My list is HTML5, Javascript, SVG, CSS. On top of this there the Javascript addons Jquery, Knockout, Leaflet, Sammy, Clockpicker, Flot, Require, Jquery-ui, etc etc etc.
The example code in Fgdata and the Senaca11 aircraft shows what can be done, but also reveals that this approach results in a near perfect example of code obfuscation. The data flow and linkage between all of these packages and Flightgear is very well hidden.
Yes I have searched for and looked at countless tutorials on the web, but have found very little of direct relevance.

Alan
Alant
 
Posts: 1219
Joined: Wed Jun 23, 2010 6:58 am
Location: Portugal
Callsign: Tarnish99
Version: latest Git
OS: Windows 10/11

Re: Heaven or Hell? Phi sneak preview.

Postby bugman » Tue Oct 20, 2015 10:13 am

When a feature is in-development and you wish to understand it, the only way is to look at the original sources. In this case that would be the FGData repository. To understand why there is no documentation in general for pretty much all software projects that are at an in-development stage, you have to understand that it is often an enormous waste of time to create such documentation. The reason is that things change so rapidly that documentation you wrote a few months ago can be so hopelessly out of date that it is completely useless and has to be thrown away. Code refactoring is a major part of software development, as well as the concept of abandoning developments and ideas for a better solution. Writing documentation, tutorials, etc. at this stage is pointless.

Regards,
Edward
bugman
Moderator
 
Posts: 1808
Joined: Thu Mar 19, 2015 10:01 am
Version: next

Re: Heaven or Hell? Phi sneak preview.

Postby Alant » Tue Oct 20, 2015 10:19 am

I think that my original post was clear and polite enough to start some form of discussion.
Alan
Alant
 
Posts: 1219
Joined: Wed Jun 23, 2010 6:58 am
Location: Portugal
Callsign: Tarnish99
Version: latest Git
OS: Windows 10/11

Re: Heaven or Hell? Phi sneak preview.

Postby Hooray » Tue Oct 20, 2015 10:24 am

Alant wrote:My general impression with the phi effort is that has great possibilities, but has no documentation and requires an in-depth knowledge of HTML5, CSS, SVG, javascript and countless javascript addons/libraries.

As such it is great for someone who has all of this at his fingertips, but ....

The example code in Fgdata and the Senaca11 aircraft shows what can be done, but also reveals that this approach results in a near perfect example of code obfuscation. The data flow and linkage between all of these packages and Flightgear is very well hidden.
Yes I have searched for and looked at countless tutorials on the web, but have found very little of direct relevance.


to be fair, getting started with (D)HTML5/JavaScript is certainly much easier than learning all the bells and whistles of home-grown, FlightGear-specific, solutions like PUI/XML, Nasal or even Canvas.

Personally, I don't quite see much of a barrier to entry when it comes to HTML5/JavaScript or FG interfacing. FlightGear could be in great shape if more "industry standards" had been adopted earlier - and in fact, it is in pretty good shape when it comes to its non-proprietary file formats, because it is using a subset of XML.

I do however agree that it is using tons of fancy toolkits, without any formalized/standardized means to link those together - also, I find the way the interfacing is directly mapped to C++ unnecessarily inflexible, i.e. even if depending on Nasal should be undesirable, it would be better to use lookup tables implemented in XML space to expose missing APIs, instead of hard-coded C++ routines.

And while it is true that there's no real Phi documentation yet, the forum/devel list archives a full with postings made by Torsten documenting /some/ internals - I once began collecting related quotes on the wiki to bootstrap a "Phi" article, but then James came up with the Qt5 launcher, so that I focused on that instead:

http://wiki.flightgear.org/Phi
http://wiki.flightgear.org/Integrated_Qt5_Launcher

Basically, most of these articles start out with tons of quotes, and can be refined over time (by adding screen shots and rewriting stuff).

Originally, the Qt5 article looked pretty much like the Phi article - and none of these have been added to by their respective developers. In other words, there's some bootstrapping needed currently.
You could start this by adding some of the Phi screen shots that Torsten posted and then begin adding a development section, and fill in any questions you may have - I am sure that Torsten will be delighted to see someone interested in documenting his work, and paving the way for others interested in joining him creating/maintaining Phi.

Personally, I am unlikely to get involved in maintaining the article, simply because of the Qt5 effort - I could have just well deleted the Phi article, but opted not to do so, because it may still contain pointers that others consider helpful.

As can be seen by the Qt5 article on the wiki, bootstrapping wiki articles can work pretty well.
And as could be seen recently, a good wiki article can even be used to bootstrap entirely new features from scratch:
http://wiki.flightgear.org/Howto:Proces ... ing_Canvas
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

Re: Heaven or Hell? Phi sneak preview.

Postby Johan G » Wed Oct 21, 2015 11:54 am

Alant wrote in Tue Oct 20, 2015 9:33 am:My list is HTML5, Javascript, SVG, CSS. On top of this there the Javascript addons Jquery, Knockout, Leaflet, Sammy, Clockpicker, Flot, Require, Jquery-ui, etc etc etc.

I would guess all of them would have to be in the right version span to cooperate nicely and on top of that each of them may very well have other dependencies. :| :roll:

In comparison Canvas GUI, even in its current state is perhaps easier to handle for many purposes.
Low-level flying — It's all fun and games till someone looses an engine. (Paraphrased from a YouTube video)
Improving the Dassault Mirage F1 (Wiki, Forum, GitLab. Work in slow progress)
Some YouTube videos
Johan G
Moderator
 
Posts: 6629
Joined: Fri Aug 06, 2010 6:33 pm
Location: Sweden
Callsign: SE-JG
IRC name: Johan_G
Version: 2020.3.4
OS: Windows 10, 64 bit

Re: Heaven or Hell? Phi sneak preview.

Postby Hooray » Wed Oct 21, 2015 12:43 pm

Johan G wrote in Wed Oct 21, 2015 11:54 am:In comparison Canvas GUI, even in its current state is perhaps easier to handle for many purposes.


It depends on your use-case: All technologies used in the Phi/Qt5 efforts could be considered "industry standards" (HTML5, JavaScript, Qt itself), with excellent documentation, support and tooling available.

A Canvas-based UI cannot satisfy the Phi use-case, i.e. providing an independent GUI front-end that does not require any software installation other than a browser. Even in the most optimistic case, Canvas will require the fgfs binary as its run-time environment - just like the Qt5 UI needs the Qt5 runtime.

PUI/XML really are niche solutions that are only used in this form by the FlightGear project, while it is relatively easy to get started with creating/adding and maintaining GUI dialogs, they are also extremely inflexible and don't scale particularly well.

The only way for the Canvas UI to provide a remote UI would be to serve SVG files via httpd/mongoose and hook them up to a subset of Nasal/JavaScript that both languages "understand", i.e. to set/get properties and invoke RPC functionality (e.g. fgcommands).

In the days prior to Phi, we actually toyed with the idea of not just using SVG in FG to create/render a widget via Canvas (ShivaVG), but to also serve SVG files with embedded code - since Torsten's Phi effort, that idea has become kinda obsolete.

But technically it would be possible to serve a SVG-based widget to a browser - for that to work, all callbacks added to events, would need to be valid JavaScript AND Nasal - even though it would be possible to dynamically recompile Nasal to be valid JavaScript (in fact, you could make Phi work with existing PUI/XML dialogs, including Nasal, doing exactly that)

And once you think about it, any Canvas could be represented as a SVG in memory and vice versa - including evne complex MFDs - i.e. we already have a parser that turns svg/xml into Canvas nodes, we could just as well have a parser doing the opposite to serve a Canvas node/group as SVG using a little serialization scheme.

Had this relationship been obvious earlier, SVG could in fact be the internal representation format of any Canvas

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: Heaven or Hell? Phi sneak preview.

Postby Johan G » Thu Oct 22, 2015 4:18 am

Sorry for being a bit grumpy when posting that.
Low-level flying — It's all fun and games till someone looses an engine. (Paraphrased from a YouTube video)
Improving the Dassault Mirage F1 (Wiki, Forum, GitLab. Work in slow progress)
Some YouTube videos
Johan G
Moderator
 
Posts: 6629
Joined: Fri Aug 06, 2010 6:33 pm
Location: Sweden
Callsign: SE-JG
IRC name: Johan_G
Version: 2020.3.4
OS: Windows 10, 64 bit

Re: Heaven or Hell? Phi sneak preview.

Postby Ianio » Mon Mar 07, 2016 11:31 pm

Hi,

has something happend to the webserver aspect of this since 2016.1?

im running standard install on linux 64bit with Chrome browser, tried browsing from android on local netowrk with same results.

The required map page does not load. see screen dump. using any accepted #Heading tag brings the same blank page. using a different port brings "webpage does not exist.
Image

i now realise that Phi can be used for so much more but the map via webserver is critical to my setup.

is this just me? it was working fine on v3.4 with same hardware.

thanks in advance.
ianio
Ianio
 
Posts: 21
Joined: Sun Feb 28, 2016 12:16 pm
Location: UK
Callsign: ianio
Version: 2016.1
OS: Linux Mint 17.3

Re: Heaven or Hell? Phi sneak preview.

Postby Torsten » Mon Mar 07, 2016 11:38 pm

Try clearing your browser cache.
flightgear.org - where development happens.
User avatar
Torsten
 
Posts: 648
Joined: Fri Feb 01, 2008 10:22 pm
Location: near Hamburg, Germany
Callsign: offline
Version: next
OS: Linux

Re: Heaven or Hell? Phi sneak preview.

Postby wlbragg » Tue Mar 08, 2016 1:06 am

I haven't tested it thoroughly but the map doesn't appear to play well with Firefox. The map squares do not align properly and don't always load (if I recall correctly), it's so bad it's unusable. But it seems to work really well with Chrome.
Kansas and Ohio/Midwest scenery development.
KEQA, 3AU, KRCP Airport Layout
Intel i7/GeForce RTX 2070/Max-Q
User avatar
wlbragg
 
Posts: 7586
Joined: Sun Aug 26, 2012 12:31 am
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Linux/RTX 2070

PreviousNext

Return to New features

Who is online

Users browsing this forum: No registered users and 5 guests