太阳方位角 matlab,太阳天顶角与太阳方位角计算软件V4.1及源码

在遥感中经常要用到太阳的天顶角和方位角的计算,但是过程很繁琐,下面是能同时计算很多点的小程序,

这些小程序是由吉林大学汪博士编写的,在此表示敬意!

-----------------------------------------------------------------------------------

真是对不住各位,在各位朋友的帮助下,发现原来的程序计算有严重的错误,现已改正,并与类似的计算软件作了比较,差别不超过5'。希望各位继续监督发现问题,帮我进行改进。下面有可执行的计算软件和FORTRAN、C++的源代码和MATLAB中可调用函数代码下载。

V4.1:

更改了参数输入方式,避免时间间隔设置超过3600秒出现的问题。

V4.0:

1,更正了太阳天顶角和太阳方位角的计算错误。

2,将参数输入由原来的屏幕输入改为文件设置。

V3.0新特点:

1,计算时间改为可以设置起始时间和结束时间,并设置时间间隔;

2,太阳方位角以正北为零点时V2.0差90度,现在V3.0中已改正;

3,原来所有角度以度为单位,现在可以设置输入的经纬度和输出太阳天顶角和方位角的单位,即是度分秒表示还是以度表示。

V2.0新特点:

1,

计算时间:每次计算一天,时间间隔由用户自己设定,以秒为单位,可以设置小数或超过60的秒数(即超过1分,如果想设置2分,则设置为120)。

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
以下是用Python实现计算太阳顶角方位角,卫星顶角方位角的代码: ```python import math # 计算太阳顶角 def solarZenithAngle(latitude, longitude, year, month, day, hour, minute, second): # 计算儒略日 J0 = 367 * year - int((7 * (year + int((month + 9) / 12.0))) / 4.0) + int(275 * month / 9.0) + day + 1721013.5 UT = hour + minute / 60.0 + second / 3600.0 T = (J0 - 2451545.0 + UT / 24.0) / 36525.0 # 计算太阳平均位置 L0 = 280.46645 + 36000.76983 * T + 0.0003032 * T**2 M = 357.52910 + 35999.05030 * T - 0.0001559 * T**2 - 0.00000048 * T**3 C = (1.914600 - 0.004817 * T - 0.000014 * T**2) * math.sin(math.radians(M)) + (0.019993 - 0.000101 * T) * math.sin(math.radians(2 * M)) + 0.000290 * math.sin(math.radians(3 * M)) sunLongitude = L0 + C # 计算太阳赤纬角 epsilon = 23.439 - 0.0000004 * T alpha = math.atan2(math.cos(math.radians(epsilon)) * math.sin(math.radians(sunLongitude)), math.cos(math.radians(sunLongitude))) delta = math.asin(math.sin(math.radians(epsilon)) * math.sin(math.radians(sunLongitude))) # 计算太阳时角 hourAngle = math.radians(15.0 * (12.0 - longitude / 15.0 - UT)) # 计算太阳高度角 solarZenithAngle = math.acos(math.sin(math.radians(latitude)) * math.sin(delta) + math.cos(math.radians(latitude)) * math.cos(delta) * math.cos(hourAngle)) return math.degrees(solarZenithAngle) # 计算太阳方位角 def solarAzimuth(latitude, longitude, year, month, day, hour, minute, second): # 计算儒略日 J0 = 367 * year - int((7 * (year + int((month + 9) / 12.0))) / 4.0) + int(275 * month / 9.0) + day + 1721013.5 UT = hour + minute / 60.0 + second / 3600.0 T = (J0 - 2451545.0 + UT / 24.0) / 36525.0 # 计算太阳平均位置 L0 = 280.46645 + 36000.76983 * T + 0.0003032 * T**2 M = 357.52910 + 35999.05030 * T - 0.0001559 * T**2 - 0.00000048 * T**3 C = (1.914600 - 0.004817 * T - 0.000014 * T**2) * math.sin(math.radians(M)) + (0.019993 - 0.000101 * T) * math.sin(math.radians(2 * M)) + 0.000290 * math.sin(math.radians(3 * M)) sunLongitude = L0 + C # 计算太阳赤纬角 epsilon = 23.439 - 0.0000004 * T alpha = math.atan2(math.cos(math.radians(epsilon)) * math.sin(math.radians(sunLongitude)), math.cos(math.radians(sunLongitude))) delta = math.asin(math.sin(math.radians(epsilon)) * math.sin(math.radians(sunLongitude))) # 计算太阳时角 hourAngle = math.radians(15.0 * (12.0 - longitude / 15.0 - UT)) # 计算太阳高度角 solarZenithAngle = math.acos(math.sin(math.radians(latitude)) * math.sin(delta) + math.cos(math.radians(latitude)) * math.cos(delta) * math.cos(hourAngle)) # 计算太阳方位角 solarAzimuth = math.atan2(math.sin(hourAngle), math.cos(hourAngle) * math.sin(math.radians(latitude)) - math.tan(delta) * math.cos(math.radians(latitude))) return math.degrees(solarAzimuth) # 计算卫星顶角 def satelliteZenithAngle(satelliteElevation): return 90.0 - satelliteElevation # 计算卫星方位角 def satelliteAzimuth(satelliteElevation, satelliteAzimuth, latitude, longitude): az = math.atan2(math.sin(math.radians(satelliteAzimuth)), math.cos(math.radians(satelliteAzimuth)) * math.sin(math.radians(latitude)) - math.tan(math.radians(satelliteElevation)) * math.cos(math.radians(latitude))) if az < 0: az += 2.0 * math.pi return math.degrees(az) ``` 以上代码中,`latitude`表示观测点的纬度,`longitude`表示观测点的经度,`year`、`month`、`day`、`hour`、`minute`、`second`表示观测时间,`satelliteElevation`表示卫星仰角,`satelliteAzimuth`表示卫星方位角。函数返回值分别为太阳顶角太阳方位角、卫星顶角和卫星方位角

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值