太阳高度角

任意时间点的全球太阳高度及方位角。

请求路径#

GET /v7/astronomy/solar-elevation-angle

参数#

查询参数

  • location (必选) 需要查询地区的以英文逗号分隔的经度,纬度坐标(十进制,最多支持小数点后两位)。例如 location=116.41,39.92
  • date (必选) 查询日期,格式为yyyyMMdd,例如 date=20170809
  • time (必选) 查询时间,格式为HHmm,24时制,例如 time=1230
  • tz (必选) 查询地区所在时区,例如tz=0800tz=-0530
  • alt (必选) 海拔高度,单位为米,例如alt=43

请求示例#

curl -X GET --compressed \
-H 'Authorization: Bearer your_token' \
'https://your-api-host/v7/astronomy/solar-elevation-angle?location=116.41%2C39.92&date=20180531&time=1230&tz=0800&alt=43'

请将your_token替换为你的JWT身份认证,将your_api_host替换为你的API Host

试一下

返回数据#

{
  "code": "200",
  "solarElevationAngle": "42.88",
  "solarAzimuthAngle": "185.92",
  "solarHour": "1217",
  "hourAngle": "-4.41",
  "refer": {
    "sources": [
      "https://developer.qweather.com/attribution.html"
    ],
    "license": [
      "QWeather Developers License"
    ]
  }
}
  • code string 状态码
  • solarElevationAngle string 太阳高度角
  • solarAzimuthAngle string 太阳方位角,0度为正北
  • solarHour string 太阳时,HHmm格式
  • hourAngle string 时角
  • refer object 数据来源和许可信息
    • sources array 原始数据来源,或数据源说明,可能为空
    • license array 数据许可或版权声明,可能为空