Automatic access SG2

Automatic access To Solar Geometry 2

Access to the Web interface =>


    FREE automatic access  - Contact us for more information

Automatic access to Solar Geometry 2. This service is the second generation of library for computing the relative position of the sun and the earth made by MINES ParisTech. Available worldwide, it provides Sun declination, Solar hour angle, Sun elevation, and Sun azimuth.

Automatic access with WGET - FAQ

Download WGET.EXE



Warning! It is strongly recommanded to avoid the launch of parallel requests, using the "&" at the end of each wget request line. This would endanger our system.

Automatic access with WGET

  1. Download wget.exe in a directory (for Windows only, WGET is available by default on Unix)
  2. In the same directory, create a text file and copy-paste in a single line (wipe off the "..." at the end of the lines) the following instruction to test this permanent access to Carpentras, France:

wget -O output.csv -nv ' ...
ComputeSunPosition&version=1.0.0&DataInputs=latitude=44.083;longitude=5.059;altitude=-999;offset=2005-01-01; ...

  1. Rename the text file with the .bat extension and double click on it to retrieve the output.csv output file (Windows environment). Or, rename the text file with a .sh extension and run it using > in a Unix environment.

  WGET, in details

wget -O output.csv -nv ' ...
ComputeSunPosition&version=1.0.0&DataInputs=latitude=latitude;longitude=longitude;altitude=altitude;offset=yyyy-mm-dd; ...


  • latitude and longitude: in degrees, with at least 3 digits after comma
  • altitude: in meters. Set "elevation=-999" to let SoDa get the elevation from Nasa SRTM database
  • yyyy-mm-dd: set the first day of the request, e.g. "2005-01-01"
  • nb_values: "TU" (universal time) or "TST" (True Solar Time)
  • time_step: in minutes, this value ranges from "1" up to  "1440" for daily values


  • # JDUT: universal julian date (day)
  • # YYYY: year
  • # MM: month of the year
  • # DD: day of the month
  • # H: hour of the day (decimal hour)
  • # DOY: day of the year
  • # DELTA: topocentric declination (radian)
  • # OMEGA: topocentric hour angle (radian)
  • # GAMMA_S0: topocentric Sun elevation angle without refraction correction (radian)
  • # ALPHA_S: topocentric Sun azimuth angle Eastward from North (radian)
  • # R: Sun-Earth Radius (ua)

Tip: The omega angle is not forced between -pi and pi. To do it, you may use
    omega= omega - (ROUND(omega/(2*PI))*2*PI)
where ROUND is the usual rounding operator that gives you the nearest integer of a given value.