Space Engineers

Space Engineers

DAS - Driver Assisting System
 Este tópico foi afixado, então deve ser importante
Wanderer_308  [desenvolvedor(a)] 19/fev./2019 às 11:21
Script setup
List of used terms:
  • PB - Progrmmble Block.
  • RC - Remote Control block.
  • Main grid - grid where sets PB and RC bloks.
  • Subgrid - any other grid connected to the main grid via rotors and/or pistons.

General setup
The bare minimum to set up the DAS is enough two blocks: Programmable block and Remote Control blocks. Also, there are two additional requirements. First, these blocks should be placed on the main grid. Second, the RC block should be orientated correctly, i.e. RC's front point in the vehicle's forward direction and RC's up to vehicle's up.

Other blocks such as thrusters, gyroscopes, suspension wheels, LCD panels, an artificial mass may or may not be on the grid and/or subgrids. If these blocks installed on the same grid as PB blocks DAS will detect them automatically. In case if you want to exclude some blocks from script's detection put in such block's Custom Data keyword (not case sensitive):
DAS_IGNORE. This keyword applies to gyros, thrusters and suspension wheel blocks.
Also, DAS keeps track of vehicle mass and re-detect functional blocks when the grid was changed. Therefore you don't need to recompile the script when you add or remove blocks.

Text Panels and cockpit's LCDs
The DAS can output some text data to LCD panels of Text Panel and cockpit blocks. For that, you need to put in Text Panel or cockpit Custom Data property special keyword and a numeric index of LCD in this block. For Text Panels this index is always 0. For other blocks, it's from 0 to number of LCDs minus one.
For example, if the cockpit has this list of LCDs:
  • Top Center Screen
  • Top Left Screen
  • Top Right Screen
  • Keyboard
Then for center screen index is 0, for the left screen it's 1, for right one it's 2, and for the keyboard it's 3.
Currently, there are two available keywords: DAS_navigation and DAS_status.
Marking block with DAS_navigation and index number will make script output navigation data, like GPS position, velocities, acceleration, yaw, roll, and pitch angles.
Marking block with DAS_status and index number will make script output its status data, like availability of scripts subroutines and functions.

Use example. Let's say we want to make the script to output navigation data in cockpit's left screen, and status data in the same cockpit's center screen. Then in its Custom Data property we should type this:
DAS_navigation 1 DAS_status 0

Programmable Block LCD
DAS's programmable block can output runtime info (one that could be seen in the terminal menu) in its LCD. For that in PB's terminal menu set the Content Type 'Text and image' for its main screen.

Subgrid wheels
DAS support suspension wheels on subgrids. However, it will not detect them automatically. To make DAS work with such wheels you have to group all subgrid suspension wheels to a group named 'Subgrid Wheels'. Of course, you can name it another way, but then you should change the expected group name in _SubgridWheelsGroupName variable in the script. DAS will treat such wheels in the same manner as regular (none subgrid) wheels and will relay user control to them, i.e. will set propulsion override and steering override.
NOTE 1: In case if subgrid wheels connected to the main grid with a movable hinge (like trailers) then you need to make sure that such trailer and the main grid should be aligned in a straight line along longitude axel at the moment of script compilation. Otherwise, the script will calculate some properties with errors.
NOTE 2: For brakes and handbrakes could work on subgrid wheels all wheeled subgrids should have RC block, or any other cockpits/pilot set.

Gyroscopes
The script only works with gyroscopes placed on the main grid. An orientation of gyroscope blocks doesn't matter. The DAS will detect gyroscopes automatically, so no additional naming or grouping needed.

Thrusters
The script only works with thrusters placed on the main grid. The DAS will detect thrusters automatically, so no additional naming or grouping needed.

Lights
To make the script work with lights designated to be stop lights just group them in 'Stop lights'.
To make the script work with lights designated to turn lights just group them in 'Turn lights'. Additionally, every light block should have in its Custom Data property one of two keywords: LEFT or RIGHT.
All these light blocks may be on subgrids.

Back-up beeper
To make the script work with sound block designated to be back-up beeper its name should contain 'Back-up beeper' text. There may be several sound blocks with this text, and these blocks may be on subgrids. All properties on sound blocks such as Loop Time, Range, Sound, etc. should be set manually.

Autopilot Trigger Timer
Autopilot can trigger specific Timer Block at every waypoint it passes, including very first and very last one. For that, this Timer Block should be named exactly as 'Timer Block DAS Waypoint'. The name, of course, could be changed in _AutopilotTimerName variable in the script.

