Example #1
0
 private void mainWindow_Loaded(object sender, RoutedEventArgs e)
 {
     this.linearGraphUtility        = new LinearGraphUtility(this.canvasGraph, Math.PI * 2, 1, Math.PI / 12, 0.1);
     this.thirdLabCalculationObject = new ThirdLabCalculationObject(new Conductivity(0.001), new ElectricalPermeability(25),
                                                                    new WaveLength(20), new Height(150), new Height(150), new ThetaDegrees(90),
                                                                    new TraceLength(1), PolarizationType.Horizontal);
     this.linearGraphUtility.DrawPlot();
 }
Example #2
0
        public void CalculateRelativeElectricalDensity_Test(double conductivity,
                                                            double permeability,
                                                            double waveLength,
                                                            double height1,
                                                            double height2,
                                                            double thetaDegrees,
                                                            double traceLength,
                                                            double expected)
        {
            var thirdLab = new ThirdLabCalculationObject(new Conductivity(conductivity), new ElectricalPermeability(permeability),
                                                         new WaveLength(waveLength), new Height(height1), new Height(height2), new ThetaDegrees(thetaDegrees),
                                                         new TraceLength(traceLength, MetricPrefixes.One), PolarizationType.Horizontal);
            var result = thirdLab.CalculateRelativeElectricalDensity();

            Assert.AreEqual(expected, Math.Floor(result.Value));
        }
Example #3
0
        public void CalculateReflectionRatio_Test(double conductivity,
                                                  double permeability,
                                                  double waveLength,
                                                  double height1,
                                                  double height2,
                                                  double thetaDegrees,
                                                  double traceLength,
                                                  double angle,
                                                  double expected,
                                                  PolarizationType polarizationType = PolarizationType.Horizontal)
        {
            var thirdLab = new ThirdLabCalculationObject(new Conductivity(conductivity), new ElectricalPermeability(permeability),
                                                         new WaveLength(waveLength), new Height(height1), new Height(height2), new ThetaDegrees(thetaDegrees),
                                                         new TraceLength(traceLength, MetricPrefixes.One), polarizationType);
            var result = thirdLab.CalculateReflectionCoefficientByAngle(
                new ThetaDegrees(angle, MetricPrefixes.One, UnitsOfMeasurement.Degree)
            {
                Radians = angle
            });

            Assert.AreEqual(Math.Round(expected, 2), Math.Round(result, 2));
        }
Example #4
0
 public ThirdlabCalculationService()
 {
     this.thirdLabCalculationObject = new ThirdLabCalculationObject(new Conductivity(0.001), new ElectricalPermeability(25),
                                                                    new WaveLength(20), new Height(150), new Height(150), new ThetaDegrees(90),
                                                                    new TraceLength(1), PolarizationType.Horizontal);
 }