NCSU-High-Powered-Rocketry-Club / AirbrakesV2

A rewrite of Airbrakes aimed at being clean and concise.
MIT License
6 stars 2 forks source link

Add functionality to generate datasets #63

Open wlsanderson opened 1 month ago

wlsanderson commented 1 month ago

With the upcoming changes of adding apogee prediction, and a dynamic way to identify the vertical direction using the gravity vector, the ability to test these features is important. Due to the lack of valid datasets to use, I think it would be worthwhile to add a parameter to the mock sim to assign what the vertical direction is, and rotate the dataset accordingly.

To implement this, I'm not sure the best approach. I don't think we should have 6 different csv's for each datasets. I think a parameter would have to be passed in the data processor that has the desired vertical axis, and it would have to be compared with the initial gravity vector to find what quaternion to rotate all of the acceleration and gyro data by.

Any advice on the broader implementation process would be great.

EDIT: the goal is now to fully generate datasets, not just rotate them

harshil21 commented 1 month ago

Yeah, this ties into the general need for us to be able to generate and simulate any flight, given a set of initial conditions and desired outcomes (e.g. different apogee, different acceleration profile, etc)

Regarding orientations specifically, we could do that feature before generating the rest of the flight data, since this is just a subset of that feature, and it doesn't quite change the flight profile.

However, the correct way to approach this is to first do this in the unit tests first, since we can generate arbitrary data packets and test small components of the entire system, and then we can think of upgrading our mock sim.