AirTransmissionLibrary/include/AirTransmission.h
2025-01-03 12:03:50 +08:00

64 lines
1.6 KiB
C
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#pragma once
#ifdef __cplusplus
extern "C" {
#endif
// 天气类型枚举
enum WeatherType {
Clear = 0, // 晴天
Cloudy = 1, // 多云
Rain = 2, // 雨天
Fog = 3, // 雾天
Dust = 4, // 沙尘
Snow = 5 // 雪天
};
// 导出函数声明
#ifdef _WIN32
#define DLLEXPORT __declspec(dllimport)
#else
#define DLLEXPORT
#endif
/// @brief 计算大气透过率
/// @param wavelength 波长(微米)
/// @param distance 距离(米)
/// @param temperature 温度(摄氏度)
/// @param relativeHumidity 相对湿度0-1
/// @param pressure 大气压力kPa
/// @param visibility 能见度(米)
/// @param weatherType 天气类型(参见 WeatherType 枚举)
/// @return 大气透过率0-1
DLLEXPORT double __cdecl CalculateTransmittance(
double wavelength,
double distance,
double temperature,
double relativeHumidity,
double pressure,
double visibility,
int weatherType
);
/// @brief 计算大气湍流影响
/// @param wavelength 波长(微米)
/// @param distance 距离(米)
/// @param temperature 温度(摄氏度)
/// @param relativeHumidity 相对湿度0-1
/// @param pressure 大气压力kPa
/// @param visibility 能见度(米)
/// @param weatherType 天气类型(参见 WeatherType 枚举)
/// @return 湍流影响系数0-1
DLLEXPORT double __cdecl CalculateAtmosphericTurbulence(
double wavelength,
double distance,
double temperature,
double relativeHumidity,
double pressure,
double visibility,
int weatherType
);
#ifdef __cplusplus
}
#endif