Erik Hofman wrote:
2. Has anyone interfaced actual hardware, i.e. switches, etc. with
flightgear? Again, are there any references for this?
Yep, it has been done. No there is no single solution. However there
is a network interface which could be used for this. The header files
are also the documentation so you will need to take a look at the
native_ctrls.hxx file in the FlightGear/src/Network directory.
John Wojnaroski has done quite a bit of hardware interfacing for his 747
cockpit project:
http://www.flightgear.org/Projects/747-JW/
The hard part is the hardware, electronics, and device drivers. Writing
the glue code in FG (if necessary) is the easiest part of the task.
For the ATC 710 project Erik mentioned I wrote a Linux device driver for
their hardware and then built a chunk of code in FG to talk to the
device driver. I went with a data-driven approach because the interface
will be reused for future more complex projects. The result is an xml
config file that specifies which switches, lights, analog inputs/outputs
connect to which properties (of the FlightGear property system) with
the ability to do a small amount of pre-filtering of data as needed. I
also built hooks in for nasal which allow me to some more complex things
where direct translation of hardware inputs to FlightGear properties
wasn't possible.
I chose to add a flightgear module in code for this project, but I could
just have easily sent the data over via the network. There always seems
to be several ways to do the same thing in FG. Which is best depends
on your particular application and preferences and amount of time
available ...
Regards,
Curt.
--
Curtis Olson http://www.flightgear.org/~curt
HumanFIRST Program http://www.humanfirst.umn.edu/
FlightGear Project http://www.flightgear.org
Unique text: 2f585eeea02e2c79d7b1d8c4963bae2d
_______________________________________________
Flightgear-devel mailing list
[email protected]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d