five-on-it / packages/ai/src/steer-vehicle / CAR
Variable: CAR
constCAR:object
Defined in: packages/ai/src/steer-vehicle.ts:30
The numbers of driving.
Type Declaration
arrive
readonlyarrive:4=4
Within this distance of the route's last point the drive is over (m).
boostAlignment
readonlyboostAlignment:0.1=0.1
Boost only when the bearing error is under this (rad) and more than this share of the top speed is wanted.
boostShare
readonlyboostShare:0.9=0.9
brakeAccel
readonlybrakeAccel:12=12
Braking the speed plan counts on (m/s²; the brakes have more).
bumperRange
readonlybumperRange:2.5=2.5
A wall this near the bumper counts as stalled thrice as fast (m).
cornerChord
readonlycornerChord:8=8
The chord a corner is taken on, for its speed (m).
cornerLookahead
readonlycornerLookahead:80=80
Route ahead examined for corners (m).
cornerMin
readonlycornerMin:0.15=0.15
A bend of less than this is no corner (rad).
directRange
readonlydirectRange:60=60
A clear straight line up to this long is driven as it is (m).
episodesToLeave
readonlyepisodesToLeave:3=3
…and this many make a car not worth staying in.
episodeWindow
readonlyepisodeWindow:600=600
Recoveries this close together add up (ticks)…
goalRoadReach
readonlygoalRoadReach:8=8
…and its goal (farther off the road, the last leg would cross too much).
handbrakeAngle
readonlyhandbrakeAngle:0.7=0.7
The handbrake comes on in bends sharper than this (rad) above this speed (m/s).
handbrakeSpeed
readonlyhandbrakeSpeed:12=12
lateralAccel
readonlylateralAccel:7=7
Lateral acceleration allowed in a bend (m/s²).
lookaheadMax
readonlylookaheadMax:30=30
…nor farther (m).
lookaheadMin
readonlylookaheadMin:6=6
…but never nearer than this (m)…
lookaheadShare
readonlylookaheadShare:0.6=0.6
The pursuit point sits this share of the speed ahead (m per m/s)…
ramAlignment
readonlyramAlignment:0.5=0.5
ramBackTicks
readonlyramBackTicks:75=75
ramContact
readonlyramContact:0.6=0.6
A ram is one blow: once the bumper is this near the target car's body (m) the driver backs off for so many ticks before it lines up again, so it never pins a car and pushes it along the road.
ramRange
readonlyramRange:12=12
The ram: within this distance (m), above this speed (m/s), within this bearing error (rad).
ramSpeed
readonlyramSpeed:8=8
rerouteDrift
readonlyrerouteDrift:8=8
A goal that moved this far from the planned one asks for a new route at once (m).
reverseTicks
readonlyreverseTicks:60=60
Ticks of reversing per recovery.
roadDetour
readonlyroadDetour:2=2
A road route longer than this share of the straight distance, plus this slack (m), is left for the grid.
roadDetourSlack
readonlyroadDetourSlack:30=30
roadReach
readonlyroadReach:14=14
How far from a road the car may be for the route to follow the roads (m)…
stallSpeed
readonlystallSpeed:0.6=0.6
Slower than this while asking for speed is stalled (m/s), after this many ticks.
stallTicks
readonlystallTicks:45=45
tailGain
readonlytailGain:0.8=0.8
The gap behind a target closes at this share of the error per second.
throttleGain
readonlythrottleGain:3=3
The speed error one full throttle answers (m/s).
turnAroundAngle
readonlyturnAroundAngle:2.1=2.1
Beyond this bearing error, with the goal this near and the car this slow, it backs round (rad, m, m/s).
turnAroundRange
readonlyturnAroundRange:18=18
turnAroundSpeed
readonlyturnAroundSpeed:3=3
turnAroundTicks
readonlyturnAroundTicks:45=45
Ticks of one backing turn.
uTurnPenalty
readonlyuTurnPenalty:30=30
What a U-turn onto the opposite lane costs against driving on (m).