How to use the astronomia/lib/solar.apparentVSOP87 function in astronomia

To help you get started, we’ve selected a few astronomia examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github commenthol / date-chinese / src / Chinese.js View on Github external
inMajorSolarTerm (jde) {
    const lon = this._cache.lon[jde] || solar.apparentVSOP87(earth, jde).lon
    this._cache.lon[jde] = lon
    const lonDeg = lon * p - 1e-13
    const term = (2 + Math.floor(lonDeg / 30)) % 12 + 1
    return { term: term, lon: lonDeg }
  }
github commenthol / date-chinese / lib / Chinese.js View on Github external
value: function inMajorSolarTerm(jde) {
      var lon = this._cache.lon[jde] || solar.apparentVSOP87(earth, jde).lon;
      this._cache.lon[jde] = lon;
      var lonDeg = lon * p - 1e-13;
      var term = (2 + Math.floor(lonDeg / 30)) % 12 + 1;
      return { term: term, lon: lonDeg };
    }