Previous: , Up: STCS Tools   [Contents]


4.2 sun-position

Author

Christian Brunello ([email protected])

License

GNU General Public License version 3 or later (see GNU General Public License)

Kind

Executable ($bindir/sun-position)

Estimates solar azimuth and elevation for a given latitude/longitude at the current local time (converted to UTC for the calculation). Needs libm at build time; skip with --disable-sun-position.

Mandatory options:

--latitude=LAT / -a LAT

Reference latitude in degrees.

--longitude=LON / -o LON

Reference longitude in degrees.

$ sun-position --latitude 45.223 --longitude 11.999
{"timestamp": 1791893400, "latitude": 45.223000, "longitude": 11.999000,
 "azimuth": 204.360031, "elevation": 46.287419}

Typical STCS use: site overlay sun-position.xml with process-transport polling on a cron expression and binding SUN:azimuth / SUN:elevation.