Exemplo n.º 1
0
double collinearityy(double yo, double c, double XA, double XO, double YA,
					double YO, double ZA, double ZO, double omega,
					double phi, double kapa)
{
	double o = gtr(omega);
	double f = gtr(phi);
	double k = gtr(kapa);
	
	double ya;
	ya = yo - c*((XA-XO)*r12(o,f,k) + (YA-YO)*r22(o,f,k) +(ZA-ZO)*r32(o,f))
		/((XA-XO)*r13(o,f,k) + (YA-YO)*r23(o, f, k) +(ZA-ZO)*r33(o, f));
	return (ya);
}
Exemplo n.º 2
0
/*-----------------------------------------------------------------------
|                              Collinearity	        					|
-----------------------------------------------------------------------*/
double collinearity(double xo, double c, double XA, double XO, double YA,
					double YO, double ZA, double ZO, double omega,
					double phi, double kapa)
{
	double o = gtr(omega);
	double f = gtr(phi);
	double k = gtr(kapa);
	
	double xa;
	xa = xo - c*((XA-XO)*r11(f,k) + (YA-YO)*r21(f,k) +(ZA-ZO)*r31(f))
		/((XA-XO)*r13(o,f,k) + (YA-YO)*r23(o, f, k) +(ZA-ZO)*r33(o, f));
	return (xa);
}
void StartCfgPage::initializePage()
{
    Wizard::currentNetcard++;

    QString str = QString( tr(gtr( "Start to configure %1." )) ).arg( *(Wizard::netcardDeviceMap.find(Wizard::currentNetcard)) );

    label->setText( str );

}
Exemplo n.º 4
0
ThanksPage::ThanksPage( QWidget* parent )
    : QWizardPage( parent )
{
    setTitle( tr(gtr( "Thanks" )) );
//     setPixmap( QWizard::WatermarkPixmap, QPixmap( "magic.png" ) );//TODO
    QVBoxLayout* layout = new QVBoxLayout;
    setLayout( layout );

    label = new QLabel(tr(gtr("The Network configuration complete.\nPlease continue to experience MagicLinux!\nThank you!\n\nNotice:\nPlease wait for your network restart when press the finish button, making your configuration to take effect.")));
    label->setWordWrap( true );
    layout->addWidget( label );
    progressBar = new QProgressBar();

    progressBar->setValue(0);
    layout->addWidget(progressBar);
    systemOutput = new QTextEdit;

    layout->addWidget(systemOutput);

    process = new QProcess(this);
    connect(process,SIGNAL(readyReadStandardOutput()),this,SLOT(slot_readyReadStandardOutput()));
    connect(process,SIGNAL(readyReadStandardError()),this,SLOT(slot_readyReadStandardError()));
    connect(process,SIGNAL(finished(int)),this, SLOT(slot_finished(int)));
}
StartCfgPage::StartCfgPage( QWidget* parent )
    : QWizardPage( parent )
{
    setTitle( tr(gtr( "StartCfgPage" )) );
    // setPixmap( QWizard::WatermarkPixmap, QPixmap( "magic.png" ) );//TODO
    QVBoxLayout* layout = new QVBoxLayout;
    setLayout( layout );
/*
    // get netcard info
    QProcess *p = new QProcess( this );
    p->start( "dmesg" );
    p->waitForFinished( -1 );// never timeout
    QStringList netcards = QString( p->readAllStandardOutput() ).split( '\n', QString::SkipEmptyParts ).filter( "eth" );
    QMessageBox::information(this, tr(gtr("info")), tr(gtr("%1")).arg(netcards.join("\n")));
*/

    label = new QLabel( "Nothing" );
    label->setWordWrap( true );
    layout->addWidget( label );
    //setCommitPage ( true );
}
Exemplo n.º 6
0
void testController(){
    
    /* Initally values */
    bus clk ("P"); // Clock pulse
    bus rst ("0");
    bus go("P");
    bus gtr("1");
    bus eql("0");
    bus les("0");
    bus en_quo, ready;
    
    DividerController * DC = new DividerController(clk, rst, go, gtr, eql, les, en_quo, ready);
    
    std::cout << "The inital values:\n";
    DC->printValues();
    
    DC->eval();
    std::cout << "\nAfter evaluation:\n";
    DC->printValues();
    
    DC->eval();
    std::cout << "\nAfter evaluation:\n";
    DC->printValues();
    
    /* Next values */
    clk = "P";
    rst = "0";
    go = "0";
    gtr = "0";
    eql = "1";
    les = "0";
    
    DC->eval();
    std::cout << "\nAfter evaluation:\n";
    DC->printValues();
    
}
Exemplo n.º 7
0
void opr()
{
    switch ( ir.m)
    {
        //rtn
        case 0:
            ret();
            break;
        //neg
        case 1:
            neg();
            break;
       //add
        case 2:
            add();
            break;
       //sub
        case 3:
            sub();
            break;
        //mul
        case 4:
            mul();
            break;
        //div
        case 5:
            divid();
            break;
        //odd
        case 6:
            odd();
            break;
        //mod
        case 7:
            mod();
            break;
        //eql
        case 8:
            eql();
            break;
        //neq
        case 9:
            neq();
            break;
        //lss
        case 10:
            lss();
            break;
        //leq
        case 11:
            leq();
            break;
        //gtr
        case 12:
            gtr();
            break;
        //geq
        case 13:
            geq();
            break;

        default:
            fprintf(output, "OP code input was invalid. ");
            sio3();
    }
}
Exemplo n.º 8
0
void executeInstruction()
{
    switch(ir.op)
    {
    case 1:
        lit();
        break;
    case 2:
        opr();
        break;
    case 3:
        lod();
        break;
    case 4:
        sto();
        break;
    case 5:
        cal();
        break;
    case 6:
        inc();
        break;
    case 7:
        jmp();
        break;
    case 8:
        jpc();
        break;
    case 9:
        sio();
    default:
        break;

    }

    void opr()
{
    switch ( ir.m)
    {
        //rtn
        case 0:
            ret();
            break;
        //neg
        case 1:
            neg();
            break;
       //add
        case 2:
            add();
            break;
       //sub
        case 3:
            sub();
            break;
        //mul
        case 4:
            mul();
            break;
        //div
        case 5:
            divid();
            break;
        //odd
        case 6:
            odd();
            break;
        //mod
        case 7:
            mod();
            break;
        //eql
        case 8:
            eql();
            break;
        //neq
        case 9:
            neq();
            break;
        //lss
        case 10:
            lss();
            break;
        //leq
        case 11:
            leq();
            break;
        //gtr
        case 12:
            gtr();
            break;
        //geq
        case 13:
            geq();
            break;

        default:
            fprintf(output, "OP code input was invalid. ");
            halt = 1;
            break;
    }
}

}