Comments (3)
- According to your knowledge of the code JSBSim does an optimization of block processing by performing, for each step, only the blocks that have had at least one input modified with respect to the previous step? (It was on of the most powerful optimization criteria I had developed for the interpreter CSMP in APL)?
There is no optimization whatsoever in JSBSim regarding the execution of systems or channels. They are all unconditionally evaluated at each time step. At the moment, the only performance improvement feature that is available is the parameter execrate
in the element <channel>
.
- There are logical blocks (I have only seen the switch), such as a JK flip-flop, (although these days I saw that it is possible to emulate it with a switch used in sample-hold mode ...), but his presence would simplify the code and improve his reading.
I don't have the slightest idea of what a "JK flip-flop" is so I can hardly answer this one.
- I'm using the useful function execrate = "n" where n is a number of intervals between one execution and another of a channel. But I noticed a boring bug, that is, if there is a time-dependent block inside its value dt is not modified (should be multiplied by the execrate value present in the block) so as to make this function transparent and therefore be able to vary execrate without having to intervene in the code.
Elements in a <channel>
should use the property simulation/channel-dt
to get the corrected time step (i.e. simulation/dt
times execrate
).
The property simulation/dt
always contain the true time step whatever execrate
is. This is a feature not a bug so that a <channel>
can always access whichever time step it needs (the true one or the corrected one). The idea is that if a <channel>
needs to access data from outside the channel context, it can deduce the time step with which these data have been computed and apply the appropriate correction.
On the contrary, it would be interesting to have a variable execrate depending on some event, since certain blocks must be executed frequently only in certain phases of the flight.
Modifying execrate
during execution would basically be equivalent to alter the channel time step in the course of the simulation. JSBSim has not been designed for that as it is assumed in many places of the code that the time step is constant.
- For the performance of JSBSim I can not complain because it is actually very fast and therefore consumes little CPU, but currently the tasks that I give are not many, I would like to know if someone has analyzed the performance problem with more depth, to understand the better optimization criteria.
There has been recently the commit e62022e by @zakalawe that was designed to improve JSBSim performance. However this is one of the very few patches for performance improvements that have been submitted in the recent years. This is certainly due to the fact that, as you mentioned, JSBSim is fast enough for most of our users; just fast enough that nobody is feeling the need to investigate for speed optimization.
In addition, there is the general trend from developers (at least myself 😄) to favor legible, easy-to-maintain code over high performance execution.
5.In Flightgear JSBSim runs in the same system thread, but being a separate application, with its own data that are exchanged only through a specialized process ... it would be very interesting to be able to run it on a separate thread, in order to use a different CPU . At this point the extended use, I would say aggressive, of JSBSim in Flightgear would be very interesting.
JSBSim can be executed in a separate process and use sockets to exchange data with FlightGear.
This can be achieved by declaring an external FDM to FlightGear
> fgfs --fdm=external --native-fdm=socket,in,120,,5550,udp --aircraft=Short_Empire --airport=SP01
and then running JSBSim in its own process
> JSBSim scripts/Short_S23_2.xml data_output/flightgear.xml --realtime --nice
However the communication is a one way transmission from JSBSim to FlightGear. Unfortunately JSBSim cannot receive data from FlightGear at the moment.
Unless someone volunteers to develop the C++ code for communication from FlightGear to JSBSim (that would be a new class inherited from FGInputSocket
).
from jsbsim.
@abassign
Since you made no further comments, I guess your questions have been addressed and this issue can be closed ?
from jsbsim.
I think this request is complete, thank for your interest.
from jsbsim.
Related Issues (20)
- JSBSim Simulink Function HOT 36
- aero/coefficient properties returning 0 HOT 1
- Android support HOT 4
- Can't build Unreal Engine plugin on Linux/Mac because of unsupported typeid keyword HOT 5
- JSBSim Unreal throws an Exception few seconds after/during takeoff HOT 1
- Missing support for castering nosewheel with angle limiter. HOT 8
- Param name new name in the form "hostname:port/proto" is not right in FGOutputSocket::SetOutputName HOT 4
- Build JSBSim by VS2019 and use C++ API HOT 1
- Crashes after adding an xml path to a component in the engine HOT 10
- Trim Errors Happening In RHEL8 On Models That Worked On RHEL7 HOT 11
- Updates to gitignore to tidy up git status after build HOT 2
- CMAKE Configure Error on MacOS (M1 aarch64) HOT 2
- After changing pitch and long initial conditions the yaw angle changes also for no reason HOT 1
- JSBSim interface to Matlab on Windows: throttle command from joystick doesn't work HOT 5
- Trim succeeds and results in NaN values HOT 1
- JSBSim and s-function have different results and different reactivity themselves HOT 1
- Building for Unreal 5 on Linux not working HOT 7
- Javascript alternative? HOT 2
- Linearization and simplex trim from console executable and xml script HOT 16
- FGTurbine Shutdown Spin HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jsbsim.