天球上の巡回セールス問題やメシエマラソンについて書いたのだけど、sphere_tsp.pyというファイル単体でGitHubに放流しており、使うにはちょっと敷居が高いので、これもbrewパッケージにしました。使ってるモジュールが重いので、インストールと初回の起動はちょっと遅いかも。
brew tap rioriost/celestsp
brew install celestsp
使い方は同じ。
celestsp --lat 34.863 --lon 138.843 --height 1000 --date 2025-03-22 --time 18:30:00 --tz +9 sources/m_0322_1830.txt
結果がズラズラーっと表示されて、画像が出力されます。
Location: Lat: 34.863, Lon: 138.843, 1000.0m
Observation Date/Time: 2025-03-22 18:30:00 +9
Optimal Order of Celestial Bodies:
Name: M39, RA: 322.89, Dec:48.25, Altitude:1.12, Azimuth:333.80, Times to set:0.22 Observable: True
Name: M52, RA: 351.19, Dec:61.59, Altitude:21.74, Azimuth:331.37, Times to set:inf Observable: True
Name: M103, RA: 23.34, Dec:60.66, Altitude:35.73, Azimuth:324.02, Times to set:inf Observable: True
Name: M76, RA: 25.58, Dec:51.58, Altitude:35.16, Azimuth:312.79, Times to set:5.09 Observable: True
......
Name: M81, RA: 148.89, Dec:69.07, Altitude:46.97, Azimuth:23.00, Times to set:inf Observable: True
Name: M34, RA: 40.53, Dec:42.72, Altitude:43.19, Azimuth:298.84, Times to set:4.64 Observable: True
Plot saved as results_20250216_223009.png
