Thrust Vector Attitude with Offset Angle

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,

This may be ambiguous. When building a rotation with only two vectors, there is theoretically an infinite number of rotations that fulfills this definition. In fact, it would correspond to all possible offset angles around the thrust axis. What Hipparchus does to select one rotation among the infinite number of possible rotations is to select the one with the smallest angle. It corresponds to a rotation with an axis orthogonal to the two vectors provided in the constructor. This may not be the rotation you want.

I guess you should find a way to build this rotation with a more stringent constraint so you don’t only get proper alignment for the thrust vector, but also proper phase around this vector.