🏠 vigrey.com

syzygy - File README.txt

syzygy

Go program that accurately calculates the 3D position in space of the Sun, Moon, and a latitude/longitude location on Earth for a given time

[GIT] git clone git://vigrey.com/git/syzygy

Git Repositories

Commits

Refs

LICENSE

README

RSS Feed

README.txt - (3080 Bytes)

 # Syzygy
 
 Go program that accurately calculates the 3D position in space of the
 Sun, Moon, and a latitude/longitude location on Earth for a given time
 
 ## Description:
 Syzygy is a program that accurately calculates the 3D positions of the
 Sun, Earth, and specified latitude/longitude on Earth for a given time.
 This allows the user to track things like moon illumination, sunset,
 sunrise, equinoxes, moon phases, eclipses.
 
 The algorithms used to calculate this data comes from "Astronomical
 Algorithms, 2nd Edition" by Jean Meeus.
 
 ## Build Platforms:
 - *BSD
 - Linux
 - macOS
 - Plan9
 - Windows
 
 
 ## Build Dependencies:
 - go >= 1.20
 
 ## Build:
 In the root directory of this repository (the directory this README.txt
 file is in), run the following command.
 
 ```sh
 make
 ```
 
 The executable will be at `build/bin/syzygy` in the repository.
 
 ## Clean Build Environment:
 If you used `make` to build syzygy, you can run the following command
 to clean up the build environment.
 
 ```sh
 make clean
 ```
 
 ## Usage:
 There are 4 ways to use syzygy, which are as follows
 
 ```sh
 syzygy
 ```
 
 ```sh
 syzygy <unix_timestamp>
 ```
 
 ```
 syzygy <lat> <lon>
 ```
 
 ```
 syzygy <lat> <lon> <unix_timestamp>
 ```
 
 - <lat> is the latitude value on Earth you want to track from -90
   to 90
 - <lon> is the longitude value on Earth you want to track from
   -180 to 180
 - <unix_timestamp> is the amount of seconds since January 1st, 1970
   (excluding leap seconds)
 
 In cases where <unix_timestamp> is not specified, syzygy will use the
 current unix timestamp.
 
 In cases where <lat> and <lon> are not specified, syzygy will use 0 for
 the latitude and longitude.
 
 ## Example Usage
 ```sh
 syzygy 42.9913021 -87.8838436 1681960707.141592
 ```
 
 The above command will provide the following output
 
 ```
 {
   "moonIllumination": 0.00003284797373787063,
   "moonPhase": -0.490618569898892,
   "sunAngle": 64.38584608297296,
   "moonAngle": 62.869180780600914,
   "sunVisible": false,
   "moonVisible": false,
   "sunGeodeticLocation": {
     "latitude": 11.400794340427336,
     "longitude": 130.14276760558522
   },
   "moonGeodeticLocation": {
     "latitude": 10.822731885063558,
     "longitude": 129.8309106151189
   },
   "earthGeodeticLocation": {
     "latitude": 42.9913021,
     "longitude": -87.8838436
   },
   "sunECEF": {
     "x": -94963497.29293689,
     "y": 112602081.46263185,
     "z": 29703009.772920746
   },
   "moonECEF": {
     "x": -236401.56954508083,
     "y": 283426.9155068214,
     "z": 70548.61457743739
   },
   "earthECEF": {
     "x": 172.53854485896656,
     "y": -4669.42563005196,
     "z": 4326.7950220101175
   },
   "equationOfTime": {
     "eccentricity": -1.8414647539088742,
     "obliquity": 2.08068776123484,
     "secondsOffset": 57.41352175823174,
   },
   "eclipse": {
     "local": false,
     "global": true
   },
   "sunEarthPhase": -218.02661120558523,
   "sunEclipticLongitude": 29.798842962357107,
   "moonEclipticLongitude": 29.308224392458214,
   "sunEarthMoonAngle": 0.6551216488634518,
   "solarTimeSecondsOffset": -21034.708942241767,
   "time": 1681960707.141592,
   "rfc3339": "2023-04-20T03:18:27.141592Z"
 }
 ```

Blanket Fort Webring

<< Prev - Random - Full List - Next >>

What the heck is this?