Space Engineers

Space Engineers

Not enough ratings
Ship Position, Velocity, Acceleration, Orientation, and More
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
2.075 KB
8 Jan, 2015 @ 9:38pm
29 May, 2015 @ 5:06am
3 Change Notes ( view )

Subscribe to download
Ship Position, Velocity, Acceleration, Orientation, and More

Description
When operating as intended, this program will determine the position, velocity, acceleration, orientation, angular velocity, and angular acceleration. These values will be stored in the custom names of blocks on board the ship that you indicate, such as the antenna or beacon block that can broadcast this information.

The instructions below are included in the code

/*****************************************************************************************************************************
Real-Time Data on the Ship's Vectors V.2

Instructions to run the code:

In order for the code to operate as intended there must be a block(excluding reactors and possibly others,
I will fix this later) with the names(case sensitive):
{Pos
{Orientation
{Velocity
{Acceleration
{AngularVelocity
{AngularAcceleration
{Reference

Optionally, you may have an LCD with the following name for the ship's vectors to show up on:
{APVLCD

The block labeled as "{Reference" must be behind the block labeled "{Pos" (relative to the ship).

With the current configuration it is assumed that this code will be executed once every 0.25 seconds.
If the code will not execute at this rate then modify the value on line 27.

Edit(29/05/15): Added LCD support and changed the angular velocity and acceleration to degrees to be more meaningful.
*****************************************************************************************************************************/

Credit to Xaiier for their XYZ Position code.
13 Comments
Sapioit 8 Feb @ 12:48pm 
Please add a screenshot or more. Thanks!
The Certain One 28 Mar, 2016 @ 6:14am 
Do I really need seven blocks called with names like "{Pos", "{Velocity ", "{Orientation" and so on? If yes then it is not a good idea. I have a specific syntax for all my block names. I could go with adding those names at the end of the block names. It's should also be possible to use just only one block for all the data which are saved by those seven blocks.

I wished there were a version of this script which would just output the data to a LCD/textpanel without saving the data in block names.
Engi 24 Mar, 2016 @ 4:23pm 
Can you have this script just output the values to an LCD or does it have to change the names of blocks?
0X800007D0  [author] 16 Aug, 2015 @ 8:57pm 
@FamousSpear It's just a convention to know that the code has actually edited the properties of a block. If people want options on different kinds of LCD outputs I'll consider it.
FamousSpear 16 Aug, 2015 @ 2:24pm 
If you are interested, I updated your script to allow multiple types of info display.

(There is probably a much better way to do it, but I am thick so!)

It can display:
ALL (Original)

{Pos 1 Line XYZ
{Orientation 1 Line XYZ
{Velocity 1 Line XYZ
{Acceleration 1 Line XYZ
{AngularVelocity 1 Line XYZ
{AngularAcceleration 1 Line XYZ

{Pos 4 Line XYZ
{Orientation 4 Line XYZ
{Velocity 4 Line XYZ
{Acceleration 4 Line XYZ
{AngularVelocity 4 Line XYZ
{AngularAcceleration 4 Line XYZ

{Pos 1 Line XorYorZ
{Orientation 1 Line XorYorZ
{Velocity 1 Line XorYorZ
{Acceleration 1 Line XorYorZ
{AngularVelocity 1 Line XorYorZ
{AngularAcceleration 1 Line XorYorZ

FamousSpear 16 Aug, 2015 @ 11:17am 
Hi again, I am wondering what the purpose of adding the } to the end of the name of the LCD is?

Basically I am trying to add some code that will let me display the various bits of info onto any LCD I want.
(So basically splitting up the info onto various screens)

I am just trying to fibure out the significance of the } of (APVLCD that gets added at the end of the code before displaying it?
FamousSpear 15 Aug, 2015 @ 1:31am 
Thanks, that fixed it! Gonna try this out some more now!
0X800007D0  [author] 14 Aug, 2015 @ 7:34pm 
@FamousSpear Have you set the ownership of the LCD to yourself then set Show Text on Screen to public?
FamousSpear 14 Aug, 2015 @ 4:46pm 
The Blocks seem to be displaying their info in their name correctly.. Just not going to the LCD
FamousSpear 14 Aug, 2015 @ 4:45pm 
Hi ya, I cannot seem to get it to display on my LCD screen... I added the {APVLCD to replace the LCD name, but it just stays displaying 'online'..