Stationeers

Stationeers

Not enough ratings
Advanced Solar Control
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
202.892 KB
26 Feb, 2019 @ 3:14pm
1 Change Note ( view )

Subscribe to download
Advanced Solar Control

Description
Supports all solar angles, has a built in clock output, a light toggle for night time and a beep at a customizable interval​.


Building
  • This script only needs one daylight sensor, facing upwards.
  • The script has a variable in near the top of the code ("rotation") to allow you to freely place both the panels and
    sensor.
  • You need at least two, and up to five, memory chips.
  • You need two batch writers to set your solar panels.
Set the screws according to their label
  • You only need to set the first three, the others are optional
  • Connect batch writers setting the appropriate values on your solar panels from mem_horz and mem_vert
  • Connect the other memories if you want to use those features.
  • Configure the beep interval as well as the clocktime it shows at sunrise in the code.
14 Comments
Iye  [author] 20 Feb, 2020 @ 2:32pm 
I suspect that is because time is calculated from horizontal solar angle. I think that is the one thats always zero on the moon map. So what you see is just the sunrise time setting since it comes down to time = 0+sunrisetime.

I will look into this when i have time, you could try changing line 54 ("div r4 r1 15") to "div r4 r2 15" to switch it to use the vertical angle instead. Would require other sunrise times ofc.
Aleax 20 Feb, 2020 @ 8:49am 
First off, great script! I have used it in a few different places and noticed a problem with the clock as well under specific conditions. I have it set on my base on Vulcan and it works great. On the moon, not so much. I duplicated the positions and settings I used on Vulcan but the most I can ever get the clock to read is a static number. One of: 0,6,18 are the only ones I have seen while fiddling with it to try and get it working. Any idea why it would not work on the Moon? I am using solar panels with a combined data/power port facing south and a daylight sensor data port facing north. Updating the rotation line in the script and testing with 0, 90, 180 and 270 all with varied results but never a working clock.
Sezar 27 Oct, 2019 @ 3:45am 
clock d3 is not working, it show 0 as output value always
Iye  [author] 6 Oct, 2019 @ 6:50pm 
Yes. Also there is nothing "special" about the end of the program. every yield instruction makes the IC "pause" its execution, meaning the code you see actually gets executed over multiple ticks.
Obviously you need to jump back to the top (or somewhere else) at some point, otherwise it would be sort of a one time program.
Spartan 6 Oct, 2019 @ 6:46pm 
Thanks for responding. I'll take another look at my setup.

So, if I understand this correctly, when you hit the end of the program and jump back to the beginning the registers keep their values? I'm still learning.
Iye  [author] 6 Oct, 2019 @ 3:46pm 
Its been a while since i actually looked at the code.
ode1 is the shorthand i used to indicate im an euler method like algorithm to estimate the suns position. i do this because i only set the vertical and horizontal position every two ticks as i need to switch the sensors mode. r2 is indeed used, it is the old value being stored for the next cycle.

I dont see how the vertical tracking would be broken though. Make sure your memories and batch writers are set up properly.
Spartan 6 Oct, 2019 @ 10:26am 
I should say that I'm on the moded planet mercury where the sun's position is always very low to the horizon. Between 78 and 100 degrees (or lower when it sets). My horizontal is tracking properly, but the vertical is not working. Whatever vertical angle I manually set the panels at, it stays that way.

I'm trying to follow the code to see what's going on, but I've so far had no luck. What would be the purpose of setting R2 in the vertical section of the code, but never using that value as far as I can tell. Can someone help me out please?
Spartan 6 Oct, 2019 @ 10:10am 
There's something wrong with this script. The calculated vertical angle always ends up being higher than 100, so it's cap at 100 and never changes. What does #ode1 stand for?
Delle(DK) 29 Sep, 2019 @ 10:13am 
Thanks for a really great script. ;-)
The sun comes up in East direction and travel West.

1). setup your solar panel so the network slot faces North, and power faces south.
2). install a solar sensor so the tail faces North, and the sensor look up into the sky Name the sensor " sensor " ( without "" signs )

Now build the computer and two batch writers and minimum 2 memory.

Your sensor need to be named sensor
memory 1 need to be named mem_horz
memory 2 need to be named mem_vert

To make things work.
look at the IC casing ( where you installed the little computer chip )
use your screwdriver and select d0 and turn it until it say "sensor"
Do the same for D1 and select "mem_horz"
do the same for D2 and select "mem_vert"

now look on the batch writers.
Configure one of them to read "mem_horz" and select Horisontal, and solar panel..
configure the other and read "mem_vert" and select vertical, and solar panel.
toril 25 Sep, 2019 @ 7:52am 
Here to report a strange anomaly while using the system on europa. In the early morning as the sun comes up the system spins the panels around a complete 360 once, then resumes tracking normaly. I'm not sure why but outside of that the system works perfectly.