电影迷的家

标题: 太阳高度角的计算 | 任何时间 | 任何地点 [打印本页]

作者: xgm518    时间: 2024-9-27 16:30
标题: 太阳高度角的计算 | 任何时间 | 任何地点
太阳赤纬角https://zhuanlan.zhihu.com/p/630216177
故名思义,就是太阳直射在赤道上的角度,如下图所示:

当春分的时候,太阳直射赤道,赤纬角为0度
太阳赤纬角的简化计算公式
<span class="MathJax_SVG" id="MathJax-Element-1-Frame" tabindex="0" data-mathml="(1)δ=23.45sin⁡(2π⋅284+n365)" role="presentation" style="display: inline-block; line-height: normal; font-size: 16px; word-spacing: normal; overflow-wrap: normal; text-wrap: nowrap; float: none; direction: ltr; max-width: none; max-height: none; min-width: 0px; min-height: 0px; border: 0px; position: relative;">(1)�=23.45sin⁡(2�⋅284+�365)
式中 <span class="MathJax_SVG" id="MathJax-Element-2-Frame" tabindex="0" data-mathml="n" role="presentation" style="display: inline-block; line-height: normal; font-size: 16px; word-spacing: normal; overflow-wrap: normal; text-wrap: nowrap; float: none; direction: ltr; max-width: none; max-height: none; min-width: 0px; min-height: 0px; border: 0px; position: relative;">� 是计算日期在一年中的日子数,例如 <span class="MathJax_SVG" id="MathJax-Element-3-Frame" tabindex="0" data-mathml="n=1" role="presentation" style="display: inline-block; line-height: normal; font-size: 16px; word-spacing: normal; overflow-wrap: normal; text-wrap: nowrap; float: none; direction: ltr; max-width: none; max-height: none; min-width: 0px; min-height: 0px; border: 0px; position: relative;">�=1 就对应着1月1日
如果你需要更精确的赤纬角计算公式,可以使用由Spencer在1971年提出的公式[1]
<span class="MathJax_SVG" id="MathJax-Element-4-Frame" tabindex="0" data-mathml="(1.1)δ=0.006918−0.399912cos⁡(Γ)+0.070257sin⁡(Γ)−0.006758cos⁡(2Γ)+0.000907sin⁡(2Γ)−0.002697cos⁡(3Γ)+0.00148sin⁡(3Γ)(rad)" role="presentation" style="display: inline-block; line-height: normal; font-size: 16px; text-align: left; word-spacing: normal; overflow-wrap: normal; text-wrap: nowrap; float: none; direction: ltr; max-width: none; max-height: none; min-width: 0px; min-height: 0px; border: 0px; position: relative;">(1.1)�=0.006918−0.399912cos⁡(Γ)+0.070257sin⁡(Γ)−0.006758cos⁡(2Γ)+0.000907sin⁡(2Γ)−0.002697cos⁡(3Γ)+0.00148sin⁡(3Γ)(���)式中 <span class="MathJax_SVG" id="MathJax-Element-6-Frame" tabindex="0" data-mathml="Γ" role="presentation" style="display: inline-block; line-height: normal; font-size: 16px; word-spacing: normal; overflow-wrap: normal; text-wrap: nowrap; float: none; direction: ltr; max-width: none; max-height: none; min-width: 0px; min-height: 0px; border: 0px; position: relative;">Γ 被称作日角,由 <span class="MathJax_SVG" id="MathJax-Element-5-Frame" tabindex="0" data-mathml="n" role="presentation" style="display: inline-block; line-height: normal; font-size: 16px; word-spacing: normal; overflow-wrap: normal; text-wrap: nowrap; float: none; direction: ltr; max-width: none; max-height: none; min-width: 0px; min-height: 0px; border: 0px; position: relative;">� 来确定
<span class="MathJax_SVG" id="MathJax-Element-7-Frame" tabindex="0" data-mathml="(1.2)Γ=2π(n−1)365(rad)" role="presentation" style="display: inline-block; line-height: normal; font-size: 16px; text-align: left; word-spacing: normal; overflow-wrap: normal; text-wrap: nowrap; float: none; direction: ltr; max-width: none; max-height: none; min-width: 0px; min-height: 0px; border: 0px; position: relative;">(1.2)Γ=2�(�−1)365(���)
正午太阳高度角对于纬度为 <span class="MathJax_SVG" id="MathJax-Element-9-Frame" tabindex="0" data-mathml="θ" role="presentation" style="display: inline-block; line-height: normal; font-size: 16px; word-spacing: normal; overflow-wrap: normal; text-wrap: nowrap; float: none; direction: ltr; max-width: none; max-height: none; min-width: 0px; min-height: 0px; border: 0px; position: relative;">� 的地区,正午太阳高度角 <span class="MathJax_SVG" id="MathJax-Element-8-Frame" tabindex="0" data-mathml="hm" role="presentation" style="display: inline-block; line-height: normal; font-size: 16px; word-spacing: normal; overflow-wrap: normal; text-wrap: nowrap; float: none; direction: ltr; max-width: none; max-height: none; min-width: 0px; min-height: 0px; border: 0px; position: relative;">ℎ� 和太阳赤纬角的关系如下图所示
用公式表示:
<span class="MathJax_SVG" id="MathJax-Element-10-Frame" tabindex="0" data-mathml="(2)hm=90−(θ−δ)(o)" role="presentation" style="display: inline-block; line-height: normal; font-size: 16px; text-align: left; word-spacing: normal; overflow-wrap: normal; text-wrap: nowrap; float: none; direction: ltr; max-width: none; max-height: none; min-width: 0px; min-height: 0px; border: 0px; position: relative;">(2)ℎ�=90−(�−�)(�)

