Beispiel #1
0
        public BeamPara(ClassChanpara chanpara, testBlock block, wedge wed, probe pro, position pos)
        {
            double xd = 0;
            double yd = 0;

            testblock = block;
            Wedge     = wed;
            Probe     = pro;
            Position  = pos;

            activele = chanpara.activenb[0];
            skewflag = GetSkewflag(chanpara.skew);
            if (chanpara.method == 0)
            {
                xd    = chanpara.defectX;
                yd    = chanpara.defectY;
                point = Direct(xd, yd, chanpara.interfaceAngle[0]);
                index = point.x[1];
            }
            else if (chanpara.method == 1)
            {
                xd    = chanpara.defectX;
                yd    = 2 * testblock.BlockHeight - chanpara.defectY;
                point = Reflect(chanpara.defectX, chanpara.defectY, chanpara.interfaceAngle[0]);
                index = point.x[2];
            }

            centerele = Centerelement(index, chanpara.interfaceAngle[0]);
            beamfile  = Dealytime(xd, yd, centerele, chanpara.interfaceAngle[0]);
        }
Beispiel #2
0
        public static int Centerelement(float xi, wedge Wedge, probe Probe, position Position, testBlock testblock)
        {
            float xw = 0;
            float yw = 0;
            float xc = 0;    //c path cross probe
            float yc = 0;
            float k1 = 0;
            float k2 = 0;

            float[] tmp          = new float[Probe.NumOfExcitation];
            int     i            = 0;
            float   probeangle   = 0;
            float   reflectangle = 0;
            float   sina         = 0;
            int     eleindex     = 0;

            probeangle   = TurntoRadian(Wedge.WedgeAngle);
            reflectangle = TurntoRadian(testblock.VAngle);
            sina         = (float)(Wedge.WedgeVelocity / testblock.TestBlockVelocity * Math.Sin(reflectangle));
            k1           = (float)(Math.Tan(probeangle));
            k2           = (float)(-1 * (Math.Sqrt(1 - Math.Pow(sina, 2))) / sina);
            xw           = (float)(Position.WedgePosition + (testblock.BlockHeight - testblock.BottomLength) / Math.Tan(reflectangle));
            yw           = -Wedge.WedgeLeftHeight;
            xc           = (k1 * xw - yw - k2 * xi) / (k1 - k2);
            yc           = k2 * (xc - xi);
            for (i = 0; i < Probe.NumOfExcitation; i++)
            {
                tmp[i] = (float)Math.Abs(xc - (xw + (Position.ProbePosition + Probe.FirstDistance + i * Probe.ElementaryInterSpace) * Math.Cos(probeangle)));
            }
            float m = tmp.Min();

            eleindex = Array.IndexOf(tmp, m);
            return(eleindex);
        }
Beispiel #3
0
        public static ClassBeamFile Dealytime(float xd, float yd, int centerele, wedge Wedge, probe Probe, position Position, testBlock testblock)
        {
            ClassBeamFile beamfile = new ClassBeamFile();
            float         xw       = 0;
            float         yw       = 0;
            float         xe       = 0;
            float         ye       = 0;
            float         tmax     = 0;
            int           i        = 0;

            float[] time         = new float[32];
            float   probeangle   = 0;
            float   k            = 0;
            int     startele     = 0;
            float   reflectangle = 0;

            startele     = centerele - 15;
            probeangle   = TurntoRadian(Wedge.WedgeAngle);
            k            = (float)(Math.Tan(probeangle));
            reflectangle = TurntoRadian(testblock.VAngle);
            xw           = (float)(Position.WedgePosition + (testblock.BlockHeight - testblock.BottomLength) / Math.Tan(reflectangle));
            yw           = -Wedge.WedgeLeftHeight;

            for (i = 0; i < 32; i++)
            {
                xe      = (float)(xw + (Position.ProbePosition + Probe.FirstDistance + (i + startele) * Probe.ElementaryInterSpace) * Math.Cos(probeangle));
                ye      = k * (xe - xw) + yw;
                time[i] = Pathtime(xe, ye, xd, 2 * testblock.BlockHeight - yd, Wedge.WedgeVelocity, testblock.TestBlockVelocity);
            }
            tmax = time.Max();

            for (i = 0; i < 32; i++)
            {
                beamfile.txDelay[i] = tmax - time[i];
                beamfile.rxDelay[i] = tmax - time[i];
            }
            beamfile.rxSize       = 32;
            beamfile.txSize       = 32;
            beamfile.txElementBin = beamfileinit(startele, 32);
            beamfile.rxElementBin = beamfileinit(startele, 32);
            return(beamfile);
        }
Beispiel #4
0
 public ClassCouple(probe pro, wedge wed, int startele)
 {
     Probe    = pro;
     Wedge    = wed;
     beamfile = CoupleDelay(startele);
 }