Пример #1
0
        public void AmplitudeRatioToPowerRatio_75OhmImpedance(double dBmV, double expected)
        {
            AmplitudeRatio ampRatio = AmplitudeRatio.FromDecibelMillivolts(dBmV);

            double actual = Math.Round(ampRatio.ToPowerRatio(ElectricResistance.FromOhms(75)).DecibelMilliwatts, 2);

            Assert.Equal(expected, actual);
        }
Пример #2
0
        public double AmplitudeRatioToPowerRatio_50OhmImpedance(double dBmV)
        {
            AmplitudeRatio ampRatio = AmplitudeRatio.FromDecibelMillivolts(dBmV);

            return(Math.Round(ampRatio.ToPowerRatio(ElectricResistance.FromOhms(50)).DecibelMilliwatts, 2));
        }
 /// <summary>
 ///     Converts a <see cref="AmplitudeRatio" /> to a <see cref="PowerRatio" />.
 /// </summary>
 /// <param name="amplitudeRatio">The amplitude ratio to convert.</param>
 /// <param name="impedance">The input impedance of the load. This is usually 50, 75 or 600 ohms.</param>
 /// <remarks>http://www.maximintegrated.com/en/app-notes/index.mvp/id/808</remarks>
 public static PowerRatio ToPowerRatio(this AmplitudeRatio amplitudeRatio, ElectricResistance impedance)
 {
     return(AmplitudeRatio.ToPowerRatio(amplitudeRatio, impedance));
 }