-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
小田急PI互換機能追加 #101
小田急PI互換機能追加 #101
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -84,6 +84,11 @@ namespace autopilot { | |
case 255: // TASC 目標停止位置設定 | ||
停止位置を追加(static_cast<m>(地上子.Optional), 状態); | ||
break; | ||
case 200: // TASC 目標停止位置設定(追加:小田急PIのATO互換) | ||
if (状態.互換モード() == 互換モード型::メトロ総合 || 状態.互換モード() == 互換モード型::小田急PI) { | ||
Comment on lines
+87
to
+88
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 一見、やっていることが互換モードの名前と合ってないような気がして「ん?」と思いましたが、以下のような使い分けを意図しているという理解で良いでしょうか。
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. その通りになります。元々、D-ATS-Pの地上子というよりは小田急PI全般の地上子なので、「小田急PIのCS-ATC路線」を見越した仕様ということになります。 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ですよね。 後で enum の名前を変えさせてもらうかもしれません。 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 他も「メトロ総合」や「swp2」のような書き方だったので、それに揃えてこのようにしたのですが、こだわりがあるわけではないです。 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 本当に となると、やはり |
||
停止位置を追加(static_cast<m>(地上子.Optional / 10), 状態); | ||
} | ||
break; | ||
case 1031: // TASC 停止位置許容誤差設定 | ||
最大許容誤差を設定(static_cast<cm>(地上子.Optional)); | ||
break; | ||
|
@@ -102,6 +107,14 @@ namespace autopilot { | |
|
||
switch (地上子.Type) | ||
{ | ||
case 21: | ||
//case 22:(小田急PIのATSと干渉するため暫定コメントアウト) | ||
case 23:// TASC 目標停止位置設定(追加:メトロ対応TASC互換) | ||
if (状態.互換モード() == 互換モード型::メトロ総合) { | ||
Comment on lines
+110
to
+113
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 21~23番地上子での停止位置設定ってどのプラグインで使われている仕様ですか? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. こちらは10年前に公開されていたメトロATO/TASCプラグインで使われていた仕様になります。 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ありがとうございます! 参考になります。 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. いただいた資料を見たところ、以下の記述が気になっています。
こちらのプラグインでは列車種別の切り替えを車両プラグイン側で行う想定のようです。 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. いろいろ考えましたが、以下のようにしたいと思います。
判断の理由としては
私の方でコードを整理してからマージしようと思うのでもうしばらくお待ちください。 |
||
次駅停止位置を設定( | ||
static_cast<m>(地上子.Optional % 1000), 直前位置, 状態); | ||
} | ||
break; | ||
case 30: // TASC 目標停止位置設定 | ||
if (状態.互換モード() == 互換モード型::汎用ats) { | ||
次駅停止位置を設定( | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,6 +39,7 @@ namespace autopilot { | |
汎用ats, | ||
メトロ総合, | ||
swp2, | ||
小田急PI, | ||
}; | ||
|
||
class 共通状態 | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
この
4.0_kmph
や5.0_kmph
は何か意図がありましたか?(自分の印象だと小田急は割と制限ギリギリまで出す運転士が多いイメージがありますが)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
D-ATS-Pの速度照査は、JR系のATSと異なり、制限速度ぴったりで行われます(あくまでプラグイン上の話です)。そのため、いくらかはマージンを入れておく必要があると思い、設定しましたが、おっしゃる通りこれでは緩く、ダイヤについていけないので、マージンはもう少し小さくてもよいかもしれません。ただ、多かれ少なかれ設定する必要はあると思います。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
もともと全ての速度制御に 0.5 km/h のマージンを入れているので、ここでさらにマージンを足すとしても 0.5~1 km/h 程度で良さそうな気がしますね。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
手元で小田急PIとbve-autopilot両方積んだ車両でちょっと実験しましたがここはマージン 0 でもいけそうな感触です