Space Engineers

Space Engineers

45 个评价
Self-Aligning Solar Panels For Ships With Gyros
   
奖励
收藏
已收藏
取消收藏
文件大小
发表于
更新日期
5.297 KB
2015 年 1 月 4 日 上午 8:56
2015 年 1 月 19 日 下午 9:20
5 项改动说明 ( 查看 )

订阅以下载
Self-Aligning Solar Panels For Ships With Gyros

描述
At last, a fully automated probe script. With the start of a timer, this script can launch a ship, cut engines off at cruising speed to optimize power use, stop at the intended distance, and align its solar panels with the sun for maximum output before shutting off all non-essential systems. All with a single timer. A truly fire-and-forget probe script. If all you need is the solar panel alignment, all other features can easily be disabled.

Features:
Self-aligning solar panels
Adjustable minimum value for power (solar panel max of 120 kW, default set to 110 kW)
Adjustable turn speed (higher numbers mean faster turns but also lower accuracy for alignment)
Ability to turn off the timer when the panels have aligned
Fully automated launch capability

Required for alignment:
1 Gyroscope
1 Solar panel
1 Programmable Block
1 Timer Block set for 2 sec. Have it run the Programmable Block and itself. Set the custom name below to have it turn off once alignment finishes.
Freedom of Movement for the craft to rotate.
Line of sight to the sun

Required for automated travel feature:
At least 1 thruster to give forward thrust, containing the characters in the frontThrustKey variable.
At least 1 thruster to give backward thrust, containing the characters in the rearThrustKey variable.
At least 1 antenna matching the name in the antennaName variable.

Instructions for use:
1. Make sure you have ownership of all parts needed.
2. Turn on the features you want with the timerOff and probeLaunch variables below.
3. Make sure that all of the names of the parts you will be using are properly set in the name variables below.
4. Customize the turn speed and power needs for the solar panel alignment.
5. If using the launch feature, set the distance you would like the probe to travel as the antenna range
6. When the ship is ready to launch (if using the launch feature) or align (if not), start the timer and watch it go.

Notes:
1. It works with a small ship but would need the minPwr value reduced to around 27 kW in the code.
2. Make sure all solar panels are facing the same direction since it only references the first solar panel for sunlight calculations.
3. The solar panel and gyro names are used as variable placeholders so don't change the names while the script is running. They will change back when it's done.
4. The orientation of the gyroscope will affect performance. It should be on the floor or ceiling for correct alignment. The orientation shouldn't matter.

If you have any issues getting it to work correctly, just let me know and i'll try to hop on and help you out.

For the probe designed for this script, see the link below.
Self-Aligning Solar Panel Antenna Probe
热门讨论 查看全部(1)
1
2016 年 7 月 16 日 下午 10:00
Script error
Tiger
45 条留言
anzellott 2021 年 2 月 13 日 上午 8:07 
Will It Work With A Space Station In Orbit?
(No, Like Actually Realistically Falling Around The Planet Using A Mod)
Райан Гослинг 2017 年 1 月 1 日 上午 10:33 
+1 fix please
SpetS 2016 年 10 月 25 日 下午 1:14 
can yuo fix this please? it doesn't work in DEV version at least
killmetohell 2016 年 7 月 6 日 下午 5:13 
I not know if work or not for it like to spin lot tried the probe travel and whent far way :P but don't know if works on modded solar panels at very least it doesn't seem to for because what i was using so don't what using minpwr was ok because can get power byond 110kw and 120k max.
Tiger 2016 年 6 月 18 日 下午 5:11 
Same error as TX and everyone else. Script is currently broken. :(
aaueer 2016 年 6 月 14 日 上午 11:20 
I'm getting the same error as TX-Spare.
Pompeij 2016 年 5 月 30 日 下午 12:53 
Still works, like Alan Veldspan said, you need to have thrusters with for- and backward named, even if you don't use them.
SpetS 2016 年 5 月 7 日 上午 8:35 
is this still working?
because it does not move/rotate the satellite :/
[40-1] SgtSnipey 2015 年 10 月 18 日 下午 12:03 
Does this still work?
Reknot 2015 年 8 月 7 日 下午 5:13 
Hey friends. Now. I got it working after some trial and error. What atleast my fault was the Thrusters. They didn't automaticly get renamed to Thruster (Backward) and Thruster (Forward). SO dubble check frontThrustKey's they have to be there from my experience.

hope it helps.