コード例 #1
0
    public void Set_pMotionLand()
    {
        Vector3D p0 = new Vector3D(landing_gear[1, 0].p0_base);

        p0.y  = 0.0D;
        p0.z -= landing_gear[1, 0].stroke0;
        Vector3D p1 = new Vector3D(landing_gear[0, 0].p0_base);

        p1.y  = 0.0D;
        p1.z -= landing_gear[0, 0].stroke0;
        Vector3D land = p1.Sub(p0).NmlVec();

        if (land.x < 0.0D)
        {
            land = land.SclProd(-1.0D);
        }

        Bearing br    = new Bearing(land.R2l());
        double  pitch = -br.pitch.GetValue();

        double h0 = p0.SclProd(-1.0D).Sub(land.SclProd(land.DotProd(p0.SclProd(-1.0D)))).Length();

        pMotion = new PlaneMotion(inp, pMotion.wpos.x, h0, pMotion.wpos.y, 0.0D, pitch, 0.0D, 0.0D, 0.0D, 0.0D, 0.0D, 0.0D, 0.0D);

        int i;

        for (i = 0; i < n_LandingGear; i++)
        {
            for (int lr = 0; lr <= 1; lr++)
            {
                if (landing_gear[i, lr].flag == 1)
                {
                    landing_gear[i, lr].delta = 1.0D;
                }
            }
        }
        flag_landing_gear = 1;

        for (i = 0; i < n_powerPlant; i++)
        {
            if (powerPlant[i].engine_type == 1)
            {
                ((ReciprocatingEngine)powerPlant[i].engine).enginePower.output = 0.0D;
            }
        }

        for (i = 0; i < n_t_flap; i++)
        {
            t_flap[i, 0].delta = 0.0D;
            t_flap[i, 1].delta = t_flap[i, 0].delta;
        }

        cif = new CockpitInterface();
    }
コード例 #2
0
    public void Init()
    {
        cif = new CockpitInterface();

        inp = new Inertia(plane.name);

        inp.SetBlock(0, new InertiaBlock("‹@‘Ì", plane.cg, plane.m0, plane.ixx_m0, plane.iyy_m0, plane.izz_m0, plane.ixy_m0, plane.iyz_m0, plane.izx_m0));

        pMotion = new PlaneMotion(inp, 0.0D, 0.0D, 0.0D, 0.0D, 0.0D, 0.0D, 0.0D, 0.0D, 0.0D, 0.0D, 0.0D, 0.0D);
        atmos   = new Isa(pMotion.wpos.y);
    }