视线 API | 两点之间的无线电路径和地形轮廓
访问与限制Public, no key needed · Medium▾
对所有人开放。来自您的个人资料的免费 API 密钥可提高限制:将其发送到 X-API-Key header, or as api_key= 在地址中。
| 5 分钟 | 小时 | 日 | |
|---|---|---|---|
| 没有密钥 | 10 | 60 | 300 |
| 使用密钥 | 30 | 200 | 1,500 |
登录在您的配置文件页面上创建免费密钥。
每个答案都包含 X-RateLimit-Remaining 和 X-RateLimit-Reset. 超过限制,答案是错误 429 与 retry_after (秒内)。拒绝的请求不计算在内。
判断两点能否看到彼此(考虑地面真实起伏)。它沿大圆路径从 A 到 B 以约一个地形网格大小的步长行走,从高程数据库读取每一步的地面高度,加上地球曲率,并与两个天线之间的直线进行比较。
返回路径是否畅通、如果被阻挡具体位置在哪、第一菲涅尔区有多少比例畅通,以及两端天线各需要多高才能使信号通过。仅有地面高度可从 地形高程 API 获取,此端点的地图和图表版本位于 视线工具。
from to
参数
| 名称 | 默认值 | 功能 |
|---|---|---|
from | 必需 | 点 A,格式为 lat,lon 十进制度数。也支持 lat1= 和 lon1=。 |
to | 必需 | 点 B,格式为 lat,lon。也支持 lat2= 和 lon2=。 |
h1 | 1.5 | A 处天线相对地面高度,单位米。 |
h2 | 1.5 | B 处相对地面高度。用于空中火箭时设置此值。 |
freq | 868 | 频率(MHz),仅用于菲涅尔区计算。 |
mode | radio | radio 使用 4/3 倍地球半径计算大气折射。optical 使用真实半径。 |
step | 网格大小 | 采样间距,单位米。保持默认时按地形层级设置,范围 30 到 120 米。 |
profile | 1 | 设为 0 以省略按样本数组,仅返回判断结果。 |
corridor | 0 | 设为 1 |
along, across | 280, 170 | 沿路由和横向的走廊采样数。上限分别为 800 和 400。 |
width | 0.8 | 走廊宽度,以路由长度的分数表示。 |
over | 0.15 | 走廊超出每端多远,以路由长度的分数表示,使两点位于数据块内部而非其边缘。 |
示例
英格兰湖区谷底观察斯卡菲尔派克山,距离 16.7 公里,方位角 301 度,两端均使用手持设备:
curl "https://www.altimetercloud.com/zh/api/los/?from=54.3760,-2.9910&to=54.4542,-3.2116&h1=1.5&h2=1.5&profile=0"
{
"success": true,
"distance_m": 16712.4,
"distance_km": 16.712,
"bearing_deg": 301.2,
"step_m": 30.9,
"samples": 542,
"mode": "radio",
"k_factor": 1.3333,
"freq_mhz": 868,
"a": { "lat": 54.376, "lon": -2.991, "ground_m": 75.4, "height_m": 1.5,
"antenna_m": 76.9, "tier": "ultra" },
"b": { "lat": 54.4542, "lon": -3.2116, "ground_m": 970.9, "height_m": 1.5,
"antenna_m": 972.4, "tier": "ultra" },
"clear": false,
"clear_fresnel": false,
"marginal": false,
"clearance_m": -84.2,
"fresnel_pct": -220.4,
"margin_m": 2,
"worst": { "distance_m": 6234.1, "lat": 54.4051, "lon": -3.0868,
"ground_m": 542.0, "sightline_m": 457.8, "clearance_m": -84.2,
"fresnel_r_m": 38.2 },
"blocked_at": { "distance_m": 6234.1, "lat": 54.4051, "lon": -3.0868,
"ground_m": 542.0, "sightline_m": 457.8, "clearance_m": -84.2,
"fresnel_r_m": 38.2 },
"need": { "a_m": 116.3, "b_m": 227.5, "a_fresnel_m": 168.9,
"b_fresnel_m": 330.1, "silly_m": 5000 },
"tiers": { "ultra": 542 },
"datum": "EGM96 mean sea level",
"units": "metres"
}
上述数字显示响应的结构。运行下方的编辑器获取实时数据,因为数据库会不时更新。
字段含义
| 字段 | 含义 |
|---|---|
clear | 当两个天线之间无任何物体高于连接它们的直线(已加入地球隆起)时为真。 |
clear_fresnel | 当 60% 的第一菲涅尔区也畅通时为真,这是无线电链路所需的,而不仅是裸露的直线。 |
marginal | 当直线能通过但间隙小于 margin_m 时为真。在实地检验前应视为阻挡。 |
clearance_m | 直线在最紧处高于地面的距离。负值表示被阻挡,绝对值为阻挡量。 |
fresnel_pct | 在最紧处第一菲涅尔区的畅通百分比。60 或以上良好,低于 60 会损失几 dB。 |
margin_m | 尖锐山脊顶端可能高于其网格平均值的量,取决于此路由上最粗糙的层级:1 弧秒时 2 米,3 弧秒时 5 米,6 弧秒时 10 米,18 弧秒时 25 米。 |
blocked_at | 打破直线的第一个采样点,路径畅通时为空。worst 始终存在,为最紧处无论如何。 |
need.b_m | B 处相对地面的高度,能使直线清除中间所有障碍。need.a_m 是 A 处的相应值。超过 silly_m 的数值表示障碍物靠近另一端太近,无法通过增加高度解决。 |
need.b_fresnel_m | 达到 60% 菲涅尔间隙所需的高度。平地上这总是很大,因为靠近低天线的地面无论如何都在菲涅尔区内。 |
profile | 四个包含 count 个条目的数组:沿路径的 distance_m、高程 ground_m、要加到它的地球隆起 curve_m 和第一菲涅尔区半径 fresnel_r_m。 |
绘制剖面
地球曲率通过将隆起加到地面而不是弯曲视线来表达,这是通常的路径剖面约定,意味着视线可以作为 a.antenna_m 和 b.antenna_m 之间的直线绘制。对于每个样本 i:
绘制的地形高度 = profile.ground_m[i] + profile.curve_m[i]
绘制的海平面 = profile.curve_m[i]
视线 = a.antenna_m + (b.antenna_m - a.antenna_m) * i / (count - 1)
菲涅尔边缘 = 视线 +/- 0.6 * profile.fresnel_r_m[i]
隆起为 d1 * d2 / (2 * k * R),其中 R 为平均地球半径,k 为响应中的 k_factor:光学为 1,无线电为 4/3。
错误
{ "success": false, "error": { "code": "413",
"message": "routes are limited to 500 km and this one is 605 km" } }
412 覆盖坏或缺失的坐标以及两点相同的情况。413 是路由超过 500 公里。视线距离远超 100 公里时会被地球本身阻挡,无论地面如何,所以这个限制已经很宽松。
限制和说明
- 高度是裸露地面。不包括树木、建筑或桅杆。一条通过山脊 5 米的直线不能通过其上的森林。
- 每个网格单元存储其内地面的平均高度,所以山脊显示低于实际值。这就是
margin_m和marginal的用途。 - 高程为 EGM96 平均海平面,直接与气压高度计比较。
- 海洋和无数据区域读为零。
- 这是几何,不是链路预算。它未考虑发射功率、天线方向图、接收机灵敏度或干扰。
- 无速率限制、无密钥、不记录提问者。请保持批量使用合理。
尝试一下
Altimeter Cloud 致谢
免费使用。如果您使用 this API, or anything made from the answers, in a commercial product or service, credit AltimeterCloud with a link to www.altimetercloud.com 在使用点:在屏幕、页面或打印输出上显示数据的位置,例如 “Data from AltimeterCloud.com”。此页面上列出的数据自身来源要求的任何署名也适用。
Terrain data credits
The ground heights come from the Terrain Tiles dataset (Mapzen / Tilezen, on AWS Open Data), reduced into resolution tiers by Altimeter Cloud. Wherever you show heights from this API, credit their sources. Each answer carries a short form of the list below in its credits field.
- ArcticDEM terrain data DEM(s) were created from DigitalGlobe, Inc., imagery and funded under National Science Foundation awards 1043681, 1559691, and 1542736
- Australia terrain data © Commonwealth of Australia (Geoscience Australia) 2017
- Austria terrain data © offene Daten Österreichs – Digitales Geländemodell (DGM) Österreich
- Canada terrain data contains information licensed under the Open Government Licence – Canada
- Europe terrain data produced using Copernicus data and information funded by the European Union - EU-DEM layers
- Global ETOPO1 terrain data U.S. National Oceanic and Atmospheric Administration
- Mexico terrain data source: INEGI, Continental relief, 2016
- New Zealand terrain data Copyright 2011 Crown copyright (c) Land Information New Zealand and the New Zealand Government (All rights reserved)
- Norway terrain data © Kartverket
- United Kingdom terrain data © Environment Agency copyright and/or database right 2015. All rights reserved
- United States 3DEP (formerly NED) and global GMTED2010 and SRTM terrain data courtesy of the U.S. Geological Survey
The licences behind each statement are on the terrain tiles attribution page.



















