Infocom UK Community API Documentation
👨
Solar Altitude
This function returns the value of solar altitude at the provided GPS latitude and longitude at the time of the request (accurate to one minute).
API Request
API Request parameters and format
- token - please obtain from the client area
- lat - latitude in Decimal degrees (DD), e.g. 41.40337
- lon - longitude in Decimal degrees (DD), e.g. 2.17407
API URL example:
https://api.infocom.uk/solar/altitude/?token=11a594a6a3d290ae435b7776138a4a81b&lat=41.40337&lon=2.17407
API Response
Example API response:
{ "value":-66.81, "message":"This is the current solar altitude at [41.40337, 2.17407]" }
There are two name:value pairs in the response:
- value - Can be either between -90.00 and 90.00 (success) or -1000 and below (error)
- message - A human-friendly explanation
The value can be:
- -90.00 to 90.00 - Always with two decimal (can be used for validation). This means your request was valid and the number is the current solar altitude
- -1000 - Incorrect API token. Please copy your token from the client area
- -1001 - Too many requests. Please check your scripts and make sure no more than 2 (two) API requests are issued per minute
- -1002 - Incorrect latitude. Must be a number between -90 and 90
- -1003 - Incorrect longitude. Must be a number between -180 and 180
© Infocom UK Ltd. | NOTE: We are using 🍪 🍪 🍪 (cookies) on this website - please leave if you are not willing to accept them.