Bots: env reporting, TFIL movement, gun selector and docs refresh
DevControlBot DevControlBot.sh env-file handling and defines, tfil.nim
survival-movement rework, README
ModularBot .env.example, ModularBot.nim, env_report.nim, vbullet_draw.nim
PPO_Bot enemy_tracker.nim
common_libs gun_harness/selector.nim
tests env_report, lead_gain_legacy, rack_membership,
rack_stat_width, tm_pattern_registration adjustments
docs env_reference.md, goto-controller-algorithm.md
This commit is contained in:
@@ -48,8 +48,20 @@ is smooth but limited to 4°/tick at top speed.
|
||||
|
||||
### Coordinate system
|
||||
|
||||
North = 0°, clockwise. `directionTo` in `utils.nim` returns a bearing in
|
||||
`[0, 360)`. `bearingTo` returns a signed relative bearing in `(-180, 180]`.
|
||||
East = 0°, North = 90°, positive angles increase counter-clockwise (Y increases
|
||||
upward, so the arena's bottom edge is Y = 0). `directionTo` in `utils.nim`
|
||||
returns a bearing in `[0, 360)`. `bearingTo` returns a signed relative bearing in
|
||||
`(-180, 180]`.
|
||||
|
||||
> **Note — the SDK's own doc comments are wrong here.** `bot.nim:183/187/191`,
|
||||
> `utils.nim:68` and the examples at `utils.nim:159-161` and `~197` all claim
|
||||
> "0 = North, 90 = East". The **implementation is authoritative**, not the
|
||||
> comments: `utils.nim:162` computes
|
||||
> `normalizeAbsoluteAngle(180.0 * arctan2(toY - fromY, toX - fromX) / PI)`, i.e.
|
||||
> plain `arctan2(dy, dx)`, and `bot.nim:178` puts the arena's bottom edge at
|
||||
> `Y = 0`. Running the SDK's own `directionTo` (robocode_tankroyale_botapi
|
||||
> 1.0.7) returns `0.0` for East and `90.0` for North, and `bearingTo` agrees.
|
||||
> Do not "fix" this section back to the commented convention.
|
||||
|
||||
---
|
||||
|
||||
|
||||
Reference in New Issue
Block a user