mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-12-05 14:19:56 -05:00
Solar: fix PWM sizing, Voc sign, unit switching and loading on review
- PWM usable power now uses the string's voltage (Vmp x panels in series), delivers nothing when the charging voltage is at or above the string's Voc, and falls off between Vmp and Voc. The "too little voltage" warning covers PWM as well as MPPT. Previously two panels in series counted double, and a panel that could not charge a 48 V bank counted as fully usable. - A Voc temperature coefficient entered without its minus sign is treated as negative, in the math, the URL and the input, so the cold-morning check cannot be made too generous. - Switching Fahrenheit on or off converts the entered temperatures instead of reinterpreting them. - While the sunlight data downloads, the off-grid tab shows a loader rather than asking for a location, and holds the cold-morning verdict until the site's temperatures are known or one has been entered. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
58842db248
commit
3bfd198fa0
6 changed files with 176 additions and 65 deletions
|
|
@ -487,6 +487,13 @@ function OwnDataSection({set, s, nasa}) {
|
|||
set({ghi: formatMonthly(ghi), temp: nasa ? formatMonthly(temp) : null});
|
||||
};
|
||||
|
||||
// Convert the temperatures with the unit, so they stay the same physical temperatures.
|
||||
const switchUnits = toFahrenheit => {
|
||||
const temps = s.temperatureInput.map(v => (v === null ? null
|
||||
: roundDigits(toFahrenheit ? cToF(v) : fToC(v), 1)));
|
||||
set({tu: toFahrenheit ? 'f' : null, temp: temps.some(v => v !== null) ? formatMonthly(temps) : null});
|
||||
};
|
||||
|
||||
const setMonth = (key, values, index, value) => {
|
||||
const next = [...values];
|
||||
next[index] = value === '' ? null : value;
|
||||
|
|
@ -516,7 +523,7 @@ function OwnDataSection({set, s, nasa}) {
|
|||
<Toggle label='Use my own sunlight data' checked={s.ownData}
|
||||
onChange={e => enable(e.currentTarget.checked)}/>
|
||||
{s.ownData && <Toggle label='Fahrenheit' checked={s.fahrenheit}
|
||||
onChange={e => set({tu: e.currentTarget.checked ? 'f' : null})}/>}
|
||||
onChange={e => switchUnits(e.currentTarget.checked)}/>}
|
||||
</Group>
|
||||
{s.ownData && <Table style={{marginTop: '0.5em'}}>
|
||||
<Table.Header>
|
||||
|
|
@ -586,7 +593,7 @@ export function SolarCalculator() {
|
|||
</Tabs.Panel>
|
||||
<Tabs.Panel value='offgrid'>
|
||||
<SolarOffGrid get={get} set={set} setNumber={setNumber} s={s} worst={worstPerKwp}
|
||||
temperatures={sunlight?.temperature}/>
|
||||
temperatures={sunlight?.temperature} loading={waitingForData}/>
|
||||
</Tabs.Panel>
|
||||
</Tabs>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue