Exemplo n.º 1
0
        public double Direct_Rate(double d)
        {
            double r = 0.0;

            for (int i = 0; i < type.Count; ++i)
            {
                r += Antenna.Calculate_Rate(d, dist[i], rate[i]);
            }
            return(r);
        }
Exemplo n.º 2
0
        public double Relay_Rate(double d)
        {
            double r = 0.0;

            for (int i = 0; i < type.Count; ++i)
            {
                if (type[i] == KAntennaType.low_gain && relay[i])
                {
                    r += Antenna.Calculate_Rate(d, dist[i], rate[i]);
                }
            }
            return(r);
        }
Exemplo n.º 3
0
        public double Indirect_Rate(double d, KAntennaInfo relay_antenna)
        {
            double r = 0.0;

            for (int i = 0; i < type.Count; ++i)
            {
                if (type[i] == KAntennaType.low_gain)
                {
                    r += Antenna.Calculate_Rate(d, dist[i], rate[i]);
                }
            }

            double indirect_r = 0.0;

            for (int i = 0; i < relay_antenna.type.Count; ++i)
            {
                if (relay_antenna.type[i] == KAntennaType.low_gain && relay_antenna.relay[i])
                {
                    indirect_r += Antenna.Calculate_Rate(d, relay_antenna.dist[i], relay_antenna.rate[i]);
                }
            }

            return(Math.Min(r, indirect_r));
        }