Script arguments
Supported script arguments (all not case sensitive):
  • STARTSTOP - toggle DAS on/off.
  • START - start the script.
  • STOP - stop the script.
  • LOW_MODE - lower suspensions height offset.
  • HIGH_MODE - rise suspensions height offset.
  • RESET_ODOMETER - reset traveled distance.
  • CYCLE_HANDBRAKES - change auto handbrakes mode.
  • TOGGLE_JUMPJETS - toggle whether to engage upward thrusters when Spacebar pressed or not.
  • TOGGLE_GSA - toggle gyros override on/off.
  • TOGGLE_HDC - toggle HDC functionality.
  • TOGGLE_AUTOPILOT - toggle autopilot on/off and reset it to the first waypoint.
  • RESUME_AUTOPILOT - toggle autopilot on/off without reset.
  • CYCLE_AUTOPILOT_ACC - change autopilot accuracy.
  • CYCLE_AUTOPILOT_WAIT - change wait time in a sec, the autopilot will wait at every waypoint.
  • CYCLE_AUTOPILOT_MODE - change autopilot drive mode.
  • INVERSE_AUTOPILOT - inverse waypoints order in RC block.
  • TOGGLE_CRUISECONTROL - toggle cruise control on/off.
  • TOGGLE_GPSTRACKER - toggle GPS waypoints tracking.
    TOGGLE_GPSLIST - show/hide tracked GPS waypoints list on 'Status' screen.
Última edição por Wanderer_308; 3/nov./2019 às 14:45
< >
Exibindo comentários 6175 de 118
Wanderer_308  [desenvolvedor(a)] 4/jul./2021 às 10:40 
DAS.DisplayScheduler Failure - you didn't set up any LCD to dispalay DAS stuff.
DAS.CameraScheduler failure - you don't have botton camera. If you have gyros they will align you to gravity.
DAS.FDS failure - you don't have downward thrusters.
DAS.LightsManager failure - something is wrong with the lights group. Maybe it's a typo, maybe it has none-lights blocks in it.
nickforgie 2/dez./2021 às 20:19 
How do I change the power value?
Wanderer_308  [desenvolvedor(a)] 3/dez./2021 às 16:25 
There is _MaxPowerConsumption variable in the script.
Kaito 30/dez./2021 às 14:21 
Does DAS_IGNORE apply to connectors? I put it there, but the CUSTOM DATA is cleared every time I reload the world.
Wanderer_308  [desenvolvedor(a)] 30/dez./2021 às 14:31 
Yes, DAS_IGNORE applies to connectors. Maybe you have some other script that clears connector's Custom Data.
Kaito 30/dez./2021 às 15:13 
Yep, it was another script. My bad, sorry for the noise!
Kaito 30/dez./2021 às 17:03 
Actually, that other script _really_ doesn't want to let me use the custom data on the connectors. Is there some other way I can tell DAS to ignore them?
Wanderer_308  [desenvolvedor(a)] 30/dez./2021 às 18:18 
Change ownership of the connector to something different from PB. But that will also deny access to it for this other script.
Kaito 30/dez./2021 às 18:42 
I "fixed" it by modifying the script to also check for DAS_IGNORE in the block name.
HeavyDeception 24/jan./2022 às 14:53 
Hello I seem to be having a problem with this all my displays say DAS standby and the lights dont seem to be working but they changed color.
Kaito 24/jan./2022 às 14:55 
Have a connector locked to anything?
Stunna 20/set./2022 às 16:35 
how do i use the script arguement
Wanderer_308  [desenvolvedor(a)] 23/set./2022 às 18:48 
@Stunna When you add "Run" command to the hotbar the game prompts you an argument.
Patrick 15/nov./2022 às 16:02 
Is there a way to set the autopilot mode in the script? I see there is a command to cycle the mode, but is there a way to see the current mode? Right now I'm just firing blind -- I have to follow the grid to the end of it's patrol path and see what happens.
FHN 16/nov./2022 às 3:27 
I don't understand why with the TOGGLE_GSA command, the gyroscopes don't want to switch.
checked the accuracy of writing the argument, rearranged the gyroscopes, recompiled the script, demolished the programmable block and reinstalled it. in my rover there are gyroscopes with DAS_IGNORE entered in custom data, and a group of gyroscopes controlled by a script.
< >
Exibindo comentários 6175 de 118
Por página: 1530 50