Space Engineers

Space Engineers

801 ratings
DAS - Driver Assisting System
9
5
14
7
3
2
2
2
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
99.970 KB
24 Jul, 2017 @ 6:50pm
4 Aug, 2019 @ 2:22pm
27 Change Notes ( view )

Subscribe to download
DAS - Driver Assisting System

Description
Description

DAS - Driver Assisting System - is a script focused on making suspension wheels based vehicles more controllable and more reliable. The script continuously processes vehicle speed, heading direction, orientation, altitude, and tweak suspensions, thrusters, and gyroscopes.

DAS subsystems

Traction Control Subsystem
TCS is a core subsystem which takes care of all suspension wheel's settings. This includes wheels on subgrids. TCS coroutines provide these functionalities:
  • Friction balancing. The script will provide maximum friction when a vehicle drives straight, and reduce it on turns. Additionally, the script detects when a vehicle starts to drift and rebalance friction across the wheels in a way that wheels don't bit surface and drift itself became more predictable. On braking, friction rebalances in a way that mutual drag point of all wheels stay behind the CoM (Center Of Masses), so the vehicle would not be turned around 180 degrees.
  • Torque adjusting. The script will ramp up and down torque to provide a smooth drive start. Maximum allowed acceleration could be changed in script settings. Script simulate electronic differential, and when the vehicle steer torque on inner wheels get reduced. The script also relays user control to wheels on subgrids, so pressing W or S wheels also apply propulsion override to these wheels.
  • Strength calculation. The script will calculate and apply the exact amount of strength each wheel needs depending on vehicle mass, local gravity magnitude, wheel size, and wheel position in the vehicle. Also, TCS has it's own Air Shok functionality. The script will boost strength on wheels when the vehicle falls, but then quickly restore original value once fall is over. This way vehicle will not bounce from the ground that much as with vanilla air shocks.
  • Speed limit variety. TCS offers analog control over speed. I.e. joysticks and alike controllers you can drive at any fraction of set speed limit (130 km/h by default). Also by pressing C key script will boost the speed limit to the maximum.
  • Adaptive steering & Ackermann steering. The Script implements Ackermann steering scheme. By this scheme maximum steer angle on each wheel recalculated, so all wheels follow it's own circular arc, and centers of turning of all wheels are in one place, forming one turning axel. By default, this main turning axel passes through the CoM. This could be changed in script settings. Also, TCS reduces steer angle depending on vehicle lateral speed. This reducement is harsher then vanilla one, but it's derived from the centrifugal force occurring from turning, therefore it more robust at preventing roll-overs. Adaptive steering could be turned off in script settings, also it temporarily turns off when pressing Spacebar+W(or S)+A(or D).
  • Hill Descent Control. When HDC is active script will use wheels propulsion override to decelerate if lateral velocity exceeds the speed limit. Could be useful when going own the hills.
  • Half-braking. The script will disengage brakes on rear wheels if pressed Spacebar+W or Spacebar+S.
  • Wheel adding. If suspension lost its wheel script will re-add it automatically.

Gyro Stabilisation & Assisting
GSA takes control over gyroscopes of a vehicle. The orientation of gyroscopes in a vehicle doesn't matter. Following functionality provided by GSA:
  • Aligning to the gravity vector, or surface curve. Surface curve evaluation requires a downward camera(s). In midair fall GSA will slightly tilt vehicle up to preact for landing.
  • Assistance in turns. When A or D key pressed script will apply appropriate turn force in gyros.
  • Auto-turtleflip. In the case of rover flip upside down GSA with use of advanced gyro manipulation algorithm will apply maximum torque to bring the rover upright.

Smart Dampeners Override
SDO will take control over all thrusters that faced forward, backward and sideward. The script will truncate user input to this thrusters, so main propulsion source would be wheels, and thrusters will serve as speed dampeners, and/or speed boosters.
  • For a speed boost and additional acceleration C+W or C+S.
  • Velocity dampening function may be switched on/off as you turn on/off vanilla dampening with Z key.

Fall Dampening System
FDS will take control over upward thrusters. Following functionalities provided by this subsystem:
  • Fall dampening. Its main purpose is to engage these thrusters when vehicle falling by any reason. For more precise altitude evaluation downward camera(s) required.
  • Thrust truncation. When vanilla dampeners are on thrusters will not provide thrust, so the rover will not hover over the ground. Also if jump jets disabled in the script pressing Spacebar will not fire these thrusters.
  • Jump jets. If jump jets enabled in script pressing Space key will engage upward thrusters.

