コード例 #1
0
ファイル: GNC.cs プロジェクト: rjohnson72/ORDA
        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;
            }
        }
コード例 #2
0
ファイル: GNC.cs プロジェクト: rjohnson72/ORDA
        public void getConfiguration(out GNCconfig config)
        {
            config = new GNCconfig();

            config.command = command;
            config.rateMode = rateMode;
            config.attMode = attMode;
            config.eacMode = eacMode;
            config.posMode = posMode;
            config.dockMode = dockMode;
            config.dockState = dockState;
            config.dockAbort = dockAbort;
            config.userRateSetting = new sVector3(userRateSetting);
            config.userAttSetting = new sVector3(userAttSetting);
            config.userAttUpSetting = new sVector3(userAttUpSetting);
            config.userPosSetting = new sVector3(userPosSetting);
            config.Kp_AngVel = Kp_AngVel;
            config.Kp_AngAcc = Kp_AngAcc;
            config.Kp_Vel = Kp_Vel;
            config.Kp_Acc = Kp_Acc;
            config.eacPulseLength = eacPulseLength;
            config.eacPulseLevel = eacPulseLevel;
            config.eacRate = eacRate;
            config.dockRollAdjust = dockRollAdjust;
            config.networkPropulsion = networkPropulsion;
        }