Skip to content
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

低速時に車両が移動しなくなる #24

Closed
Siro256 opened this issue Jun 30, 2023 · 2 comments
Closed

低速時に車両が移動しなくなる #24

Siro256 opened this issue Jun 30, 2023 · 2 comments

Comments

@Siro256
Copy link
Member

Siro256 commented Jun 30, 2023

Related issue: fixrtm#473, Kai-Z-JP/KaizPatchX#248

2km/h付近で車両の移動が止まってしまう問題が存在する。

-- ここから検証情報

結論: 座標計算時RailMap#getRailPosに渡している分割数が足りない

現行の処理ではレール1mあたり32分割した座標をもとに計算しており(RailMap#getNearlestPointによる、typoではない)、
1tickあたりの移動距離がこれ(1/32m)を下回ると車両が停止する。
1tickあたり1/32ブロックを移動するときの時速は(1/32)*20*3.6=2.25[km/h]であり、これまでに経験している
約2km/hで車両が停止するという問題と整合性が取れる。

@Siro256
Copy link
Member Author

Siro256 commented Jun 30, 2023

低速で止まることはなくなったが速度が出なくなっている

@Siro256 Siro256 reopened this Jun 30, 2023
@Siro256
Copy link
Member Author

Siro256 commented Jun 30, 2023

6c26817#diff-8c9b564358eac2909f8354280c1a247602d8932b18d7aaedc22e1cd9a62177acR33-R34
(abs(speed) + 0.25F) * SPLITS_PER_METERとするべきところ、外側の括弧が抜けている

@waya0125 waya0125 added type/bug 意図しない動作をしています and removed type/bug 意図しない動作をしています labels Jun 30, 2023
anatawa12 added a commit to anatawa12/Kotatsu-fixRTM that referenced this issue Jul 14, 2023
anatawa12 added a commit to anatawa12/Kotatsu-fixRTM that referenced this issue Jul 14, 2023
Kai-Z-JP added a commit to Kai-Z-JP/KaizPatchX that referenced this issue Dec 4, 2023
port from Kotatsu-RTM/fixRTM#24

Co-authored-by: Siro256 <siro@siro256.dev>
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

No branches or pull requests

2 participants