I've been using Flightgear to visualize my simulations. I'm currently busy with my masters and it involves control system design for a helicopter landing on a ship deck. In order to visualize this, I run two instances of flightgear and connect them using multiplayer. I run my simulations on a separate computer and stream the data over via the network. For clarity sake, I must say that I want, and need both visualizations to run on one computer (in two instances of flightgear). This is mostly due to the larger jitter problems when running multiplayer over the network.
I have models for both the ship and the helicopter running in MATLAB and I'm able to interface quite easily with the visualization via an sfunction that I wrote. The issue that I'm having is that FlightGear won't seem to bind to any other port than 5502 for an FDM input and, for the life of me, I can't figure out why (resulting in an inability to stream data for both visualizations simultaneously). I've established that its not my sfunction (via a udp test) and I've narrowed it down to either a bug in flightgear or something wrong with my setup scripts. I'm running FlightGear 3.0, but was originally running 2.10 (I upgraded to try fix this, but that didn't help).
The setup scripts that I use are shown below,
Helicopter:
- Code: Select all
start /D "C:\Program Files\FlightGear\bin\Win32\" /MAX fgfs.exe --fg-root="C:\Program Files\FlightGear\data" --units-meters --aircraft=simheli --time-match-local --httpd=5801 --fdm=network,<hostpcip>,5502 --multiplay=out,10,localhost,5504 --multiplay=in,10,localhost,5503 --callsign=heli
Ship:
- Code: Select all
start /D "C:\Program Files\FlightGear\bin\Win32\" /MAX fgfs.exe --fg-root="C:\Program Files\FlightGear\data" --units-meters --aircraft=corvette --time-match-local --httpd=5804 --fdm=network,<hostpcip>,5501 --multiplay=out,10,localhost,5503 --multiplay=in,10,localhost,5504 --callsign=corvette
Flightgear will only work if I use port 5502. Is this standard behavior, or am I missing something? The only other relevant information I can think of is that I use custom models, but I tested it with a different aircraft model and found no difference.
Thanks in advance!
Chris