osmsun

package module
v0.0.0-...-964a022 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 22, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Overview

References used in this file: [1] Zhang, T., Stackhouse, P. W., Macpherson, B., & Mikovitz, J. C. (2021). A solar azimuth formula that renders circumstantial treatment unnecessary without compromising mathematical rigor: Mathematical setup, application and extension of a formula based on the subsolar point and atan2 function. Renewable Energy, 172, 1333–1340. doi:10.1016/j.renene.2021.03.047 [2] https://aa.usno.navy.mil/faq/GAST (Retrieved on 27 April 2024). [3] Government Publishing Office (Ed.). (2018). Astronomical almanac for the year 2019. U.S. Government Printing Office. [4] Meeus, J. (1998). Astronomical Algorithms (2nd ed.). Royal Tunbridge Wells, England: Atlantic Books. [5] Osborne, P. (2013). The Mercator Projections. Zenodo. https://doi.org/10.5281/ZENODO.35392 [6] Urban, S., & Seidelmann, P. K. (Eds.). (2012). Explanatory Supplement to the Astronomical Almanac, third edition (3rd ed.). Sausalito, CA: University Science Books.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DrawAttribution

func DrawAttribution(img draw.Image, zoomLevel int, attribution string) error

Draw an attribution string on the image, scales according to the dimensions of the image.

func DrawMoon

func DrawMoon(img draw.Image, utcNow time.Time, zoomLevel int)

DrawMoon calculates the position of the moon and draw a moon on the image there.

func DrawSun

func DrawSun(img draw.Image, utcNow time.Time, zoomLevel int)

DrawSun calculates the position of the sun and the boundaries of where the sun shines and draw the sun and the area on Earth where there is no sun, respectively.

func GetWorldMap

func GetWorldMap(cachePath string, zoomLevel int) (image.Image, error)

GetWorldMap returns a world map image, if it's not cached for this zoomlevel, tiles would be fetched from OSM and a world map is constructed. If a cached world map is not found, it will connect to openstreetmap.org and

Types

This section is empty.

Directories

Path Synopsis
internal
cmd

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL