-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Physics unit tests #6
base: main
Are you sure you want to change the base?
Physics unit tests #6
Conversation
196ab14
to
5841e27
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need semi-extensive commenting for crucial physics unit tests like energy, gravity, orbital, and even attitude. I can't just trust random numbers and shouldn't really have to spend any time speculating about them when reading through them.
pub struct Quaternion { | ||
pub data: na::Vector4<f64>, | ||
} | ||
|
||
#[cfg(test)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why are we editing numerics/quaternion in this pr? Why isn't it just in the numerics unit test pr?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR was just based on the numerics branch so I got the dependency changes. Once that is merged ill just rebase it off of main.
@@ -37,3 +37,125 @@ pub fn quaternion_derivative<T: SpacecraftProperties>(state: &State<T>) -> Quate | |||
// Only use body angular velocity for quaternion propagation | |||
compute_quaternion_derivative(&state.quaternion, &state.angular_velocity) | |||
} | |||
|
|||
#[cfg(test)] | |||
mod tests { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please comment explaining the different unit tests for quick readability. Also like the other PR explain/document the test value you used and how you decided upon or found them. Rn just a script in the google drive is sufficient
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will do. Will merge once I've uploaded my scripts and writeup to the google drive. The gist is I used a hybrid of some python scripts and hand calculations to verify values. I also used a few examples from Vallado.
Ignore the changes to numerics. This PR would be merged after the numerics. I just based this branch off of the numerics so the cargo.toml updates were included!
Edit: Need to recommit the orbital mechanics tests