太阳日照时长计算计算太阳日照时长就是计算昼弧与夜弧的占比,如下图
推导过程这里就略去了,直接放结果(感兴趣的同志可以参考Cooper[2]的计算)
对于纬度为 <span class="MathJax_SVG" id="MathJax-Element-11-Frame" tabindex="0" data-mathml="θ" role="presentation" style="display: inline-block; line-height: normal; font-size: 16px; word-spacing: normal; overflow-wrap: normal; text-wrap: nowrap; float: none; direction: ltr; max-width: none; max-height: none; min-width: 0px; min-height: 0px; border: 0px; position: relative;">� 的地区,日照时长为:
<span class="MathJax_SVG" id="MathJax-Element-12-Frame" tabindex="0" data-mathml="(3)Ts=215arccos⁡(−tan⁡(δ)⋅tan⁡(θ))" role="presentation" style="display: inline-block; line-height: normal; font-size: 16px; text-align: left; word-spacing: normal; overflow-wrap: normal; text-wrap: nowrap; float: none; direction: ltr; max-width: none; max-height: none; min-width: 0px; min-height: 0px; border: 0px; position: relative;">(3)��=215arccos⁡(−tan⁡(�)⋅tan⁡(�))
使用这个结果可以用来计算日出和日落的时间,以中国为例:
我国使用的是北京时间(GMT+8),北京市的经度为 <span class="MathJax_SVG" id="MathJax-Element-13-Frame" tabindex="0" data-mathml="116.40o" role="presentation" style="display: inline-block; line-height: normal; font-size: 16px; word-spacing: normal; overflow-wrap: normal; text-wrap: nowrap; float: none; direction: ltr; max-width: none; max-height: none; min-width: 0px; min-height: 0px; border: 0px; position: relative;">116.40�
假定我所在的城市经度为 <span class="MathJax_SVG" id="MathJax-Element-14-Frame" tabindex="0" data-mathml="γ" role="presentation" style="display: inline-block; line-height: normal; font-size: 16px; word-spacing: normal; overflow-wrap: normal; text-wrap: nowrap; float: none; direction: ltr; max-width: none; max-height: none; min-width: 0px; min-height: 0px; border: 0px; position: relative;">� ,我所在的城市太阳达到正午高度角的时间是:
<span class="MathJax_SVG" id="MathJax-Element-16-Frame" tabindex="0" data-mathml="(3.1)Tc=12:00+γ−120360⋅1440(min)" role="presentation" style="display: inline-block; line-height: normal; font-size: 16px; text-align: left; word-spacing: normal; overflow-wrap: normal; text-wrap: nowrap; float: none; direction: ltr; max-width: none; max-height: none; min-width: 0px; min-height: 0px; border: 0px; position: relative;">(3.1)��=12:00+�−120360⋅1440(���)例如天津(经度: <span class="MathJax_SVG" id="MathJax-Element-15-Frame" tabindex="0" data-mathml="117.2o" role="presentation" style="display: inline-block; line-height: normal; font-size: 16px; word-spacing: normal; overflow-wrap: normal; text-wrap: nowrap; float: none; direction: ltr; max-width: none; max-height: none; min-width: 0px; min-height: 0px; border: 0px; position: relative;">117.2� )的达到正午太阳高度角的时间是: <span class="MathJax_SVG" id="MathJax-Element-17-Frame" tabindex="0" data-mathml="12:04" role="presentation" style="display: inline-block; line-height: normal; font-size: 16px; word-spacing: normal; overflow-wrap: normal; text-wrap: nowrap; float: none; direction: ltr; max-width: none; max-height: none; min-width: 0px; min-height: 0px; border: 0px; position: relative;">12:04

