Skip to content

特急ひたち品川→仙台の位置情報シミュレーション用GPXを追加 - #7168

Merged
TinyKitten merged 2 commits into
devfrom
feature/gpx-hitachi
Oct 4, 2026
Merged

TinyKitten merged 2 commits into
devfrom
feature/gpx-hitachi

Conversation

@TinyKitten

@TinyKitten TinyKitten commented Oct 4, 2026 •

Copy link
Copy Markdown
Member

概要

特急ひたち(品川→仙台)を走る GPX を assets/gpx/ に追加します。通過駅が長く続く在来線特急で、到着判定と通過判定を確かめるためのサンプルです。

変更の種類

  • バグ修正
  • 新機能
  • リファクタリング
  • ドキュメント
  • CI/CD
  • その他

変更内容

  • assets/gpx/HitachiShinagawaSendai.gpx を追加しました。
    • 次のコマンドで生成しました: npm run gpx:generate -- --line-group 116 --api https://gql-stg.trainlcd.app/ --out assets/gpx/HitachiShinagawaSendai.gpx
    • 停車データの更新(常磐線の特急ひたち・ときわの停車駅を現行ダイヤに合わせて一部通過・一部停車へ更新 StationAPI#1717)を反映した stg の API から生成しています。この更新は 常磐線の特急ひたち・ときわの停車駅の更新を本番へ反映 StationAPI#1718 で本番へ反映される予定です。
    • 東海道線・上野東京ライン・常磐快速線・常磐線の4路線を直通します。経路は94駅で、そのうち30駅に停車します。
    • 区間の時間は到着時間推定に合わせています。全体で約307分、18394点です。巡航速度は推定から決まり、最高でも 82km/h です。
    • 停車駅は StationAPI の stopCondition に従います。一部停車(PartialStop)と一部通過(Partial)の9駅は、どちらも停車として扱います。アプリの src/utils/isPass.ts と同じ規則です。そのため、実在するどの1本の停車パターンとも一致しません。
  • docs/location-simulation.md の同梱 GPX の一覧に追記し、説明の段落を加えました。

回帰リスクと対策

  • アプリのコードは変えていません。GPX は開発用のファイルで、アプリのコードから require() されません。
  • location.gpxEtaAssist.test.ts は、精度を持たない全 GPX を自動で読み込みます。このファイルも対象になります。
    • ローカルでは、このファイルの分だけ約18秒延びました。
    • 「ETA 補助の有効・無効で走行結果が一致する」テストは、このファイルでも通りました。
  • ファイルは約1.5MBで、同梱の GPX の中で最も大きくなります。

テスト

  • npm run lint が通ること

  • npm test が通ること

  • npm run typecheck が通ること

  • 最初のコミット(f5a324a)で npm test を実行し、322スイート・3597件がすべて通りました。

  • GPX を作り直したコミット(fc16610)では、npm run lint と GPX を読み込むテスト3スイート(location.gpxEtaAssist / location.subwayGpx / location.gpxLag、23件)を実行し、すべて通りました。このコミットの変更は GPX とドキュメントだけです。

関連Issue

Refs TrainLCD/StationAPI#1717

スクリーンショット(任意)

UI 変更なし: 開発用の GPX とドキュメントの追加のみで、アプリの画面には影響しません。

🤖 Generated with Claude Code

https://claude.ai/code/session_018re65BxiKdD6mx2tVpcezp

Summary by CodeRabbit

  • ドキュメント
    • 同梱GPXの一覧に、到着時間の推定に合わせて走行する特急ひたちの品川〜仙台間のサンプルを追加しました。
    • サンプルの説明に、路線数、駅数、停車駅数、所要時間、点数、巡航速度の上限を記載しました。
    • PartialStop と Partial も停車として扱うため、実在する単一列車の停車パターンとは一致しないことを明記しました。

@TinyKitten TinyKitten self-assigned this Oct 4, 2026
@coderabbitai

coderabbitai Bot commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Essentials
  • Run ID: d99689be-e7cf-4e09-b5f7-3442f9977b8f
📥 Commits

Reviewing files that changed from the base of the PR and between f5a324a and fc16610.

📒 Files selected for processing (2)
  • assets/gpx/HitachiShinagawaSendai.gpx
  • docs/location-simulation.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • docs/location-simulation.md

Included review availability: This review used your included allowance. 2 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 4 reviews per hour.


📝 Walkthrough

Walkthrough

位置シミュレーションのドキュメントに、特急ひたち品川発仙台行きのGPXサンプルを追加しました。経路情報と、停車駅の判定に関する説明を記載しました。

Changes

特急ひたちのGPXサンプル

Layer / File(s) Summary
サンプル一覧と経路情報
docs/location-simulation.md
同梱GPX一覧にサンプルを追加しました。--line-group 116 で生成した4路線直通の経路について、94駅中30駅に停車し、所要時間が約307分、点数が18,394点、最高巡航速度が82km/hと記載しました。PartialStop と Partial を停車扱いするため、記載の停車パターンは実在する単一列車の停車パターンとは一致しないことも説明しました。

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~3 minutes

Change: Other

Merge Risk: ⚪ Minimal · up to fc166

No actionable mismatch was found in the new location-simulation sample. It is ready to merge after normal checks.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed 特急ひたちの品川→仙台間の位置情報シミュレーション用GPXを追加する変更を、具体的かつ簡潔に示しています。
Description check ✅ Passed 概要、変更の種類、変更内容、テスト、関連Issue、スクリーンショットの各項目を記載しています。変更内容とテスト結果も具体的です。
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

うさぎはGPXをそっと見て
品川から仙台まで線を追う
駅の数や時間を記し
停車の条件も書き添える
新しい案内がここに増えた
月明かりの下、耳を揺らす

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

@TinyKitten
TinyKitten merged commit fdc1890 into dev Oct 4, 2026
4 checks passed
@TinyKitten
TinyKitten deleted the feature/gpx-hitachi branch October 4, 2026 15:17
This was referenced Oct 4, 2026
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.

2 participants