Thanks to visit codestin.com
Credit goes to github.com

Skip to content

ENH: Add post-simulation step callback #758

@CWood-sdf

Description

@CWood-sdf

Is your feature request related to a problem? Please describe.

I'm using rocketpy to test airbrake control code that will eventually fly on a rocket. One thing I am working on is the ability to have a ground station that receives updates from a radio. I am simulating this in rocketpy by invoking the airbrakes control code and radio update code in the airbrakes controller function. However, the airbakes controller function is not invoked past apogee, which does not run my code, which causes me to have a data cutoff at apogee.

I could fix this by going over the rocketpy sensor data lists afterward, finding the apogee point, then reinvoking my code with the rest of the sensor data points, but that feels really ugly and bug prone. I would really like to avoid something like this because I would like to eventually test my program's entire lifecycle (launch, burnout, parachute deployment, landing) in rocketpy.

Describe the solution you'd like

The first possible solution is to allow the airbrakes controller function to be called after apogee. However, this feels like a very ugly solution

What I think would be a better solution is to allow the user to specify a callback that is invoked either after every simulation step or after some amount of time has passed in the simulation (similar to the sensor update rates).

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    Status

    Mid-Term

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions