ericstoneking / 42

Simulation for spacecraft attitude control system analysis and design
247 stars 82 forks source link

Command execution time #95

Closed annamaskolenko closed 2 years ago

annamaskolenko commented 2 years ago

Hello Eric I have been trying different attitude commands like pointing and aligning, and the thing I have noticed is that the SC (I tried Simple and Shuttle (both are using prototype fsw)) meets the commanded attitude at roughly 23000s into simulation no matter what time stamp I am using for the command, what the command is and what SC I am using. For example, with the command

10000.0 Point SC[0].B[0] Primary Vector [1.0 0.0 0.0] at World[3] 10000.0 Align SC[0].B[0] Secondary Vector [0.0 1.0 0.0] with L-frame Vector [1.0 0.0 0.0]

the SC stabilises at 23000s, and with the command

10.0 Point SC[0].B[0] Primary Vector [1.0 0.0 0.0] at World[3] 10.0 Align SC[0].B[0] Secondary Vector [0.0 1.0 0.0] with L-frame Vector [1.0 0.0 0.0]

it stabilises at 23000s as well. I was wondering if it is because of fsw type and ideal actuators. Also, I would like to know if simulation time is universal time like we are used to it. I would be grateful if you could explain me this. Anna

ericstoneking commented 2 years ago

Look in 42fsw.c:InitAC for AC->PrototypeCtrl.wc, amax, and vmax. These are parameters that specify the performance of the RampCoastGlide function used by PrototypeCtrl. In my copy, vmax is 0.5 deg/sec, so slewing from any attitude to any other attitude should be accomplished within about 6 minutes. I tried your commands on my setup, and it behaves as expected.

You are correct that PrototypeCtrl and ideal actuators yield the same performance regardless of the actual S/C mass properties. Ideal actuators are unbounded.

For time, see Docs/42 Overview.pdf slide 21, Kit/Include/timekit.h, and Source/42exec.c:AdvanceTime. Set LeapSeconds in Inp_Sim.txt