Space Engineers

Space Engineers

Not enough ratings
Program Triangulator
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
4.102 KB
23 Sep, 2015 @ 7:50pm
28 Nov, 2015 @ 7:47am
2 Change Notes ( view )

Subscribe to download
Program Triangulator

Description
Program Triangulator
by Seamus Donohue of EVE University
Saturday, November 28, 2015, Space Engineers version 01.110.006.

This is a triangulation program that records measurements taken by the user to calculate the coordinates of a target as seen from different perspectives.

This program, when invoked with a null argument, will record the position of a cockpit on the ship and a point in front of that same cockpit. When invoked later with a non-null argument, it will again record these two positions and perform a calculation as discussed below.

Each measurement defines a line; two measurements will result in two lines, typcially skew to each other. This program will then calculate the points of closest approach on each line, and then calculates the midpoint. The midpoint is recorded to an LCD Panel in a correctly-formatted GPS line, using an incrementing integer for the name of the GPS entry.

USAGE:

Choose which cockpit you will be sitting in while using Triangulator. Give that cockpit a unique name, and put that name (case sensitive) into the string constant below.
**THE USER IS RESPONSIBLE FOR THIS!**

Choose a Text Panel or LCD Panel and put its name in the string constant, below.
**THE USER IS RESPONSIBLE FOR THIS!**

Get in the cockpit and point your ship as closely as possible at a desired target (station, asteroid, whatever, as long as it's still). Run this program with a null argument (and a keybinding in your Cockpit is recommended for this purpose). Move your ship some distance to the side, then point your ship closely at the same target and run this program with any non-null argument. The program doesn't care WHAT the non-null argument is, just so long as it is not null, the empty string "", is not exactly the string "reset", and doesn't start with the string "reset ".

Successful triangulations will be recorded to the text or LCD panel specified.

User's aim does not need to be perfect. In most cases, two consecutive measurements will result in a pair of skew rays that don't actually intersect, but come close. So, this program calculates the points of closest approach and records the midpoint in-between them. But, the target must be either stationary or much, much slower than the user.

Calling the program with "reset" or "reset ####" (where #### is any valid 4-byte integer; that is, in the range -2,147,483,648 to 2,147,483,647) will change the label number to use for the next target. The program will continue to increment upwards (more positive, less negative) from that value for each successful triangulation. Note that invoking a reset does not clear the LCD Panel nor take a triangulation measurement.
12 Comments
FrostWolfCZ 17 Nov, 2020 @ 3:42am 
Someone who knows Colobot ?
Seamus Donohue  [author] 5 Feb, 2019 @ 5:32pm 
@uglydisease , I haven't looked at the code in 2 years, so I'm forgetting the specifics. Theoretically, the script can easily be modified to look for a Remote Control instead of a Cockpit.
uglydisease 3 Feb, 2019 @ 11:32am 
Can you use a remote control block instead of a cockpit? I've been looking for some scripts to help set up fighter drones that can assist you.
Caspar 28 May, 2018 @ 2:52am 
i dont think this is actualy triangulating.
Seamus Donohue  [author] 17 Apr, 2018 @ 2:51pm 
@YourBabysDaddy , this program doesn't do what you're asking for. What is the intended use case?
TalkingToWalls 23 Feb, 2018 @ 12:18pm 
What if im not pointing at anything? Lets say From Point A im 2000km from something and at point B im 2010km from something and I wanna know those coords?
artiedee 28 Nov, 2015 @ 2:27pm 
Awesome!
Seamus Donohue  [author] 28 Nov, 2015 @ 11:06am 
@artiedee: Okay, done! Recopy my script from the Workshop.
artiedee 26 Nov, 2015 @ 1:38am 
Thanks man!
Seamus Donohue  [author] 25 Nov, 2015 @ 5:05pm 
@artiedee: Yeah, I can do that. It might be a few days before I get around to it, though.