Space Engineers

Space Engineers

Not enough ratings
Simple Solar Rotor Controller
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
380.607 KB
2 Mar, 2019 @ 4:35pm
22 Jan, 2023 @ 2:10pm
4 Change Notes ( view )

Subscribe to download
Simple Solar Rotor Controller

Description
A simple script to point solar panels at the sun. Simply load this, then put "Solar" somewhere in the name of any rotor that changes solar panel positioning. The script will adjust each rotor, one by one, so that the panels get ~maximum output.

Note that the initial adjustment may take some time, as the rotation is done slowly to account for the lag between adjustment and reporting of updated power output.
6 Comments
Lifernal  [author] 22 Jan, 2023 @ 2:22pm 
@Ghoughpteighbteau I just posted a new version that judges rotor position based on only the panels attached to the currently operating rotor
Lifernal  [author] 5 Apr, 2019 @ 9:45pm 
@Ghoughpteighbteau that's actually at the top:

const String ROTOR_TAG = "Solar";

But if multiple controllers run concurrently they'll confuse each other; not sure how to work around that without giving up "simple"
Ghoughpteighbteau 3 Apr, 2019 @ 5:03pm 
@Lifernal nah just the one. To be fair, even with 3 arrays (6 rotors), this script still manages to mostly work, it just bugs out a little when the sun reaches the zeinth.

How bad would it be to add a constant to the top of this script that specifies a group that contains the rotors and solar panels for it to track? As an alternative to having "Solar" in the name.

Then we go in to the control panel, select the panels and rotors and put them all in the same group, then set the constant in the programmable block.

That should keep the script pretty simple, right? That would let me have multiple arrays without things going screwy when the sun gets near the zeinth.
Lifernal  [author] 31 Mar, 2019 @ 5:46pm 
@Ghoughpteighbteau Are you using multiple programmable blocks to control each set of rotors? If so, don't :D

It's necessary to only have one solar rotor moving at a time (the script cycles through them in turn.) If two different rotors turn concurrently, it'll get confused, since it's measuring the output of all solar panels to achieve alignment. (If I added the ability to associate panels to specific rotors, it wouldn't be "simple" anymore.)
Ghoughpteighbteau 31 Mar, 2019 @ 4:35pm 
This works pretty well, but multiple arrays kinda messes this thing up, because power is changing constantly in aggregate across the panels, it gets the wrong idea once you have enough solar trackers.
Dwarf-Lord Pangolin 4 Mar, 2019 @ 7:38pm 
Thank you so much for making this. Works like a dream. The loss in power from manually aligning them every five minutes is pretty big.