Actions

Editing PowerTransmitter

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision Your text
Line 66: Line 66:
  
 
==Alignment formulas==
 
==Alignment formulas==
All dataports points north, the delta values are calculated from: "receiver coordinate" - "emitter coordinate"
+
All dataports points north, the delta values are calculated from: "reciever coordinate" - "emitter coordinate"
  
 
Horizontal for "emitter" = atan2( delta-x / delta-z ) * 180 / pi
 
Horizontal for "emitter" = atan2( delta-x / delta-z ) * 180 / pi
 
<br>Vertical for "emitter" = 90 + atan( delta-y / sqrt( (delta-z)^2 + (delta-x)^2 ) ) * 180 / pi
 
<br>Vertical for "emitter" = 90 + atan( delta-y / sqrt( (delta-z)^2 + (delta-x)^2 ) ) * 180 / pi
  
Horizontal for "receiver" = 180 + Horizontal for "emitter"
+
Horizontal for "reciever" = 180 + Horizontal for "emitter"
<br>Vertical for "receiver" = 180 - Vertical for "emitter"  
+
<br>Vertical for "reciever" = 180 - Vertical for "emitter"  
  
 
Comments:
 
Comments:
Line 79: Line 79:
 
<br>Both atan2() and atan() uses radians for the angle, radians are converted to degrees by multiplying with 180 / pi
 
<br>Both atan2() and atan() uses radians for the angle, radians are converted to degrees by multiplying with 180 / pi
 
<br>atan2(x/z) should be z/x in a normal situation, but it has been inverted to compensate for the devices inverted rotation direction
 
<br>atan2(x/z) should be z/x in a normal situation, but it has been inverted to compensate for the devices inverted rotation direction
<br>atan(y/x) uses Pythagoras theorem to set x as the horizontal-plane distance between emitter and receiver
+
<br>atan(y/x) uses Pythagoras theorem to set x as the horizontal-plane distance between emitter and reciever
  
 
==IC script==
 
==IC script==

Please note that all contributions to Unofficial Stationeers Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see Unofficial Stationeers Wiki:Copyrights for details). Do not submit copyrighted work without permission!

To edit this page, please answer the question that appears below (more info):

Cancel | Editing help (opens in new window)