BUG: Fix the handling of reference pressure for older rpy files. by phmbressan · Pull Request #808 · RocketPy-Team/RocketPy

Pull request type

  • Code changes (bugfix, features)

Checklist

Current behavior

Currently, the introduction of net_thrust is the first addition of an attribute that impacts the behavior of the motor and flight classes. Therefore, the .rpy of version 1.8.0 does not have this parameters, which should be handled.

One notable point is that the tests are working as expected and caught this "file breaking change".

New behavior

This PR adds custom handling for the new attributes. Unfortunately, I did not find other ways beside manual handling (i.e. pinpointing in code the necessary attribute).

I am open to suggestions on how to deal with those parameter changes between older file versions.

Breaking change

  • Yes
  • No