How the distance between two places is measured

The Earth is not flat, so the distance on this poster never comes from a ruler drawn over a web map. Both places are first treated as points on a sphere with a mean radius of 6371.0088 kilometres, and the tool applies the Haversine formula: it converts both latitudes and longitudes to radians, takes the sine of half the difference in latitude and the cosine-weighted difference in longitude, and turns the resulting central angle into an arc length along the surface. That gives the true great-circle distance — the shortest path an airliner would fly — in kilometres and statute miles, with no rounding hidden until the final display.

Along with the distance, two more navigational answers are produced. The initial bearing is the compass direction from the first place toward the second, computed with the standard spherical atan2 expression and expressed both as a degree angle from true north and as one of sixteen compass points from north through north-northeast. Because a great circle is a curve rather than a straight line, that direction changes slowly along the route — the printed angle is specifically the departure bearing at the first city. The midpoint is the coordinate exactly halfway along the great-circle arc, found through vector-style spherical interpolation, and it is shown in decimal degrees and again in degrees, minutes and seconds so it can be pasted into any map or GPS field.

Choose each endpoint either from the built-in city list or by typing a name and coordinates by hand — for a first home, a university town, a parent's village, the airport where someone landed. The city selector only fills the fields; everything afterwards is plain math you can verify on paper. Give the poster your own title, such as “The Distance Between Us”, and pick kilometres or miles; the big number always speaks in your chosen unit while the secondary line carries the other.

A result poster, not a calculator screenshot

The answer is designed as a keepsake from the start: the two names sit in letter-pressed FROM and TO blocks, the huge distance is set in a display serif with a small dashed arc joining the two points beneath it, and the bearing and halfway point are arranged like a quiet data plate. On download the whole composition is repainted at 300 DPI in your chosen print size, with every glyph redrawn as vectors. No tile server, no geocoding API and no analytics call is ever made — two pairs of numbers are all the page ever needs.

两地之间的距离是怎样量出来的

地球不是平的,所以这张海报上的距离绝不会来自网页地图上的一把直尺。两个地点先被当作平均半径 6371.0088 千米的球面上的两个点,工具套用 Haversine 公式:把纬度与经度全部换算成弧度,取纬度差一半的正弦,以及以余弦加权的经度差一半的正弦,再把得到的圆心角换算成沿球面的弧长。这给出的是真正的大圆距离——民航航班会飞的最短路径——同时以千米与法定英里显示,在最终排版之前不做任何隐藏的四舍五入。

除距离之外,还会同时给出两个航行答案。方位角是从第一个地点指向第二个地点的罗盘方向,由标准的球面 atan2 式算出,既显示自正北起算的度数,也换算为从北、北东北一路排开的十六个罗盘点之一。由于大圆是曲线而非直线,这个方向会沿航程缓慢变化;印出的角度专指出发时在第一座城市的起始航向。中点则是大圆航线上正中间一半处的坐标,通过球面向量式的插值求出,并同时以十进制度与度分秒两种形式给出,方便直接粘进任何地图或 GPS 输入框。

两个端点既可以从内置城市列表选择,也可以手动填写名称与坐标——第一个家、一座大学城、父母的村庄、某人落地的机场都可以。城市下拉只是替你填入字段,此后的一切都是可以在纸上验证的纯数学。给海报起一个自己的标题,比如「我们之间的距离」,再选千米或英里;大数字永远使用你选定的单位,旁边的小字则附上另一种单位。

是结果海报,不是计算器截图

答案从一开始就被设计成一件值得留存的印刷品:两个地名安放在压印感的 FROM 与 TO 区块中,巨大的距离以展示衬线体排出,下方一条小弧线用虚线连接两个端点,方位角与中点则排成一块安静的数据铭牌。下载时整幅构图会按你选择的尺寸以 300 DPI 重绘,每个字都以矢量重新生成。页面从不请求地图瓦片、地理编码接口或统计分析——两对数字就是它所需要的全部。

Why might this differ slightly from my navigation app?

This is the straight-line great-circle distance through the air, while driving and flight apps add roads, airways, wind and restrictions. The underlying number uses the mean Earth radius and is typically within about half a percent of the published route length — use it for wall art and scale, not for filing a flight plan.

为什么和导航软件的数字略有出入?

这里给出的是空中直线大圆距离,而驾驶与航班软件会叠加道路、航路、风与管制限制。底层数字使用地球平均半径,与公布航线长度的偏差通常在千分之几以内——它适合做墙面海报与尺度参考,不能用于申报飞行计划。

What does the bearing angle mean for cities far apart?

It is the initial great-circle bearing measured clockwise from true north at the first place. On a long route the heading slowly rotates — flying from New York to Tokyo, you depart toward the northwest and arrive from the northeast even though the city sits west of you. The sixteen-point compass label beside the degree figure translates the same angle into plain words in both languages.

相距很远的城市,方位角是什么意思?

它是在第一个地点、自真北顺时针量到的大圆初始方位。长途航线上航向会缓缓旋转——从纽约飞东京,出发时朝西北,抵达时却从东北方向进入,尽管东京位于西方。度数旁的十六方位文字会用两种语言把同一角度翻译成日常说法。

Can I use coordinates that are not in the city list?

Absolutely. Leave the selector or choose any city, then type the real latitude and longitude into the number fields and give the place your own name. The haversine, bearing and midpoint all accept any value within the legal latitude and longitude ranges, so a house, beach, chapel or mountain pass works just as well as a capital city.

可以用城市列表之外的坐标吗?

完全可以。保留下拉或任选一座城市后,直接在数字框里填写真实经纬度,并给地点起一个自己的名字。距离、方位角与中点计算接受合法经纬度范围内的任何数值,所以一栋房子、一片海滩、一座小教堂或一个山口,和首都城市一样好用。