如何计算日出,日落和中午 [英] How to calculate sunrise, sunset and noon
本文介绍了如何计算日出,日落和中午的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试制作一个程序,根据世界上任何城市的经度,纬度和时区计算日出,日落和太阳中午。
我怎么能在 vb.net 中做到这一点?
谢谢。
I'm trying to make a program that calculates the sunrise, sunset and solar noon based on longitude, latitude and time zone for any city in the world.
How can I do that in vb.net?
Thanks.
推荐答案
日出和日落的计算很容易找到:
https://en.wikipedia。 org / wiki / Sunrise_equation [ ^ ]
http://users.electromagnetic.net/bu/astro/sunrise-set.php [ ^ ]
http://aa.quae.nl/en/reken/zonpositie.html [ ^ ]
您只需将计算转换为代码。
没有必要计算中午 - 它总是在下午12点。 :)
(除非你的意思是太阳中午,它包含在日出/日落计算中。)
编辑:我发布了我用于GitHub的C#代码,这可能会给你一个开始的地方:
https://gist.github.com/RichardD2/f6b08a5791b21ac77ce7 [ ^ ]
The calculations for sunrise and sunset are easy to find:
https://en.wikipedia.org/wiki/Sunrise_equation[^]
http://users.electromagnetic.net/bu/astro/sunrise-set.php[^]
http://aa.quae.nl/en/reken/zonpositie.html[^]
You just need to translate the calculation into code.
There's no need to "calculate" noon - it's always at exactly 12 PM. :)
(Unless you mean "solar noon", which is included in the sunrise / sunset calculation.)
I've posted the C# code I use to GitHub, which might give you a place to start:
https://gist.github.com/RichardD2/f6b08a5791b21ac77ce7[^]
这篇关于如何计算日出,日落和中午的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文