AstroDistance[astro]
返回目前从你所在的地理位置观测到天体 astro 的物理距离.
AstroDistance[astro,astro0]
返回目前从 astro0 观测到天体 astro 的物理距离.
AstroDistance[astro,Dated[astro0,date]]
返回在给定日期从 astro0 观测到天体 astro 的物理距离.
AstroDistance
AstroDistance[astro]
返回目前从你所在的地理位置观测到天体 astro 的物理距离.
AstroDistance[astro,astro0]
返回目前从 astro0 观测到天体 astro 的物理距离.
AstroDistance[astro,Dated[astro0,date]]
返回在给定日期从 astro0 观测到天体 astro 的物理距离.
更多信息
- AstroDistance 计算穿过空间在特定位置之间移动的距离,例如天体的中心或其表面上的点.
- 在 AstroDistance[astro1,astro0] 中,以天文实体的形式给出天体,如 Entity["Planet","Mars"],表示天体的中心,或使用天体表面上的位置,如 GeoPosition[{lat,lon,h},"Mars"] 或 Entity["SolarSystemFeature", "OlympusMonsMars"]. 也可以使用表示物理位置的字符串,如 "JupiterBarycenter".
- 在 AstroDistance[astro,astro0] 中,观测点 astro0 必须是太阳系内的位置,但目标位置 astro 可以是深空物体,如恒星或星系.
- 太阳系 BCRS 坐标中的观测时刻由 AstroDistance 的第二个参数决定,默认为当前时刻.
- 在 AstroDistance[astro,astro0] 中,对于太阳系外的 astro 物体,结果始终是天体测量意义上的,即给出到光发出的位置的距离,而不是到 astro 在观测日期的位置的距离.
- 在 AstroDistance[astro,astro0]中,对于太阳系内的 astro 物体,默认情况下,针对光发出的时间对结果进行校正,但可通过 AstroDistance[astro,{astro0,"LightTime""Geometric"}] 计算几何距离.
范例
打开所有单元 关闭所有单元基本范例 (3)
AstroDistance[Entity["Planet", "Venus"]]AstroDistance[Entity["Planet", "Venus"], GeoPosition[{0, 0}, Entity["PlanetaryMoon", "Moon"]]]绘制 2015 年到 2030 年木星和地球中心之间的距离:
Plot[AstroDistance[Entity["Planet", "Jupiter"], Dated[Entity["Planet", "Earth"], year]], {year, 2015, 2030}]范围 (5)
AstroDistance[Entity["Planet", "Jupiter"], Dated[Entity["Planet", "Mars"], Now]]AstroDistance[Entity["Planet", "Jupiter"], {Entity["Planet", "Mars"], Now}]AstroDistance[Entity["Planet", "Jupiter"], {Now, Entity["Planet", "Mars"]}]AstroDistance[Entity["Planet", "Jupiter"], GeoPosition[{40, 30}, Entity["Planet", "Venus"]]]UnitConvert[% - AstroDistance[Entity["Planet", "Jupiter"], Entity["Planet", "Venus"]], "Miles"]Entity["Planet", "Venus"]["Radius"]AstroDistance[Entity["SolarSystemFeature", "OlympusMonsMars"], Entity["City", {"Paris", "IleDeFrance", "France"}]]AstroDistance[Entity["Star", "Sun"], "SolarSystemBarycenter"]Plot[AstroDistance[Entity["Star", "Sun"], Dated["SolarSystemBarycenter", DateObject[{year}, "Instant", "GregorianYear", 0]]], {year, 0, 100}, TargetUnits -> "Gigameters"]EntityClass["PlanetaryMoon", "GalileanMoon"]//EntityList结果以 QuantityArray 形式给出:
AstroDistance[%]%//Normal应用 (4)
构建一个函数,计算给定公历年木星中心和地球中心之间的几何距离:
date[year_] := DateObject[{year}, CalendarType -> "GregorianYear"];
dJE[year_ ? NumericQ] := AstroDistance[Entity["Planet", "Jupiter"], {Entity["Planet", "Earth"], date[year], "LightTime" -> "Geometric"}]Plot[dJE[year], {year, 2020, 2026}]FindMinimum[QuantityMagnitude[dJE[year]], {year, 2022.5, 2022, 2023}]date[year] /. Last[%]CalendarConvert[%]dES[d_ ? NumericQ] := AstroDistance[Entity["Planet", "Earth"], {Entity["Star", "Sun"], DateObject[{2022, 1, d, 0, 0, 0}]}]由于地球轨道的偏心率,一年中该距离的波动幅度为 1 个天文单位:
Plot[dES[d], {d, 1, 366}]FindMinimum[QuantityMagnitude[dES[d]], {d, 1, 366}]2022 年,它发生在格林威治标准时间 1 月 4 日早上 7 点左右:
DateObject[{2022, 1, d, 0, 0, 0}] /. Last[%]FindMaximum[QuantityMagnitude[dES[d]], {d, 1, 366}]2022 年,它发生在 7 月 4 日,也是格林威治标准时间早上 7 点左右:
DateObject[{2022, 1, d, 0, 0, 0}] /. Last[%]AstroDistance[Entity["Star", "Vega"]]UnitConvert[%, "LightYears"]% - AstroDistance[Entity["Star", "Vega"], Entity["Star", "Sun"]]Plot[AstroDistance[Entity["Star", "Vega"], Dated[Here, DateObject[{2022, 1, d, 0, 0, 0}]]] - AstroDistance[Entity["Star", "Vega"], Dated[Entity["Star", "Sun"], DateObject[{2022, 1, d, 0, 0, 0}]]], {d, 1, 366}]Plot[AstroDistance[Entity["Star", "Vega"], Dated[Entity["Star", "Sun"], DateObject[{y}, "Instant", "GregorianYear", 0]]] - AstroDistance[Entity["Star", "Vega"], Entity["Star", "Sun"]], {y, 2022, 2023}]距离每年减少约 2.5 个天文单位,从织女星的负径向速度上可以看出:
Entity["Star", "Vega"]["RadialVelocity"]ps = PlanetData[]rs = Entity["Star", "Sun"]["Radius"] / (AstroDistance[Entity["Star", "Sun"], #]& /@ ps)Graphics[{Table[{{Orange, Disk[{i - 1 / i, 0} / 80, rs[[i]]]}, Text[ps[[i]], {i - 1 / i, -1} / 80]}, {i, 8}]}, ImageSize -> Full]属性和关系 (3)
AstroDistance[astro,obsrvr] 等价于 AstroPosition[astro,obsrvr]["Distance"]:
now = Now;d = AstroDistance[Entity["PlanetaryMoon", "Callisto"], {Entity["City", {"Paris", "IleDeFrance", "France"}], now}]AstroPosition[Entity["PlanetaryMoon", "Callisto"], {Entity["City", {"Paris", "IleDeFrance", "France"}], now}]%["Distance"]% == QuantityMagnitude[d, "AstronomicalUnit"]AstroDistance[astro1,astro2]考虑了光从 astro1 传播到 astro2 所需的时间. 计算这一天从火星可以看到木星的距离:
date = DateObject[{2022, 9, 1, 0, 0, 0}];d1 = AstroDistance[Entity["Planet", "Mars"], {Entity["Planet", "Jupiter"], date}]d1 / Quantity["SpeedOfLight"]//UnitSimplifyd2 = AstroDistance[Entity["Planet", "Mars"], {Entity["Planet", "Jupiter"], date, "LightTime" -> "Geometric"}]d2 - d1//UnitSimplifyd1r = AstroDistance[Entity["Planet", "Jupiter"], {Entity["Planet", "Mars"], date}]d1 - d1r//UnitSimplify然而,不对 light-time 进行校正的计算结果却是一致的:
d2r = AstroDistance[Entity["Planet", "Jupiter"], {Entity["Planet", "Mars"], date, "LightTime" -> "Geometric"}]d2 - d2r用 GeoPositionENU 计算从你所在的位置到普林西比岛的欧几里德距离:
GeoPositionENU[Entity["Island", "PrincipeIsland"], Here]["ENU"]d = Quantity[Norm[%], "Meters"]GeoDistance 给出沿地球表面的距离,因此更长:
GeoDistance[Entity["Island", "PrincipeIsland"], Here, UnitSystem -> "Metric"]比较欧几里德距离与 AstroDistance 给出的距离:
AstroDistance[Entity["Island", "PrincipeIsland"], Here] - drframe = {Here, "LightTime" -> "Geometric", "Aberration" -> False, "LightDeflection" -> False};AstroDistance[Entity["Island", "PrincipeIsland"], rframe] - d相关指南
-
▪
- 天文计算与数据
文本
Wolfram Research (2022),AstroDistance,Wolfram 语言函数,https://reference.wolfram.com/language/ref/AstroDistance.html.
CMS
Wolfram 语言. 2022. "AstroDistance." Wolfram 语言与系统参考资料中心. Wolfram Research. https://reference.wolfram.com/language/ref/AstroDistance.html.
APA
Wolfram 语言. (2022). AstroDistance. Wolfram 语言与系统参考资料中心. 追溯自 https://reference.wolfram.com/language/ref/AstroDistance.html 年
BibTeX
@misc{reference.wolfram_2026_astrodistance, author="Wolfram Research", title="{AstroDistance}", year="2022", howpublished="\url{https://reference.wolfram.com/language/ref/AstroDistance.html}", note=[Accessed: 11-August-2026]}
BibLaTeX
@online{reference.wolfram_2026_astrodistance, organization={Wolfram Research}, title={AstroDistance}, year={2022}, url={https://reference.wolfram.com/language/ref/AstroDistance.html}, note=[Accessed: 11-August-2026]}