Board index FlightGear Support Interfacing

Issues running batch file with MATLAB dos command

Connecting two computers, using generic protocol, connecting with Matlab?

Issues running batch file with MATLAB dos command

Postby jh12350 » Tue Apr 17, 2018 1:56 pm

Hi all,

I have been trying to run FlightGear through a MATLAB/Simulink model with the dos command, and have been running into 2 key issues.

1) After starting the batch file from the MATLAB code, dos('runfg.bat'), FlightGear loads but the aircraft doesn't move even if the simulator isn't paused. The aircraft simply loads in the middle of the air and stays there.
2) After starting FlightGear from dos('runfg.bat'), I lose access to the MATLAB and Simulink windows of work. As a result, I can start FlightGear, but can not drive it with my Matlab/Simulink model.

Thank you in advance for any help!

Shown below is my batch file.

SET FG_ROOT=C:\Program Files\FlightGear\data
C:\"Program Files"\FlightGear\bin\fgfs.exe --aircraft=ASK21 --fdm=null --enable-auto-coordination --native-fdm=socket,in,30,localhost,5502,udp --uBody=30 --fog-disable --enable-clouds3d --start-date-lat=2004:06:01:09:00:00 --enable-sound --visibility=15000 --in-air --prop:/engines/engine0/running=true --disable-freeze --airport=KSFO --runway=01L --altitude=8000 --heading=0 --offset-distance=0 --offset-azimuth=0 --enable-rembrandt
jh12350
 
Posts: 1
Joined: Tue Apr 17, 2018 1:51 pm

Re: Issues running batch file with MATLAB dos command

Postby Pierre92 » Fri Jun 08, 2018 12:31 am

Hi,

I had the same problem a few days ago and I solved it very easily by using
system('runfg.bat')
instead of dos('runfg.bat')

Hope it helps
Pierre92
 
Posts: 1
Joined: Thu Jun 07, 2018 8:23 am


Return to Interfacing

Who is online

Users browsing this forum: No registered users and 4 guests