Stormworks: Build and Rescue

Stormworks: Build and Rescue

Not enough ratings
Coordinate transformation program
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
212.017 KB
18 Feb, 2023 @ 12:15am
1 Change Note ( view )

Subscribe to download
Coordinate transformation program

Description
World coordinates → local coordinates and local coordinates → world coordinates can be converted.
Works even upside down.
It can be used for FCR_ and artillery control.

About coordinates
world coordinates
X represents east and west. East is the positive direction. It is the same coordinate system as the X of the GPS sensor.
Y stands for North and South. North is the positive direction. It is the same coordinate system as the Y of the GPS sensor.
Z stands for altitude. Up is the positive direction. It is in the same coordinate system as the altitude sensor values.

local coordinates
X represents left and right. Right is the positive direction.
Y stands for front and back. Forward is the positive direction.
Z stands for up and down. Up is the positive direction.

Usage
Copy and paste the function to the LUA you want to use.

world coordinates → local coordinates
・Substitute the world coordinates you want to transform into WorldX, WorldY and WorldZ. (Substitute the sensor values directly for variables other than these variables.)
・Execute the program on the right LocalX, LocalY, LocalZ = World2Local(GPSX, GPSY, GPSZ, WorldX, WorldY, WorldZ, Xtilt, Ytilt, Ztilt, Xdirection, Ydirection, Zdirection)
・The transformed local coordinates are substituted for LocalX, LocalY and LocalZ.

local coordinates → world coordinates
・Substitute the local coordinates you want to transform into LocalX, LocalY and LocalZ. (Substitute the sensor values directly for variables other than these variables.)
・Execute the program on the right WorldX, WorldY, WorldZ = Local2World(GPSX, GPSY, GPSZ, LocalX, LocalY, LocalZ, Xtilt, Ytilt, Ztilt, Xdirection, Ydirection, Zdirection)
・WorldX, WorldY and WorldZ are substituted with transformed local coordinates.

For details on how to use it, check the videos and sample programs you subscribed to.

Physics sensor version
https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=2950512828

Others
  • You can remodel it.
  • You may distribute it secondarily (if you modify it).
  • You can incorporate it.
  • You can make a video.
  • You don't have to get permission.