那么根据日出到正午和日落到正午的时间相同,可以计算出日出时间和日落时间为:
日出:<span class="MathJax_SVG" id="MathJax-Element-18-Frame" tabindex="0" data-mathml="(3.2)Tup=Tc−Ts2" role="presentation" style="display: inline-block; line-height: normal; font-size: 16px; text-align: left; word-spacing: normal; overflow-wrap: normal; text-wrap: nowrap; float: none; direction: ltr; max-width: none; max-height: none; min-width: 0px; min-height: 0px; border: 0px; position: relative;">(3.2)���=��−��2日落:<span class="MathJax_SVG" id="MathJax-Element-19-Frame" tabindex="0" data-mathml="(3.3)Tdown=Tc+Ts2" role="presentation" style="display: inline-block; line-height: normal; font-size: 16px; text-align: left; word-spacing: normal; overflow-wrap: normal; text-wrap: nowrap; float: none; direction: ltr; max-width: none; max-height: none; min-width: 0px; min-height: 0px; border: 0px; position: relative;">(3.3)�����=��+��2例如天津在2023年5月20日的日出时间为:4:56;日落时间为19:12
(与真实值的误差仅有20秒)
太阳视运动轨迹计算在天球上,太阳的视运行轨迹如下图所示:
可以看到,对于不同的日期,太阳的运行轨迹发生了平移。根据我们刚刚计算的太阳正午高度角,可以推算出太阳轨迹与日期的函数关系。
Tip:接下来可能会涉及到一些繁琐的数学运算,不感兴趣的同志可以直接跳转到结果部分
日轨部分如红色弧线所示,日轨是在天球上的一个圆环,圆环的圆心 <span class="MathJax_SVG" id="MathJax-Element-20-Frame" tabindex="0" data-mathml="P" role="presentation" style="display: inline-block; line-height: normal; font-size: 16px; word-spacing: normal; overflow-wrap: normal; text-wrap: nowrap; float: none; direction: ltr; max-width: none; max-height: none; min-width: 0px; min-height: 0px; border: 0px; position: relative;">� 的坐标如下:
<span class="MathJax_SVG" id="MathJax-Element-22-Frame" tabindex="0" data-mathml="(3)P=(0,dcos⁡(θ),−dsin⁡(θ))" role="presentation" style="display: inline-block; line-height: normal; font-size: 16px; text-align: left; word-spacing: normal; overflow-wrap: normal; text-wrap: nowrap; float: none; direction: ltr; max-width: none; max-height: none; min-width: 0px; min-height: 0px; border: 0px; position: relative;">(3)�=(0,�cos⁡(�),−�sin⁡(�))假定太阳的运行角度为 <span class="MathJax_SVG" id="MathJax-Element-21-Frame" tabindex="0" data-mathml="φ" role="presentation" style="display: inline-block; line-height: normal; font-size: 16px; word-spacing: normal; overflow-wrap: normal; text-wrap: nowrap; float: none; direction: ltr; max-width: none; max-height: none; min-width: 0px; min-height: 0px; border: 0px; position: relative;">� ,太阳相对于日轨中心的位矢为<span class="MathJax_SVG" id="MathJax-Element-23-Frame" tabindex="0" data-mathml="(4)Δr=Rsin⁡(β)sin⁡(φ)ex+Rsin⁡(β)cos⁡(φ)sin⁡(θ)ey+Rsin⁡(β)cos⁡(φ)cos⁡(θ)ez" role="presentation" style="display: inline-block; line-height: normal; font-size: 16px; text-align: left; word-spacing: normal; overflow-wrap: normal; text-wrap: nowrap; float: none; direction: ltr; max-width: none; max-height: none; min-width: 0px; min-height: 0px; border: 0px; position: relative;">(4)Δ�=�sin⁡(�)sin⁡(�)��+�sin⁡(�)cos⁡(�)sin⁡(�)��+�sin⁡(�)cos⁡(�)cos⁡(�)��二者相加,得到太阳的坐标为:<span class="MathJax_SVG" id="MathJax-Element-24-Frame" tabindex="0" data-mathml="(5){x=Rsin⁡(β)sin⁡(φ)y=Rsin⁡(β)cos⁡(φ)sin⁡(θ)+dcos⁡(θ)z=Rsin⁡(β)cos⁡(φ)cos⁡(θ)−dsin⁡(θ)" role="presentation" style="display: inline-block; line-height: normal; font-size: 16px; text-align: left; word-spacing: normal; overflow-wrap: normal; text-wrap: nowrap; float: none; direction: ltr; max-width: none; max-height: none; min-width: 0px; min-height: 0px; border: 0px; position: relative;">(5){�=�sin⁡(�)sin⁡(�)�=�sin⁡(�)cos⁡(�)sin⁡(�)+�cos⁡(�)�=�sin⁡(�)cos⁡(�)cos⁡(�)−�sin⁡(�)根据图中几何关系, <span class="MathJax_SVG" id="MathJax-Element-25-Frame" tabindex="0" data-mathml="β=h+θ=90+δ" role="presentation" style="display: inline-block; line-height: normal; font-size: 16px; word-spacing: normal; overflow-wrap: normal; text-wrap: nowrap; float: none; direction: ltr; max-width: none; max-height: none; min-width: 0px; min-height: 0px; border: 0px; position: relative;">�=ℎ+�=90+� , <span class="MathJax_SVG" id="MathJax-Element-26-Frame" tabindex="0" data-mathml="d=Rcos⁡(β)" role="presentation" style="display: inline-block; line-height: normal; font-size: 16px; word-spacing: normal; overflow-wrap: normal; text-wrap: nowrap; float: none; direction: ltr; max-width: none; max-height: none; min-width: 0px; min-height: 0px; border: 0px; position: relative;">�=�cos⁡(�)
带入后即可得出对应纬度的太阳运动轨迹,编写如下Python程序做一个简单的可视化吧:
import numpy as npimport matplotlib.pyplot as pltfrom mpl_toolkits.mplot3d import Axes3D# 定义参数R = 1  # 半径beta = 70theta = 40beta = beta * np.pi / 180theta = theta * np.pi / 180d = R * np.cos(beta)  # 计算d的值# 创建φ值phi = np.linspace(0, 2 * np.pi, 100)# 计算x, y, zx = R * np.sin(beta) * np.sin(phi)y = R * np.sin(beta) * np.cos(phi) * np.sin(theta) + d * np.cos(theta)z = R * np.sin(beta) * np.cos(phi) * np.cos(theta) - d * np.sin(theta)# 创建3D图形fig = plt.figure()ax = fig.add_subplot(111, projection='3d')# 绘制原点ax.scatter([0], [0], [0], color="g", label="Origin")# 绘制基础平面circle_x = R * np.cos(phi)circle_y = R * np.sin(phi)ax.plot(circle_x, circle_y, 0, color='lightblue')# 绘制轨迹,颜色根据z的值确定for i in range(len(z)):    if z > 0:        ax.plot(x[i:i + 2], y[i:i + 2], z[i:i + 2], color='red')    else:        ax.plot(x[i:i + 2], y[i:i + 2], z[i:i + 2], color='blue')# 显示图例red_patch = plt.plot([], [],                     marker="o",                     ms=10,                     ls="",                     mec=None,                     color='red',                     label="Day")[0]blue_patch = plt.plot([], [],                      marker="o",                      ms=10,                      ls="",                      mec=None,                      color='blue',                      label="Night")[0]plt.legend(handles=[red_patch, blue_patch], loc='upper right')# 显示图形plt.show()

天津,5月20日的太阳轨迹至此,我们就完成了太阳视运动轨迹的计算,有了这个轨迹我们可以很容易的算出太阳的两个方位角太阳的方位角计算
对于在北半球的我们,当太阳达到最大高度角的时候,太阳在我们的南方(也就是 <span class="MathJax_SVG" id="MathJax-Element-27-Frame" tabindex="0" data-mathml="y+" role="presentation" style="display: inline-block; line-height: normal; font-size: 16px; word-spacing: normal; overflow-wrap: normal; text-wrap: nowrap; float: none; direction: ltr; max-width: none; max-height: none; min-width: 0px; min-height: 0px; border: 0px; position: relative;">�+ 方向)
我们将太阳的两个方位角分别记为 <span class="MathJax_SVG" id="MathJax-Element-28-Frame" tabindex="0" data-mathml="(Θ,Φ)" role="presentation" style="display: inline-block; line-height: normal; font-size: 16px; word-spacing: normal; overflow-wrap: normal; text-wrap: nowrap; float: none; direction: ltr; max-width: none; max-height: none; min-width: 0px; min-height: 0px; border: 0px; position: relative;">(Θ,�) ,如下图所示:
容易有:
<span class="MathJax_SVG" id="MathJax-Element-29-Frame" tabindex="0" data-mathml="(6)sin⁡(Θ)=x2+y2R,sin⁡(Φ)=yx2+y2" role="presentation" style="display: inline-block; line-height: normal; font-size: 16px; text-align: left; word-spacing: normal; overflow-wrap: normal; text-wrap: nowrap; float: none; direction: ltr; max-width: none; max-height: none; min-width: 0px; min-height: 0px; border: 0px; position: relative;">(6)sin⁡(Θ)=�2+�2�,sin⁡(�)=��2+�2
北京市5月20日的太阳轨迹
回到开头的问题,我们已经成功的参数化表达了太阳的运动轨迹,我们可以回答这个问题了:

北京,5月20日的太阳轨迹
使用Excel做了一个计算表格:






欢迎光临 电影迷的家 (https://dymdj.com/) Powered by Discuz! X3.2