Exemplo n.º 1
0
        public void restoreConfiguration(GNCconfig config)
        {
            // should be good, might need to add some checks
            command = config.command;
            rateMode = config.rateMode;
            attMode = config.attMode;
            eacMode = config.eacMode;
            posMode = config.posMode;
            dockMode = config.dockMode;
            dockState = config.dockState;
            dockAbort = config.dockAbort;
            userRateSetting = config.userRateSetting.toVector3 ();
            userAttSetting = config.userAttSetting.toVector3 ();
            userAttUpSetting = config.userAttUpSetting.toVector3 ();
            userPosSetting = config.userPosSetting.toVector3 ();
            Kp_AngVel = config.Kp_AngVel;
            Kp_AngAcc = config.Kp_AngAcc;
            Kp_Vel = config.Kp_Vel;
            Kp_Acc = config.Kp_Acc;
            eacPulseLength = config.eacPulseLength;
            eacPulseLevel = config.eacPulseLevel;
            eacRate = config.eacRate;
            dockRollAdjust = config.dockRollAdjust;
            networkPropulsion = config.networkPropulsion;

            // ...
            if (command == Command.EAC && eacMode == EACMode.RATE_ATT) {
                eacAttInvalid = true;
            }
        }
Exemplo n.º 2
0
        public void requestCommand(Command c)
        {
            command = c;

            rateMode = RateMode.IDLE;
            attMode = AttMode.IDLE;
            eacMode = EACMode.IDLE;
            dockMode = DockMode.IDLE;
            dockState = DockState.IDLE;

            if (command != Command.RATE && command != Command.ATT && command != Command.EAC)
                posMode = PosMode.IDLE;

            if (command == Command.DOCK)
            {
                if (flightData.targetVessel == null)
                {
                    command = Command.OFF;
                }
            }
        }
Exemplo n.º 3
0
        public void requestEacMode(EACMode m)
        {
            if (command != Command.EAC)
                return;

            if (eacMode == m)
                eacMode = EACMode.IDLE;
            else
                eacMode = m;

            if (eacMode == EACMode.RATE_ATT)
                eacAttInvalid = true;
        }
Exemplo n.º 4
0
 public void getStates(out Command outCommand, 
     out RateMode outRateMode,
     out AttMode outAttMode,
     out EACMode outEacMode,
     out PosMode outPosMode,
     out DockMode outDockMode)
 {
     outCommand = command;
     outRateMode = rateMode;
     outAttMode = attMode;
     outEacMode = eacMode;
     outPosMode = posMode;
     outDockMode = dockMode;
 }