コード例 #1
0
        //计算岸边流量
        public double CalculateShoreFlow(CalculateShoreFlowParam param)
        {
            this.BeamAngle   = param.RiverDischargeInstrument.RiverDischargeBeamAngle;
            this.PulseLength = param.RiverDischargeInstrument.RiverDischargePulseLength;
            this.PulseLag    = param.RiverDischargeInstrument.RiverDischargePulseLag;

            this.MinAmplitude   = param.RiverDischargeConditions.RiverDischargeMinAmplitude;
            this.MinCorrelation = param.RiverDischargeConditions.RiverDischargeMinCorrelation;
            this.MinNG3         = param.RiverDischargeConditions.RiverDischargeMinNG3;
            this.MinNG4         = param.RiverDischargeConditions.RiverDischargeMinNG4;

            return(Calculate(param.RiverDischargeOrgData,
                             param.RiverDischargeDistance,
                             param.RiverDischarge_A,
                             param.RiverDischargeDraft));
        }
コード例 #2
0
        //JZH 2012-04-08 添加一个计算岸边平均流速的方法
        public static double CalculateShoreVelocity(CalculateShoreFlowParam param)
        {
            ShoreFlow     flow = new ShoreFlow();
            EarthVelocity eVel = new EarthVelocity();

            eVel = flow.CalculateAvgVelocity(param.RiverDischargeOrgData, 0.0);
            double fVelDir = System.Math.Atan2(eVel.EastVelocity, eVel.NorthVelocity);

            if (fVelDir < 0)
            {
                fVelDir = fVelDir / 3.14159 * 180 + 360;
            }
            else
            {
                fVelDir = fVelDir / 3.14159 * 180;
            }
            return(fVelDir);
        }
コード例 #3
0
        /// <summary>
        /// 计算岸边流量
        /// 如果数据组中不能得到有效的平均流速数据(比如10组数据中任何一组的有效bins小于2),
        /// 此调用会抛出 Exception 异常,请注意捕捉
        /// </summary>
        /// <param name="param">参数</param>
        /// <returns>计算结果</returns>
        public static double CalculateShoreFlow(CalculateShoreFlowParam param)
        {
            ShoreFlow flow = new ShoreFlow();

            return(flow.CalculateShoreFlow(param));
        }