NCSU-High-Powered-Rocketry-Club / AirbrakesV2

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

Add functionality to rotate datasets #63

Open wlsanderson opened 22 hours ago

wlsanderson commented 22 hours 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.

harshil21 commented 19 hours 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.