Визуализация расположения планет
Смешанные величины присутствуют во многих контекстах: деньги, время, расстояние, вес, углы и т.д.
In[1]:=
![Click for copyable input](assets.ru/visualize-the-location-of-planets/In_36.png)
Quantity[MixedMagnitude[{2, 35, 21.2}],
MixedUnit[{"Hours", "Minutes", "Seconds"}]]
Out[1]=
![](assets.ru/visualize-the-location-of-planets/O_34.png)
In[2]:=
![Click for copyable input](assets.ru/visualize-the-location-of-planets/In_37.png)
UnitConvert[Quantity[75.562, "AngularDegrees"],
MixedUnit[{"AngularDegrees", "ArcMinutes", "ArcSeconds"}]]
Out[2]=
![](assets.ru/visualize-the-location-of-planets/O_35.png)
In[3]:=
![Click for copyable input](assets.ru/visualize-the-location-of-planets/In_38.png)
Quantity[MixedMagnitude[{5, 11}], MixedUnit[{"Feet", "Inches"}]]
Out[3]=
![](assets.ru/visualize-the-location-of-planets/O_36.png)
In[4]:=
![Click for copyable input](assets.ru/visualize-the-location-of-planets/In_39.png)
Quantity[MixedMagnitude[{5, 11}], MixedUnit[{"Feet", "Inches"}]];
% + Quantity[2.5, "Feet"]
Out[4]=
![](assets.ru/visualize-the-location-of-planets/O_37.png)
Функция SiderealTime рассчитывает смешанные величины. В качестве иллюстрации, найдем текущее звёздное время в в заданноой местности.
In[5]:=
![Click for copyable input](assets.ru/visualize-the-location-of-planets/In_40.png)
stime = SiderealTime[]
Out[5]=
![](assets.ru/visualize-the-location-of-planets/O_38.png)
Получите текущее положение Солнца в экваториальных координатах.
In[6]:=
![Click for copyable input](assets.ru/visualize-the-location-of-planets/In_41.png)
sunpos = SunPosition[CelestialSystem -> "Equatorial"]
Out[6]=
![](assets.ru/visualize-the-location-of-planets/O_39.png)
Рассчитайте позицию Луны в этой же системе координат.
In[7]:=
![Click for copyable input](assets.ru/visualize-the-location-of-planets/In_42.png)
moonpos = MoonPosition[CelestialSystem -> "Equatorial"]
Out[7]=
![](assets.ru/visualize-the-location-of-planets/O_40.png)
Найдите координаты прямого восхождения планет.
In[8]:=
![Click for copyable input](assets.ru/visualize-the-location-of-planets/In_43.png)
planetpos =
QuantityMagnitude[
DeleteMissing[
EntityValue[EntityClass["Planet", All],
EntityProperty["Planet", "RightAscension"]]],
"HoursOfRightAscension"]
Out[8]=
![](assets.ru/visualize-the-location-of-planets/O_41.png)
Объедините различные измерения положений в список прямых восхождений для каждого небесного тела.
In[9]:=
![Click for copyable input](assets.ru/visualize-the-location-of-planets/In_44.png)
ascensions = Join[ {0, moonpos[[1, 1]] - sunpos[[1, 1]]}, planetpos];
код на языке Wolfram Language целиком
Создайте графический вид положения планет, Солнца и Луны, обозримый с южного полюса.
код на языке Wolfram Language целиком
Out[11]=
![](assets.ru/visualize-the-location-of-planets/O_42.png)