Hi everyone,
I am trying to simulate thrust direction attitude with a given offset angle around the thruster axis. Currently, I am using Attitude Sequence class to simulate the transition between nominal attitude to thrust vector alignment with offset angle. The offset angle defined around the thruster axis. For the sake of simplicity we can say that the thruster axis coincides with X-axis of satellite frame therefore it enables us to rotate satellite Y and Z axis while we have thrust vector attitude. My implementation as follows;
public ThrustDirectionAttitude(LOFType thrustDirectionLofType, ThrustDirectionProvider variableDirectionInFrame, Vector3D thrusterAxisInSatelliteFrame, double offsetAngle){
this.thrustDirectionLofType = thrustDirectionLofType;
this.variableDirectionInFrame = variableDirectionInFrame;
this.thrusterAxisInSatelliteFrame = thrusterAxisInSatelliteFrame;
this.offsetAngle = offsetAngle;
}
public Attitude getAttitude(PVCoordinatesProvider pvProv, AbsoluteDate date, Frame frame){
Rotation inertial2ThrusterFrame = thrustDirectionLofType.rotationFromInertial(pvProv.getPVCoordinates(date,frame));
Vector3D thrustDirection = variableDirectionInFrame.computeThrustDirection(pvProv, date, frame);
Rotation thrusterFrame2OffsetFrame = new Rotation(thrusterAxisInSatelliteFrame, offsetAngle, RotationConvention.VECTOR_OPERATOR);
Vector3D thrAxis = thrusterFrame2OffsetFrame.applyTo(thrusterAxisInSatelliteFrame);
Vector3D thrustDirectionInOffsetFrame = thrusterFrame2OffsetFrame.applyTo(thrustDirection);
Rotation inertial2OffsetFrame = thrusterFrame2OffsetFrame.compose(inertial2ThrusterFrame, RotationConvention.FRAME_TRANSFORM);
Vector3D thrustDirectionInertial = inertialFrame2OffsetFrame.applyInverseTo(thrustDirectionOffset);
Rotation offset2InertialFrame = new Rotation(thrAxis, thrustDirectionInertial);
return new Attitude(date, frame, offset2Inertial.revert(), Vector3D.ZERO, Vector3D.ZERO);
}
Long story short, my attitude composition is wrong, but I did not understand how to implement such an attitude. Any help regarding to this issue is much appreciated.
Thanks in advance,