This method will create two satellites. The first one will have an attitude profile where the body X axis is aligned with the satellite’s velocity vector and the body Y axis is constrained to the sun vector. The second satellite will be a copy of the first except the body Y axis will be aligned to a new created vector that switches between following the original satellite’s body Y axis and a fixed orientation at a 50° angle from zenith.
1. Create a satellite with an Aligned and Constrained attitude profile. Set the X axis to be aligned to the velocity vector and the Y axis to be constrained by the sun vector. For the purposes of this exercise, I will call this Satellite1.
2. Copy and paste this satellite so that you have two identical satellites. I am going to call this new one Satellite2.
3. Open Analysis Workbench. On Satellite2, create an Angle VGT component of type "Between Vectors". Select the Satellite1 Body Y vector as your first vector and Satellite1 Zenith vector as the second.
4. Create a Scalar Calc object of type "Angle". Set this to be the value of the angle you just created in step 3.
5. Create a Condition Calc Object of type "Scalar Bounds". Set the scalar to be the Angle scalar object you created in step 4 and the Operation to be Below Maximum. Set the Maximum to be your maximum angle off zenith (I used 50°).
6. Create a new Vector Component of type "Fixed at Time Instant". Click the ellipses next to Reference Time Instant, expand the condition from step 5, expand SatisfactionIntervals, expand the First interval, and select the Stop time of that interval. Set the source vector as the Satellite 1 Body Y vector. Set the Reference Axes as Satellite2 ICR.
This will create a vector that is fixed in time at the point in time when the angle off zenith is 50 degrees.
7. Create a new Vector Component of type "Scheduled". Set the schedule to be the SatisfactionIntervals of the condition from step 5. Set the On Schedule Vector to be the Satellite1 Body Y axis. This will ensure that the new vector we are creating will use the original constrained-by-the-sun Y vector while the angle from zenith is below 50°. Check the box next to Use Off Schedule. Set the Off Schedule to be the vector you created in step 6. This will ensure that this new vector will stay fixed at the 50° point when the angle off zenith goes above 50°. Uncheck the box next to Use Slew to turn if OFF.
8. Open up Satellite2’s properties and select Attitude. Set the Attitude type to "Aligned and Constrained". For the Aligned Vector, set the coordinates (X=0, Y=1, Z=0) and the Reference Vector as the new vector you created in step 7 above. For the Constrained Vector, set the coordinates (X=1, Y=0, Z=0) and the Reference Vector as Satellite2 Velocity.
This completes the process for setting up an attitude profile with a constrained roll angle. You will want to click off the Show option for Satellite1 (in its 2D properties) so it doesn’t interfere with your visualization.