[英]Why the Elevation is wrong for my coordinates, can anyone explain me
There might be several similar questions and of course that helped me find a way to calculate sun position for specific lat-long coordinates, in my case Berlin. 可能会有几个类似的问题,当然可以帮助我找到一种方法来计算特定纬度坐标(在我的情况下是柏林)的太阳位置。 But I am getting the wrong result.
但是我得到了错误的结果。 There is an 8 or 9-degree difference in my result.
我的结果有8度或9度的差异。
if you Check these two websites, where the values are different. 如果您检查这两个网站,则它们的值是不同的。 https://www.timeanddate.com/sun/germany/berlin
https://www.timeanddate.com/sun/germany/berlin
https://www.suncalc.org/#/52.5072,13.4248,10/2019.01.30/16:45/1/0 https://www.suncalc.org/#/52.5072,13.4248,10/2019.01.30/16:45/1/0
I have a different type of codes but all work the same way. 我有不同类型的代码,但是所有代码都以相同的方式工作。 I can't figure it out if why my result has such a huge difference.
我不能弄清楚为什么我的结果有如此大的差异。
from astropy.coordinates import EarthLocation, SkyCoord, get_sun, AltAz
from astropy.time import Time
import astropy.units as u
utcoffset = 1*u.hour # Central European Time
ctime = Time.now() + utcoffset
Berlin = EarthLocation(lat = 52.50721*u.deg, lon = 13.42475*u.deg)
get_sun(ctime).transform_to(AltAz(location=Berlin))
The result is as follows: 结果如下:
<SkyCoord (AltAz: obstime=2019-01-30 16:58:26.084488, location=(3784032.5060993554, 903211.2359915433, 5037352.958007532) m, pressure=0.0 hPa, temperature=0.0 deg_C, relative_humidity=0.0, obswl=1.0 micron): (az, alt, distance) in (deg, deg, m)
(255.03483501, -10.75194363, 1.47368685e+11)>
Never Mind... Sorry Guys... I figured it out. 没关系...对不起,伙计...我想通了。 I don't have to consider here the offset when already giving the location lat-long of Berlin.
在给出柏林纬度的位置时,我不必在这里考虑偏移量。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.