Results 1 to 9 of 9

Thread: OpenRocket Simulation Listeners

  1. #1
    Join Date
    17th June 2012
    Location
    Durham, NH
    Posts
    525

    OpenRocket Simulation Listeners

    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.
    Level 1 - CTI H133 in an Estes Partizon

    Blog:
    http://awseiger.wordpress.com/

  2. #2
    Join Date
    18th March 2012
    Location
    Apex, NC.
    Posts
    3,141
    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)

  3. #3
    Join Date
    20th August 2009
    Location
    Kansas
    Posts
    697
    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

    Quote Originally Posted by awseiger View Post
    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.
    NAR 91582 TRA 13980 L2

    Give OpenRocket Android application a try.

  4. #4
    Join Date
    17th June 2012
    Location
    Durham, NH
    Posts
    525
    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.
    Level 1 - CTI H133 in an Estes Partizon

    Blog:
    http://awseiger.wordpress.com/

  5. #5
    Join Date
    18th March 2012
    Location
    Apex, NC.
    Posts
    3,141
    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)

  6. #6
    Join Date
    20th August 2009
    Location
    Kansas
    Posts
    697
    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
    NAR 91582 TRA 13980 L2

    Give OpenRocket Android application a try.

  7. #7
    Join Date
    21st January 2011
    Location
    Midwest/Great Lakes
    Posts
    148
    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



    .

  8. #8
    Join Date
    20th August 2009
    Location
    Kansas
    Posts
    697
    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

    Quote Originally Posted by MCS View Post
    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



    .
    NAR 91582 TRA 13980 L2

    Give OpenRocket Android application a try.

  9. #9
    Join Date
    1st June 2010
    Location
    Espoo, Finland
    Posts
    161
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •