Space Engineers

Space Engineers

54 ratings
Triangulation rangefinder
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
24.247 KB
10 May, 2019 @ 6:20am
14 May, 2019 @ 4:13am
3 Change Notes ( view )

Subscribe to download
Triangulation rangefinder

Description
Triangulation rangefinder
v 1.0.1

Especially for servers on which Raycast is prohibited.

The script allows you to measure distances and determine the coordinates of fixed targets by the method of triangulation, without using Raycast.
To do this, you need to perform several measurements by aiming the camera crosshair on the target and launching the program block with an argument. Each next measurement should be performed by moving a little to the side or vertically from the previous position.
The more measurements will be made, the more data will be to clarify the coordinates. At least two measurements are necessary, the coordinate will be determined with low accuracy.

4-5 measurements from a distance of 5 km give a point with an accuracy of several meters.

The script can also create an arbitrary GPS point at a specified distance along the ray of the camera. To do this, in the Custom Data of the block specified in the settings as "InputCustomDataBlockName", specify the distance in meters. Nothing but numbers, for example, "50000" - the point will be 50 km ahead on the course.

Procedure.
Reduce the power of the gyros to the minimum for comfortable camera guidance with high approximation.
Select a noticeable eye-catching detail on the target; make all measurements relative to this point.
Between measurements, move 100-200 meters to the side.

The principle of determining the coordinates.
At each measurement, the script remembers the ray in space, conducted from the camera in the direction of the target. Each pair of rays forms a triangle in space, the base of which is known. The far end of the triangle is determined by the sine theorem, assuming that the rays intersect at this point.
Thus, the script gets a lot of points formed by each pair of rays, if you combine the rays on the principle of "each with each." Then the center of the "cloud" of the obtained points is determined, as well as the deviation of the points from the center. After this, a center calculation is performed, at which points with a large deviation are ignored.
The result is displayed on the LCD panel in the form of GPS coordinates. It can be copied via the "Edit" menu in the properties of the LCD panel and pasted as the GPS coordinate.

The arguments of the program block:
  • addray - remembers the new ray in space and calculates the coordinates
  • clear - reset all results and clear memory
  • refresh - recalculation of coordinates and update of information on current distance to the target
  • addpoint - creates an arbitrary GPS point at a specified distance along the course of the camera

Customization.
When you first start the configuration will be created in the "Custom Data" menu. There you can select a language, as well as specify the names of the blocks. After changing the configuration, you need to recompile the script.

The script does not use Raycast!
Support for Russian and English.
Script Settings via "Custom Data".
Allows you to create an arbitrary GPS point at a specified distance along the course of the camera.

Known issues:
At the surface of the planet, the apparent position of the target is distorted and shifted down the local vertical, so the point is lower than the real position of the target. The horizontal coordinate is determined exactly. Perhaps I will correct this by introducing an amendment, the problem is being studied. Or maybe it's just a glitch of my local world.
30 Comments
Afourz 21 Dec, 2024 @ 2:12pm 
@Hereby если не читать описание скрипта, то, разумеется, ты ничего не поймёшь.
«Результат отображается на LCD панели в виде GPS координаты. Его можно скопировать через меню "Редактировать" в свойствах LCD-панели и вставить, как координату GPS.»
RTFT
Hereby 27 Nov, 2024 @ 12:13pm 
Я может чего-то не понимаю, но скрипт точно не создаёт никаких точек в пространстве. Он точно формирует текст, для вставки GPS точки в пространство из буфера, но самих точек не создаёт. Или я чего-то не понимаю?
kinngrimm 19 Mar, 2023 @ 5:31pm 
ah ok, well if you ever want to expand its capabilities :)
Andrew  [author] 19 Mar, 2023 @ 1:36pm 
@kinngrimm no, this script calculates the coordinates of the point on the crosshair of the camera rays.
kinngrimm 12 Mar, 2023 @ 12:25pm 
does this allow for using strong unknown signals as gps markers for a triangulation if say these are in a range of 200km from each other?
Andrew  [author] 2 May, 2022 @ 7:28am 
@MisterMann, when the program block is compiled for the first time, the text with the settings will be formatted in its customData. There they can be changed (language, block names).
After changing the settings in customData, the program block needs to be recompiled.
There is no need to change the script text. This is done on purpose, because on some servers, a special role is required to change the script, which is issued by the administrator, for example, to one player from the faction.
And so any player will be able to make settings without changing the script.
Andrew  [author] 2 May, 2022 @ 7:18am 
Peekofwar, all blocks must be on the same grid
Peekofwar 18 Apr, 2022 @ 3:14pm 
Does it matter if the programmable block and the camera are on different girds? Example: Placing the programmable block in a server room, and having the camera in use on an azimuth and pitch rotor setup?
MisterMann 13 Apr, 2022 @ 1:49pm 
I feel like I'm doing something wrong in the naming part since they won't connect to each other. Put it in the name of the blocks, then custom data, and then at the part of the script that doesn't give me errors so at this point I don't know where to add the names at for the script to work.
Silent Shepherd 3 May, 2021 @ 4:53pm 
Nice work on the script!

You remind me of someone I knew in Shadow Gear...