fgVisual version 0.4 Ivan Ngeow 18 Dec 2009 fgVisual reads position/attitude data from Broker and 747IPC to drive FlightGear as a scenery engine for PS1. -------- Compilation: In Linux/FreeBSD, "make" will create the fgvisual executable file. There are no configurable options. -------- Setup: Typically, you will have a few computers on a LAN setup like this: PC 1: 747IPC + PS1 PC 2: FlightGear, fgVisual PC 3: other cool stuff Broker can run on any PC, as long as the FROM.PS1 and TO.PS1 files in the PS1 folder are visible (through a network drive). Typically, Broker is run on PC 1. 1. On PC 2, edit fgvisual.ini: broker_ip=0.0.0.0 IP address of the machine running Broker. TCP port 1863 is assumed. flightgear_ip=127.0.0.1 IP address of the machine running FlightGear. This is typically the same computer as fgVisual. flightgear_port=5901 UDP port number to inject into FlightGear. netfdm_port=5900 UDP port number on which to listen for high-precision data from 747IPC. fg_telnet_port=5900 TCP port number on which to communicate with FlightGear to exchange world variables eg ground elevation. 2. FlightGear should be started with at least these options: --fdm=null --native-gui=socket,in,60,,5901,udp --telnet=5900 I usually add --aircraft=ufo (least CPU-intensive to draw) but you can use any aircraft you want. 3. On PC 1, edit 747IPC.INI: flightgearip=xx.xx.xx.xx Set to the IP address of the machine running fgVisual flightgearport=5900 This should be the same UDP port number as "netfdm_port" above. -------- Running: Start the programs in this order: 1. FlightGear 2. Broker 3. 747IPC (which will load PS1) 4. fgVisual (which will connect to Broker and FlightGear) -------- How it works: Data flows from PS1 to fgVisual down two paths: i) Broker keys (eg IPC.latdeg IPC.latmin etc) ii) double-precision floating point data originally formatted for direct injection into FlightGear v1.0.0. This is called the FGNetFDM structure. FGNetFDM packets are pumped out at 18.2 Hz from 747IPC as UDP datagrams, bypassing Broker. Each packet is approx 400 bytes in size and the network bandwidth is minimal. There is no latency associated with Broker processing of keys. fgVisual processes the incoming raw data and internally smoothens them, then injects them into FlightGear at a nominal rate of 30 Hz. It uses the undocumented FGNetGUI interface, which is activated using the --native-gui commandline option. This interface also uses UDP datagrams. fgVisual obtains ground elevation data from FlightGear using the public 'telnet' interface to the FlightGear property tree. This is a low bandwidth TCP data connection with plain ASCII content. Other sim properties (eg winds, clouds, time of day) can also be set using this interface in future. -------- License This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.