Skip to content

太陽・月の軌道を空の色と同じ日の出・日の入りで動かす - #78

Merged
HR0101 merged 1 commit into
mainfrom
fix/issue-63-celestial-orbit-season
Oct 15, 2026
Merged

HR0101 merged 1 commit into
mainfrom
fix/issue-63-celestial-orbit-season

Conversation

@HR0101

@HR0101 HR0101 commented Oct 15, 2026

Copy link
Copy Markdown
Owner

概要

太陽・月の軌道を、空の色と同じ季節ごとの日の出・日の入りで動かします。

Closes #63

このPRは #77(#71)の上に積んでいます。

原因

  • 空の色は、季節で伸び縮みさせた時刻(daylightHour)でキーフレームを選んでいました。
  • 太陽・月のcelestialProgressとcelestialAltitudeには季節補正前の時刻が渡され、軌道の起点と終点はsunriseHour = 5.5、sunsetHour = 18.5の固定値でした。

その結果、冬の17:45は空が夕焼けから夜へ移る色なのに太陽が空の中ほどにあり、夏の19:00は太陽が沈んでいるのに空が明るいままでした。

変更内容

  • 日の出・日の入りを持つDaylightScheduleを追加しました。軌道の計算(水平位置・高さ)もここへ移しています。

  • SkyPalette.daylight(for:)は、空の色の伸び縮み(正午を中心にdaylightScale倍)を逆にたどり、キーフレーム上の日の出5:30・日の入り18:30が実際に何時になるかを求めます。

    季節 日の出 日の入り
    夏 4:47 19:13
    春・秋 5:30 18:30
    冬 6:15 17:45
  • 配色にdaylightを持たせ、太陽・月の軌道と空の色が同じ値を使うようにしました。

  • 日の出・日の入りの時刻そのものを日付から求め、南中時刻を中心にする対応は bug: 季節による昼の長さの差が小さく、冬の夕暮れと夏の夜明けが実際より遅い #64 で行います。このPRでは、空と天体のずれをなくすことに絞りました。

確認

  • celestialOrbitSharesTheSeasonalDaylightWithTheSkyを追加
    • どの季節でも日の入りの瞬間の空の暗さが同じで、太陽が地平線上にある
    • 冬の17:45は太陽が地平線まで下がり、夏の19:00は太陽が沈みきっておらず空も昼の配色
  • 実行日の季節によって結果が変わっていたcelestialBodyRisesAtDawnAndPeaksAtNoonを、季節ごとの日の出・南中で確かめる形に変更
  • BusTimeWidgetExtensionを警告をエラーにした設定でビルド
  • python3 Scripts/generate_l10n.py --check

既知の失敗(この変更とは無関係)

weekendKeepsTheNoticeAndStillShowsWeekdayTimesはmainでも失敗しています。

関連

🤖 Generated with Claude Code

https://claude.ai/code/session_01ATcUWKWDs87zwTrKyiKpY4

空の色だけが季節で伸び縮みした時刻を使い、太陽・月の軌道は
日の出5:30・日の入り18:30で固定されていた。冬の夕方は空が夕焼けなのに
太陽がまだ高く、夏の19時台は沈んだ太陽の下で空が明るいままだった。

- 日の出・日の入りを持つ DaylightSchedule を追加し、空の色と天体の軌道が
  同じ値を共有する
- 季節ごとの日の出・日の入りを、空の色の伸び縮みの逆算から求める
- 配色に日の出・日の入りを持たせる

Refs #63

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ATcUWKWDs87zwTrKyiKpY4
@coderabbitai

coderabbitai Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 81e4c271-26a6-4591-8459-c7122271f719
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@HR0101
HR0101 changed the base branch from fix/issue-71-season-japan-time to main October 15, 2026 12:01
@HR0101
HR0101 merged commit d988653 into main Oct 15, 2026
4 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: 太陽・月の軌道が季節に連動せず、日の出5:30・日の入り18:30で固定されている

1 participant