Lights handling
A small cherry on top of a DAS cake. A lot of things controlled by this script, so I decided, why not put a little bit more. The script can handle lights as stoplights and turn lights.

Features

Autopilot
DAS has built-in autopilot system working with suspension wheels. A user can set itinerary waypoints in the Remote Control block, and then toggle DAS autopilot on. Autopilot parameters:
  • Accuracy. This parameter determines how close to waypoint vehicle should be to consider this waypoint is reached.
  • Wait time. Autopilot can wait a given amount of time in each waypoint before driving to the next one. Handbrakes will be engaged while the autopilot is waiting.
  • Drive mode. There are three drive modes: One Way - autopilot will drive from waypoints A to B, C, D... etc, and once the last waypoint reached autopilot will be turned off, and handbrakes will be engaged; Patrol - autopilot will drive from waypoint A to B, C, D..., and once the last waypoint reached autopilot will drive in reverse itinerary, i.e. D, C, B, A, then again revers; Circle - autopilot will drive from waypoint A to B, C, D..., and once the last waypoint reached autopilot will drive to waypoint A, then B, C, D... etc.
The autopilot has its own speed limit, which could be changed at script settings, and when it's active will engage HDC function of TCS.
Important note: the autopilot does not have any collision detection features, and if there is any obstacle on the way to waypoint autopilot will ram it without any hesitation.

Cruise Control
DAS has a built-in Cruise Control system. CC once turned on it will keep lateral velocity and travel direction that was on the moment of engagement. A user can correct velocity and travel direction with WASD and Spacebar keys without disengaging CC.

Automatic handbrakes
Will engage hand brakes when there is no one in the cockpit/control seat. Can be toggled in the script.

Back-up beeper
Remember these heavy lifter cars that making a beeping sound when driving backward? Now you can do it too! Well, not exactly the same way, because the game doesn't have this particular sound, but still you can place a sound block, choose the sound of your taste and script will play this sound when you driving backward.

Standby mode
The script watches for connector blocks state, and if vehicle connected to something via such connector it will suspend all its subroutines. Once disconnected script ill run itself again.
Note though, if you running something like mobile base with connectors designated to carry smaller vehicles then you need to add a 'DAS_IGNORE' keyword to connector's Custom Data, so the script will not halt itself unintentionally.
Popular Discussions View All (28)
121
1
8 Jul @ 6:35am
PINNED: Script setup
Wanderer_308
11
13 Sep, 2024 @ 7:42pm
Suspension strentgth offset
Into
84
13 Sep, 2024 @ 8:16am
Feature/Improvement Suggestions
Rubezagel
1,211 Comments
FantazeR 10 Jul @ 7:24pm 
can this script activate reverse lights?
Wanderer_308  [author] 29 Jun @ 3:21pm 
@john72934, Hi. To disable brakes find and delete this line
if(!BrStMachine.MoveNext())BrStMachine=UpdateBrakes();
john72934 29 Jun @ 9:04am 
Hi great mod. Is there a way to disable the brakes on the front wheels because the rover tries to flip FWD when you need to stop fast. the weight on the rover is balanced i just make small light weight rovers. i have lowered the top speed down to 27 m/s. Thank you for any help you can give me.
Wanderer_308  [author] 5 Jun @ 2:09pm 
Yeah, you need to find and delete this line:
gyro.GyroPower=(float)gyroPower;
MinerUser 4 Jun @ 11:46pm 
Is there a way to disable the automatic gyro strength override while keeping the stabilisation?
Wanderer_308  [author] 2 Jun @ 6:20pm 
@MinerUser Gyro Stabilisation is working as long as vehicle is in motion, regardless if anyone in the control seat. Maybe your problem caused by something else?
MinerUser 2 Jun @ 6:04am 
Hello, is there a way to make the Gyro Stabilisation also work when I'm not currently steering the vehicle? It's working well when I'm in the controll seat, but when I leave it just flops to the side...
Wanderer_308  [author] 21 May @ 4:58pm 
@Adams Yes, kinda. Technically for the script it would be just subgrid suspensions. However I'm not sure how accurate would be suspension strength calculations.
Adams 21 May @ 2:31am 
Can you use this script with a custom suspension where there are 1x1 wheels used as a suspension spring?
Shadowpheonix 12 May @ 5:47pm 
I first subscribed to this script in August of 2020 and still use it today. This is an absolute MUST HAVE script for me. :)