iPhone 4 根据 GPS 纬度和一年中的某一天以编程方式计算日持续时间
我正在查看这篇维基百科文章:
有人有过在 iOS 上使用上面的方程和 GPS 给出的纬度计算日出/日落时间的经验吗?
我对太阳正午也很感兴趣。这个想法是创建一个时钟,其中太阳围绕一个固定按钮旋转,以真正“模拟”的方式指示时间......日出/日落时间将允许我将“太阳”的轨道围绕按钮定位对于一年中的某一天,给人留下白天将有多少时间以及已经过了多少时间的印象。
iPhone 会以某种方式自动调整亮度,你知道这是基于通过光传感器的环境光还是像我上面尝试做的那样的某种计算吗?也许已经有我可以使用的东西了?
谢谢您,我相信这些信息不仅对我有益!
我在 C++ 中找到了这个源代码,但不确定如何将其集成到现有的 Xcode 项目中。 http://www.sci.fi/~benefon/rscalc_cpp.html
I'm looking at this wikipedia article:
Anybody had experience calculating Sunrise/Sunset times on iOS using the equations above with latitude given by the GPS?
I'm also interested in the Solar Noon. The idea is to create a clock in which the sun revolves around a fixed button, indicating time in a truly "analog" sense... The Sunrise/sunset times would then allow me to position the orbit of the "sun" around the button for a given day of the year, giving the impression of how much daylight time there will be, and how much has already expired.
Somehow iPhone adjusts brightness automatically, do you know if that is based on the ambient light via light sensor or some kind of calculation like the one that I'm trying to do above? Maybe there's already something out there that I can use?
Thank you, I'm sure this information will benefit not just me!
I found this source in C++, but am not sure how to integrate it into an existing Xcode project.
http://www.sci.fi/~benefon/rscalc_cpp.html
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这是一个 objective-c 框架,用于根据位置计算日出和日落。
iPhone 通过传感器检测环境光来调整亮度。
Here is a objective-c framework to calculate sunrise and sunset based on the location.
The iPhone adjusts its brightness by a sensor detecting ambient light.