rlxone / solarnoaa Goto Github PK
View Code? Open in Web Editor NEW๐ Calculation of local times of sunrise, solar noon, sunset, azimuth, elevation based on the calculation procedure by NOAA
License: MIT License
๐ Calculation of local times of sunrise, solar noon, sunset, azimuth, elevation based on the calculation procedure by NOAA
License: MIT License
How do you convert the returned value (double) from sunrise or sunset to TIME ?
Thanks for your code , it's helpful for me.
I found that in 1999 or 2000 the piece of the code falls in infinite loop and I made some modification.
/// Calculate the Geometric Mean Longitude of the Sun
///
/// - Parameter t: number of Julian centuries since J2000.0
/// - Returns: the Geometric Mean Longitude of the Sun in degrees
static func calcGeomMeanLongSun(_ t: Double) -> Double {
var l0: Double = 0.0
l0 = 280.46646 + t * (36000.76983 + 0.0003032 * t)
// while (l0 <= 360) && (l0 >= 0) {
// if l0 > 360 {
// l0 = l0 - 360
// }
// if l0 < 0 {
// l0 = l0 + 360
// }
// }
while l0 > 360.0 {
l0 = l0 - 360.0
}
while l0 < 0.0 {
l0 = l0 + 360.0
}
return l0
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.