24 :
Computer(comp_type, comp_name), mode(0), vlimit(0.0f),
25 trans_x_limit(0.0f), trans_y_limit(0.0f), trans_z_limit(0.0f),
26 throttle(0.0f), halt(0)
32 :
Computer(c), mode(0), vlimit(0.0f),
33 trans_x_limit(0.0f), trans_y_limit(0.0f), trans_z_limit(0.0f),
34 throttle(0.0f), halt(0)
91 bool flcs_operative =
false;
115 if (fabs(vfwd)>=
vlimit) {
116 if (trans_x > 0 && vfwd > 0)
119 else if (trans_x < 0 && vfwd < 0)
124 if (
halt && flcs_operative) {
127 double vmag = fabs(vfwd);
136 trans_y *= (vmag/(
vlimit/2));
155 if (fabs(vfwd) >=
vlimit) {
156 if (trans_z > 0 && vfwd > 0)
159 else if (trans_z < 0 && vfwd < 0)
170 if (flcs_operative) {
192 double deflection = vrt.
y;
198 else if (deflection != 0) {
199 double theta = asin(deflection);
209 desired_bank = -desired_bank;
211 double current_bank = asin(deflection);
212 double theta = desired_bank - current_bank;
216 if (current_bank < 0 && desired_bank < 0 ||
217 current_bank > 0 && desired_bank > 0) {
219 double coord_pitch = compass_pitch
221 - fabs(helm) * fabs(current_bank);
247 if (fabs(vfwd) >=
vlimit/2) {
248 if (trans_x > 0 && vfwd > 0)
251 else if (trans_x < 0 && vfwd < 0)
256 if (trans_y == 0 &&
halt) {
260 if (vfwd > vdesired) {
266 double vdelta = vfwd-vdesired;
268 trans_y *= (vdelta/(
vlimit/2));
287 if (fabs(vfwd) >
vlimit/2) {
288 if (trans_z > 0 && vfwd > 0)
291 else if (trans_z < 0 && vfwd < 0)