@jjlmoya/utils-home 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +62 -0
- package/src/category/i18n/en.ts +24 -0
- package/src/category/i18n/es.ts +24 -0
- package/src/category/i18n/fr.ts +24 -0
- package/src/category/index.ts +12 -0
- package/src/category/seo.astro +15 -0
- package/src/components/PreviewNavSidebar.astro +116 -0
- package/src/components/PreviewToolbar.astro +143 -0
- package/src/data.ts +11 -0
- package/src/env.d.ts +5 -0
- package/src/index.ts +26 -0
- package/src/layouts/PreviewLayout.astro +117 -0
- package/src/pages/[locale]/[slug].astro +146 -0
- package/src/pages/[locale].astro +251 -0
- package/src/pages/index.astro +4 -0
- package/src/tests/faq_count.test.ts +19 -0
- package/src/tests/locale_completeness.test.ts +42 -0
- package/src/tests/mocks/astro_mock.js +2 -0
- package/src/tests/no_h1_in_components.test.ts +48 -0
- package/src/tests/seo_length.test.ts +22 -0
- package/src/tests/tool_validation.test.ts +17 -0
- package/src/tool/dewPointCalculator/bibliography.astro +14 -0
- package/src/tool/dewPointCalculator/component.astro +443 -0
- package/src/tool/dewPointCalculator/i18n/en.ts +183 -0
- package/src/tool/dewPointCalculator/i18n/es.ts +183 -0
- package/src/tool/dewPointCalculator/i18n/fr.ts +183 -0
- package/src/tool/dewPointCalculator/index.ts +34 -0
- package/src/tool/dewPointCalculator/logic.ts +16 -0
- package/src/tool/dewPointCalculator/seo.astro +14 -0
- package/src/tool/dewPointCalculator/ui.ts +13 -0
- package/src/tool/ledSavingCalculator/bibliography.astro +14 -0
- package/src/tool/ledSavingCalculator/component.astro +520 -0
- package/src/tool/ledSavingCalculator/i18n/en.ts +217 -0
- package/src/tool/ledSavingCalculator/i18n/es.ts +217 -0
- package/src/tool/ledSavingCalculator/i18n/fr.ts +217 -0
- package/src/tool/ledSavingCalculator/index.ts +34 -0
- package/src/tool/ledSavingCalculator/logic.ts +31 -0
- package/src/tool/ledSavingCalculator/seo.astro +14 -0
- package/src/tool/ledSavingCalculator/ui.ts +32 -0
- package/src/tool/projectorCalculator/bibliography.astro +14 -0
- package/src/tool/projectorCalculator/component.astro +569 -0
- package/src/tool/projectorCalculator/i18n/en.ts +181 -0
- package/src/tool/projectorCalculator/i18n/es.ts +181 -0
- package/src/tool/projectorCalculator/i18n/fr.ts +181 -0
- package/src/tool/projectorCalculator/index.ts +34 -0
- package/src/tool/projectorCalculator/logic.ts +21 -0
- package/src/tool/projectorCalculator/seo.astro +14 -0
- package/src/tool/projectorCalculator/ui.ts +16 -0
- package/src/tool/qrGenerator/bibliography.astro +14 -0
- package/src/tool/qrGenerator/component.astro +499 -0
- package/src/tool/qrGenerator/i18n/en.ts +233 -0
- package/src/tool/qrGenerator/i18n/es.ts +233 -0
- package/src/tool/qrGenerator/i18n/fr.ts +233 -0
- package/src/tool/qrGenerator/index.ts +34 -0
- package/src/tool/qrGenerator/logic.ts +27 -0
- package/src/tool/qrGenerator/seo.astro +14 -0
- package/src/tool/qrGenerator/ui.ts +23 -0
- package/src/tool/solarCalculator/bibliography.astro +14 -0
- package/src/tool/solarCalculator/component.astro +532 -0
- package/src/tool/solarCalculator/i18n/en.ts +176 -0
- package/src/tool/solarCalculator/i18n/es.ts +176 -0
- package/src/tool/solarCalculator/i18n/fr.ts +176 -0
- package/src/tool/solarCalculator/index.ts +34 -0
- package/src/tool/solarCalculator/logic.ts +31 -0
- package/src/tool/solarCalculator/seo.astro +14 -0
- package/src/tool/solarCalculator/ui.ts +11 -0
- package/src/tool/tariffComparator/bibliography.astro +14 -0
- package/src/tool/tariffComparator/component.astro +595 -0
- package/src/tool/tariffComparator/i18n/en.ts +192 -0
- package/src/tool/tariffComparator/i18n/es.ts +192 -0
- package/src/tool/tariffComparator/i18n/fr.ts +192 -0
- package/src/tool/tariffComparator/index.ts +34 -0
- package/src/tool/tariffComparator/logic.ts +47 -0
- package/src/tool/tariffComparator/seo.astro +14 -0
- package/src/tool/tariffComparator/ui.ts +25 -0
- package/src/tools.ts +9 -0
- package/src/types.ts +72 -0
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
import type { WithContext, FAQPage, HowTo, SoftwareApplication } from 'schema-dts';
|
|
2
|
+
import type { ToolLocaleContent } from '../../../types';
|
|
3
|
+
import type { SolarCalculatorUI } from '../ui';
|
|
4
|
+
|
|
5
|
+
const slug = 'calculadora-solar';
|
|
6
|
+
const title = 'Calculadora de Inclinación de Paneles Solares';
|
|
7
|
+
const description =
|
|
8
|
+
'Calcula el ángulo óptimo de inclinación para tus paneles solares según tu latitud geográfica. Obtén los valores para instalación fija y ajustes estacionales.';
|
|
9
|
+
|
|
10
|
+
const faqData = [
|
|
11
|
+
{
|
|
12
|
+
question: '¿Qué pasa si mi tejado no tiene la inclinación perfecta?',
|
|
13
|
+
answer:
|
|
14
|
+
'No es un problema grave. Las pérdidas por desviaciones pequeñas (5-10°) son menores al 3% de la producción anual. Es más importante evitar sombras parciales que obsesionarse con el ángulo exacto.',
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
question: '¿El ángulo óptimo es el mismo en todo el mundo?',
|
|
18
|
+
answer:
|
|
19
|
+
'No. Depende directamente de tu latitud. Un usuario en Madrid (~40°N) tiene un ángulo óptimo distinto a uno en Noruega (~60°N) o en Argentina (~34°S).',
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
question: '¿Hacia dónde deben mirar los paneles?',
|
|
23
|
+
answer:
|
|
24
|
+
'En el Hemisferio Norte, siempre hacia el Sur (azimut 180°). En el Hemisferio Sur, hacia el Norte. Una orientación Este-Oeste puede causar pérdidas del 15-20% respecto al óptimo.',
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
question: '¿Sirve también para colectores de agua caliente solar?',
|
|
28
|
+
answer:
|
|
29
|
+
'Sí. Las fórmulas de inclinación son las mismas para colectores térmicos y para paneles fotovoltaicos, ya que ambos dependen del mismo principio geométrico.',
|
|
30
|
+
},
|
|
31
|
+
];
|
|
32
|
+
|
|
33
|
+
const howToData = [
|
|
34
|
+
{
|
|
35
|
+
name: 'Introduce tu latitud',
|
|
36
|
+
text: 'Escribe la latitud de tu ubicación en grados decimales, o usa el botón de geolocalización para detectarla automáticamente.',
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
name: 'Consulta el ángulo óptimo',
|
|
40
|
+
text: 'El ángulo óptimo anual es el valor principal para instalaciones fijas. Úsalo como referencia al programar tu instalador.',
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
name: 'Ajusta por estación (opcional)',
|
|
44
|
+
text: 'Si tu soporte lo permite, usa los ángulos de invierno y verano para maximizar la producción en cada estación.',
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
name: 'Verifica la orientación',
|
|
48
|
+
text: 'Comprueba el indicador de hemisferio: tus paneles deben apuntar al Sur si estás en el Hemisferio Norte, y al Norte si estás en el Sur.',
|
|
49
|
+
},
|
|
50
|
+
];
|
|
51
|
+
|
|
52
|
+
const faqSchema: WithContext<FAQPage> = {
|
|
53
|
+
'@context': 'https://schema.org',
|
|
54
|
+
'@type': 'FAQPage',
|
|
55
|
+
mainEntity: faqData.map((item) => ({
|
|
56
|
+
'@type': 'Question',
|
|
57
|
+
name: item.question,
|
|
58
|
+
acceptedAnswer: { '@type': 'Answer', text: item.answer },
|
|
59
|
+
})),
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
const howToSchema: WithContext<HowTo> = {
|
|
63
|
+
'@context': 'https://schema.org',
|
|
64
|
+
'@type': 'HowTo',
|
|
65
|
+
name: title,
|
|
66
|
+
description,
|
|
67
|
+
step: howToData.map((step) => ({
|
|
68
|
+
'@type': 'HowToStep',
|
|
69
|
+
name: step.name,
|
|
70
|
+
text: step.text,
|
|
71
|
+
})),
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
const appSchema: WithContext<SoftwareApplication> = {
|
|
75
|
+
'@context': 'https://schema.org',
|
|
76
|
+
'@type': 'SoftwareApplication',
|
|
77
|
+
name: title,
|
|
78
|
+
description,
|
|
79
|
+
applicationCategory: 'UtilityApplication',
|
|
80
|
+
operatingSystem: 'All',
|
|
81
|
+
offers: { '@type': 'Offer', price: '0', priceCurrency: 'EUR' },
|
|
82
|
+
inLanguage: 'es',
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
export const content: ToolLocaleContent<SolarCalculatorUI> = {
|
|
86
|
+
slug,
|
|
87
|
+
title,
|
|
88
|
+
description,
|
|
89
|
+
faqTitle: 'Preguntas Frecuentes',
|
|
90
|
+
faq: faqData,
|
|
91
|
+
bibliographyTitle: 'Bibliografía',
|
|
92
|
+
bibliography: [
|
|
93
|
+
{ name: 'NREL PVWatts Calculator', url: 'https://pvwatts.nrel.gov/' },
|
|
94
|
+
{ name: 'PVGIS — European Commission Solar Tool', url: 'https://re.jrc.ec.europa.eu/pvgis/' },
|
|
95
|
+
{ name: 'SEIA — Solar Energy Industry Research Data', url: 'https://www.seia.org/solar-industry-research-data' },
|
|
96
|
+
],
|
|
97
|
+
howTo: howToData,
|
|
98
|
+
schemas: [faqSchema, howToSchema, appSchema],
|
|
99
|
+
seo: [
|
|
100
|
+
{
|
|
101
|
+
type: 'title',
|
|
102
|
+
text: 'La Ciencia de la Inclinación Solar',
|
|
103
|
+
level: 2,
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
type: 'paragraph',
|
|
107
|
+
html: 'La diferencia entre una factura eléctrica de cero euros y una inversión que no rinde está, literalmente, en los ángulos. La <strong>radiación solar</strong> no es uniforme: es un flujo dinámico que cambia con la hora, el día y la estación. Comprender la geometría celeste es el primer paso para convertir tu tejado en una central eléctrica de alto rendimiento.',
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
type: 'stats',
|
|
111
|
+
items: [
|
|
112
|
+
{ value: 'Lat × 0.87', label: 'Fórmula General', icon: 'mdi:angle-acute' },
|
|
113
|
+
{ value: 'Lat × 0.76 + 3.1', label: 'Latitudes 25°–50°', icon: 'mdi:map-marker' },
|
|
114
|
+
{ value: '± 15°', label: 'Ajuste Estacional', icon: 'mdi:calendar-sync' },
|
|
115
|
+
],
|
|
116
|
+
columns: 3,
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
type: 'comparative',
|
|
120
|
+
items: [
|
|
121
|
+
{
|
|
122
|
+
title: 'El Principio de Perpendicularidad',
|
|
123
|
+
description: 'Un panel solar funciona como una red que atrapa fotones. Es máximamente efectiva cuando se enfrenta a 90° respecto a los rayos solares. Cualquier desviación reduce la superficie efectiva de captación.',
|
|
124
|
+
icon: 'mdi:solar-panel',
|
|
125
|
+
points: ['Maximiza la superficie efectiva de captación', 'Base de todos los cálculos de inclinación'],
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
title: 'La Importancia de la Latitud',
|
|
129
|
+
description: 'Tu ubicación en el globo dicta la altura máxima del sol. Cuanto más lejos del ecuador, más bajo viaja el sol y más vertical debe ser el panel para interceptarlo.',
|
|
130
|
+
icon: 'mdi:earth',
|
|
131
|
+
points: ['A mayor latitud, mayor inclinación necesaria', 'El ecuador requiere paneles casi planos'],
|
|
132
|
+
},
|
|
133
|
+
],
|
|
134
|
+
columns: 2,
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
type: 'title',
|
|
138
|
+
text: 'Estrategias Estacionales',
|
|
139
|
+
level: 3,
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
type: 'paragraph',
|
|
143
|
+
html: '<strong>Verano:</strong> El sol alcanza su cenit. Los paneles deben estar casi planos, restando ~15° a tu latitud. Aprovecha los días largos y la radiación directa intensa. <strong>Invierno:</strong> El sol viaja bajo, cerca del horizonte. Inclina más los paneles sumando ~15° a tu latitud. La mayor inclinación también ayuda a que la nieve se deslice sin tapar las células.',
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
type: 'diagnostic',
|
|
147
|
+
variant: 'info',
|
|
148
|
+
title: '¿Instalación Fija o Ajuste Estacional?',
|
|
149
|
+
icon: 'mdi:wrench',
|
|
150
|
+
badge: 'Consejo Pro',
|
|
151
|
+
html: '<p><strong>Fija (estándar):</strong> Configura al ángulo óptimo anual. Menor mantenimiento y mayor resistencia al viento, con una pérdida de apenas el 5-10% frente al seguimiento solar. <strong>Ajuste estacional (pro):</strong> Modifica el ángulo 2-4 veces al año para ganar hasta un +15% de rendimiento en los meses de invierno.</p>',
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
type: 'summary',
|
|
155
|
+
title: 'Claves para una Instalación Eficiente',
|
|
156
|
+
items: [
|
|
157
|
+
'El ángulo óptimo anual es tu referencia principal para instalaciones fijas.',
|
|
158
|
+
'Las pérdidas por desviaciones de ±5° son menores al 3% de la producción anual.',
|
|
159
|
+
'Prioriza evitar sombras parciales sobre buscar el ángulo exacto.',
|
|
160
|
+
'En el Hemisferio Norte, orienta siempre los paneles hacia el Sur.',
|
|
161
|
+
'Un ajuste estacional de 2-4 veces al año puede mejorar el rendimiento invernal en un +15%.',
|
|
162
|
+
],
|
|
163
|
+
},
|
|
164
|
+
],
|
|
165
|
+
ui: {
|
|
166
|
+
labelLatitude: 'Latitud Geográfica',
|
|
167
|
+
btnLocate: 'Detectar mi ubicación',
|
|
168
|
+
labelOptimal: 'Ángulo Óptimo Anual',
|
|
169
|
+
labelEfficiency: 'Eficiencia Máxima',
|
|
170
|
+
labelWinter: 'Invierno',
|
|
171
|
+
labelSummer: 'Verano',
|
|
172
|
+
hemisphereNorth: 'Hemisferio Norte — Orientar al SUR',
|
|
173
|
+
hemisphereSouth: 'Hemisferio Sur — Orientar al NORTE',
|
|
174
|
+
geoNotAvailable: 'Geolocalización no disponible en este navegador.',
|
|
175
|
+
},
|
|
176
|
+
};
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
import type { WithContext, FAQPage, HowTo, SoftwareApplication } from 'schema-dts';
|
|
2
|
+
import type { ToolLocaleContent } from '../../../types';
|
|
3
|
+
import type { SolarCalculatorUI } from '../ui';
|
|
4
|
+
|
|
5
|
+
const slug = 'calculateur-solaire';
|
|
6
|
+
const title = "Calculateur d'Inclinaison de Panneaux Solaires";
|
|
7
|
+
const description =
|
|
8
|
+
"Calculez l'angle d'inclinaison optimal pour vos panneaux solaires en fonction de votre latitude géographique. Obtenez les valeurs pour une installation fixe et les ajustements saisonniers.";
|
|
9
|
+
|
|
10
|
+
const faqData = [
|
|
11
|
+
{
|
|
12
|
+
question: "Que se passe-t-il si mon toit n'a pas l'inclinaison parfaite ?",
|
|
13
|
+
answer:
|
|
14
|
+
"Ce n'est pas un problème majeur. Les pertes dues à de petits écarts (5-10°) représentent moins de 3 % de la production annuelle. Éviter les ombrages partiels est bien plus important que d'obtenir l'angle exact.",
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
question: "L'angle optimal est-il le même partout dans le monde ?",
|
|
18
|
+
answer:
|
|
19
|
+
"Non. Il dépend directement de votre latitude. Un utilisateur à Madrid (~40°N) a un angle optimal différent de celui en Norvège (~60°N) ou en Argentine (~34°S).",
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
question: 'Dans quelle direction mes panneaux doivent-ils être orientés ?',
|
|
23
|
+
answer:
|
|
24
|
+
"Dans l'hémisphère nord, toujours vers le Sud (azimut 180°). Dans l'hémisphère sud, vers le Nord. Une orientation Est-Ouest peut entraîner des pertes de 15 à 20 % par rapport à l'optimum.",
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
question: "Cela fonctionne-t-il aussi pour les chauffe-eaux solaires ?",
|
|
28
|
+
answer:
|
|
29
|
+
"Oui. Les formules d'inclinaison sont identiques pour les capteurs thermiques et les panneaux photovoltaïques, car les deux reposent sur le même principe géométrique.",
|
|
30
|
+
},
|
|
31
|
+
];
|
|
32
|
+
|
|
33
|
+
const howToData = [
|
|
34
|
+
{
|
|
35
|
+
name: 'Entrez votre latitude',
|
|
36
|
+
text: 'Saisissez votre latitude en degrés décimaux, ou utilisez le bouton de géolocalisation pour la détecter automatiquement.',
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
name: "Consultez l'angle optimal",
|
|
40
|
+
text: "L'angle optimal annuel est la valeur principale pour les installations fixes. Utilisez-le comme référence lors de la programmation avec votre installateur.",
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
name: 'Ajustez par saison (facultatif)',
|
|
44
|
+
text: "Si votre support le permet, utilisez les angles d'hiver et d'été pour maximiser la production à chaque saison.",
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
name: "Vérifiez l'orientation",
|
|
48
|
+
text: "Consultez l'indicateur d'hémisphère : vos panneaux doivent être orientés vers le Sud si vous êtes dans l'hémisphère nord, et vers le Nord dans l'hémisphère sud.",
|
|
49
|
+
},
|
|
50
|
+
];
|
|
51
|
+
|
|
52
|
+
const faqSchema: WithContext<FAQPage> = {
|
|
53
|
+
'@context': 'https://schema.org',
|
|
54
|
+
'@type': 'FAQPage',
|
|
55
|
+
mainEntity: faqData.map((item) => ({
|
|
56
|
+
'@type': 'Question',
|
|
57
|
+
name: item.question,
|
|
58
|
+
acceptedAnswer: { '@type': 'Answer', text: item.answer },
|
|
59
|
+
})),
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
const howToSchema: WithContext<HowTo> = {
|
|
63
|
+
'@context': 'https://schema.org',
|
|
64
|
+
'@type': 'HowTo',
|
|
65
|
+
name: title,
|
|
66
|
+
description,
|
|
67
|
+
step: howToData.map((step) => ({
|
|
68
|
+
'@type': 'HowToStep',
|
|
69
|
+
name: step.name,
|
|
70
|
+
text: step.text,
|
|
71
|
+
})),
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
const appSchema: WithContext<SoftwareApplication> = {
|
|
75
|
+
'@context': 'https://schema.org',
|
|
76
|
+
'@type': 'SoftwareApplication',
|
|
77
|
+
name: title,
|
|
78
|
+
description,
|
|
79
|
+
applicationCategory: 'UtilityApplication',
|
|
80
|
+
operatingSystem: 'All',
|
|
81
|
+
offers: { '@type': 'Offer', price: '0', priceCurrency: 'EUR' },
|
|
82
|
+
inLanguage: 'fr',
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
export const content: ToolLocaleContent<SolarCalculatorUI> = {
|
|
86
|
+
slug,
|
|
87
|
+
title,
|
|
88
|
+
description,
|
|
89
|
+
faqTitle: 'Questions Fréquentes',
|
|
90
|
+
faq: faqData,
|
|
91
|
+
bibliographyTitle: 'Bibliographie',
|
|
92
|
+
bibliography: [
|
|
93
|
+
{ name: 'NREL PVWatts Calculator', url: 'https://pvwatts.nrel.gov/' },
|
|
94
|
+
{ name: 'PVGIS — Outil Solaire de la Commission Européenne', url: 'https://re.jrc.ec.europa.eu/pvgis/' },
|
|
95
|
+
{ name: "SEIA — Données de Recherche sur l'Énergie Solaire", url: 'https://www.seia.org/solar-industry-research-data' },
|
|
96
|
+
],
|
|
97
|
+
howTo: howToData,
|
|
98
|
+
schemas: [faqSchema, howToSchema, appSchema],
|
|
99
|
+
seo: [
|
|
100
|
+
{
|
|
101
|
+
type: 'title',
|
|
102
|
+
text: "La Science de l'Inclinaison Solaire",
|
|
103
|
+
level: 2,
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
type: 'paragraph',
|
|
107
|
+
html: "La différence entre une facture d'électricité nulle et un investissement qui ne porte pas ses fruits se mesure, littéralement, en degrés. Le <strong>rayonnement solaire</strong> n'est pas uniforme : c'est un flux dynamique qui varie selon l'heure, le jour et la saison. Comprendre la géométrie céleste est la première étape pour transformer votre toit en centrale électrique haute performance.",
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
type: 'stats',
|
|
111
|
+
items: [
|
|
112
|
+
{ value: 'Lat × 0.87', label: 'Formule Générale', icon: 'mdi:angle-acute' },
|
|
113
|
+
{ value: 'Lat × 0.76 + 3.1', label: 'Latitudes 25°–50°', icon: 'mdi:map-marker' },
|
|
114
|
+
{ value: '± 15°', label: 'Ajustement Saisonnier', icon: 'mdi:calendar-sync' },
|
|
115
|
+
],
|
|
116
|
+
columns: 3,
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
type: 'comparative',
|
|
120
|
+
items: [
|
|
121
|
+
{
|
|
122
|
+
title: 'Le Principe de Perpendicularité',
|
|
123
|
+
description: "Un panneau solaire fonctionne comme un filet qui capture des photons. Il est le plus efficace lorsqu'il fait face au flux à 90° par rapport aux rayons solaires. Tout écart réduit la surface de captation effective.",
|
|
124
|
+
icon: 'mdi:solar-panel',
|
|
125
|
+
points: ['Maximise la surface de captation effective', 'Base de tous les calculs d\'inclinaison'],
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
title: "L'Importance de la Latitude",
|
|
129
|
+
description: "Votre position sur le globe détermine la hauteur maximale du soleil. Plus vous êtes éloigné de l'équateur, plus le soleil voyage bas et plus le panneau doit être incliné pour l'intercepter.",
|
|
130
|
+
icon: 'mdi:earth',
|
|
131
|
+
points: ['Plus la latitude est élevée, plus l\'inclinaison est nécessaire', "Près de l'équateur, les panneaux sont presque plats"],
|
|
132
|
+
},
|
|
133
|
+
],
|
|
134
|
+
columns: 2,
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
type: 'title',
|
|
138
|
+
text: 'Stratégies Saisonnières',
|
|
139
|
+
level: 3,
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
type: 'paragraph',
|
|
143
|
+
html: "<strong>Été :</strong> Le soleil atteint son zénith. Les panneaux doivent être presque plats — soustrayez ~15° à votre latitude. Profitez des longues journées et d'un rayonnement direct intense. <strong>Hiver :</strong> Le soleil voyage bas près de l'horizon. Inclinez davantage les panneaux en ajoutant ~15° à votre latitude. Une inclinaison plus forte aide aussi la neige à glisser sans bloquer les cellules.",
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
type: 'diagnostic',
|
|
147
|
+
variant: 'info',
|
|
148
|
+
title: 'Installation Fixe ou Ajustement Saisonnier ?',
|
|
149
|
+
icon: 'mdi:wrench',
|
|
150
|
+
badge: 'Conseil Pro',
|
|
151
|
+
html: "<p><strong>Fixe (standard) :</strong> Réglez à l'angle optimal annuel. Moins d'entretien et meilleure résistance au vent, avec seulement 5-10 % de perte par rapport au suivi solaire. <strong>Ajustement saisonnier (pro) :</strong> Modifiez l'angle 2-4 fois par an pour gagner jusqu'à +15 % de performance pendant les mois d'hiver.</p>",
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
type: 'summary',
|
|
155
|
+
title: "Clés pour une Installation Efficace",
|
|
156
|
+
items: [
|
|
157
|
+
"L'angle optimal annuel est votre référence principale pour les installations fixes.",
|
|
158
|
+
'Les pertes dues à des écarts de ±5° représentent moins de 3 % de la production annuelle.',
|
|
159
|
+
"Privilégiez l'évitement des ombrages partiels plutôt que la recherche de l'angle exact.",
|
|
160
|
+
"Dans l'hémisphère nord, orientez toujours les panneaux vers le Sud.",
|
|
161
|
+
"Un ajustement saisonnier 2-4 fois par an peut améliorer les performances hivernales de +15 %.",
|
|
162
|
+
],
|
|
163
|
+
},
|
|
164
|
+
],
|
|
165
|
+
ui: {
|
|
166
|
+
labelLatitude: 'Latitude Géographique',
|
|
167
|
+
btnLocate: 'Détecter ma position',
|
|
168
|
+
labelOptimal: 'Angle Optimal Annuel',
|
|
169
|
+
labelEfficiency: 'Efficacité Maximale',
|
|
170
|
+
labelWinter: 'Hiver',
|
|
171
|
+
labelSummer: 'Été',
|
|
172
|
+
hemisphereNorth: 'Hémisphère Nord — Orienter vers le SUD',
|
|
173
|
+
hemisphereSouth: 'Hémisphère Sud — Orienter vers le NORD',
|
|
174
|
+
geoNotAvailable: "La géolocalisation n'est pas disponible dans ce navigateur.",
|
|
175
|
+
},
|
|
176
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { HomeToolEntry, ToolLocaleContent, ToolDefinition } from '../../types';
|
|
2
|
+
import SolarCalculatorComponent from './component.astro';
|
|
3
|
+
import SolarCalculatorSEO from './seo.astro';
|
|
4
|
+
import SolarCalculatorBibliography from './bibliography.astro';
|
|
5
|
+
|
|
6
|
+
import type { SolarCalculatorUI } from './ui';
|
|
7
|
+
|
|
8
|
+
export type SolarCalculatorLocaleContent = ToolLocaleContent<SolarCalculatorUI>;
|
|
9
|
+
|
|
10
|
+
import { content as es } from './i18n/es';
|
|
11
|
+
import { content as en } from './i18n/en';
|
|
12
|
+
import { content as fr } from './i18n/fr';
|
|
13
|
+
|
|
14
|
+
export const solarCalculator: HomeToolEntry<SolarCalculatorUI> = {
|
|
15
|
+
id: 'solar-calculator',
|
|
16
|
+
icons: {
|
|
17
|
+
bg: 'mdi:solar-panel',
|
|
18
|
+
fg: 'mdi:weather-sunny',
|
|
19
|
+
},
|
|
20
|
+
i18n: {
|
|
21
|
+
es: async () => es,
|
|
22
|
+
en: async () => en,
|
|
23
|
+
fr: async () => fr,
|
|
24
|
+
},
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export { SolarCalculatorComponent, SolarCalculatorSEO, SolarCalculatorBibliography };
|
|
28
|
+
|
|
29
|
+
export const SOLAR_CALCULATOR_TOOL: ToolDefinition = {
|
|
30
|
+
entry: solarCalculator,
|
|
31
|
+
Component: SolarCalculatorComponent,
|
|
32
|
+
SEOComponent: SolarCalculatorSEO,
|
|
33
|
+
BibliographyComponent: SolarCalculatorBibliography,
|
|
34
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export interface TiltResult {
|
|
2
|
+
optimal: number;
|
|
3
|
+
winter: number;
|
|
4
|
+
summer: number;
|
|
5
|
+
isNorth: boolean;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export function toRad(deg: number): number {
|
|
9
|
+
return (deg * Math.PI) / 180;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export function calculateTilt(lat: number): TiltResult {
|
|
13
|
+
const absLat = Math.abs(lat);
|
|
14
|
+
|
|
15
|
+
let optimal = absLat * 0.87;
|
|
16
|
+
if (absLat > 25 && absLat < 50) {
|
|
17
|
+
optimal = absLat * 0.76 + 3.1;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
const winter = absLat * 0.9 + 29;
|
|
21
|
+
const summer = absLat * 0.9 - 23.5;
|
|
22
|
+
|
|
23
|
+
const clamp = (n: number) => Math.min(Math.max(n, 0), 90);
|
|
24
|
+
|
|
25
|
+
return {
|
|
26
|
+
optimal: parseFloat(clamp(optimal).toFixed(1)),
|
|
27
|
+
winter: parseFloat(clamp(winter).toFixed(1)),
|
|
28
|
+
summer: parseFloat(clamp(summer).toFixed(1)),
|
|
29
|
+
isNorth: lat >= 0,
|
|
30
|
+
};
|
|
31
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
---
|
|
2
|
+
import { SEORenderer } from '@jjlmoya/utils-shared';
|
|
3
|
+
import { solarCalculator } from './index';
|
|
4
|
+
import type { KnownLocale } from '../../types';
|
|
5
|
+
|
|
6
|
+
interface Props {
|
|
7
|
+
locale?: KnownLocale;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
const { locale = 'es' } = Astro.props;
|
|
11
|
+
const content = await solarCalculator.i18n[locale]?.();
|
|
12
|
+
if (!content) return null;
|
|
13
|
+
---
|
|
14
|
+
<SEORenderer content={{ locale: locale as string, sections: content.seo }} />
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export interface SolarCalculatorUI extends Record<string, string> {
|
|
2
|
+
labelLatitude: string;
|
|
3
|
+
btnLocate: string;
|
|
4
|
+
labelOptimal: string;
|
|
5
|
+
labelEfficiency: string;
|
|
6
|
+
labelWinter: string;
|
|
7
|
+
labelSummer: string;
|
|
8
|
+
hemisphereNorth: string;
|
|
9
|
+
hemisphereSouth: string;
|
|
10
|
+
geoNotAvailable: string;
|
|
11
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
---
|
|
2
|
+
import { Bibliography as SharedBibliography } from '@jjlmoya/utils-shared';
|
|
3
|
+
import { tariffComparator } from './index';
|
|
4
|
+
import type { KnownLocale } from '../../types';
|
|
5
|
+
|
|
6
|
+
interface Props {
|
|
7
|
+
locale?: KnownLocale;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
const { locale = 'es' } = Astro.props;
|
|
11
|
+
const content = await tariffComparator.i18n[locale]?.();
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
{content && <SharedBibliography links={content.bibliography} />}
|