IT-HOME SOLAR POWER

Vladimir Petrović Preduzetnik Inženjerske Delatnosti i Tehničko Savetovanje IT-HOME Vranje

Sedište: Kneza Miloša 36a/12, 17500 Vranje | Poslovnica: Bore Stankovića 61, Vranje

PIB: 112313948 | MB: 66020037
T.R.: 340-0001000027314-45
E-mail: info@it-home.rs | Web: www.it-home.rs

Podaci o klijentu i izveštaju

1. Satelitska mapa — Određivanje lokacije i azimuta krova

; }); document.getElementById("printDate").textContent = new Date().toLocaleDateString("sr-RS"); function updateClient() { document.getElementById("printClientName").textContent = document.getElementById("clientName").value || "—"; document.getElementById("printClientAddr").textContent = document.getElementById("clientAddress").value || "—"; } function uploadLogo(e) { const file = e.target.files[0]; if (!file) return; const reader = new FileReader(); reader.onload = function(ev) { document.getElementById("logoContainer").innerHTML = ; }; reader.readAsDataURL(file); } function addPlane() { const nextId = planes.length + 1; planes.push({ id: Date.now(), name: Krovna ravan ${nextId}, azimuth: 180, tilt: 30, count: 8, watts: 590 }); renderPlanes(); calculate(); } function removePlane(idx) { if (planes.length <= 1) return; planes.splice(idx, 1); renderPlanes(); calculate(); } function updatePlane(idx, field, val) { planes[idx][field] = field === 'name' ? val : parseFloat(val) || 0; if (field === 'name') updatePlaneSelect(); calculate(); } function updatePlaneSelect() { const sel = document.getElementById("targetPlaneSelect"); sel.innerHTML = planes.map((p, i) => ).join(""); } function renderPlanes() { const container = document.getElementById("planesContainer"); container.innerHTML = planes.map((p, i) =>
${planes.length > 1 ?Ukloni` : ''} Azimut (°) [180° = Jug] Nagib krova (°) Broj panela (kom) Snaga jednog panela (W) `).join(""); updatePlaneSelect(); } function toggleConsMode() { const mode = document.getElementById("consMode").value; document.getElementById("annualConsBox").style.display = mode === "annual" ? "block" : "none"; document.getElementById("monthlyConsBox").style.display = mode === "monthly" ? "block" : "none"; calculate(); } function toggleTariffMode() { const type = document.getElementById("customerType").value; document.getElementById("householdTariffBox").style.display = type === "household" ? "block" : "none"; document.getElementById("industryTariffBox").style.display = type === "industry" ? "block" : "none"; calculate(); } function getOrientationFactor(azimuth, tilt) { const azRad = ((azimuth - 180) * Math.PI) / 180; const tiltRad = (tilt * Math.PI) / 180; const cosAz = Math.cos(azRad); const tiltPenalty = 1 - 0.00018 * Math.pow(tilt - 32, 2); let factor = 1.0; if (cosAz >= 0) { factor = 0.88 + 0.12 * cosAz; } else { factor = Math.max(0.42, 0.88 + 0.36 * cosAz * Math.sin(tiltRad + 0.35)); } return factor * Math.max(0.7, tiltPenalty); } function calculate() { const baseYield = parseFloat(document.getElementById("baseYield").value) || 1360; const sysLoss = (parseFloat(document.getElementById("sysLoss").value) || 14) / 100; const lossRatio = (1 - sysLoss) / 0.86; let totalKwp = 0; let totalPanels = 0; let weightedAnnualProd = 0; let monthlyProd = new Array(12).fill(0); const wSum = MONTH_WEIGHTS.reduce((a, b) => a + b, 0); planes.forEach(p => { const kwp = (p.count * p.watts) / 1000; totalKwp += kwp; totalPanels += p.count; const factor = getOrientationFactor(p.azimuth, p.tilt); const planeAnnual = kwp * baseYield * factor * lossRatio; weightedAnnualProd += planeAnnual; const isNorth = Math.cos(((p.azimuth - 180) * Math.PI) / 180) < 0; MONTH_WEIGHTS.forEach((w, mIdx) => { let seasonalAdj = 1.0; if (isNorth) { seasonalAdj = (mIdx <= 1 || mIdx >= 10) ? 0.65 : (mIdx >= 4 && mIdx <= 7 ? 1.15 : 0.95); } monthlyProd[mIdx] += planeAnnual * (w / wSum) * seasonalAdj; }); }); const rawSum = monthlyProd.reduce((a, b) => a + b, 0) || 1; monthlyProd = monthlyProd.map(v => v * (weightedAnnualProd / rawSum)); const consMode = document.getElementById("consMode").value; let monthlyCons = new Array(12).fill(0); if (consMode === "annual") { const ann = parseFloat(document.getElementById("annualCons").value) || 0; const cSum = CONS_WEIGHTS.reduce((a, b) => a + b, 0); monthlyCons = CONS_WEIGHTS.map(w => ann * (w / cSum)); } else { for (let i = 0; i < 12; i++) { monthlyCons[i] = parseFloat(document.getElementById(mCons_${i}).value) || 0; } } const totalCons = monthlyCons.reduce((a, b) => a + b, 0); const custType = document.getElementById("customerType").value; const useBat = document.getElementById("useBattery").value === "yes"; const batCap = parseFloat(document.getElementById("batCapacity").value) || 0; const batDod = (parseFloat(document.getElementById("batDod").value) || 90) / 100; const batCost = useBat ? (parseFloat(document.getElementById("batCost").value) || 0) : 0; let totalSaveRsd = 0; let extraBatSelfKwh = 0; const tbody = document.getElementById("resultsTableBody"); tbody.innerHTML = ""; for (let i = 0; i < 12; i++) { const prod = monthlyProd[i]; const cons = monthlyCons[i]; const diff = prod - cons; let monthSaveRsd = 0; if (custType === "household") { const rate = parseFloat(document.getElementById("householdRate").value) || 16.8; let selfRatio = 0.38; if (useBat) { const batMonthlyShift = Math.min(prod * 0.45, batCap * batDod * 26); extraBatSelfKwh += batMonthlyShift; selfRatio = Math.min(0.85, selfRatio + (batMonthlyShift / (prod || 1))); } const directKwh = Math.min(cons, prod * selfRatio); const bankedKwh = Math.max(0, Math.min(cons - directKwh, prod - directKwh)); monthSaveRsd = directKwh * rate + bankedKwh * (rate * 0.76); } else { const rate = parseFloat(document.getElementById("industryRate").value) || 17.5; let selfPct = (parseFloat(document.getElementById("industrySelfUse").value) || 85) / 100; if (useBat) { const batMonthlyShift = Math.min(prod * 0.25, batCap * batDod * 24); extraBatSelfKwh += batMonthlyShift; selfPct = Math.min(0.98, selfPct + (batMonthlyShift / (prod || 1))); } const usedKwh = Math.min(cons, prod * selfPct); const exportedKwh = Math.max(0, prod - usedKwh); monthSaveRsd = usedKwh * rate + exportedKwh * 8.5; } totalSaveRsd += monthSaveRsd; tbody.innerHTML += ` ${MONTHS[i]} ${Math.round(prod).toLocaleString("sr-RS")}${Math.round(cons).toLocaleString("sr-RS")}\(diff>=0?^{\prime }+^{\prime }:^{\prime \prime }\){Math.round(diff).toLocaleString("sr-RS")}${Math.round(monthSaveRsd).toLocaleString("sr-RS")} RSD${(monthSaveRsd / EUR_RATE).toFixed(0)} €`; } const totalBalance = weightedAnnualProd - totalCons; const totalSaveEur = totalSaveRsd / EUR_RATE; tbody.innerHTML += ` UKUPNO GODIŠNJE ${Math.round(weightedAnnualProd).toLocaleString("sr-RS")} kWh${Math.round(totalCons).toLocaleString("sr-RS")} kWh\(totalBalance>=0?^{\prime }+^{\prime }:^{\prime \prime }\){Math.round(totalBalance).toLocaleString("sr-RS")} kWh${Math.round(totalSaveRsd).toLocaleString("sr-RS")} RSD${Math.round(totalSaveEur).toLocaleString("sr-RS")} €`; const pricePerKwp = parseFloat(document.getElementById("pricePerKwp").value) || 850; const totalInvestEur = totalKwp * pricePerKwp + batCost; const roiYears = totalSaveEur > 0 ? (totalInvestEur / totalSaveEur).toFixed(1) : "—"; const coveragePct = totalCons > 0 ? Math.min(100, Math.round((weightedAnnualProd / totalCons) * 100)) : 0; document.getElementById("kpiPower").textContent = ${totalKwp.toFixed(2)} kWp; document.getElementById("kpiPanels").textContent = ${totalPanels} panela | Inverter ~${Math.max(3, Math.round(totalKwp * 0.85))} kW; document.getElementById("kpiProd").textContent = ${Math.round(weightedAnnualProd).toLocaleString("sr-RS")} kWh; document.getElementById("kpiSpec").textContent = ${totalKwp > 0 ? Math.round(weightedAnnualProd / totalKwp) : 0} kWh/kWp prosečno; document.getElementById("kpiSaveEur").textContent = ${Math.round(totalSaveEur).toLocaleString("sr-RS")} €; document.getElementById("kpiSaveRsd").textContent = ${Math.round(totalSaveRsd).toLocaleString("sr-RS")} RSD / godišnje; document.getElementById("kpiRoi").textContent = ${roiYears} god.; document.getElementById("kpiInvest").textContent = Investicija: ${Math.round(totalInvestEur).toLocaleString("sr-RS")} € | Pokrivenost: ${coveragePct}%; const batBox = document.getElementById("batterySummaryBox"); if (useBat && batCap > 0) { batBox.style.display = "block"; document.getElementById("batCapDisp").textContent = batCap; document.getElementById("batSelfInc").textContent = +${Math.round(extraBatSelfKwh).toLocaleString("sr-RS")} kWh/god; document.getElementById("batExtraSave").textContent = +${Math.round((extraBatSelfKwh * 4.2) / EUR_RATE)} €/god; } else { batBox.style.display = "none"; } const maxVal = Math.max(...monthlyProd, ...monthlyCons, 100); const chart = document.getElementById("chartContainer"); chart.innerHTML = MONTHS.map((m, i) => { const pH = Math.round((monthlyProd[i] / maxVal) * 165); const cH = Math.round((monthlyCons[i] / maxVal) * 165); return
${m.slice(0,3)}
; }).join(""); } window.addEventListener('DOMContentLoaded', function() { initMap(); renderPlanes(); calculate(); });