從阿提米絲 2 號觀看月球

by Jeffrey Bryant
現在,阿提米絲 2 號已發射成功,並已離開地球軌道前往月球,新的目標是繞月飛行。我在先前的一篇文章中介紹了預期的軌道軌跡(https://community.wolfram.com/groups/-/m/t/3672762))。 現在我想討論當機組人員接近月球,然後返回家園時會看到什麼。
如同先前一樣,我們需要向噴氣推進實驗室(JPL Horizons)查詢此任務的最新軌跡資料。首先需要定義日期/時間範圍,在此情況下,是 JPL 提供之資料的邊界以及 10 分鐘的取樣增量:
In[]:=
date0=
Thu 2 Apr 2026 01:58:00GMT
;​​date1=
Fri 10 Apr 2026 23:50:00GMT
;​​dt=
10
min
;
現在可以查詢 JPL Horizons:
In[]:=
horizonsEarth=
[◼]
HorizonsEphemerisData
"State","@-1024",<|"Frame"->"EclipticJ2000","Center"->
Earth
PLANET
,"Dates"->{date0,date1,dt}|>,"Position","Dataset";
接著,可以從查詢得到的資料建構 TimeSeries:
In[]:=
artemisEarthTS=TimeSeries@QuantityMagnitude[Normal@horizonsEarth,"AstronomicalUnit"];
接下來會使用以地球中心為原點的 "EclipticICRS" 參考框架(與 NASA 的 “EclipticJ2000“ 相同)建立一些方便的函數,以取得最終場景中各種元素的位置:
In[]:=
artemisPos[d_]:=Values[artemisEarthTS[d]]​​moonPos[d_]:=AstroPosition
Moon
PLANETARY MOON
,"EclipticICRS",d,
Earth
PLANET
,"Cartesian"["Data"]​​earthPos[d_]:={0,0,0};​​sunPos[d_]:=AstroPosition
Sun
STAR
,"EclipticICRS",d,
Earth
PLANET
,"Cartesian"["Data"]
如前所述,這裏用了一些未記錄的函數來取得 3D 元素隨時間變化的正確旋轉。"EclipticICRS" 參考架構與時間無關,因此不需要為它指定日期:
In[]:=
moonRot[d_]:=Astronomy`AstroOrientationMatrix[{"IAU_MOON",d},"EclipticICRS"]​​earthRot[d_]:=Astronomy`AstroOrientationMatrix[{"ITRS",d},"EclipticICRS"]
需要這些物體的實際尺寸:
In[]:=
moonRad=QuantityMagnitude
Moon
PLANETARY MOON
["EquatorialRadius"],"AstronomicalUnit";​​earthRad=QuantityMagnitude
Earth
PLANET
["EquatorialRadius"],"AstronomicalUnit";​​sunRad=QuantityMagnitude
Sun
STAR
["EquatorialRadius"],"AstronomicalUnit";
太陽系天體需要紋理與樣式:
In[]:=
moon0={Texture[GeoImage[GeoModel->"Moon",GeoCenter->-90,GeoProjection->"Equirectangular",GeoZoomLevel->2]],Sphere[]};​​earth0=
Earth
PLANET
["TexturedSurface"][[1]];​​sun0={ColorData["BlackBodySpectrum"][5770],Sphere[]};
接著,我們將每個太陽系天體旋轉、縮放並平移到其適當的位置:
In[]:=
moon[d_]:=Translate[Scale[GeometricTransformation[moon0,moonRot[d]],moonRad,{0,0,0}],moonPos[d]]​​earth[d_]:=Scale[GeometricTransformation[earth0,earthRot[d]],earthRad,{0,0,0}]​​sun[d_]:=Translate[Scale[sun0,sunRad,{0,0,0}],sunPos[d]]
日期戳記的一些樣式設定也很有用:
In[]:=
label[d_]:=Style[DateString[d,{"DayShort"," ","MonthNameShort"," ","Year"," ","Hour24",":","Minute",":","Second"," ","GMT"}],GrayLevel[.75],Bold,22]
為了讓事情更有趣,當視野接近月球時,在那附近把「時鐘放慢」會很有用,如此便能更仔細地觀察細節。為此,距離月球較遠時,日期範圍會以 1 分鐘為增量進行取樣;但接近月球時,則會以 1 秒為增量進行取樣。
In[]:=
movingAverage[dates_List,n_Integer]:=Mean/@Partition[dates,n,1];
In[]:=
IntervalSampling[intsamps_List]:=With[{all=Union@@Map[IntervalSampling,intsamps]},{n=Round[Length[all]/100,2]},{res=movingAverage[all,n+1]},Union[Take[all,n/2],res,Take[all,-n/2]]];
In[]:=
IntervalSampling[Rule[{tmin_,tmax_},dt_]]:=Range[tmin,tmax,dt]
In[]:=
dates=IntervalSampling
Thu 2 Apr 2026 01:58:00GMT
,
Fri 10 Apr 2026 23:50:00GMT
->
1
min
,
Mon 6 Apr 2026 22:37:00GMT
,
Tue 7 Apr 2026 02:09:00GMT
->
1
s
;
最後,可將場景組裝起來。此處的關鍵函數是使用 ViewVector 選項。這可讓相機放置在太空船的位置,並將目標指向月球。其結果是模擬阿提米絲 2 號機組人員在整個任務期間如果看向月球時,會看到的視圖。
In[]:=
crewViewFrames=Graphics3D​​{AmbientLight[GrayLevel[.2]],​​{Specularity[White,1],PointLight[White,sunPos[#]],AmbientLight[GrayLevel[.2]],moon[#],earth[#]},​​{DirectionalLight[White,ImageScaled[{0,0,1}]],sun[#]}​​},​​
​​&/@dates;
In[]:=
crewViewVideo=SlideShowVideo[crewViewFrames,DefaultDuration->45,RasterSize->{720,720}]
Out[]=
CloudObject[
https://www.wolframcloud.com/obj/jeffb/Video/Video-2026-04-03T11-31-41-337.m
p4
]

重新檢視前面的軌域視圖

這裏主要是我上一篇貼文內容的縮寫版本,並做了程式碼變更以使其與這篇新文章保持一致。如果想將兩段影片結合起來,讓其彼此同步,重新建構這個內容會很有幫助。
In[]:=
datesFromData=Keys[Normal[horizonsEarth]];
In[]:=
xyzArtemisEarth=QuantityMagnitude[Values/@Values@Normal[horizonsEarth[[All,{"X","Y","Z"}]]],"AstronomicalUnit"];
In[]:=
artemisEarthTimeSeries=TimeSeries[Transpose[{datesFromData,xyzArtemisEarth}]]
Out[]=
TimeSeries
Time: Thu 2 Apr 2026 01:57:59 to Fri 10 Apr 2026 23:47:59 GMT+00:00
Length: 1284
Duration:
8
days
21
h
50
min
0
s
0.012
ms

In[]:=
artemisDataFromEarth[d_]:={StandardRed,AbsolutePointSize[10],Point[artemisEarthTimeSeries[d]],Opacity[.75],AbsoluteThickness[2],Line[xyzArtemisEarth]}
In[]:=
moonPath=LineAstroPosition
Moon
PLANETARY MOON
,"EclipticICRS",#,
Earth
PLANET
,"Cartesian"["Data"]&/@datesFromData;
In[]:=
moonDataFromEarth[d_]:=White,SphereAstroPosition
Moon
PLANETARY MOON
,"EclipticICRS",d,
Earth
PLANET
,"Cartesian"["Data"],moonRad,Opacity[.5],AbsoluteThickness[2],moonPath
flybyDate=
Minute: Mon 6 Apr 2026 22:00GMT
;
In[]:=
moonFlybyPos=AstroPosition
Moon
PLANETARY MOON
,"EclipticICRS",flybyDate,
Earth
PLANET
,"Cartesian"["Data"];
In[]:=
optionsFromEarth={ImageSize->{720,720},SphericalRegion->Sphere[moonFlybyPos/2,0.00054],ViewAngle->Pi/20,Boxed->False,ViewPoint->{-1.38,-3,.5},Background->Black};
In[]:=
orbitViewFrames=Graphics3D[​​{​​{White,Translate[Scale[Sphere[],moonRad,{0,0,0}],moonPos[#]],Opacity[.5],AbsoluteThickness[2],moonPath},​​earth[#],​​{StandardRed,AbsolutePointSize[10],Point[artemisEarthTimeSeries[#]],Opacity[.75],AbsoluteThickness[2],Line[xyzArtemisEarth]}​​},​​optionsFromEarth​​]&/@dates;
將這些影片組合起來,大多是留給讀者當作練習,但像 GridVideo 這樣的函數可以是將它們以簡單方式組合起來的容易方法。

引用此筆記本

從阿提米絲 2 號觀看月球​
作者:Jeffrey Bryant​
Wolfram 社群,精選推薦,2026 年 4 月 3 日
​https://community.wolfram.com/groups/-/m/t/3673962