将WeatherCondition 类改为 Weather 类,修改了 WeatherType 枚举;完善了湍流的计算和测试
This commit is contained in:
parent
0b9917a724
commit
2e51c9d49a
Binary file not shown.
@ -27,7 +27,7 @@
|
|||||||
可以处理各种天气条件和烟雾环境
|
可以处理各种天气条件和烟雾环境
|
||||||
</remarks>
|
</remarks>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:AirTransmission.AtmosphericTransmittanceCalculator.CalcLaser(AirTransmission.WeatherCondition,System.Double)">
|
<member name="M:AirTransmission.AtmosphericTransmittanceCalculator.CalcLaser(AirTransmission.Weather,System.Double)">
|
||||||
<summary>
|
<summary>
|
||||||
计算激光在给定天气条件和距离下的大气透过率
|
计算激光在给定天气条件和距离下的大气透过率
|
||||||
</summary>
|
</summary>
|
||||||
@ -35,7 +35,7 @@
|
|||||||
<param name="distance">传输距离(米)</param>
|
<param name="distance">传输距离(米)</param>
|
||||||
<returns>大气透过率</returns>
|
<returns>大气透过率</returns>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:AirTransmission.AtmosphericTransmittanceCalculator.CalcIR(AirTransmission.WeatherCondition,System.Double)">
|
<member name="M:AirTransmission.AtmosphericTransmittanceCalculator.CalcIR(AirTransmission.Weather,System.Double)">
|
||||||
<summary>
|
<summary>
|
||||||
计算红外线在给定条件下的大气透过率
|
计算红外线在给定条件下的大气透过率
|
||||||
</summary>
|
</summary>
|
||||||
@ -43,7 +43,7 @@
|
|||||||
<param name="distance">传输距离(米)</param>
|
<param name="distance">传输距离(米)</param>
|
||||||
<returns>大气透过率</returns>
|
<returns>大气透过率</returns>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:AirTransmission.AtmosphericTransmittanceCalculator.CalcMillimeterWave(AirTransmission.WeatherCondition,System.Double)">
|
<member name="M:AirTransmission.AtmosphericTransmittanceCalculator.CalcMillimeterWave(AirTransmission.Weather,System.Double)">
|
||||||
<summary>
|
<summary>
|
||||||
计算毫米波在给定条件下的大气透过率
|
计算毫米波在给定条件下的大气透过率
|
||||||
</summary>
|
</summary>
|
||||||
@ -51,7 +51,7 @@
|
|||||||
<param name="distance">传输距离(米)</param>
|
<param name="distance">传输距离(米)</param>
|
||||||
<returns>大气透过率</returns>
|
<returns>大气透过率</returns>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:AirTransmission.AtmosphericTransmittanceCalculator.CalcUV(AirTransmission.WeatherCondition,System.Double)">
|
<member name="M:AirTransmission.AtmosphericTransmittanceCalculator.CalcUV(AirTransmission.Weather,System.Double)">
|
||||||
<summary>
|
<summary>
|
||||||
计算紫外线在给定天气条件和距离下的大气透过率
|
计算紫外线在给定天气条件和距离下的大气透过率
|
||||||
</summary>
|
</summary>
|
||||||
@ -59,7 +59,7 @@
|
|||||||
<param name="distance">传输距离(米)</param>
|
<param name="distance">传输距离(米)</param>
|
||||||
<returns>大气透过率</returns>
|
<returns>大气透过率</returns>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:AirTransmission.AtmosphericTransmittanceCalculator.CalcTurbulenceEffect(AirTransmission.WeatherCondition,System.Double,System.Double)">
|
<member name="M:AirTransmission.AtmosphericTransmittanceCalculator.CalcTurbulenceEffect(AirTransmission.Weather,System.Double,System.Double)">
|
||||||
<summary>
|
<summary>
|
||||||
计算湍流效应对激光透过率的影响
|
计算湍流效应对激光透过率的影响
|
||||||
</summary>
|
</summary>
|
||||||
@ -147,18 +147,18 @@
|
|||||||
基于1.06微米波长(常用的Nd:YAG激光器波长)计算:k = 2π/λ
|
基于1.06微米波长(常用的Nd:YAG激光器波长)计算:k = 2π/λ
|
||||||
</remarks>
|
</remarks>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:AirTransmission.AtmosphericTurbulenceModel.CalculateTurbulenceEffect(AirTransmission.WeatherCondition,System.Double,System.Double)">
|
<member name="M:AirTransmission.AtmosphericTurbulenceModel.CalculateTurbulenceEffect(AirTransmission.Weather,System.Double,System.Double)">
|
||||||
<summary>
|
<summary>
|
||||||
计算大气湍流对光传输的综合影响
|
计算大气湍流对光传输的综合影响
|
||||||
</summary>
|
</summary>
|
||||||
<param name="distance">传输距离(米)</param>
|
<param name="distance">传输距离(公里)</param>
|
||||||
<param name="height">传输高度(米)</param>
|
<param name="height">传输高度(米)</param>
|
||||||
<param name="weather">天气条件</param>
|
<param name="weather">天气条件</param>
|
||||||
<returns>湍流效应(0到1之间的值,1表示无影响,0表示完全衰减)</returns>
|
<returns>湍流效应(0到1之间的值,1表示无影响,0表示完全衰减)</returns>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:AirTransmission.AtmosphericTurbulenceModel.CalculateC2n(System.Double,System.Double)">
|
<member name="M:AirTransmission.AtmosphericTurbulenceModel.CalculateC2n(System.Double,System.Double)">
|
||||||
<summary>
|
<summary>
|
||||||
使用修改后的 Hufnagel-Valley 模型计算大气折射率结构常数
|
使用标准的 Hufnagel-Valley 模型计算大气折射率结构常数
|
||||||
</summary>
|
</summary>
|
||||||
<param name="height">高度(米)</param>
|
<param name="height">高度(米)</param>
|
||||||
<param name="windSpeed">风速(米/秒)</param>
|
<param name="windSpeed">风速(米/秒)</param>
|
||||||
@ -169,7 +169,7 @@
|
|||||||
计算弗里德参数(Fried parameter)
|
计算弗里德参数(Fried parameter)
|
||||||
</summary>
|
</summary>
|
||||||
<param name="C2n">大气折射率结构常数</param>
|
<param name="C2n">大气折射率结构常数</param>
|
||||||
<param name="L">传输距离(米)</param>
|
<param name="distance">传输距离(公里)</param>
|
||||||
<returns>弗里德参数(米)</returns>
|
<returns>弗里德参数(米)</returns>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:AirTransmission.AtmosphericTurbulenceModel.CalculateScintillationIndex(System.Double,System.Double,System.Double)">
|
<member name="M:AirTransmission.AtmosphericTurbulenceModel.CalculateScintillationIndex(System.Double,System.Double,System.Double)">
|
||||||
@ -178,7 +178,7 @@
|
|||||||
</summary>
|
</summary>
|
||||||
<param name="C2n">大气折射率结构常数</param>
|
<param name="C2n">大气折射率结构常数</param>
|
||||||
<param name="k">波数</param>
|
<param name="k">波数</param>
|
||||||
<param name="L">传输距离(米)</param>
|
<param name="distance">传输距离(公里)</param>
|
||||||
<returns>闪烁指数(无量纲)</returns>
|
<returns>闪烁指数(无量纲)</returns>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:AirTransmission.AtmosphericTurbulenceModel.CalculateBeamWander(System.Double,System.Double,System.Double)">
|
<member name="M:AirTransmission.AtmosphericTurbulenceModel.CalculateBeamWander(System.Double,System.Double,System.Double)">
|
||||||
@ -186,8 +186,8 @@
|
|||||||
计算光束漂移(Beam Wander)
|
计算光束漂移(Beam Wander)
|
||||||
</summary>
|
</summary>
|
||||||
<param name="C2n">大气折射率结构常数</param>
|
<param name="C2n">大气折射率结构常数</param>
|
||||||
<param name="L">传输距离(米)</param>
|
<param name="distance">传输距离(公里)</param>
|
||||||
<param name="h">传输高度(米)</param>
|
<param name="height">传输高度(米)</param>
|
||||||
<returns>光束漂移(弧度)</returns>
|
<returns>光束漂移(弧度)</returns>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:AirTransmission.AtmosphericTurbulenceModel.CalculateCoherenceLength(System.Double,System.Double)">
|
<member name="M:AirTransmission.AtmosphericTurbulenceModel.CalculateCoherenceLength(System.Double,System.Double)">
|
||||||
@ -195,7 +195,7 @@
|
|||||||
计算相干长度(Coherence Length)
|
计算相干长度(Coherence Length)
|
||||||
</summary>
|
</summary>
|
||||||
<param name="C2n">大气折射率结构常数</param>
|
<param name="C2n">大气折射率结构常数</param>
|
||||||
<param name="L">传输距离(米)</param>
|
<param name="distance">传输距离(公里)</param>
|
||||||
<returns>相干长度(米)</returns>
|
<returns>相干长度(米)</returns>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:AirTransmission.AtmosphericTurbulenceModel.CalculateAngleOfArrival(System.Double,System.Double,System.Double)">
|
<member name="M:AirTransmission.AtmosphericTurbulenceModel.CalculateAngleOfArrival(System.Double,System.Double,System.Double)">
|
||||||
@ -203,7 +203,7 @@
|
|||||||
计算到达角(Angle of Arrival)
|
计算到达角(Angle of Arrival)
|
||||||
</summary>
|
</summary>
|
||||||
<param name="C2n">大气折射率结构常数</param>
|
<param name="C2n">大气折射率结构常数</param>
|
||||||
<param name="L">传输距离(米)</param>
|
<param name="distance">传输距离(公里)</param>
|
||||||
<param name="D">接收器口径(米)</param>
|
<param name="D">接收器口径(米)</param>
|
||||||
<returns>到达角(弧度)</returns>
|
<returns>到达角(弧度)</returns>
|
||||||
</member>
|
</member>
|
||||||
@ -212,7 +212,7 @@
|
|||||||
计算等晕角(Isoplanatism Angle)
|
计算等晕角(Isoplanatism Angle)
|
||||||
</summary>
|
</summary>
|
||||||
<param name="C2n">大气折射率结构常数</param>
|
<param name="C2n">大气折射率结构常数</param>
|
||||||
<param name="L">传输距离(米)</param>
|
<param name="distance">传输距离(公里)</param>
|
||||||
<returns>等晕角(弧度)</returns>
|
<returns>等晕角(弧度)</returns>
|
||||||
</member>
|
</member>
|
||||||
<member name="T:AirTransmission.IRTransmittanceModel">
|
<member name="T:AirTransmission.IRTransmittanceModel">
|
||||||
@ -342,7 +342,7 @@
|
|||||||
- 计算各种天气条件(雨、雪、雾、沙尘)的衰减效应
|
- 计算各种天气条件(雨、雪、雾、沙尘)的衰减效应
|
||||||
</remarks>
|
</remarks>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:AirTransmission.LaserTransmittanceModel.#ctor(AirTransmission.WeatherCondition)">
|
<member name="M:AirTransmission.LaserTransmittanceModel.#ctor(AirTransmission.Weather)">
|
||||||
<summary>
|
<summary>
|
||||||
激光透过率计算模型,用于计算激光在大气中的传输特性
|
激光透过率计算模型,用于计算激光在大气中的传输特性
|
||||||
</summary>
|
</summary>
|
||||||
@ -549,7 +549,7 @@
|
|||||||
- 毫米波:3190μm(3.19mm,对应94GHz)
|
- 毫米波:3190μm(3.19mm,对应94GHz)
|
||||||
</remarks>
|
</remarks>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:AirTransmission.TransmittanceModel.#ctor(AirTransmission.WeatherCondition)">
|
<member name="M:AirTransmission.TransmittanceModel.#ctor(AirTransmission.Weather)">
|
||||||
<summary>
|
<summary>
|
||||||
大气透过率计算的基础模型类,提供了各种大气条件下的透过率计算方法
|
大气透过率计算的基础模型类,提供了各种大气条件下的透过率计算方法
|
||||||
</summary>
|
</summary>
|
||||||
@ -585,7 +585,7 @@
|
|||||||
标准气溶胶密度常量,单位:粒子/立方厘米
|
标准气溶胶密度常量,单位:粒子/立方厘米
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="F:AirTransmission.TransmittanceModel.weatherCondition">
|
<member name="F:AirTransmission.TransmittanceModel.weather">
|
||||||
<summary>
|
<summary>
|
||||||
当前天气条件对象
|
当前天气条件对象
|
||||||
</summary>
|
</summary>
|
||||||
@ -773,7 +773,7 @@
|
|||||||
4. 综合得到最终透过率
|
4. 综合得到最终透过率
|
||||||
</remarks>
|
</remarks>
|
||||||
</member>
|
</member>
|
||||||
<member name="T:AirTransmission.WeatherCondition">
|
<member name="T:AirTransmission.Weather">
|
||||||
<summary>
|
<summary>
|
||||||
天气条件类,用于描述大气传输计算所需的天气参数
|
天气条件类,用于描述大气传输计算所需的天气参数
|
||||||
</summary>
|
</summary>
|
||||||
@ -792,11 +792,11 @@
|
|||||||
<param name="visibility">能见度(公里)</param>
|
<param name="visibility">能见度(公里)</param>
|
||||||
<param name="precipitation">降水量(毫米/小时),可选</param>
|
<param name="precipitation">降水量(毫米/小时),可选</param>
|
||||||
<param name="co2Concentration">二氧化碳浓度(ppm),默认415ppm</param>
|
<param name="co2Concentration">二氧化碳浓度(ppm),默认415ppm</param>
|
||||||
<param name="pressure">大气压力(kPa),默认101.325kPa</param>
|
<param name="pressure">大气压力(hPa),默认1013.25hPa</param>
|
||||||
<param name="windSpeed">风速(m/s),默认0m/s</param>
|
<param name="windSpeed">风速(m/s),默认0m/s</param>
|
||||||
<param name="windDirection">风向(0-360度),默认0度</param>
|
<param name="windDirection">风向(0-360度),默认0度</param>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:AirTransmission.WeatherCondition.#ctor(AirTransmission.WeatherType,System.Double,System.Double,System.Double,System.Nullable{System.Double},System.Double,System.Double,System.Double,System.Double)">
|
<member name="M:AirTransmission.Weather.#ctor(AirTransmission.WeatherType,System.Double,System.Double,System.Double,System.Double,System.Double,System.Double,System.Double,System.Double)">
|
||||||
<summary>
|
<summary>
|
||||||
天气条件类,用于描述大气传输计算所需的天气参数
|
天气条件类,用于描述大气传输计算所需的天气参数
|
||||||
</summary>
|
</summary>
|
||||||
@ -815,56 +815,56 @@
|
|||||||
<param name="visibility">能见度(公里)</param>
|
<param name="visibility">能见度(公里)</param>
|
||||||
<param name="precipitation">降水量(毫米/小时),可选</param>
|
<param name="precipitation">降水量(毫米/小时),可选</param>
|
||||||
<param name="co2Concentration">二氧化碳浓度(ppm),默认415ppm</param>
|
<param name="co2Concentration">二氧化碳浓度(ppm),默认415ppm</param>
|
||||||
<param name="pressure">大气压力(kPa),默认101.325kPa</param>
|
<param name="pressure">大气压力(hPa),默认1013.25hPa</param>
|
||||||
<param name="windSpeed">风速(m/s),默认0m/s</param>
|
<param name="windSpeed">风速(m/s),默认0m/s</param>
|
||||||
<param name="windDirection">风向(0-360度),默认0度</param>
|
<param name="windDirection">风向(0-360度),默认0度</param>
|
||||||
</member>
|
</member>
|
||||||
<member name="P:AirTransmission.WeatherCondition.Type">
|
<member name="P:AirTransmission.Weather.Type">
|
||||||
<summary>
|
<summary>
|
||||||
天气类型
|
天气类型
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="P:AirTransmission.WeatherCondition.Temperature">
|
<member name="P:AirTransmission.Weather.Temperature">
|
||||||
<summary>
|
<summary>
|
||||||
温度(摄氏度)
|
温度(摄氏度)
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="P:AirTransmission.WeatherCondition.RelativeHumidity">
|
<member name="P:AirTransmission.Weather.RelativeHumidity">
|
||||||
<summary>
|
<summary>
|
||||||
相对湿度(百分比)
|
相对湿度(百分比)
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="P:AirTransmission.WeatherCondition.Visibility">
|
<member name="P:AirTransmission.Weather.Visibility">
|
||||||
<summary>
|
<summary>
|
||||||
能见度(公里)
|
能见度(公里)
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="P:AirTransmission.WeatherCondition.Precipitation">
|
<member name="P:AirTransmission.Weather.Precipitation">
|
||||||
<summary>
|
<summary>
|
||||||
降水量(毫米/小时)
|
降水量(毫米/小时)
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="P:AirTransmission.WeatherCondition.CO2Concentration">
|
<member name="P:AirTransmission.Weather.CO2Concentration">
|
||||||
<summary>
|
<summary>
|
||||||
二氧化碳浓度(ppm)
|
二氧化碳浓度(ppm)
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="P:AirTransmission.WeatherCondition.Pressure">
|
<member name="P:AirTransmission.Weather.Pressure">
|
||||||
<summary>
|
<summary>
|
||||||
大气压力(kPa)
|
大气压力(hPa)
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="P:AirTransmission.WeatherCondition.WindSpeed">
|
<member name="P:AirTransmission.Weather.WindSpeed">
|
||||||
<summary>
|
<summary>
|
||||||
风速(m/s)
|
风速(m/s)
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="P:AirTransmission.WeatherCondition.WindDirection">
|
<member name="P:AirTransmission.Weather.WindDirection">
|
||||||
<summary>
|
<summary>
|
||||||
风向(0-360度, 0度为北, 顺时针)
|
风向(0-360度, 0度为北, 顺时针)
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:AirTransmission.WeatherCondition.PrintWeatherInfo(AirTransmission.WeatherCondition)">
|
<member name="M:AirTransmission.Weather.PrintWeatherInfo(AirTransmission.Weather)">
|
||||||
<summary>
|
<summary>
|
||||||
打印天气信息
|
打印天气信息
|
||||||
</summary>
|
</summary>
|
||||||
@ -879,27 +879,27 @@
|
|||||||
天气类型枚举
|
天气类型枚举
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="F:AirTransmission.WeatherType.晴天">
|
<member name="F:AirTransmission.WeatherType.Clear">
|
||||||
<summary>
|
<summary>
|
||||||
晴朗天气
|
晴朗天气
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="F:AirTransmission.WeatherType.雨天">
|
<member name="F:AirTransmission.WeatherType.Rain">
|
||||||
<summary>
|
<summary>
|
||||||
雨天
|
雨天
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="F:AirTransmission.WeatherType.雪天">
|
<member name="F:AirTransmission.WeatherType.Snow">
|
||||||
<summary>
|
<summary>
|
||||||
雪天
|
雪天
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="F:AirTransmission.WeatherType.雾天">
|
<member name="F:AirTransmission.WeatherType.Fog">
|
||||||
<summary>
|
<summary>
|
||||||
雾天
|
雾天
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="F:AirTransmission.WeatherType.沙尘">
|
<member name="F:AirTransmission.WeatherType.Dust">
|
||||||
<summary>
|
<summary>
|
||||||
沙尘天气
|
沙尘天气
|
||||||
</summary>
|
</summary>
|
||||||
|
|||||||
@ -58,7 +58,7 @@ namespace AirTransmission
|
|||||||
/// <param name="weather">天气条件</param>
|
/// <param name="weather">天气条件</param>
|
||||||
/// <param name="distance">传输距离(米)</param>
|
/// <param name="distance">传输距离(米)</param>
|
||||||
/// <returns>大气透过率</returns>
|
/// <returns>大气透过率</returns>
|
||||||
public static double CalcLaser(WeatherCondition weather, double distance)
|
public static double CalcLaser(Weather weather, double distance)
|
||||||
{
|
{
|
||||||
var model = new LaserTransmittanceModel(weather);
|
var model = new LaserTransmittanceModel(weather);
|
||||||
return model.CalculateTransmittance(distance);
|
return model.CalculateTransmittance(distance);
|
||||||
@ -70,7 +70,7 @@ namespace AirTransmission
|
|||||||
/// <param name="weather">天气条件</param>
|
/// <param name="weather">天气条件</param>
|
||||||
/// <param name="distance">传输距离(米)</param>
|
/// <param name="distance">传输距离(米)</param>
|
||||||
/// <returns>大气透过率</returns>
|
/// <returns>大气透过率</returns>
|
||||||
public static double CalcIR(WeatherCondition weather, double distance)
|
public static double CalcIR(Weather weather, double distance)
|
||||||
{
|
{
|
||||||
var model = new IRTransmittanceModel(weather);
|
var model = new IRTransmittanceModel(weather);
|
||||||
return model.CalculateTransmittance(distance);
|
return model.CalculateTransmittance(distance);
|
||||||
@ -82,7 +82,7 @@ namespace AirTransmission
|
|||||||
/// <param name="weather">天气条件</param>
|
/// <param name="weather">天气条件</param>
|
||||||
/// <param name="distance">传输距离(米)</param>
|
/// <param name="distance">传输距离(米)</param>
|
||||||
/// <returns>大气透过率</returns>
|
/// <returns>大气透过率</returns>
|
||||||
public static double CalcMillimeterWave(WeatherCondition weather, double distance)
|
public static double CalcMillimeterWave(Weather weather, double distance)
|
||||||
{
|
{
|
||||||
var model = new MillimeterWaveTransmittanceModel(weather);
|
var model = new MillimeterWaveTransmittanceModel(weather);
|
||||||
return model.CalculateTransmittance(distance);
|
return model.CalculateTransmittance(distance);
|
||||||
@ -94,7 +94,7 @@ namespace AirTransmission
|
|||||||
/// <param name="weather">天气条件</param>
|
/// <param name="weather">天气条件</param>
|
||||||
/// <param name="distance">传输距离(米)</param>
|
/// <param name="distance">传输距离(米)</param>
|
||||||
/// <returns>大气透过率</returns>
|
/// <returns>大气透过率</returns>
|
||||||
public static double CalcUV(WeatherCondition weather, double distance)
|
public static double CalcUV(Weather weather, double distance)
|
||||||
{
|
{
|
||||||
var model = new UVTransmittanceModel(weather);
|
var model = new UVTransmittanceModel(weather);
|
||||||
return model.CalculateTransmittance(distance);
|
return model.CalculateTransmittance(distance);
|
||||||
@ -107,7 +107,7 @@ namespace AirTransmission
|
|||||||
/// <param name="distance">传输距离(米)</param>
|
/// <param name="distance">传输距离(米)</param>
|
||||||
/// <param name="height">传输高度(米)</param>
|
/// <param name="height">传输高度(米)</param>
|
||||||
/// <returns>大气透过率</returns>
|
/// <returns>大气透过率</returns>
|
||||||
public static double CalcTurbulenceEffect(WeatherCondition weather, double distance, double height)
|
public static double CalcTurbulenceEffect(Weather weather, double distance, double height)
|
||||||
{
|
{
|
||||||
return AtmosphericTurbulenceModel.CalculateTurbulenceEffect(weather, distance, height);
|
return AtmosphericTurbulenceModel.CalculateTurbulenceEffect(weather, distance, height);
|
||||||
}
|
}
|
||||||
@ -199,7 +199,7 @@ namespace AirTransmission
|
|||||||
[DllExport("CalculateTransmittance", CallingConvention = CallingConvention.Cdecl)]
|
[DllExport("CalculateTransmittance", CallingConvention = CallingConvention.Cdecl)]
|
||||||
public static double CalculateTransmittanceExport(int radiationType, double wavelength, double distance, WeatherParameters parameters)
|
public static double CalculateTransmittanceExport(int radiationType, double wavelength, double distance, WeatherParameters parameters)
|
||||||
{
|
{
|
||||||
var weather = new WeatherCondition(
|
var weather = new Weather(
|
||||||
type: (WeatherType)parameters.WeatherType,
|
type: (WeatherType)parameters.WeatherType,
|
||||||
temperature: parameters.Temperature,
|
temperature: parameters.Temperature,
|
||||||
relativeHumidity: parameters.RelativeHumidity,
|
relativeHumidity: parameters.RelativeHumidity,
|
||||||
@ -238,7 +238,7 @@ namespace AirTransmission
|
|||||||
[DllExport("CalculateAtmosphericTurbulence", CallingConvention = CallingConvention.Cdecl)]
|
[DllExport("CalculateAtmosphericTurbulence", CallingConvention = CallingConvention.Cdecl)]
|
||||||
public static double CalculateAtmosphericTurbulenceExport(double wavelength, double distance, WeatherParameters parameters, double height)
|
public static double CalculateAtmosphericTurbulenceExport(double wavelength, double distance, WeatherParameters parameters, double height)
|
||||||
{
|
{
|
||||||
var weather = new WeatherCondition(
|
var weather = new Weather(
|
||||||
type: (WeatherType)parameters.WeatherType,
|
type: (WeatherType)parameters.WeatherType,
|
||||||
temperature: parameters.Temperature,
|
temperature: parameters.Temperature,
|
||||||
relativeHumidity: parameters.RelativeHumidity,
|
relativeHumidity: parameters.RelativeHumidity,
|
||||||
|
|||||||
@ -29,11 +29,11 @@ namespace AirTransmission
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 计算大气湍流对光传输的综合影响
|
/// 计算大气湍流对光传输的综合影响
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="distance">传输距离(米)</param>
|
/// <param name="distance">传输距离(公里)</param>
|
||||||
/// <param name="height">传输高度(米)</param>
|
/// <param name="height">传输高度(米)</param>
|
||||||
/// <param name="weather">天气条件</param>
|
/// <param name="weather">天气条件</param>
|
||||||
/// <returns>湍流效应(0到1之间的值,1表示无影响,0表示完全衰减)</returns>
|
/// <returns>湍流效应(0到1之间的值,1表示无影响,0表示完全衰减)</returns>
|
||||||
public static double CalculateTurbulenceEffect(WeatherCondition weather, double distance, double height)
|
public static double CalculateTurbulenceEffect(Weather weather, double distance, double height)
|
||||||
{
|
{
|
||||||
double C2n = CalculateC2n(height, weather.WindSpeed);
|
double C2n = CalculateC2n(height, weather.WindSpeed);
|
||||||
double r0 = CalculateFriedParameter(C2n, distance);
|
double r0 = CalculateFriedParameter(C2n, distance);
|
||||||
@ -44,36 +44,58 @@ namespace AirTransmission
|
|||||||
double turbulenceEffect = Math.Exp(-sigmaI2) * (1 - Math.Exp(-r0 / beamWander));
|
double turbulenceEffect = Math.Exp(-sigmaI2) * (1 - Math.Exp(-r0 / beamWander));
|
||||||
|
|
||||||
// 增加一个缩放因子,使效应更明显
|
// 增加一个缩放因子,使效应更明显
|
||||||
double scalingFactor = 0.8;
|
double scalingFactor = 0.9; // 从0.8增加到0.9,使差异更明显
|
||||||
|
|
||||||
|
// 根据天气条件调整湍流效应
|
||||||
|
if (weather.Type == WeatherType.Rain || weather.Type == WeatherType.Snow)
|
||||||
|
{
|
||||||
|
// 雨雪天气湍流效应更强
|
||||||
|
turbulenceEffect = turbulenceEffect * 0.9;
|
||||||
|
}
|
||||||
|
else if (weather.Type == WeatherType.Dust || weather.Type == WeatherType.Fog)
|
||||||
|
{
|
||||||
|
// 沙尘和雾天湍流效应中等
|
||||||
|
turbulenceEffect = turbulenceEffect * 0.95;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 距离越远,湍流效应越明显
|
||||||
|
double distanceFactor = Math.Min(distance / 10.0, 0.2); // 最多降低20%,10公里为基准
|
||||||
|
turbulenceEffect = turbulenceEffect * (1.0 - distanceFactor);
|
||||||
|
|
||||||
turbulenceEffect = 1 - scalingFactor * (1 - turbulenceEffect);
|
turbulenceEffect = 1 - scalingFactor * (1 - turbulenceEffect);
|
||||||
|
|
||||||
return turbulenceEffect;
|
return turbulenceEffect;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 使用修改后的 Hufnagel-Valley 模型计算大气折射率结构常数
|
/// 使用标准的 Hufnagel-Valley 模型计算大气折射率结构常数
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="height">高度(米)</param>
|
/// <param name="height">高度(米)</param>
|
||||||
/// <param name="windSpeed">风速(米/秒)</param>
|
/// <param name="windSpeed">风速(米/秒)</param>
|
||||||
/// <returns>大气折射率结构常数</returns>
|
/// <returns>大气折射率结构常数</returns>
|
||||||
public static double CalculateC2n(double height, double windSpeed)
|
public static double CalculateC2n(double height, double windSpeed)
|
||||||
{
|
{
|
||||||
// 修改 Hufnagel-Valley 模型,增加湍流强度
|
// 使用标准的 Hufnagel-Valley 模型
|
||||||
double A = 1.7e-13; // 增加了一个数量级
|
double A = 0.00594; // 标准系数
|
||||||
double v = windSpeed;
|
// 确保风速至少为0.5 m/s,防止计算结果不合理
|
||||||
return A * Math.Pow(v / 27, 2) * Math.Pow(height * 1e-5, 10) * Math.Exp(-height / 1000)
|
double v = Math.Max(windSpeed, 0.5);
|
||||||
+ 2.7e-15 * Math.Exp(-height / 1500);
|
|
||||||
|
// 标准 Hufnagel-Valley 公式
|
||||||
|
double result = A * Math.Pow(v / 27, 2) * Math.Pow(height * 1e-5, 10) * Math.Exp(-height / 1000)
|
||||||
|
+ 2.7e-16 * Math.Exp(-height / 1500);
|
||||||
|
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 计算弗里德参数(Fried parameter)
|
/// 计算弗里德参数(Fried parameter)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="C2n">大气折射率结构常数</param>
|
/// <param name="C2n">大气折射率结构常数</param>
|
||||||
/// <param name="L">传输距离(米)</param>
|
/// <param name="distance">传输距离(公里)</param>
|
||||||
/// <returns>弗里德参数(米)</returns>
|
/// <returns>弗里德参数(米)</returns>
|
||||||
private static double CalculateFriedParameter(double C2n, double L)
|
private static double CalculateFriedParameter(double C2n, double distance)
|
||||||
{
|
{
|
||||||
return Math.Pow(0.423 * k * k * C2n * L, -3.0 / 5.0);
|
return Math.Pow(0.423 * k * k * C2n * distance, -3.0 / 5.0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -81,57 +103,57 @@ namespace AirTransmission
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="C2n">大气折射率结构常数</param>
|
/// <param name="C2n">大气折射率结构常数</param>
|
||||||
/// <param name="k">波数</param>
|
/// <param name="k">波数</param>
|
||||||
/// <param name="L">传输距离(米)</param>
|
/// <param name="distance">传输距离(公里)</param>
|
||||||
/// <returns>闪烁指数(无量纲)</returns>
|
/// <returns>闪烁指数(无量纲)</returns>
|
||||||
private static double CalculateScintillationIndex(double C2n, double k, double L)
|
private static double CalculateScintillationIndex(double C2n, double k, double distance)
|
||||||
{
|
{
|
||||||
return 1.23 * C2n * Math.Pow(k, 7.0 / 6.0) * Math.Pow(L, 11.0 / 6.0);
|
return 1.23 * C2n * Math.Pow(k, 7.0 / 6.0) * Math.Pow(distance, 11.0 / 6.0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 计算光束漂移(Beam Wander)
|
/// 计算光束漂移(Beam Wander)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="C2n">大气折射率结构常数</param>
|
/// <param name="C2n">大气折射率结构常数</param>
|
||||||
/// <param name="L">传输距离(米)</param>
|
/// <param name="distance">传输距离(公里)</param>
|
||||||
/// <param name="h">传输高度(米)</param>
|
/// <param name="height">传输高度(米)</param>
|
||||||
/// <returns>光束漂移(弧度)</returns>
|
/// <returns>光束漂移(弧度)</returns>
|
||||||
private static double CalculateBeamWander(double C2n, double L, double h)
|
private static double CalculateBeamWander(double C2n, double distance, double height)
|
||||||
{
|
{
|
||||||
return 2.87 * Math.Pow(C2n * L * Math.Pow(h, 5.0/3.0), 1.0/3.0);
|
return 2.87 * Math.Pow(C2n * distance * Math.Pow(height, 5.0/3.0), 1.0/3.0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 计算相干长度(Coherence Length)
|
/// 计算相干长度(Coherence Length)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="C2n">大气折射率结构常数</param>
|
/// <param name="C2n">大气折射率结构常数</param>
|
||||||
/// <param name="L">传输距离(米)</param>
|
/// <param name="distance">传输距离(公里)</param>
|
||||||
/// <returns>相干长度(米)</returns>
|
/// <returns>相干长度(米)</returns>
|
||||||
private static double CalculateCoherenceLength(double C2n, double L)
|
private static double CalculateCoherenceLength(double C2n, double distance)
|
||||||
{
|
{
|
||||||
return Math.Pow(1.46 * k * k * C2n * L, -3.0 / 5.0);
|
return Math.Pow(1.46 * k * k * C2n * distance, -3.0 / 5.0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 计算到达角(Angle of Arrival)
|
/// 计算到达角(Angle of Arrival)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="C2n">大气折射率结构常数</param>
|
/// <param name="C2n">大气折射率结构常数</param>
|
||||||
/// <param name="L">传输距离(米)</param>
|
/// <param name="distance">传输距离(公里)</param>
|
||||||
/// <param name="D">接收器口径(米)</param>
|
/// <param name="D">接收器口径(米)</param>
|
||||||
/// <returns>到达角(弧度)</returns>
|
/// <returns>到达角(弧度)</returns>
|
||||||
public static double CalculateAngleOfArrival(double C2n, double L, double D)
|
public static double CalculateAngleOfArrival(double C2n, double distance, double D)
|
||||||
{
|
{
|
||||||
return 2.91 * Math.Pow(C2n * L / Math.Pow(D, 1.0/3.0), 0.6);
|
return 2.91 * Math.Pow(C2n * distance / Math.Pow(D, 1.0/3.0), 0.6);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 计算等晕角(Isoplanatism Angle)
|
/// 计算等晕角(Isoplanatism Angle)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="C2n">大气折射率结构常数</param>
|
/// <param name="C2n">大气折射率结构常数</param>
|
||||||
/// <param name="L">传输距离(米)</param>
|
/// <param name="distance">传输距离(公里)</param>
|
||||||
/// <returns>等晕角(弧度)</returns>
|
/// <returns>等晕角(弧度)</returns>
|
||||||
public static double CalculateIsoplanatismAngle(double C2n, double L)
|
public static double CalculateIsoplanatismAngle(double C2n, double distance)
|
||||||
{
|
{
|
||||||
return 0.314 * Math.Pow(C2n * k * k * L, -3.0 / 5.0);
|
return 0.314 * Math.Pow(C2n * k * k * distance, -3.0 / 5.0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -38,7 +38,7 @@ namespace AirTransmission
|
|||||||
/// </remarks>
|
/// </remarks>
|
||||||
private const double IR_WAVELENGTH = 10.0; // 主要计算波长(微米)
|
private const double IR_WAVELENGTH = 10.0; // 主要计算波长(微米)
|
||||||
|
|
||||||
public IRTransmittanceModel(WeatherCondition weather) : base(weather) { }
|
public IRTransmittanceModel(Weather weather) : base(weather) { }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 计算给定距离的红外线透过率
|
/// 计算给定距离的红外线透过率
|
||||||
|
|||||||
@ -16,7 +16,7 @@ namespace AirTransmission
|
|||||||
/// - 处理烟雾对激光传输的影响
|
/// - 处理烟雾对激光传输的影响
|
||||||
/// - 计算各种天气条件(雨、雪、雾、沙尘)的衰减效应
|
/// - 计算各种天气条件(雨、雪、雾、沙尘)的衰减效应
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
internal class LaserTransmittanceModel(WeatherCondition weather) : TransmittanceModel(weather)
|
internal class LaserTransmittanceModel(Weather weather) : TransmittanceModel(weather)
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 激光波长常量,单位:微米
|
/// 激光波长常量,单位:微米
|
||||||
@ -138,21 +138,21 @@ namespace AirTransmission
|
|||||||
private double CalculateAerosolFactor()
|
private double CalculateAerosolFactor()
|
||||||
{
|
{
|
||||||
double q;
|
double q;
|
||||||
if (Visibility > 50)
|
if (Visibility > 50000)
|
||||||
q = 1.6;
|
q = 1.6;
|
||||||
else if (Visibility > 6)
|
else if (Visibility > 6000)
|
||||||
q = 1.3;
|
q = 1.3;
|
||||||
else if (Visibility > 1)
|
else if (Visibility > 1000)
|
||||||
q = 0.585 * Math.Pow(Visibility, 1.0/3.0);
|
q = 0.585 * Math.Pow(Visibility / 1000, 1.0/3.0);
|
||||||
else
|
else
|
||||||
q = 0.585 * Math.Pow(1, 1.0/3.0);
|
q = 0.585 * Math.Pow(1000, 1.0/3.0);
|
||||||
|
|
||||||
// 增加气溶胶散射的影响
|
// 增加气溶胶散射的影响
|
||||||
double aerosolFactor = 3.91 / Visibility * Math.Pow(LASER_WAVELENGTH / 0.55, -q) * 1.1; // 增加10%的气溶胶散射
|
double aerosolFactor = 3.91 / Visibility / 1000 * Math.Pow(LASER_WAVELENGTH / 0.55, -q) * 1.1; // 增加10%的气溶胶散射
|
||||||
|
|
||||||
if (Visibility < 5)
|
if (Visibility < 5000)
|
||||||
{
|
{
|
||||||
aerosolFactor *= (1 + (5 - Visibility) / 5);
|
aerosolFactor *= (1 + (5000 - Visibility) / 5000);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (IsDusty)
|
if (IsDusty)
|
||||||
@ -174,8 +174,8 @@ namespace AirTransmission
|
|||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
// 增加雾的衰减效应
|
// 增加雾的衰减效应
|
||||||
double q = 0.585 * Math.Pow(Visibility, 1.0/3.0);
|
double q = 0.585 * Math.Pow(Visibility / 1000, 1.0/3.0);
|
||||||
double beta = 3.91 / Visibility * Math.Pow(LASER_WAVELENGTH / 0.55, -q);
|
double beta = 3.91 / Visibility / 1000 * Math.Pow(LASER_WAVELENGTH / 0.55, -q);
|
||||||
return beta * pathLength * 1.2; // 从0.5改为1.2,增加雾的影响
|
return beta * pathLength * 1.2; // 从0.5改为1.2,增加雾的影响
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -33,7 +33,7 @@ namespace AirTransmission
|
|||||||
/// </remarks>
|
/// </remarks>
|
||||||
private const double MILLIMETER_WAVE_WAVELENGTH = 3190.0; // 微米(对应94 GHz)
|
private const double MILLIMETER_WAVE_WAVELENGTH = 3190.0; // 微米(对应94 GHz)
|
||||||
|
|
||||||
public MillimeterWaveTransmittanceModel(WeatherCondition weather) : base(weather) { }
|
public MillimeterWaveTransmittanceModel(Weather weather) : base(weather) { }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 计算给定距离的毫米波透过率
|
/// 计算给定距离的毫米波透过率
|
||||||
|
|||||||
@ -23,7 +23,7 @@ namespace AirTransmission
|
|||||||
/// - 紫外:0.2-0.4μm
|
/// - 紫外:0.2-0.4μm
|
||||||
/// - 毫米波:3190μm(3.19mm,对应94GHz)
|
/// - 毫米波:3190μm(3.19mm,对应94GHz)
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
internal abstract class TransmittanceModel(WeatherCondition weather)
|
internal abstract class TransmittanceModel(Weather weather)
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 标准大气透过率常量
|
/// 标准大气透过率常量
|
||||||
@ -44,7 +44,7 @@ namespace AirTransmission
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 当前天气条件对象
|
/// 当前天气条件对象
|
||||||
/// </summary>
|
/// </summary>
|
||||||
protected WeatherCondition weatherCondition = weather;
|
protected Weather weather = weather;
|
||||||
// 大气模型参数
|
// 大气模型参数
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 温度,单位:开尔文
|
/// 温度,单位:开尔文
|
||||||
@ -72,27 +72,27 @@ namespace AirTransmission
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 是否下雨
|
/// 是否下雨
|
||||||
/// </summary>
|
/// </summary>
|
||||||
protected bool IsRaining { get; set; } = weather.Type == WeatherType.雨天;
|
protected bool IsRaining { get; set; } = weather.Type == WeatherType.Rain;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 降雨量(毫米/小时)
|
/// 降雨量(毫米/小时)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
protected double RainRate { get; set; } = weather.Type == WeatherType.雨天 ? (weather.Precipitation ?? 0) : 0;
|
protected double RainRate { get; set; } = weather.Type == WeatherType.Rain ? weather.Precipitation : 0;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 是否有雾
|
/// 是否有雾
|
||||||
/// </summary>
|
/// </summary>
|
||||||
protected bool IsFoggy { get; set; } = weather.Type == WeatherType.雾天;
|
protected bool IsFoggy { get; set; } = weather.Type == WeatherType.Fog;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 是否有沙尘
|
/// 是否有沙尘
|
||||||
/// </summary>
|
/// </summary>
|
||||||
protected bool IsDusty { get; set; } = weather.Type == WeatherType.沙尘;
|
protected bool IsDusty { get; set; } = weather.Type == WeatherType.Dust;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 是否下雪
|
/// 是否下雪
|
||||||
/// </summary>
|
/// </summary>
|
||||||
protected bool IsSnowing { get; set; } = weather.Type == WeatherType.雪天;
|
protected bool IsSnowing { get; set; } = weather.Type == WeatherType.Snow;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 降雪量(毫米/小时)
|
/// 降雪量(毫米/小时)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
protected double SnowRate { get; set; } = weather.Type == WeatherType.雪天 ? (weather.Precipitation ?? 0) : 0;
|
protected double SnowRate { get; set; } = weather.Type == WeatherType.Snow ? weather.Precipitation : 0;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 二氧化碳浓度(ppm)
|
/// 二氧化碳浓度(ppm)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@ -41,7 +41,7 @@ namespace AirTransmission
|
|||||||
/// </remarks>
|
/// </remarks>
|
||||||
private const double UV_WAVELENGTH = 0.308; // 主要计算波长(微米)
|
private const double UV_WAVELENGTH = 0.308; // 主要计算波长(微米)
|
||||||
|
|
||||||
public UVTransmittanceModel(WeatherCondition weather) : base(weather) { }
|
public UVTransmittanceModel(Weather weather) : base(weather) { }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 计算给定距离的紫外线透过率
|
/// 计算给定距离的紫外线透过率
|
||||||
|
|||||||
@ -20,10 +20,10 @@ namespace AirTransmission
|
|||||||
/// <param name="visibility">能见度(公里)</param>
|
/// <param name="visibility">能见度(公里)</param>
|
||||||
/// <param name="precipitation">降水量(毫米/小时),可选</param>
|
/// <param name="precipitation">降水量(毫米/小时),可选</param>
|
||||||
/// <param name="co2Concentration">二氧化碳浓度(ppm),默认415ppm</param>
|
/// <param name="co2Concentration">二氧化碳浓度(ppm),默认415ppm</param>
|
||||||
/// <param name="pressure">大气压力(kPa),默认101.325kPa</param>
|
/// <param name="pressure">大气压力(hPa),默认1013.25hPa</param>
|
||||||
/// <param name="windSpeed">风速(m/s),默认0m/s</param>
|
/// <param name="windSpeed">风速(m/s),默认0m/s</param>
|
||||||
/// <param name="windDirection">风向(0-360度),默认0度</param>
|
/// <param name="windDirection">风向(0-360度),默认0度</param>
|
||||||
public class WeatherCondition(WeatherType type, double temperature, double relativeHumidity, double visibility, double? precipitation = null, double co2Concentration = 415, double pressure = 101.325, double windSpeed = 0, double windDirection = 0)
|
public class Weather(WeatherType type, double temperature, double relativeHumidity, double visibility, double precipitation = 0, double co2Concentration = 415, double pressure = 101.325, double windSpeed = 0, double windDirection = 0)
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 天气类型
|
/// 天气类型
|
||||||
@ -44,14 +44,14 @@ namespace AirTransmission
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 降水量(毫米/小时)
|
/// 降水量(毫米/小时)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public double? Precipitation { get; set; } = precipitation;
|
public double Precipitation { get; set; } = precipitation;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 二氧化碳浓度(ppm)
|
/// 二氧化碳浓度(ppm)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public double CO2Concentration { get; set; } = co2Concentration;
|
public double CO2Concentration { get; set; } = co2Concentration;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 大气压力(kPa)
|
/// 大气压力(hPa)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public double Pressure { get; set; } = pressure;
|
public double Pressure { get; set; } = pressure;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -71,9 +71,9 @@ namespace AirTransmission
|
|||||||
/// 输出格式:
|
/// 输出格式:
|
||||||
/// 天气类型: [类型], 温度: [温度]°C, 相对湿度: [湿度]%, 能见度: [能见度]km, 降水量: [降水量]mm/h, 大气压力: [大气压力]kPa, 风速: [风速]m/s, 风向: [风向]度
|
/// 天气类型: [类型], 温度: [温度]°C, 相对湿度: [湿度]%, 能见度: [能见度]km, 降水量: [降水量]mm/h, 大气压力: [大气压力]kPa, 风速: [风速]m/s, 风向: [风向]度
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
public static void PrintWeatherInfo(WeatherCondition weather)
|
public static void PrintWeatherInfo(Weather weather)
|
||||||
{
|
{
|
||||||
Debug.WriteLine($"---天气类型: {weather.Type}, 温度: {weather.Temperature}°C, 相对湿度: {weather.RelativeHumidity}%, 能见度: {weather.Visibility}km, 降水量: {weather.Precipitation ?? 0}mm/h, 大气压力: {weather.Pressure}kPa, 风速: {weather.WindSpeed}m/s, 风向: {weather.WindDirection}度");
|
Debug.WriteLine($"---天气类型: {weather.Type}, 温度: {weather.Temperature}°C, 相对湿度: {weather.RelativeHumidity}%, 能见度: {weather.Visibility}km, 降水量: {weather.Precipitation}mm/h, 大气压力: {weather.Pressure}kPa, 风速: {weather.WindSpeed}m/s, 风向: {weather.WindDirection}度");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -85,22 +85,22 @@ namespace AirTransmission
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 晴朗天气
|
/// 晴朗天气
|
||||||
/// </summary>
|
/// </summary>
|
||||||
晴天, // 晴朗天气
|
Clear, // 晴朗天气
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 雨天
|
/// 雨天
|
||||||
/// </summary>
|
/// </summary>
|
||||||
雨天, // 雨天
|
Rain, // 雨天
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 雪天
|
/// 雪天
|
||||||
/// </summary>
|
/// </summary>
|
||||||
雪天, // 雪天
|
Snow, // 雪天
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 雾天
|
/// 雾天
|
||||||
/// </summary>
|
/// </summary>
|
||||||
雾天, // 雾天
|
Fog, // 雾天
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 沙尘天气
|
/// 沙尘天气
|
||||||
/// </summary>
|
/// </summary>
|
||||||
沙尘 // 沙尘
|
Dust // 沙尘
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -7,8 +7,8 @@ class Program
|
|||||||
Console.WriteLine("脉冲激光目标指示器辐射能量计算");
|
Console.WriteLine("脉冲激光目标指示器辐射能量计算");
|
||||||
|
|
||||||
// 创建一个晴天的天气条件
|
// 创建一个晴天的天气条件
|
||||||
var weatherCondition = new WeatherCondition(
|
var weather = new Weather(
|
||||||
type: WeatherType.晴天,
|
type: WeatherType.Clear,
|
||||||
temperature: 25,
|
temperature: 25,
|
||||||
relativeHumidity: 60,
|
relativeHumidity: 60,
|
||||||
visibility: 10
|
visibility: 10
|
||||||
@ -22,7 +22,7 @@ class Program
|
|||||||
double targetReflectivity = 0.2; // 假设目标反射率为20%
|
double targetReflectivity = 0.2; // 假设目标反射率为20%
|
||||||
|
|
||||||
// 计算激光透过率和接收功率
|
// 计算激光透过率和接收功率
|
||||||
double transmittance = AtmosphericTransmittanceCalculator.CalcLaser(weatherCondition, targetDistance);
|
double transmittance = AtmosphericTransmittanceCalculator.CalcLaser(weather, targetDistance);
|
||||||
double receivedPower = AtmosphericTransmittanceCalculator.CalculateReceivedRadiation(transmittance, laserEnergy, pulseWidth, targetDistance, receiverDistance, targetReflectivity);
|
double receivedPower = AtmosphericTransmittanceCalculator.CalculateReceivedRadiation(transmittance, laserEnergy, pulseWidth, targetDistance, receiverDistance, targetReflectivity);
|
||||||
|
|
||||||
Console.WriteLine($"\n导弹导引头接收到的平均功率: {receivedPower:E2} W");
|
Console.WriteLine($"\n导弹导引头接收到的平均功率: {receivedPower:E2} W");
|
||||||
@ -37,6 +37,9 @@ class Program
|
|||||||
Console.WriteLine("\n不同天气条件下的激光透过率测试");
|
Console.WriteLine("\n不同天气条件下的激光透过率测试");
|
||||||
TestLaserTransmittanceInDifferentWeather();
|
TestLaserTransmittanceInDifferentWeather();
|
||||||
|
|
||||||
|
Console.WriteLine("\n不同风速条件下的湍流效应测试");
|
||||||
|
TestTurbulenceWithDifferentWindSpeeds();
|
||||||
|
|
||||||
Console.WriteLine("\n不同天气条件下的红外线透过率测试");
|
Console.WriteLine("\n不同天气条件下的红外线透过率测试");
|
||||||
TestIRTransmittanceInDifferentWeather();
|
TestIRTransmittanceInDifferentWeather();
|
||||||
|
|
||||||
@ -51,36 +54,42 @@ class Program
|
|||||||
static void TestLaserTransmittanceInDifferentWeather()
|
static void TestLaserTransmittanceInDifferentWeather()
|
||||||
{
|
{
|
||||||
// 测试各种天气条件
|
// 测试各种天气条件
|
||||||
TestLaserTransmittance(WeatherType.晴天, "晴朗");
|
TestLaserTransmittance(WeatherType.Clear, "晴朗");
|
||||||
TestLaserTransmittance(WeatherType.雨天, "小雨", relativeHumidity: 60, precipitation: 2.5, visibility: 5);
|
TestLaserTransmittance(WeatherType.Rain, "小雨", relativeHumidity: 60, precipitation: 2.5, visibility: 5);
|
||||||
TestLaserTransmittance(WeatherType.雨天, "大雨", relativeHumidity: 90, precipitation: 25, visibility: 2.5);
|
TestLaserTransmittance(WeatherType.Rain, "大雨", relativeHumidity: 90, precipitation: 25, visibility: 2.5);
|
||||||
TestLaserTransmittance(WeatherType.雾天, "雾", relativeHumidity: 80, visibility: 5);
|
TestLaserTransmittance(WeatherType.Fog, "雾", relativeHumidity: 80, visibility: 5);
|
||||||
TestLaserTransmittance(WeatherType.沙尘, "沙尘", visibility: 0.5);
|
TestLaserTransmittance(WeatherType.Dust, "沙尘", visibility: 0.5);
|
||||||
TestLaserTransmittance(WeatherType.雪天, "雪天", temperature: -5, relativeHumidity: 80, visibility: 1, precipitation: 2.5);
|
TestLaserTransmittance(WeatherType.Snow, "雪天", temperature: -5, relativeHumidity: 80, visibility: 1, precipitation: 2.5);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 测试特定天气条件下的激光透过率
|
// 测试特定天气条件下的激光透过率
|
||||||
static void TestLaserTransmittance(WeatherType type, string description,
|
static void TestLaserTransmittance(WeatherType type, string description,
|
||||||
double temperature = 25, double relativeHumidity = 50,
|
double temperature = 25, double relativeHumidity = 50,
|
||||||
double visibility = 23, double? precipitation = null, double latitude = 30)
|
double visibility = 23, double precipitation = 0,
|
||||||
|
double latitude = 30, double windSpeed = 0)
|
||||||
{
|
{
|
||||||
double[] distances = [0.1, 0.5, 1, 5, 10]; // 测试不同距离(公里)
|
double[] distances = [0.1, 0.5, 1, 5, 10]; // 测试不同距离(公里)
|
||||||
|
|
||||||
// 创建天气条件
|
// 创建天气条件
|
||||||
var weatherCondition = new WeatherCondition(
|
var weather = new Weather(
|
||||||
type: type,
|
type: type,
|
||||||
temperature: temperature,
|
temperature: temperature,
|
||||||
relativeHumidity: relativeHumidity,
|
relativeHumidity: relativeHumidity,
|
||||||
visibility: visibility,
|
visibility: visibility,
|
||||||
precipitation: precipitation
|
precipitation: precipitation,
|
||||||
|
windSpeed: windSpeed
|
||||||
);
|
);
|
||||||
|
|
||||||
// 输出结果
|
// 输出结果
|
||||||
Console.WriteLine($"\n[{description}条件下的激光透过率]");
|
Console.WriteLine($"\n[{description}条件下的激光透过率]");
|
||||||
WeatherCondition.PrintWeatherInfo(weatherCondition);
|
Weather.PrintWeatherInfo(weather);
|
||||||
foreach (var d in distances){
|
foreach (var d in distances){
|
||||||
double laserTransmittance = AtmosphericTransmittanceCalculator.CalcLaser(weatherCondition, d);
|
double laserTransmittance = AtmosphericTransmittanceCalculator.CalcLaser(weather, d);
|
||||||
double turbulenceEffect = AtmosphericTransmittanceCalculator.CalcTurbulenceEffect(weatherCondition, d, 100); // 添加高度参数,假设高度为100米
|
|
||||||
|
// 增加合理的光束传输高度,与传输距离和风速相关
|
||||||
|
double height = 100 + windSpeed * 10; // 风速越大,光束平均高度越高
|
||||||
|
double turbulenceEffect = AtmosphericTransmittanceCalculator.CalcTurbulenceEffect(weather, d, height);
|
||||||
|
|
||||||
Console.WriteLine($"距离:{d}公里, 1.06μm激光透过率为: {laserTransmittance:P2}, 湍流效应: {turbulenceEffect:P2}");
|
Console.WriteLine($"距离:{d}公里, 1.06μm激光透过率为: {laserTransmittance:P2}, 湍流效应: {turbulenceEffect:P2}");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -89,8 +98,8 @@ class Program
|
|||||||
static void CalculateSinglePathRadiation()
|
static void CalculateSinglePathRadiation()
|
||||||
{
|
{
|
||||||
// 创建天气条件
|
// 创建天气条件
|
||||||
var weatherCondition = new WeatherCondition(
|
var weather = new Weather(
|
||||||
type: WeatherType.晴天,
|
type: WeatherType.Clear,
|
||||||
temperature: 25,
|
temperature: 25,
|
||||||
relativeHumidity: 60,
|
relativeHumidity: 60,
|
||||||
visibility: 10
|
visibility: 10
|
||||||
@ -100,7 +109,7 @@ class Program
|
|||||||
double receiverDistance = 3; // 3公里
|
double receiverDistance = 3; // 3公里
|
||||||
|
|
||||||
// 计算透过率和接收功率
|
// 计算透过率和接收功率
|
||||||
double transmittance = AtmosphericTransmittanceCalculator.CalcLaser(weatherCondition, receiverDistance);
|
double transmittance = AtmosphericTransmittanceCalculator.CalcLaser(weather, receiverDistance);
|
||||||
double receivedPower = AtmosphericTransmittanceCalculator.CalculateReceivedRadiationSinglePath(transmittance, targetRadiation, receiverDistance);
|
double receivedPower = AtmosphericTransmittanceCalculator.CalculateReceivedRadiationSinglePath(transmittance, targetRadiation, receiverDistance);
|
||||||
|
|
||||||
Console.WriteLine($"\n导弹导引头接收到的辐射能量: {receivedPower:E2} W/Sr");
|
Console.WriteLine($"\n导弹导引头接收到的辐射能量: {receivedPower:E2} W/Sr");
|
||||||
@ -109,12 +118,12 @@ class Program
|
|||||||
// 测试特定天气条件下的红外线透过率
|
// 测试特定天气条件下的红外线透过率
|
||||||
static void TestIRTransmittance(WeatherType type, string description,
|
static void TestIRTransmittance(WeatherType type, string description,
|
||||||
double temperature = 25, double relativeHumidity = 50,
|
double temperature = 25, double relativeHumidity = 50,
|
||||||
double visibility = 10, double? precipitation = null, double latitude = 30)
|
double visibility = 10, double precipitation = 0)
|
||||||
{
|
{
|
||||||
double[] distances = [0.1, 0.5, 1, 5, 10]; // 测试不同距离(公里)
|
double[] distances = [0.1, 0.5, 1, 5, 10]; // 测试不同距离(公里)
|
||||||
|
|
||||||
// 创建天气条件
|
// 创建天气条件
|
||||||
var weatherCondition = new WeatherCondition(
|
var weather = new Weather(
|
||||||
type: type,
|
type: type,
|
||||||
temperature: temperature,
|
temperature: temperature,
|
||||||
relativeHumidity: relativeHumidity,
|
relativeHumidity: relativeHumidity,
|
||||||
@ -124,10 +133,10 @@ class Program
|
|||||||
|
|
||||||
// 输出结果
|
// 输出结果
|
||||||
Console.WriteLine($"\n[{description}条件下的红外线透过率]");
|
Console.WriteLine($"\n[{description}条件下的红外线透过率]");
|
||||||
WeatherCondition.PrintWeatherInfo(weatherCondition);
|
Weather.PrintWeatherInfo(weather);
|
||||||
foreach (var d in distances)
|
foreach (var d in distances)
|
||||||
{
|
{
|
||||||
double irTransmittance = AtmosphericTransmittanceCalculator.CalcIR(weatherCondition, d);
|
double irTransmittance = AtmosphericTransmittanceCalculator.CalcIR(weather, d);
|
||||||
Console.WriteLine($"距离:{d}公里, 红外线透过率为: {irTransmittance:P2}");
|
Console.WriteLine($"距离:{d}公里, 红外线透过率为: {irTransmittance:P2}");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -155,23 +164,23 @@ class Program
|
|||||||
static void TestMillimeterWaveTransmittanceInDifferentWeather()
|
static void TestMillimeterWaveTransmittanceInDifferentWeather()
|
||||||
{
|
{
|
||||||
// 测试各种天气条件
|
// 测试各种天气条件
|
||||||
TestMillimeterWaveTransmittance(WeatherType.晴天, "晴朗");
|
TestMillimeterWaveTransmittance(WeatherType.Clear, "晴朗");
|
||||||
TestMillimeterWaveTransmittance(WeatherType.雨天, "小雨", relativeHumidity: 60, precipitation: 2.5, visibility: 5);
|
TestMillimeterWaveTransmittance(WeatherType.Rain, "小雨", relativeHumidity: 60, precipitation: 2.5, visibility: 5);
|
||||||
TestMillimeterWaveTransmittance(WeatherType.雨天, "大雨", relativeHumidity: 90, precipitation: 25, visibility: 2.5);
|
TestMillimeterWaveTransmittance(WeatherType.Rain, "大雨", relativeHumidity: 90, precipitation: 25, visibility: 2.5);
|
||||||
TestMillimeterWaveTransmittance(WeatherType.雾天, "雾", relativeHumidity: 70, visibility: 1);
|
TestMillimeterWaveTransmittance(WeatherType.Fog, "雾", relativeHumidity: 70, visibility: 1);
|
||||||
TestMillimeterWaveTransmittance(WeatherType.沙尘, "沙尘", visibility: 0.5);
|
TestMillimeterWaveTransmittance(WeatherType.Dust, "沙尘", visibility: 0.5);
|
||||||
TestMillimeterWaveTransmittance(WeatherType.雪天, "雪天", temperature: -5, relativeHumidity: 80, visibility: 1, precipitation: 5);
|
TestMillimeterWaveTransmittance(WeatherType.Snow, "雪天", temperature: -5, relativeHumidity: 80, visibility: 1, precipitation: 5);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 测试特定天气条件下的毫米波透过率
|
// 测试特定天气条件下的毫米波透过率
|
||||||
static void TestMillimeterWaveTransmittance(WeatherType type, string description,
|
static void TestMillimeterWaveTransmittance(WeatherType type, string description,
|
||||||
double temperature = 25, double relativeHumidity = 50,
|
double temperature = 25, double relativeHumidity = 50,
|
||||||
double visibility = 10, double? precipitation = null)
|
double visibility = 10, double precipitation = 0)
|
||||||
{
|
{
|
||||||
double[] distances = [0.1, 0.5, 1, 5, 10]; // 测试不同距离(公里)
|
double[] distances = [0.1, 0.5, 1, 5, 10]; // 测试不同距离(公里)
|
||||||
|
|
||||||
// 创建天气条件
|
// 创建天气条件
|
||||||
var weatherCondition = new WeatherCondition(
|
var weather = new Weather(
|
||||||
type: type,
|
type: type,
|
||||||
temperature: temperature,
|
temperature: temperature,
|
||||||
relativeHumidity: relativeHumidity,
|
relativeHumidity: relativeHumidity,
|
||||||
@ -181,10 +190,10 @@ class Program
|
|||||||
|
|
||||||
// 输出结果
|
// 输出结果
|
||||||
Console.WriteLine($"\n[{description}条件下的毫米波透过率]");
|
Console.WriteLine($"\n[{description}条件下的毫米波透过率]");
|
||||||
WeatherCondition.PrintWeatherInfo(weatherCondition);
|
Weather.PrintWeatherInfo(weather);
|
||||||
foreach (var d in distances)
|
foreach (var d in distances)
|
||||||
{
|
{
|
||||||
double mmWaveTransmittance = AtmosphericTransmittanceCalculator.CalcMillimeterWave(weatherCondition, d);
|
double mmWaveTransmittance = AtmosphericTransmittanceCalculator.CalcMillimeterWave(weather, d);
|
||||||
Console.WriteLine($"距离:{d}公里, 毫米波透过率为: {mmWaveTransmittance:P2}");
|
Console.WriteLine($"距离:{d}公里, 毫米波透过率为: {mmWaveTransmittance:P2}");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -193,35 +202,35 @@ class Program
|
|||||||
static void TestIRTransmittanceInDifferentWeather()
|
static void TestIRTransmittanceInDifferentWeather()
|
||||||
{
|
{
|
||||||
// 测试各种天气条件
|
// 测试各种天气条件
|
||||||
TestIRTransmittance(WeatherType.晴天, "晴朗");
|
TestIRTransmittance(WeatherType.Clear, "晴朗");
|
||||||
TestIRTransmittance(WeatherType.雨天, "小雨", relativeHumidity: 60, precipitation: 2.5, visibility: 5);
|
TestIRTransmittance(WeatherType.Rain, "小雨", relativeHumidity: 60, precipitation: 2.5, visibility: 5);
|
||||||
TestIRTransmittance(WeatherType.雨天, "大雨", relativeHumidity: 90, precipitation: 25, visibility: 2.5);
|
TestIRTransmittance(WeatherType.Rain, "大雨", relativeHumidity: 90, precipitation: 25, visibility: 2.5);
|
||||||
TestIRTransmittance(WeatherType.雾天, "雾", relativeHumidity: 70, visibility: 1);
|
TestIRTransmittance(WeatherType.Fog, "雾", relativeHumidity: 70, visibility: 1);
|
||||||
TestIRTransmittance(WeatherType.沙尘, "沙尘", visibility: 0.5);
|
TestIRTransmittance(WeatherType.Dust, "沙尘", visibility: 0.5);
|
||||||
TestIRTransmittance(WeatherType.雪天, "雪天", temperature: -5, relativeHumidity: 80, visibility: 1, precipitation: 5);
|
TestIRTransmittance(WeatherType.Snow, "雪天", temperature: -5, relativeHumidity: 80, visibility: 1, precipitation: 5);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 测试不同天气条件下的紫外线透过率
|
// 测试不同天气条件下的紫外线透过率
|
||||||
static void TestUVTransmittanceInDifferentWeather()
|
static void TestUVTransmittanceInDifferentWeather()
|
||||||
{
|
{
|
||||||
// 测试各种天气条件
|
// 测试各种天气条件
|
||||||
TestUVTransmittance(WeatherType.晴天, "晴朗");
|
TestUVTransmittance(WeatherType.Clear, "晴朗");
|
||||||
TestUVTransmittance(WeatherType.雨天, "小雨", relativeHumidity: 60, precipitation: 2.5, visibility: 5);
|
TestUVTransmittance(WeatherType.Rain, "小雨", relativeHumidity: 60, precipitation: 2.5, visibility: 5);
|
||||||
TestUVTransmittance(WeatherType.雨天, "大雨", relativeHumidity: 90, precipitation: 25, visibility: 2.5);
|
TestUVTransmittance(WeatherType.Rain, "大雨", relativeHumidity: 90, precipitation: 25, visibility: 2.5);
|
||||||
TestUVTransmittance(WeatherType.雾天, "雾", relativeHumidity: 70, visibility: 1);
|
TestUVTransmittance(WeatherType.Fog, "雾", relativeHumidity: 70, visibility: 1);
|
||||||
TestUVTransmittance(WeatherType.沙尘, "沙尘", visibility: 0.5);
|
TestUVTransmittance(WeatherType.Dust, "沙尘", visibility: 0.5);
|
||||||
TestUVTransmittance(WeatherType.雪天, "雪天", temperature: -5, relativeHumidity: 80, visibility: 1, precipitation: 5);
|
TestUVTransmittance(WeatherType.Snow, "雪天", temperature: -5, relativeHumidity: 80, visibility: 1, precipitation: 5);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 测试特定天气条件下的紫外线透过率
|
// 测试特定天气条件下的紫外线透过率
|
||||||
static void TestUVTransmittance(WeatherType type, string description,
|
static void TestUVTransmittance(WeatherType type, string description,
|
||||||
double temperature = 25, double relativeHumidity = 50,
|
double temperature = 25, double relativeHumidity = 50,
|
||||||
double visibility = 10, double? precipitation = null)
|
double visibility = 10, double precipitation = 0)
|
||||||
{
|
{
|
||||||
double[] distances = [0.1, 0.5, 1, 5, 10]; // 测试不同距离(公里)
|
double[] distances = [0.1, 0.5, 1, 5, 10]; // 测试不同距离(公里)
|
||||||
|
|
||||||
// 创建天气条件
|
// 创建天气条件
|
||||||
var weatherCondition = new WeatherCondition(
|
var weather = new Weather(
|
||||||
type: type,
|
type: type,
|
||||||
temperature: temperature,
|
temperature: temperature,
|
||||||
relativeHumidity: relativeHumidity,
|
relativeHumidity: relativeHumidity,
|
||||||
@ -231,12 +240,24 @@ class Program
|
|||||||
|
|
||||||
// 输出结果
|
// 输出结果
|
||||||
Console.WriteLine($"\n[{description}条件下的紫外线透过率]");
|
Console.WriteLine($"\n[{description}条件下的紫外线透过率]");
|
||||||
WeatherCondition.PrintWeatherInfo(weatherCondition);
|
Weather.PrintWeatherInfo(weather);
|
||||||
foreach (var d in distances)
|
foreach (var d in distances)
|
||||||
{
|
{
|
||||||
double uvTransmittance = AtmosphericTransmittanceCalculator.CalcUV(weatherCondition, d);
|
double uvTransmittance = AtmosphericTransmittanceCalculator.CalcUV(weather, d);
|
||||||
Console.WriteLine($"距离:{d}公里, 紫外线透过率为: {uvTransmittance:P2}");
|
Console.WriteLine($"距离:{d}公里, 紫外线透过率为: {uvTransmittance:P2}");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 测试不同风速条件下的湍流效应
|
||||||
|
static void TestTurbulenceWithDifferentWindSpeeds()
|
||||||
|
{
|
||||||
|
// 测试不同风速对湍流的影响
|
||||||
|
TestLaserTransmittance(WeatherType.Clear, "晴朗无风", windSpeed: 0);
|
||||||
|
TestLaserTransmittance(WeatherType.Clear, "晴朗轻微微风", windSpeed: 0.5);
|
||||||
|
TestLaserTransmittance(WeatherType.Clear, "晴朗微风", windSpeed: 1);
|
||||||
|
TestLaserTransmittance(WeatherType.Clear, "晴朗轻风", windSpeed: 2.5);
|
||||||
|
TestLaserTransmittance(WeatherType.Clear, "晴朗中风", windSpeed: 5);
|
||||||
|
TestLaserTransmittance(WeatherType.Clear, "晴朗强风", windSpeed: 10);
|
||||||
|
TestLaserTransmittance(WeatherType.Clear, "晴朗大风", windSpeed: 15);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user