/*
输入参数:
Longitude - 经度(单位"度")
Latitude - 纬度(单位"度")
Year - 年
Month - 月
Day - 日
Hour - 时
Minute - 分
Second - 秒
输出参数:
Height - 太阳高度角 (单位"弧度")
Direction - 太阳方位角 (单位"弧度")
*/
void SunPositionNR(double Longitude, double Latitude, int year, int month, int day, int hour, int minute, int second, double& height, double& direction)
{
double A = year/4;
double B = A-floor(A);
double C = 32.8;
if(month <= 2)
C = 30.6;
if(B==0 && month>2)
C = 31.8;
double G = floor(30.6*month-C+0.5)+day;
double L = Longitude/15.0; //经度修正
double H = hour-8 + minute/60.0; //时刻修正
doubl
[c++] 计算太阳高度角
最新推荐文章于 2024-04-26 14:45:00 发布