Hlpfcn is used to compute some frequently used sines and cosines, which are needed for the calculation of the time derivatives of the state variables in the aircraft model. Since the results are, of course, quite trivial, it was not necessary to send the outputs from the block Hlpfcn to the Workspace, which is why Hlpfcn was placed in a feedback loop. The aircraft model therefore contains three feedback loops: one for the state vector x, one for its time-derivative (this feedback is used for additional output equations only, so it does not induce algebraic loops into the system!), and one for the outputs from Hlpfcn.
It is important to notice that these feedback loops are necessary to find a computation order for the simulations: they define an artificial causality that makes simulations possible. In reality, the forces and moments depend upon the state variables and there time-derivatives, and vice-versa, so the computation order is not necessarily equal to the order of occurance in physical reality!
x = [V alpha beta p q r psi theta phi xe ye H]' (states) {V : airspeed [m/s] } alpha: angle of attack [rad] beta : sideslip angle [rad] {p : roll rate [rad/s] } {q : pitch rate [rad/s] } {r : yaw rate [rad/s] } psi : yaw angle [rad] theta: pitch angle [rad] phi : roll angle [rad] {xe : x-coordinate in Earth-fixed reference frame [m] } {ye : y-coordinate '' '' '' '' [m] } {H : altitude above sea-level [m] }
The signals which are not actually used by Hlpfcn have been put between curly braces.
yhlp = [cos(alpha) sin(alpha) cos(beta) sin(beta) ... ... tan(beta) sin(psi) cos(psi) sin(theta) ... ... cos(theta) sin(phi) cos(phi)]'.
(Notice that this list also contains one tangens, which makes the definition of yhlp a little bit confusing. Hlpfcn therefore needs to be 'fine-tuned' in the future.)