Skip to content

Commit e835d9c

Browse files
cps13claude
andcommitted
Add solar-power-app — interactive rooftop solar panel planner
Interactive MATLAB app for planning rooftop solar installations. Enter any address to load satellite imagery, draw panels, optimize tilt, and estimate annual energy yield with PDF report export. Includes live scripts for address-based analysis, core function demos, and US solar potential mapping. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 48d33a6 commit e835d9c

14 files changed

Lines changed: 2336 additions & 0 deletions
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# MATLAB temporary files
2+
*.asv
3+
*.m~
4+
*.autosave
5+
6+
# Simulink autosave
7+
*.slxc
8+
slprj/
9+
10+
# Generated outputs
11+
SolarReport.pdf
12+
13+
# Tooling
14+
.claude/
15+
.mcp.json
16+
17+
# OS files
18+
.DS_Store
19+
Thumbs.db
20+
desktop.ini

Examples/solar-power-app/README.md

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# Solar Panel Planner for MATLAB&reg;
2+
3+
![Solar Panel Planner App](hero.gif)
4+
5+
An interactive application for planning rooftop solar panel installations using satellite imagery, sun-position modeling, and energy yield estimation in MATLAB&reg;.
6+
7+
## Overview
8+
9+
This app lets you enter any street address, view the rooftop on a satellite map, draw solar panel rectangles interactively, and estimate annual energy production. It models:
10+
11+
- **Sun position** throughout the year (altitude and azimuth for any latitude/longitude)
12+
- **Clear-sky irradiance** with air mass and atmospheric effects
13+
- **Temperature derating** using NOCT (Nominal Operating Cell Temperature) model
14+
- **Clearness index** from NASA POWER monthly averages
15+
- **Panel tilt optimization** for maximum annual yield
16+
- **PDF report export** with site summary and energy analysis
17+
18+
## Quick Start
19+
20+
```matlab
21+
% Launch the interactive app
22+
SolarPanelApp()
23+
```
24+
25+
1. Enter an address and click **Load** to fetch satellite imagery
26+
2. Click **+ Add Panel** to draw panel rectangles on the roof
27+
3. Adjust tilt with the slider or click **Optimize** for maximum yield
28+
4. View daily power curves and monthly energy bar charts in real time
29+
30+
## Scripts
31+
32+
| Script | Description |
33+
|--------|-------------|
34+
| `examples/AddressSolarAnalysis.m` | Enter any address and get a full year solar analysis |
35+
| `examples/SolarPanelDemo.m` | Demonstrates core functions: sun position, irradiance, panel power |
36+
| `examples/SolarPotentialMap.m` | Visualizes solar potential across the United States |
37+
38+
## Helper Functions
39+
40+
| Function | Description |
41+
|----------|-------------|
42+
| `helpers/sunPosition` | Solar altitude and azimuth for any location and time |
43+
| `helpers/solarPanelPower` | Instantaneous panel power output (W) given conditions |
44+
| `helpers/clearnessIndex` | Monthly clearness index from latitude/longitude |
45+
| `helpers/ambientTemperature` | Hourly ambient temperature from sinusoidal model |
46+
| `helpers/geocodeAddress` | Convert street address to lat/lon via OpenStreetMap Nominatim |
47+
48+
## Requirements
49+
50+
- MATLAB&reg; R2023a or later
51+
- Mapping Toolbox&trade; (satellite basemap imagery)
52+
- MATLAB Report Generator&trade; (optional, for PDF export)
53+
- Internet connection (required for basemap tiles and address geocoding via OpenStreetMap Nominatim)

0 commit comments

Comments
 (0)