rdoddanavar / hpr-sim

6DOF Flight Simulation for High Power Model Rocketry
https://rdoddanavar.github.io/hpr-sim/
GNU General Public License v3.0
3 stars 2 forks source link

Allow math, references in random distribution parameters #85

Open rdoddanavar opened 2 years ago

rdoddanavar commented 2 years ago

Current implementation of YAML input file parser (util_yaml.process()) does not allow for math expressions or internal references in parameter list when specifying random distribution.

For example, this is currently not possible:

mass:
    massBody:
        value: 5.0
        unit: lbm
        dist:
            name: normal
            param: [ref(mass.massBody.value), 0.1*ref(mass.massBody.value)]

Instead, the user would be forced to hardcode these values to achieve the desired effect:

mass:
    massBody:
        value: 5.0
        unit: lbm
        dist:
            name: normal
            param: [5.0, 0.5]