Wolfram 语言

地理计算

火星救援

计算、显示并测量《火星救援》一书中马克·沃特尼(Mark Watney)从区域 3 栖息舱(HAB)到区域 4 火星探测车(MAV)之间行走路径估计值.

该范例中的所有位置都参照火星上的位置. 这可以用 GeoPosition 具体指定或之后从 GeoModel 选项中选取.

以下为区域 3 和 4 的着陆点位置估计.

In[1]:=
Click for copyable input
ares3 = GeoPosition[{31.2, -28.5}, "Mars"]; ares4 = GeoPosition[{-4.32, 15.28}, "Mars"];

由此得出了,马克的火星旅行的第一个近似.

In[2]:=
Click for copyable input
GeoGraphics[{Orange, Thick, Arrow@GeoPath[{ares3, ares4}]}, GeoRange -> All, GeoProjection -> "Orthographic", Background -> Black]
Out[2]=

从区域 3 栖息舱,马克跟随水流冲出的山谷移动到了火星谷地.

In[3]:=
Click for copyable input
mawrthVallis = GeoPosition[CompressedData[" 1:eJxTTMoPSmViYGCQAGIQLd/6OnCHnJXDN42Y/kOlxgdsua4vLvhr6QAkbbnE jQ8wgMABS4d17g+rRNYZHZg1EwgiLaHqjQ5wgRVaOhz+ChRwMoKqt3BYAhS9 rmx0AKTLPdHCoRBksIHRgf5DQIX8Fg4iIANDjA5oAo35usLcAaLO6EDQDjmg ixD8s2eAgMccrj4NBJ6Zwc0DK99h5vAmEMQyPACmV5s5gN3RYAixf6GZA8Re wwNgdzbB5A0OGINAsZkDxB8GEPf5m0H8H64P9Z8ZxH+H9CDqN5tC/at3AOIu U0h4fNWF2Kdo6uABYhzXhaj/bAL1jy5E/RUTB3A4ztQ5AAD2PaQO "]];
In[4]:=
Click for copyable input
GeoGraphics[{Thick, Orange, Arrow@GeoPath[mawrthVallis]}, GeoModel -> "Mars", GeoRangePadding -> Quantity[100, "Miles"]]
Out[4]=

然后马克从 Trouvelot 和 Rutherford 陨石坑之间走过.

In[5]:=
Click for copyable input
GeoPosition /@ {Entity["SolarSystemFeature", "TrouvelotMars"], Entity["SolarSystemFeature", "RutherfordMars"]}
Out[5]=
In[6]:=
Click for copyable input
rtCraters = GeoPosition[{17.52, -11.91}, "Mars"];

随后向 Marth 陨石坑放方向前进.

In[7]:=
Click for copyable input
marthCrater = GeoPosition[Entity["SolarSystemFeature", "MarthMars"]]
Out[7]=

从那里他向南继续前进了 540 公里.

In[8]:=
Click for copyable input
pos540S = GeoDestination[marthCrater, GeoDisplacement[{Quantity[540, "Kilometers"], "South"}]]
Out[8]=

最后,他来到了 Schiaparelli 陨石坑附近.

In[9]:=
Click for copyable input
schiaparelliCrater = GeoPosition[{-0.16, 14.38}, "Mars"]
Out[9]=
In[10]:=
Click for copyable input
geopath = GeoPath[{{ares3, mawrthVallis[[1, 1]]}, mawrthVallis, {mawrthVallis[[1, -1]], rtCraters, marthCrater, pos540S, schiaparelliCrater, ares4}}];

该地理路径沿火星表面的长度.

In[11]:=
Click for copyable input
GeoLength[geopath, GeoModel -> "Mars"]
Out[11]=

最后,添加书中提到的几个地名和标签.

In[12]:=
Click for copyable input
labeled[pos_, label_, offset_: {Left, Bottom}] := {Point[pos], Text[Style[label, Directive[12, Italic, White]], pos, offset]}
In[13]:=
Click for copyable input
points = labeled @@@ Join[EntityValue[{Entity["SolarSystemFeature", "ArabiaTerraMars"], Entity["DeepSpaceProbe", "MarsPathfinder"], Entity["DeepSpaceProbe", "MERDashBOpportunityRover"], Entity["SolarSystemFeature", "TerraMeridianiMars"], Entity["SolarSystemFeature", "RutherfordMars"], Entity["SolarSystemFeature", "BecquerelMars"], Entity["SolarSystemFeature", "TrouvelotMars"], Entity["SolarSystemFeature", "MarthMars"]}, {"Position", "Name"}], { {ares3, "Ares 3 HAB"}, {ares4, "Ares 4 MAV", {Right, Bottom}}}];

这里便得出了该路程的最终地图.

In[14]:=
Click for copyable input
GeoGraphics[{Orange, Thick, geopath, PointSize[Large], points}, GeoModel -> "Mars"]
Out[14]=

相关范例

de en es fr ja ko pt-br ru