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

feat: update State printing to support extended state #231

Merged
merged 4 commits into from
Oct 5, 2023

Conversation

kyle-cochran
Copy link
Contributor

@kyle-cochran kyle-cochran commented Oct 5, 2023

When printing the State, you currently see:

-- Trajectory :: State -----------------------------------------------------------------------------
    Instant:                                 2018-01-01 00:00:00 [UTC]                
    Position:                                [1.200000000000, 3.400000000000, 5.600000000000] [m] @ GCRF 
    Velocity:                                [7.800000000000, 9.000000000000, 1.200000000000] [m/s] @ GCRF 
----------------------------------------------------------------------------------------------------

This updates the print to support extending the state beyond position/velocity. So now it looks like:

-- Trajectory :: State -----------------------------------------------------------------------------
    Instant:                                 2018-01-01 00:00:00 [UTC]                
    Frame:                                   GCRF                                     
    CARTESIAN_POSITION                       [1.2000, 3.4000, 5.6000]                 
    CARTESIAN_VELOCITY                       [7.8000, 9.0000, 1.2000]                 
----------------------------------------------------------------------------------------------------

@codecov
Copy link

codecov bot commented Oct 5, 2023

Codecov Report

Merging #231 (c9390a0) into main (d358179) will increase coverage by 0.01%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #231      +/-   ##
==========================================
+ Coverage   82.78%   82.79%   +0.01%     
==========================================
  Files          62       62              
  Lines        4739     4743       +4     
==========================================
+ Hits         3923     3927       +4     
  Misses        816      816              
Files Coverage Δ
...penSpaceToolkit/Astrodynamics/Trajectory/State.cpp 100.00% <100.00%> (ø)

Copy link
Contributor

@vishwa2710 vishwa2710 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just some nits.

src/OpenSpaceToolkit/Astrodynamics/Trajectory/State.cpp Outdated Show resolved Hide resolved
src/OpenSpaceToolkit/Astrodynamics/Trajectory/State.cpp Outdated Show resolved Hide resolved
@kyle-cochran kyle-cochran merged commit 3a708d6 into main Oct 5, 2023
@kyle-cochran kyle-cochran deleted the users/kyle/state-printing branch October 5, 2023 16:53
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