Skip to content

Commit

Permalink
fix: state frame conversion in ComputeTargetDirectionVector (#438)
Browse files Browse the repository at this point in the history
  • Loading branch information
vishwa2710 authored Sep 20, 2024
1 parent 19b96f5 commit af0155d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/OpenSpaceToolkit/Astrodynamics/Flight/Profile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ Vector3d Profile::ComputeTargetDirectionVector(const State& aState, const Trajec
}

const Vector3d targetPositionCoordinates =
aTrajectory.getStateAt(aState.accessInstant()).getPosition().accessCoordinates();
aTrajectory.getStateAt(aState.accessInstant()).inFrame(Frame::GCRF()).getPosition().accessCoordinates();
const Vector3d satellitePositionCoordinates = aState.getPosition().accessCoordinates();

return (targetPositionCoordinates - satellitePositionCoordinates).normalized();
Expand Down

0 comments on commit af0155d

Please sign in to comment.