![]() ![]() Yes, we were planning on sharing our code once we had this resolved. Has anyone tried using Flightgear and SciLab together like this? Any thoughts on what we should Brewer: I will try to upload some plots showing what we are getting when I get home. We have tried using both Flightgear versions 1.9 and 2.0. This causes the navigation algorithm to go unstable. ![]() However, there appears to be an approximately 2 second delay between when SciLab sends the command and the servos move in Flighgear. When we run the simulation, we get flight data coming into SciLab and servo commands going back to Flightgear. I wrote some prototype navigation/flight planning software in SciLab. :)īrian (my neighbor and software guru) created a simple UDP server program to set up the connection between Fligthgear and SciLab. The best part, of course, is that it doesn't cost anything. This allows for quick prototyping of your autopilot code without risking your aircraft. Our goal is to get a closed-loop, all-software simulation using Flightgear as the flight simulation and SciLab as the autopilot stand-in. Simulation the simulation crashed.My neighbor and I have been trying to do something similar to Tom Hastie's simulation ( see here) but using only free software. InputDelta = (double*)(*(block->work + 1)) Ĭompilation process was successfull but as soon as I had run the *(block->work) = (double *)scicos_malloc(sizeof(double)*3) #define Y ((double *)GetRealOutPortPtrs(block, 1)) #define U ((double *)GetRealInPortPtrs(block, 1)) I have attempted to implement the Ramp filter with CBLOCK4 usage: Of the dynamically allocated memory which shall be used for system Scicos_block structure is intended to be used for storage of the address I have read the availableĭocumentation and it seems to me that the void **work item of the Have found that the Scilab/Xcos offers several variants of the "Cīlock". I have done a naive experiment with a copy of a given C_BLOCK (so I have two instances of the Ramp filter and each one has different set of parameters) but this resulted in strange behavior when both instances produce same ouput but this output does not correspond to any set of parameters.ĭoes anybody know how to have several instances of one Scilab/Xcos C_BLOCK in one simulation? ![]() This C_BLOCK works but I have hit to a problem how to create multiple instances of a given C_BLOCK (each one with different set of parameters) in one simulation. ![]() Void Ramp(flag,nevprt,t,xd,x,nx,z,nz,tvec, So I have started to experiment with it and I have developed a Ramp filter block: I haven't found any example regarding usage of this block. The Xcos toolbox (alternative for Simulink) offers the so called C_BLOCK which enables to insert C code into the Xcos simulation. So I have started to look for some alternative and I have found the Scilab/Xcos - open source alternative for Matlab/Simulink. It seems to me that appropriate way how to do that is the S-function block in Matlab/Simulink. Before implementing those building stones I would like to verify the algorithms via a simulation. My goal is to have basic building stones for control software development. I have been developing a library of control blocks (PID controller, various filters etc.) in C programming language. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |