Does anybody understand how OpenRocket Simulation listeners work?
I'm trying to simulate my active stabilization project, and thus I need to link the fin cant angle to the roll/pitch/yaw of the rocket.
Does anybody understand how OpenRocket Simulation listeners work?
I'm trying to simulate my active stabilization project, and thus I need to link the fin cant angle to the roll/pitch/yaw of the rocket.
What is that?
Matt Tripoli Junior Member# 14257
2013 motors:
AT 38-360 H178DM (283ns)
CTI Pro-29 3 Grain 138G106-14A (138ns)
CTI Pro-29 1 Grain 55F29-12A (55ns)
Estes C6-5 (9ns)
Estes B4-2 (4ns)
Total Newton Seconds for 2013: 489ns
2.4% of N5800
Largest Motor flown: Aerotech H178DM (38-360)
Let's do it through this thread, so others can follow. It seems like a great feature (that Rocksim Doesn't have) that allows complex rockets to be simulated.
I understand this requires Java programming.
Namely?
Matt Tripoli Junior Member# 14257
2013 motors:
AT 38-360 H178DM (283ns)
CTI Pro-29 3 Grain 138G106-14A (138ns)
CTI Pro-29 1 Grain 55F29-12A (55ns)
Estes C6-5 (9ns)
Estes B4-2 (4ns)
Total Newton Seconds for 2013: 489ns
2.4% of N5800
Largest Motor flown: Aerotech H178DM (38-360)
Alex,
Currently it does require java programming though there had been some grumblings about supporting scripting languages. Fortunately, I can do java programmingUnfortunately I have not looked at the api to plug this into OR.
I'm going to continue like you know Java code. If you don't ignore it and then lets talk math.
The controller class needs to implement SimulationListener. At each stage of the simulation, your class would be called with the SimulationStatus containing all the computed values for the simulation.
Sampo had already implemented something which might be a good starting place RollControlListener. The comment says it's "a PI-controller to adjust the cant of fins named "CONTROL" to stop the rocket from rolling". Sounds like a pretty good starting point.
Then we need to figure out how to convince OR to use your simulation listener when it executes.
Kevin
Simulation listeners are reasonably simple to setup, but unwinding all the Java classes to get your listener to actually do something useful is harder. I would start with the documentation which includes working examples.
http://openrocket.wikinet.org/wiki/Simulation_Listeners
Unfortunately the class structure of OpenRocket isn't well documented and can be fairly complex. I had to download the development environment, Eclipse, set break points, and stumble through the class hierarchy via example.
http://openrocket.wikinet.org/wiki/Developer%27s_Guide
Extensions via Python scripting is also possible, but I never got this to work.
-->MCS
.
Hi MCS.
I have actually hacked on OpenRocket for the last 9 months or so. I'm pretty familiar with the code - even its current state with poor developer documentation.
It seems that the SimulationListener should be a more accessable interface for development. What do you think should be done to make it more amenable? What additional facilities would be helpful to develop SimluationListeners?
I haven't tried to plug in python scripts. Did you have problems getting the python interpreter embedded correctly, or were they problems with the functional api as well.
Kevin
Hi,
The simulation listeners are quite technically complex at the moment. I've been planning on implementing a simpler plugin interface for creating simulation extensions and other plugins for OR, but it's a bit stuck at the moment.
Like mentioned, I've implemented simulation of our own roll control system in OR, even to the point that the physical on-board computer has done the calculations, sent control commands to OpenRocket which then simulates the next flight conditions that are sent back to the flight computer. Great way to debug issues on ground, and we found several critical bugs in the flight software that way.
The best documentation available is the user's guide documentation and existing examples:
http://openrocket.wikinet.org/wiki/Simulation_Listeners
https://openrocket.svn.sourceforge.n...lListener.java
Please do note that the roll simulation of OpenRocket is flaky at best. You should not try to optimize the PID parameters purely based on OpenRocket simulation results, or at least add a hefty safety margin to them.
Cheers,
Sampo N.