Phi: Difference between revisions

1,498 bytes removed ,  22 March 2016
m
Fixed some references and few minor mistakes
(Quoting cleanup)
m (Fixed some references and few minor mistakes)
Line 75: Line 75:
<ref name="HelloFGP2.0">[[http://sourceforge.net/p/flightgear/mailman/message/32840486/ Goodbye fgPanel, Hello fgPanel 2.0]]</ref>
<ref name="HelloFGP2.0">[[http://sourceforge.net/p/flightgear/mailman/message/32840486/ Goodbye fgPanel, Hello fgPanel 2.0]]</ref>


The most exciting part is, the web based instrument runs on any modern platform without the need to install any spooky software. It also runs flawless on my Android phone and tablet and of course in a standard browser (Firefox and Chrome tested). On mobile OSes, you can add it to your home screen, making this a full-screen web-app to get rid of the browser navigation and toolbar (like shown in the screenshot). There is not much required on the FlightGear side - recent git has all it needs. Workload for FlightGear is neglible, for the current EFIS, on page load a few hundret kilobyte of static files are transmitted and once fully loaded, 10 (ten!) properties are observed and transmitted on change. All the rendering takes place on the web browser's device.
The most exciting part is, the web based instrument runs on any modern platform without the need to install any spooky software. It also runs flawless on my Android phone and tablet and of course in a standard browser (Firefox and Chrome tested). On mobile OSes, you can add it to your home screen, making this a full-screen web-app to get rid of the browser navigation and toolbar (like shown in the screenshot). There is not much required on the FlightGear side - recent 2016.1.1 has all it needs. Workload for FlightGear is negligible, for the current EFIS, on page load a few hundred kilobytes of static files are transmitted and once fully loaded, 10 (ten!) properties are observed and transmitted on change. All the rendering takes place on the web browser's device.
<ref>[[HelloFGP2.0]]</ref>
<ref name="HelloFGP2.0"></ref>


== EFIS via SVG ==
== Making Web-Panel instruments ==
{{FGCquote
I use Inkscape to draw the SVGs. The objects to animate are selected by their id attribute, so you should set a reasonable name for those. To get proper scaling of the SVGs, you need to set the viewBox: width, <br/>
  |I use Inkscape to draw the svgs. The elements to animate are selected by <br/>
height, and preserveAspectRation of the <svg> tag element. It should be also possible to draw SVG's on the fly e.g. from svg.js and animate this as well. Not much has been on this front.
their id attribute, so you have to set a reasonabl name for those.<br/>
<ref name="HelloFGP2.0"></ref>
To get proper scaling of the svg, you need to set the viewBox, width, <br/>
height and preserveAspectRation of the <svg> element.<br/>
It should be also possible to draw svg on the fly e.g. from svg.js and <br/>
animate this, too. I havn't looked into this so far.<br/>
<br/>
The port number for the httpd is set from the commandline, use whatever <br/>
suits your needs. No other ports are involved or hardcoded, everything <br/>
runs over http protocol at that port, the websocket included. The <br/>
individual services are distinguished by their url (/props/, /json/, <br/>
/screenshot/, PropertyListener etc). Again, everything runs over port <br/>
8080 (or whatever you told http to bind to).
  |{{cite web |url=http://sourceforge.net/p/flightgear/mailman/message/32854893/
    |title=<nowiki>Re: [Flightgear-devel] Goodbye fgpanel - hello fgpanel 2.0</nowiki>
    |author=<nowiki>Torsten Dreyer</nowiki>
    |date=<nowiki>2014-09-22</nowiki>
  }}
}}
 
{{FGCquote
  |Personally, I like to stick with fgdata as the repo. Master branch is a <br/>
good enough playground. During the development cycle things don't <br/>
necessarily have to be stable to get checked in there, if they are new <br/>
and mostly unused parts and do not get sucked into the running fgfs <br/>
instance.<br/>
I am planning to move the .js library files out of the aircraft <br/>
directory into common fgdata once they seem to be in someway usable.<br/>
If you want to contribute to that area, I'm happy to handle merge <br/>
requests or appyl diffs.
  |{{cite web |url=http://sourceforge.net/p/flightgear/mailman/message/32854893/
    |title=<nowiki>Re: [Flightgear-devel] Goodbye fgpanel - hello fgpanel 2.0</nowiki>
    |author=<nowiki>Torsten Dreyer</nowiki>
    |date=<nowiki>2014-09-22</nowiki>
  }}
}}
67

edits