Skip to content
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

Added velocity based LVLH to inertial frame transformation #94

Merged
merged 5 commits into from
Nov 21, 2016

Conversation

mvandenbroeck
Copy link
Member

@mvandenbroeck mvandenbroeck commented Nov 18, 2016

Two functions were added to referenceFrameTransfomations.cpp and referenceFrameTransformations.h:

  • A function that gives the transformation quaternion to rotate a vector in the body-centered velocity based LVLH frame (TNW frame) to the inertial (I) frame.
    Inputs: Cartesian state of body wrt central body, Cartesian state of central body wrt inertial frame, a bool to specify whether the N axis of the TNW frame is pointing away from the central body or not (pointing away from central body by default).
    Output: transformation quaternion.

  • A function that gives the transformation matrix to rotate a vector in the body-centered velocity based LVLH frame (TNW frame) to the planet-fixed (planetocentric) frame. The N axis in the TNW frame is pointing to the inside of the orbit.
    Input: Keplerian state of body wrt central body.
    Output: transformation matrix.

Both functions are accompanied by unitTests.

Cheers,

Michael

@DominicDirkx
Copy link
Member

Hi Michael, could you attach your Matlab script used for the unit test here?

@mvandenbroeck
Copy link
Member Author

Hi Dominic, here is the Matlab file. I had to put in in a .txt file though.
.m files are not allowed as attachments.

velocityBasedLvlhToPlanetocentricFrameTransformation.txt

Cheers,

Michael

@DominicDirkx
Copy link
Member

Hi Michael,

Thanks! I've gone through the code, made some small corrections and added an extra extensive unit test, which verifies whether all properties that one would expect of the rotations hold true.

Also, I've added an extra check to the test from Keplerian elements, so that the conversion from Cartesian elements is also computed. Both results are the same within numerical precision.

I've pushed all changes to my

https://github.com/DominicDirkx/tudat/tree/mvandenbroeck-master

branch. If you have any more questions/comments on this code, let me know. If not, I'll merge it into the Tudat master.

Dominic

@DominicDirkx DominicDirkx merged commit 3f6226c into Tudat:master Nov 21, 2016
@DominicDirkx
Copy link
Member

HI Michael,

Thanks for the check, code has now been added to the Tudat master!

@mvandenbroeck
Copy link
Member Author

Hi Dominic,

Thanks for the addition!

Michael

@gviavattene gviavattene mentioned this pull request Sep 21, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants