-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use Sun irradiance for solar panels #59179
Conversation
Tracknig solar panel sounds like a very good candidate for a new appliance in a following PR. |
Spell checker encountered unrecognized words in the in-game text added in this pull request. See below for details. Click to expand
This alert is automatically generated. You can simply disregard if this is inaccurate, or (optionally) you can also add the new words to |
* sun_irradiance * weather * debug tool * lint * wrong spots * fix sun_multiplier * solar panels * adjusted weathers * outside reality bubble * astyle * luxmeter * unnecessary line * cleanup * solar panel appliances 20% buff * test short vs long * lint * make clang happy * dictionary irradiance * astyle * actually add the debug tools Co-authored-by: Fris0uman <[email protected]>
Summary
Features "Use Sun irradiance for solar panels"
Purpose of change
Solar panels are powered by light. The game uses light system designed for vision where 100 is light level where you have full vision.
In practice you have full vision is relatively low lighting. This causes solar panels to run at nearly full efficiency from early morning to late night.
Describe the solution
Use sun irradiance. This is the amount of radiation energy that hits Earth surfafce.
Sun irradiance is affected by weather multiplicatively instead of additively. So instead of cloudy weather giving -20 to light level it will give *0.15.
This reduces solar power quite a bit.
For example summer day 60 at 08:00. In the old system solar panels would work at 95% efficiency but in new system they would work at only 50% efficiency.
Winter solar panel usage is heavily nerfed in this. On winter day 60 at 12:00. In the old system solar panels would work at 104% efficiency but in new system they work at 60% efficiency.
Solar panels on cloudy weather are even more nerfed than that. On a cloudy summer day the old system would give 75% of power compared to clear weather while the new system will give only 15% of power compared to clear weather.
Some comparison numbers for energy produced per with 5 solar panel vehicle on a clear day (24 hour period).
So in general about 1/2 power produced compared to before (except winter is 1/3).
The sun irradiance is pretty simple system. It assumes that the solar panel is level with ground and does not track Sun. Modeling angled panels and tracking systems would be possible but in my opinion not worth the effort. If you want to create "flat", "angled" and "tracking" solar panel variants just give the angled and tracking variants something like +20% and +40% power outputs. It is not exactly right but close enough.
The max sun irradiance is set to 1000. In reality it is a bit higher than that. But it is such a nice number, small error doesn't matter and all the calculations (at least for now) use relative values.
I also separated "debug lux meter" from normal lux meter. The normal lux meter now also consumes uses batteries.
Describe alternatives you've considered
The numbers on solar panel vehicle parts could be buffed a bit to compensate the loss of power generation.
If you think current solar panel power output is good for balance you can just double the solar panel part output.
Maybe debug items should go into a mod to keep them separated from normal stuff. IMO debug items are easier to use than debug menu for targeted things.
Testing
Rewrote the solar panel tests.
Numbers seem sensible in all weathers ingame.
Additional context