Error in fganimate (line 24)

1 次查看(过去 30 天)
Shams ur Rehman
Shams ur Rehman 2022-2-24
移动Steve Miller 2023-5-9
hi,
I face an issue and don't find any solution of it. the code which i put in matlab is:
tdata = csvread('fg_log.csv',1,0);
% ts = [tdata(:,1) convang(tdata(:,[3 2]),'deg','rad') tdata(:,4) ...
% convang(tdata(:,5:7),'deg','rad')];
ts = timeseries([convang(tdata(:,[3 2]),'deg','rad') ...
tdata(:,4) convang(tdata(:,5:7),'deg','rad')],tdata(:,1));
h = fganimation;
h.TimeseriesSourceType = 'Timeseries';
h.TimeseriesSource = ts;
h.FlightGearBaseDirectory = 'C:\Program Files (x86)\FlightGear';
h.FlightGearVersion = '0.9.10';
h.GeometryModelName = 'c172p';
h.DestinationIpAddress = '127.0.0.1';
h.DestinationPort = '5502';
h.AirportId = 'KSFO';
h.RunwayId = '01R';
h.InitialAltitude = 6;
h.InitialHeading = 10;
h.OffsetDistance = 0;
h.OffsetAzimuth = 0;
h.TimeScaling = 5;
get(h)
% GenerateRunScript(h)
system('runfg.bat &');
play(h)
But show the below error and don,t run flight gear simulator.
Error in Aero.FlightGearAnimation/play
Error in fganimate (line 34)
play(h)
Please help me out.
MATLAB 2020b

回答(1 个)

Shams ur Rehman
Shams ur Rehman 2022-3-15
移动:Steve Miller 2023-5-9
hi,
i have resolved the issue by updating the flight gear version to the new one. and further if it show an issue while running the code then go to bin file of file gear and there ti win32 and copy all files from the win32 folder and past simply in to the bin folder. it will work. thanks to the MATLAB community. and my further work can be found in

类别

Help CenterFile Exchange 中查找有关 Aerospace Toolbox 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by