OpenRocket Simulation Listeners

The Rocketry Forum

Help Support The Rocketry Forum:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.

awseiger

Well-Known Member
Joined
Jun 16, 2012
Messages
649
Reaction score
1
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.
 
Alex,

I don't really understand them but will certainly like to help you figure it out. Do you want to do it on this thread, through pm, or email?

Kevin

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.
 
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.
 
Alex,

Currently it does require java programming though there had been some grumblings about supporting scripting languages. Fortunately, I can do java programming :) Unfortunately 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.

https://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.

https://openrocket.wikinet.org/wiki/Developer's_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

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.

https://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.

https://openrocket.wikinet.org/wiki/Developer's_Guide

Extensions via Python scripting is also possible, but I never got this to work.


-->MCS



.
 
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:

https://openrocket.wikinet.org/wiki/Simulation_Listeners
https://openrocket.svn.sourceforge....on/listeners/example/RollControlListener.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.
 
Back
Top