简体   繁体   English

C#中的PyEphem(日出/日落时间计算)等效项

[英]PyEphem (sunrise / sunset time calculation) equivalent in C#

PyEphem is a neat library that allows easy calculation of sunrise, set, dawn, and dusk of location based on lat, long, and UTC timestamp PyEphem是一个简洁的库,可以根据纬度,经度和UTC时间戳轻松计算日出,日落,黎明和黄昏的位置

I don't want to go through the calculation myself, rather I was wondering if there is an existing library I could use 我不想自己进行计算 ,而是想知道是否可以使用现有的库

I know this post is old but check out CoordinateSharp . 我知道这篇文章很旧,但请查看CoordinateSharp It can do exactly what you described. 它可以完全按照您的描述进行操作。 It can even do Solar/Lunar eclipse calculations. 它甚至可以进行日食/月食计算。

Example Usage: 用法示例:

Coordinate c = new Coordinate(19.0991676, -98.2209974, DateTime.Now());
c.CelestialInfo.SunRise; //Returns sunrise nullable DateTime for location.

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM