@jjlmoya/utils-astronomy 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.
Files changed (57) hide show
  1. package/package.json +60 -0
  2. package/src/category/i18n/en.ts +57 -0
  3. package/src/category/i18n/es.ts +57 -0
  4. package/src/category/i18n/fr.ts +58 -0
  5. package/src/category/index.ts +16 -0
  6. package/src/category/seo.astro +15 -0
  7. package/src/components/PreviewNavSidebar.astro +116 -0
  8. package/src/components/PreviewToolbar.astro +143 -0
  9. package/src/data.ts +19 -0
  10. package/src/env.d.ts +5 -0
  11. package/src/index.ts +22 -0
  12. package/src/layouts/PreviewLayout.astro +117 -0
  13. package/src/pages/[locale]/[slug].astro +146 -0
  14. package/src/pages/[locale].astro +251 -0
  15. package/src/pages/index.astro +4 -0
  16. package/src/tests/faq_count.test.ts +24 -0
  17. package/src/tests/mocks/astro_mock.js +2 -0
  18. package/src/tests/seo_length.test.ts +57 -0
  19. package/src/tests/tool_validation.test.ts +145 -0
  20. package/src/tool/bortleVisualizer/bibliography.astro +14 -0
  21. package/src/tool/bortleVisualizer/component.astro +491 -0
  22. package/src/tool/bortleVisualizer/i18n/en.ts +153 -0
  23. package/src/tool/bortleVisualizer/i18n/es.ts +161 -0
  24. package/src/tool/bortleVisualizer/i18n/fr.ts +153 -0
  25. package/src/tool/bortleVisualizer/index.ts +41 -0
  26. package/src/tool/bortleVisualizer/logic.ts +118 -0
  27. package/src/tool/bortleVisualizer/seo.astro +61 -0
  28. package/src/tool/bortleVisualizer/style.css +5 -0
  29. package/src/tool/deepSpaceScope/bibliography.astro +14 -0
  30. package/src/tool/deepSpaceScope/component.astro +849 -0
  31. package/src/tool/deepSpaceScope/i18n/en.ts +157 -0
  32. package/src/tool/deepSpaceScope/i18n/es.ts +157 -0
  33. package/src/tool/deepSpaceScope/i18n/fr.ts +157 -0
  34. package/src/tool/deepSpaceScope/index.ts +48 -0
  35. package/src/tool/deepSpaceScope/logic.ts +41 -0
  36. package/src/tool/deepSpaceScope/seo.astro +61 -0
  37. package/src/tool/deepSpaceScope/style.css +5 -0
  38. package/src/tool/starExposureCalculator/bibliography.astro +14 -0
  39. package/src/tool/starExposureCalculator/component.astro +562 -0
  40. package/src/tool/starExposureCalculator/i18n/en.ts +163 -0
  41. package/src/tool/starExposureCalculator/i18n/es.ts +163 -0
  42. package/src/tool/starExposureCalculator/i18n/fr.ts +158 -0
  43. package/src/tool/starExposureCalculator/index.ts +53 -0
  44. package/src/tool/starExposureCalculator/logic.ts +49 -0
  45. package/src/tool/starExposureCalculator/seo.astro +61 -0
  46. package/src/tool/starExposureCalculator/style.css +5 -0
  47. package/src/tool/telescopeResolution/bibliography.astro +14 -0
  48. package/src/tool/telescopeResolution/component.astro +556 -0
  49. package/src/tool/telescopeResolution/i18n/en.ts +168 -0
  50. package/src/tool/telescopeResolution/i18n/es.ts +163 -0
  51. package/src/tool/telescopeResolution/i18n/fr.ts +168 -0
  52. package/src/tool/telescopeResolution/index.ts +52 -0
  53. package/src/tool/telescopeResolution/logic.ts +39 -0
  54. package/src/tool/telescopeResolution/seo.astro +61 -0
  55. package/src/tool/telescopeResolution/style.css +5 -0
  56. package/src/tools.ts +19 -0
  57. package/src/types.ts +71 -0
@@ -0,0 +1,157 @@
1
+ import type { WithContext, FAQPage, HowTo, SoftwareApplication } from 'schema-dts';
2
+ import type { DeepSpaceScopeUI, DeepSpaceScopeLocaleContent } from '../index';
3
+
4
+ const slug = 'telescope-reach';
5
+ const title = 'Telescope Reach Calculator';
6
+ const description = 'Calculate the limiting magnitude of your telescope and discover which deep sky objects are visible with your equipment under your sky conditions.';
7
+
8
+ const ui: DeepSpaceScopeUI = {
9
+ toolTitle: 'Telescope Reach',
10
+ apertureLabel: 'Aperture',
11
+ bortleLabel: 'Sky (Bortle)',
12
+ limitMagLabel: 'Limiting Magnitude',
13
+ azimuthLabel: 'AZ',
14
+ dragHint: 'Click and drag to explore the cosmos (360°)',
15
+ dragHintMobile: 'Drag to explore 360°',
16
+ planetLabel: 'Planets',
17
+ starLabel: 'Stars',
18
+ deepSpaceLabel: 'Deep Space',
19
+ magnitudeLabel: 'Magnitude',
20
+ coordinatesLabel: 'Coordinates',
21
+ };
22
+
23
+ const faq: DeepSpaceScopeLocaleContent['faq'] = [
24
+ {
25
+ question: 'What is the limiting magnitude of a telescope?',
26
+ answer: 'It is the magnitude of the faintest object the telescope can detect under given sky conditions. It depends on the aperture diameter (larger aperture = more light captured) and sky quality (Bortle). A human eye under optimal conditions reaches magnitude 6.5; a 200mm telescope can reach magnitude 13-14.',
27
+ },
28
+ {
29
+ question: 'How does the Bortle scale affect what I can see?',
30
+ answer: 'Each Bortle level reduces approximately 0.5 magnitudes of what you can see. A 200mm telescope under Bortle 2 can reach magnitude 14.5, but under Bortle 7 the same aperture will only reach magnitude 11-12. Dark skies multiply the capability of any instrument.',
31
+ },
32
+ {
33
+ question: 'What objects are visible from a city?',
34
+ answer: 'From a Bortle 7-8 sky (urban), with a 150mm telescope you can see bright planets in great detail, the Moon, bright open clusters (M45, M44), globular clusters (M13), and some bright galaxies like M31 and M81, though without much detail. Faint nebulae require darker skies or specific filters.',
35
+ },
36
+ {
37
+ question: 'How much aperture do I need to see color in nebulae?',
38
+ answer: 'The human eye loses color sensitivity with low light. To see color in emission nebulae like M42 you need at least 200-250mm of aperture and Bortle 3-4 sky. With less aperture nebulae appear grayish, although with astrophotography even small telescopes capture spectacular colors.',
39
+ },
40
+ ];
41
+
42
+ const howTo: DeepSpaceScopeLocaleContent['howTo'] = [
43
+ { name: '1. Set your aperture', text: 'Move the aperture slider to simulate your telescope. The range goes from 50mm (binoculars) to 400mm (advanced telescope).' },
44
+ { name: '2. Adjust sky quality', text: 'Set the Bortle level of your usual observing location to see the real limiting magnitude.' },
45
+ { name: '3. Explore the star map', text: 'Drag the field to explore all 360° of sky and discover which objects are visible with your equipment.' },
46
+ { name: '4. Click on objects', text: 'Tap any sky object to see its detailed information: type, magnitude, and description.' },
47
+ ];
48
+
49
+ const bibliography: DeepSpaceScopeLocaleContent['bibliography'] = [
50
+ { name: 'Complete Messier Catalogue', url: 'https://www.skyatnightmagazine.com/space-science/messier-catalogue' },
51
+ { name: 'Stellarium Web - Interactive Star Chart', url: 'https://stellarium-web.org/' },
52
+ ];
53
+
54
+ const seo: DeepSpaceScopeLocaleContent['seo'] = [
55
+ {
56
+ type: 'summary',
57
+ title: 'Key Points of Telescopic Reach',
58
+ items: [
59
+ 'Aperture is the decisive factor: larger diameter means more light and higher limiting magnitude.',
60
+ 'Dark sky (low Bortle) can gain 2-3 magnitudes compared to an urban sky.',
61
+ 'A 200mm telescope reaches mag 13-14 at Bortle 3, and only mag 11 at Bortle 7.',
62
+ 'Bright planets and the Moon don\'t require dark sky - visible from the city.',
63
+ ],
64
+ },
65
+ { type: 'title', text: 'The Physics of Astronomical Observation: Aperture and Magnitude', level: 2 },
66
+ {
67
+ type: 'paragraph',
68
+ html: 'The primary function of a telescope is not to magnify the image, but to <strong>collect light</strong>. The human eye has a pupil that dilates up to about 6-7mm in complete darkness. A 200mm telescope has a collecting surface of 31,416mm², more than <strong>800 times larger</strong> than the human pupil, allowing you to see objects hundreds of times fainter.',
69
+ },
70
+ {
71
+ type: 'paragraph',
72
+ html: 'The formula for magnitude gain is: <code>Gain = 5 × log₁₀(Aperture_mm / 6)</code>. For a 200mm aperture: 5 × log₁₀(200/6) = 5 × 1.52 = 7.6 additional magnitudes above the naked eye. Adding the 6.5 magnitudes visible to the naked eye (under dark sky), we reach a limiting magnitude of 14.1.',
73
+ },
74
+ { type: 'title', text: 'The Effect of Light Pollution on Reach', level: 2 },
75
+ {
76
+ type: 'paragraph',
77
+ html: 'Even with the world\'s largest telescope, you cannot see faint galaxies from a city center. The brightness of the sky background "erases" the necessary contrast. The <strong>Bortle Scale</strong> quantifies this effect: each additional Bortle level subtracts approximately 0.5 magnitudes of telescope reach.',
78
+ },
79
+ {
80
+ type: 'table',
81
+ headers: ['Aperture', 'Bortle 2 (Dark)', 'Bortle 4 (Rural)', 'Bortle 6 (Suburban)', 'Bortle 8 (Urban)'],
82
+ rows: [
83
+ ['70mm', 'Mag 12.0', 'Mag 10.8', 'Mag 9.5', 'Mag 8.3'],
84
+ ['100mm', 'Mag 12.8', 'Mag 11.6', 'Mag 10.3', 'Mag 9.1'],
85
+ ['150mm', 'Mag 13.6', 'Mag 12.4', 'Mag 11.1', 'Mag 9.9'],
86
+ ['200mm', 'Mag 14.2', 'Mag 13.0', 'Mag 11.7', 'Mag 10.5'],
87
+ ['300mm', 'Mag 15.0', 'Mag 13.8', 'Mag 12.5', 'Mag 11.3'],
88
+ ],
89
+ },
90
+ {
91
+ type: 'tip',
92
+ title: 'The Messier Catalogue: Your Object List',
93
+ html: 'Charles Messier compiled his famous catalogue of 110 objects in 1781 to avoid confusing them with comets. Today it is the reference catalogue for visual observers. The 110 Messier objects (M1-M110) include nebulae, clusters and galaxies, all accessible with telescopes under 150mm from Bortle 4-5 skies.',
94
+ },
95
+ { type: 'title', text: 'Featured Objects by Type and Difficulty', level: 2 },
96
+ {
97
+ type: 'paragraph',
98
+ html: 'For beginning observers, <strong>planets</strong> are the most rewarding target: they don\'t require dark skies and offer surprising details even with small telescopes (Saturn\'s rings at 40x, Jupiter\'s bands at 80x, Mars\' polar caps). <strong>Nebulae</strong> and <strong>galaxies</strong> require more aperture and darker skies, but reward with panoramas of unmatched beauty.',
99
+ },
100
+ {
101
+ type: 'stats',
102
+ columns: 2,
103
+ items: [
104
+ { label: 'Human Eye (7mm)', value: 'Mag 6.5', icon: 'mdi:eye' },
105
+ { label: '70mm Refractor', value: 'Mag 12', icon: 'mdi:telescope' },
106
+ { label: '200mm Dobsonian', value: 'Mag 14+', icon: 'mdi:telescope' },
107
+ { label: 'HST Space', value: 'Mag 31', icon: 'mdi:satellite-variant' },
108
+ ],
109
+ },
110
+ ];
111
+
112
+ const faqSchema: WithContext<FAQPage> = {
113
+ '@context': 'https://schema.org',
114
+ '@type': 'FAQPage',
115
+ mainEntity: faq.map((item) => ({
116
+ '@type': 'Question',
117
+ name: item.question,
118
+ acceptedAnswer: { '@type': 'Answer', text: item.answer },
119
+ })),
120
+ };
121
+
122
+ const howToSchema: WithContext<HowTo> = {
123
+ '@context': 'https://schema.org',
124
+ '@type': 'HowTo',
125
+ name: title,
126
+ description,
127
+ step: howTo.map((step) => ({
128
+ '@type': 'HowToStep',
129
+ name: step.name,
130
+ text: step.text,
131
+ })),
132
+ };
133
+
134
+ const appSchema: WithContext<SoftwareApplication> = {
135
+ '@context': 'https://schema.org',
136
+ '@type': 'SoftwareApplication',
137
+ name: title,
138
+ description,
139
+ applicationCategory: 'UtilitiesApplication',
140
+ operatingSystem: 'Web',
141
+ offers: { '@type': 'Offer', price: '0', priceCurrency: 'EUR' },
142
+ inLanguage: 'en',
143
+ };
144
+
145
+ export const content: DeepSpaceScopeLocaleContent = {
146
+ slug,
147
+ title,
148
+ description,
149
+ ui,
150
+ seo,
151
+ faq,
152
+ faqTitle: 'Frequently Asked Questions',
153
+ bibliography,
154
+ bibliographyTitle: 'Bibliographic References',
155
+ howTo,
156
+ schemas: [faqSchema as any, howToSchema as any, appSchema],
157
+ };
@@ -0,0 +1,157 @@
1
+ import type { WithContext, FAQPage, HowTo, SoftwareApplication } from 'schema-dts';
2
+ import type { DeepSpaceScopeUI, DeepSpaceScopeLocaleContent } from '../index';
3
+
4
+ const slug = 'alcance-telescopio';
5
+ const title = 'Calculadora de Alcance del Telescopio';
6
+ const description = 'Calcula la magnitud límite de tu telescopio y descubre qué objetos de cielo profundo son visibles con tu equipo bajo tus condiciones de cielo.';
7
+
8
+ const ui: DeepSpaceScopeUI = {
9
+ toolTitle: 'Alcance del Telescopio',
10
+ apertureLabel: 'Apertura',
11
+ bortleLabel: 'Cielo (Bortle)',
12
+ limitMagLabel: 'Magnitud Límite',
13
+ azimuthLabel: 'AZ',
14
+ dragHint: 'Haz clic y arrastra para explorar el cosmos (360°)',
15
+ dragHintMobile: 'Arrastra para explorar 360°',
16
+ planetLabel: 'Planetas',
17
+ starLabel: 'Estrellas',
18
+ deepSpaceLabel: 'Espacio Profundo',
19
+ magnitudeLabel: 'Magnitud',
20
+ coordinatesLabel: 'Coordenadas',
21
+ };
22
+
23
+ const faq: DeepSpaceScopeLocaleContent['faq'] = [
24
+ {
25
+ question: '¿Qué es la magnitud límite de un telescopio?',
26
+ answer: 'Es la magnitud del objeto más tenue que el telescopio puede detectar bajo unas condiciones de cielo dadas. Depende del diámetro de la apertura (mayor apertura = más luz captada) y de la calidad del cielo (Bortle). Un ojo humano en condiciones óptimas llega a magnitud 6.5; un telescopio de 200mm puede alcanzar magnitud 13-14.',
27
+ },
28
+ {
29
+ question: '¿Cómo afecta la escala de Bortle a lo que puedo ver?',
30
+ answer: 'Cada nivel de Bortle reduce aproximadamente 0.5 magnitudes de lo que puedes ver. Un telescopio de 200mm bajo un Bortle 2 puede alcanzar magnitud 14.5, pero bajo un Bortle 7 la misma apertura solo llegará a magnitud 11-12. El cielo oscuro multiplica la capacidad de cualquier instrumento.',
31
+ },
32
+ {
33
+ question: '¿Qué objetos son visibles desde una ciudad?',
34
+ answer: 'Desde un cielo Bortle 7-8 (urbano), con un telescopio de 150mm puedes ver los planetas brillantes con gran detalle, la Luna, cúmulos abiertos brillantes (M45, M44), cúmulos globulares (M13), y algunas galaxias brillantes como M31 y M81, aunque sin mucho detalle. Las nebulosas débiles requieren cielos más oscuros o filtros específicos.',
35
+ },
36
+ {
37
+ question: '¿Cuánto apertura necesito para ver el color en las nebulosas?',
38
+ answer: 'El ojo humano pierde sensibilidad al color con poca luz. Para ver color en nebulosas de emisión como M42 necesitas al menos 200-250mm de apertura y cielo Bortle 3-4. Con menos apertura las nebulosas se ven grisáceas, aunque con astrofotografía incluso telescopios pequeños capturan colores espectaculares.',
39
+ },
40
+ ];
41
+
42
+ const howTo: DeepSpaceScopeLocaleContent['howTo'] = [
43
+ { name: '1. Configura tu apertura', text: 'Mueve el slider de apertura para simular tu telescopio. El rango va de 50mm (binoculares) a 400mm (telescopio avanzado).' },
44
+ { name: '2. Ajusta la calidad del cielo', text: 'Pon el nivel de Bortle de tu zona de observación habitual para ver la magnitud límite real.' },
45
+ { name: '3. Explora el mapa estelar', text: 'Arrastra el campo para explorar los 360° del cielo y descubrir qué objetos son visibles con tu equipo.' },
46
+ { name: '4. Haz clic en los objetos', text: 'Toca cualquier objeto del cielo para ver su información detallada: tipo, magnitud y descripción.' },
47
+ ];
48
+
49
+ const bibliography: DeepSpaceScopeLocaleContent['bibliography'] = [
50
+ { name: 'Catálogo Messier Completo', url: 'https://www.skyatnightmagazine.com/space-science/messier-catalogue' },
51
+ { name: 'Stellarium Web - Carta Celeste Interactiva', url: 'https://stellarium-web.org/' },
52
+ ];
53
+
54
+ const seo: DeepSpaceScopeLocaleContent['seo'] = [
55
+ {
56
+ type: 'summary',
57
+ title: 'Claves del Alcance Telescópico',
58
+ items: [
59
+ 'La apertura es el factor decisivo: a mayor diámetro, más luz y mayor magnitud límite.',
60
+ 'El cielo oscuro (Bortle bajo) puede ganar 2-3 magnitudes respecto a un cielo urbano.',
61
+ 'Un telescopio de 200mm alcanza mag 13-14 en Bortle 3, y solo mag 11 en Bortle 7.',
62
+ 'Los planetas brillantes y la Luna no requieren cielo oscuro, son visibles desde ciudad.',
63
+ ],
64
+ },
65
+ { type: 'title', text: 'La Física de la Observación Astronómica: Apertura y Magnitud', level: 2 },
66
+ {
67
+ type: 'paragraph',
68
+ html: 'La función principal de un telescopio no es aumentar la imagen, sino <strong>recolectar luz</strong>. El ojo humano tiene una pupila que se dilata hasta unos 6-7mm en la oscuridad total. Un telescopio de 200mm tiene una superficie colectora de 31,416mm², más de <strong>800 veces mayor</strong> que la pupila humana, permitiéndote ver objetos cientos de veces más tenues.',
69
+ },
70
+ {
71
+ type: 'paragraph',
72
+ html: 'La fórmula para la ganancia de magnitud es: <code>Ganancia = 5 × log₁₀(Apertura_mm / 6)</code>. Para una apertura de 200mm: 5 × log₁₀(200/6) = 5 × 1.52 = 7.6 magnitudes adicionales sobre el ojo desnudo. Sumando las 6.5 magnitudes visibles a ojo (en cielo oscuro), llegamos a magnitud límite de 14.1.',
73
+ },
74
+ { type: 'title', text: 'El Efecto de la Contaminación Lumínica en el Alcance', level: 2 },
75
+ {
76
+ type: 'paragraph',
77
+ html: 'Incluso con el telescopio más grande del mundo, no puedes ver galaxias débiles desde el centro de una ciudad. El brillo del fondo del cielo "borra" el contraste necesario. La <strong>Escala de Bortle</strong> cuantifica este efecto: cada nivel adicional de Bortle resta aproximadamente 0.5 magnitudes de alcance al telescopio.',
78
+ },
79
+ {
80
+ type: 'table',
81
+ headers: ['Apertura', 'Bortle 2 (Oscuro)', 'Bortle 4 (Rural)', 'Bortle 6 (Suburbano)', 'Bortle 8 (Urbano)'],
82
+ rows: [
83
+ ['70mm', 'Mag 12.0', 'Mag 10.8', 'Mag 9.5', 'Mag 8.3'],
84
+ ['100mm', 'Mag 12.8', 'Mag 11.6', 'Mag 10.3', 'Mag 9.1'],
85
+ ['150mm', 'Mag 13.6', 'Mag 12.4', 'Mag 11.1', 'Mag 9.9'],
86
+ ['200mm', 'Mag 14.2', 'Mag 13.0', 'Mag 11.7', 'Mag 10.5'],
87
+ ['300mm', 'Mag 15.0', 'Mag 13.8', 'Mag 12.5', 'Mag 11.3'],
88
+ ],
89
+ },
90
+ {
91
+ type: 'tip',
92
+ title: 'El Catálogo Messier: Tu Lista de Objetos',
93
+ html: 'Charles Messier compiló en 1781 su famoso catálogo de 110 objetos para evitar confundirlos con cometas. Hoy es el catálogo de referencia para observadores visuales. Los 110 objetos Messier (M1-M110) incluyen nebulosas, cúmulos y galaxias, todos accesibles con telescopios de menos de 150mm desde cielos Bortle 4-5.',
94
+ },
95
+ { type: 'title', text: 'Objetos Destacados por Tipo y Dificultad', level: 2 },
96
+ {
97
+ type: 'paragraph',
98
+ html: 'Para los observadores que empiezan, los <strong>planetas</strong> son el objetivo más gratificante: no requieren cielo oscuro y ofrecen detalles sorprendentes incluso con telescopios pequeños (anillos de Saturno a 40x, bandas de Júpiter a 80x, casquetes polares de Marte). Las <strong>nebulosas</strong> y <strong>galaxias</strong> requieren mayor apertura y cielos más oscuros, pero compensan con panoramas de belleza inigualable.',
99
+ },
100
+ {
101
+ type: 'stats',
102
+ columns: 2,
103
+ items: [
104
+ { label: 'Ojo Humano (7mm)', value: 'Mag 6.5', icon: 'mdi:eye' },
105
+ { label: '70mm Refractor', value: 'Mag 12', icon: 'mdi:telescope' },
106
+ { label: '200mm Dobson', value: 'Mag 14+', icon: 'mdi:telescope' },
107
+ { label: 'HST Espacial', value: 'Mag 31', icon: 'mdi:satellite-variant' },
108
+ ],
109
+ },
110
+ ];
111
+
112
+ const faqSchema: WithContext<FAQPage> = {
113
+ '@context': 'https://schema.org',
114
+ '@type': 'FAQPage',
115
+ mainEntity: faq.map((item) => ({
116
+ '@type': 'Question',
117
+ name: item.question,
118
+ acceptedAnswer: { '@type': 'Answer', text: item.answer },
119
+ })),
120
+ };
121
+
122
+ const howToSchema: WithContext<HowTo> = {
123
+ '@context': 'https://schema.org',
124
+ '@type': 'HowTo',
125
+ name: title,
126
+ description,
127
+ step: howTo.map((step) => ({
128
+ '@type': 'HowToStep',
129
+ name: step.name,
130
+ text: step.text,
131
+ })),
132
+ };
133
+
134
+ const appSchema: WithContext<SoftwareApplication> = {
135
+ '@context': 'https://schema.org',
136
+ '@type': 'SoftwareApplication',
137
+ name: title,
138
+ description,
139
+ applicationCategory: 'UtilitiesApplication',
140
+ operatingSystem: 'Web',
141
+ offers: { '@type': 'Offer', price: '0', priceCurrency: 'EUR' },
142
+ inLanguage: 'es',
143
+ };
144
+
145
+ export const content: DeepSpaceScopeLocaleContent = {
146
+ slug,
147
+ title,
148
+ description,
149
+ ui,
150
+ seo,
151
+ faq,
152
+ faqTitle: 'Preguntas Frecuentes',
153
+ bibliography,
154
+ bibliographyTitle: 'Referencias Bibliográficas',
155
+ howTo,
156
+ schemas: [faqSchema as any, howToSchema as any, appSchema],
157
+ };
@@ -0,0 +1,157 @@
1
+ import type { WithContext, FAQPage, HowTo, SoftwareApplication } from 'schema-dts';
2
+ import type { DeepSpaceScopeUI, DeepSpaceScopeLocaleContent } from '../index';
3
+
4
+ const slug = 'portee-telescope';
5
+ const title = 'Calculateur de Portée du Télescope';
6
+ const description = 'Calculez la magnitude limite de votre télescope et découvrez quels objets du ciel profond sont visibles avec votre équipement dans vos conditions de ciel.';
7
+
8
+ const ui: DeepSpaceScopeUI = {
9
+ toolTitle: 'Portée du Télescope',
10
+ apertureLabel: 'Ouverture',
11
+ bortleLabel: 'Ciel (Bortle)',
12
+ limitMagLabel: 'Magnitude Limite',
13
+ azimuthLabel: 'AZ',
14
+ dragHint: 'Cliquez et faites glisser pour explorer le cosmos (360°)',
15
+ dragHintMobile: 'Faites glisser pour explorer 360°',
16
+ planetLabel: 'Planètes',
17
+ starLabel: 'Étoiles',
18
+ deepSpaceLabel: 'Espace Profond',
19
+ magnitudeLabel: 'Magnitude',
20
+ coordinatesLabel: 'Coordonnées',
21
+ };
22
+
23
+ const faq: DeepSpaceScopeLocaleContent['faq'] = [
24
+ {
25
+ question: 'Qu\'est-ce que la magnitude limite d\'un télescope?',
26
+ answer: 'C\'est la magnitude de l\'objet le plus faible que le télescope peut détecter dans des conditions de ciel données. Elle dépend du diamètre de l\'ouverture (plus grande ouverture = plus de lumière captée) et de la qualité du ciel (Bortle). Un oeil humain dans des conditions optimales atteint la magnitude 6.5; un télescope de 200mm peut atteindre la magnitude 13-14.',
27
+ },
28
+ {
29
+ question: 'Comment l\'échelle de Bortle affecte-t-elle ce que je peux voir?',
30
+ answer: 'Chaque niveau de Bortle réduit d\'environ 0.5 magnitude ce que vous pouvez voir. Un télescope de 200mm sous un Bortle 2 peut atteindre la magnitude 14.5, mais sous un Bortle 7 la même ouverture n\'atteindra que la magnitude 11-12. Un ciel sombre multiplie la capacité de tout instrument.',
31
+ },
32
+ {
33
+ question: 'Quels objets sont visibles depuis une ville?',
34
+ answer: 'Depuis un ciel Bortle 7-8 (urbain), avec un télescope de 150mm vous pouvez voir les planètes brillantes en grand détail, la Lune, les amas ouverts brillants (M45, M44), les amas globulaires (M13), et certaines galaxies brillantes comme M31 et M81, bien que sans beaucoup de détail. Les nébuleuses faibles nécessitent des ciels plus sombres ou des filtres spécifiques.',
35
+ },
36
+ {
37
+ question: 'De quelle ouverture ai-je besoin pour voir les couleurs dans les nébuleuses?',
38
+ answer: 'L\'oeil humain perd la sensibilité aux couleurs avec peu de lumière. Pour voir de la couleur dans des nébuleuses d\'émission comme M42, vous avez besoin d\'au moins 200-250mm d\'ouverture et d\'un ciel Bortle 3-4. Avec moins d\'ouverture, les nébuleuses apparaissent grisâtres, bien qu\'en astrophotographie même de petits télescopes capturent des couleurs spectaculaires.',
39
+ },
40
+ ];
41
+
42
+ const howTo: DeepSpaceScopeLocaleContent['howTo'] = [
43
+ { name: '1. Configurez votre ouverture', text: 'Déplacez le curseur d\'ouverture pour simuler votre télescope. La plage va de 50mm (jumelles) à 400mm (télescope avancé).' },
44
+ { name: '2. Ajustez la qualité du ciel', text: 'Réglez le niveau de Bortle de votre lieu d\'observation habituel pour voir la magnitude limite réelle.' },
45
+ { name: '3. Explorez la carte étoilée', text: 'Faites glisser le champ pour explorer les 360° du ciel et découvrir quels objets sont visibles avec votre équipement.' },
46
+ { name: '4. Cliquez sur les objets', text: 'Touchez n\'importe quel objet céleste pour voir ses informations détaillées: type, magnitude et description.' },
47
+ ];
48
+
49
+ const bibliography: DeepSpaceScopeLocaleContent['bibliography'] = [
50
+ { name: 'Catalogue Messier Complet', url: 'https://www.skyatnightmagazine.com/space-science/messier-catalogue' },
51
+ { name: 'Stellarium Web - Carte Céleste Interactive', url: 'https://stellarium-web.org/' },
52
+ ];
53
+
54
+ const seo: DeepSpaceScopeLocaleContent['seo'] = [
55
+ {
56
+ type: 'summary',
57
+ title: 'Points Clés de la Portée Télescopique',
58
+ items: [
59
+ 'L\'ouverture est le facteur décisif: plus grand diamètre signifie plus de lumière et magnitude limite plus élevée.',
60
+ 'Un ciel sombre (Bortle faible) peut gagner 2-3 magnitudes par rapport à un ciel urbain.',
61
+ 'Un télescope de 200mm atteint mag 13-14 en Bortle 3, et seulement mag 11 en Bortle 7.',
62
+ 'Les planètes brillantes et la Lune ne nécessitent pas de ciel sombre - visibles depuis la ville.',
63
+ ],
64
+ },
65
+ { type: 'title', text: 'La Physique de l\'Observation Astronomique: Ouverture et Magnitude', level: 2 },
66
+ {
67
+ type: 'paragraph',
68
+ html: 'La fonction principale d\'un télescope n\'est pas d\'agrandir l\'image, mais de <strong>collecter de la lumière</strong>. L\'oeil humain a une pupille qui se dilate jusqu\'à environ 6-7mm dans l\'obscurité totale. Un télescope de 200mm a une surface collectrice de 31 416mm², plus de <strong>800 fois plus grande</strong> que la pupille humaine, vous permettant de voir des objets des centaines de fois plus faibles.',
69
+ },
70
+ {
71
+ type: 'paragraph',
72
+ html: 'La formule du gain de magnitude est: <code>Gain = 5 × log₁₀(Ouverture_mm / 6)</code>. Pour une ouverture de 200mm: 5 × log₁₀(200/6) = 5 × 1.52 = 7.6 magnitudes supplémentaires au-dessus de l\'oeil nu. En ajoutant les 6.5 magnitudes visibles à l\'oeil nu (sous ciel sombre), on atteint une magnitude limite de 14.1.',
73
+ },
74
+ { type: 'title', text: 'L\'Effet de la Pollution Lumineuse sur la Portée', level: 2 },
75
+ {
76
+ type: 'paragraph',
77
+ html: 'Même avec le plus grand télescope du monde, vous ne pouvez pas voir des galaxies faibles depuis le centre d\'une ville. La luminosité du fond du ciel "efface" le contraste nécessaire. L\'<strong>Échelle de Bortle</strong> quantifie cet effet: chaque niveau de Bortle supplémentaire soustrait environ 0.5 magnitude de portée au télescope.',
78
+ },
79
+ {
80
+ type: 'table',
81
+ headers: ['Ouverture', 'Bortle 2 (Sombre)', 'Bortle 4 (Rural)', 'Bortle 6 (Suburbain)', 'Bortle 8 (Urbain)'],
82
+ rows: [
83
+ ['70mm', 'Mag 12.0', 'Mag 10.8', 'Mag 9.5', 'Mag 8.3'],
84
+ ['100mm', 'Mag 12.8', 'Mag 11.6', 'Mag 10.3', 'Mag 9.1'],
85
+ ['150mm', 'Mag 13.6', 'Mag 12.4', 'Mag 11.1', 'Mag 9.9'],
86
+ ['200mm', 'Mag 14.2', 'Mag 13.0', 'Mag 11.7', 'Mag 10.5'],
87
+ ['300mm', 'Mag 15.0', 'Mag 13.8', 'Mag 12.5', 'Mag 11.3'],
88
+ ],
89
+ },
90
+ {
91
+ type: 'tip',
92
+ title: 'Le Catalogue Messier: Votre Liste d\'Objets',
93
+ html: 'Charles Messier a compilé en 1781 son célèbre catalogue de 110 objets pour éviter de les confondre avec des comètes. Aujourd\'hui c\'est le catalogue de référence pour les observateurs visuels. Les 110 objets Messier (M1-M110) incluent nébuleuses, amas et galaxies, tous accessibles avec des télescopes de moins de 150mm depuis des ciels Bortle 4-5.',
94
+ },
95
+ { type: 'title', text: 'Objets Remarquables par Type et Difficulté', level: 2 },
96
+ {
97
+ type: 'paragraph',
98
+ html: 'Pour les observateurs débutants, les <strong>planètes</strong> sont la cible la plus gratifiante: elles ne nécessitent pas de ciel sombre et offrent des détails surprenants même avec de petits télescopes (anneaux de Saturne à 40x, bandes de Jupiter à 80x). Les <strong>nébuleuses</strong> et les <strong>galaxies</strong> nécessitent plus d\'ouverture et des ciels plus sombres, mais récompensent avec des panoramas d\'une beauté incomparable.',
99
+ },
100
+ {
101
+ type: 'stats',
102
+ columns: 2,
103
+ items: [
104
+ { label: 'Oeil Humain (7mm)', value: 'Mag 6.5', icon: 'mdi:eye' },
105
+ { label: 'Réfracteur 70mm', value: 'Mag 12', icon: 'mdi:telescope' },
106
+ { label: 'Dobson 200mm', value: 'Mag 14+', icon: 'mdi:telescope' },
107
+ { label: 'HST Spatial', value: 'Mag 31', icon: 'mdi:satellite-variant' },
108
+ ],
109
+ },
110
+ ];
111
+
112
+ const faqSchema: WithContext<FAQPage> = {
113
+ '@context': 'https://schema.org',
114
+ '@type': 'FAQPage',
115
+ mainEntity: faq.map((item) => ({
116
+ '@type': 'Question',
117
+ name: item.question,
118
+ acceptedAnswer: { '@type': 'Answer', text: item.answer },
119
+ })),
120
+ };
121
+
122
+ const howToSchema: WithContext<HowTo> = {
123
+ '@context': 'https://schema.org',
124
+ '@type': 'HowTo',
125
+ name: title,
126
+ description,
127
+ step: howTo.map((step) => ({
128
+ '@type': 'HowToStep',
129
+ name: step.name,
130
+ text: step.text,
131
+ })),
132
+ };
133
+
134
+ const appSchema: WithContext<SoftwareApplication> = {
135
+ '@context': 'https://schema.org',
136
+ '@type': 'SoftwareApplication',
137
+ name: title,
138
+ description,
139
+ applicationCategory: 'UtilitiesApplication',
140
+ operatingSystem: 'Web',
141
+ offers: { '@type': 'Offer', price: '0', priceCurrency: 'EUR' },
142
+ inLanguage: 'fr',
143
+ };
144
+
145
+ export const content: DeepSpaceScopeLocaleContent = {
146
+ slug,
147
+ title,
148
+ description,
149
+ ui,
150
+ seo,
151
+ faq,
152
+ faqTitle: 'Questions Fréquentes',
153
+ bibliography,
154
+ bibliographyTitle: 'Références Bibliographiques',
155
+ howTo,
156
+ schemas: [faqSchema as any, howToSchema as any, appSchema],
157
+ };
@@ -0,0 +1,48 @@
1
+ import type { AstronomyToolEntry, ToolLocaleContent, ToolDefinition } from '../../types';
2
+ import DeepSpaceScopeComponent from './component.astro';
3
+ import DeepSpaceScopeSEO from './seo.astro';
4
+ import DeepSpaceScopeBibliography from './bibliography.astro';
5
+
6
+ export interface DeepSpaceScopeUI {
7
+ [key: string]: string;
8
+ toolTitle: string;
9
+ apertureLabel: string;
10
+ bortleLabel: string;
11
+ limitMagLabel: string;
12
+ azimuthLabel: string;
13
+ dragHint: string;
14
+ dragHintMobile: string;
15
+ planetLabel: string;
16
+ starLabel: string;
17
+ deepSpaceLabel: string;
18
+ magnitudeLabel: string;
19
+ coordinatesLabel: string;
20
+ }
21
+
22
+ export type DeepSpaceScopeLocaleContent = ToolLocaleContent<DeepSpaceScopeUI>;
23
+
24
+ import { content as es } from './i18n/es';
25
+ import { content as en } from './i18n/en';
26
+ import { content as fr } from './i18n/fr';
27
+
28
+ export const deepSpaceScope: AstronomyToolEntry<DeepSpaceScopeUI> = {
29
+ id: 'deep-space-scope',
30
+ icons: {
31
+ bg: 'mdi:telescope',
32
+ fg: 'mdi:eye',
33
+ },
34
+ i18n: {
35
+ es: async () => es,
36
+ en: async () => en,
37
+ fr: async () => fr,
38
+ },
39
+ };
40
+
41
+ export { DeepSpaceScopeComponent, DeepSpaceScopeSEO, DeepSpaceScopeBibliography };
42
+
43
+ export const DEEP_SPACE_SCOPE_TOOL: ToolDefinition = {
44
+ entry: deepSpaceScope,
45
+ Component: DeepSpaceScopeComponent,
46
+ SEOComponent: DeepSpaceScopeSEO,
47
+ BibliographyComponent: DeepSpaceScopeBibliography,
48
+ };
@@ -0,0 +1,41 @@
1
+ export interface DeepSpaceObject {
2
+ name: string;
3
+ type: string;
4
+ mag: number;
5
+ az: number;
6
+ alt: number;
7
+ icon: string;
8
+ color: string;
9
+ desc?: string;
10
+ }
11
+
12
+ export function calculateLimitingMagnitude(apertureSlider: number, bortle: number): number {
13
+ const mm = 50 + (apertureSlider / 100) * 350;
14
+ const nakedEyeMag = 7.9 - bortle * 0.5;
15
+ const gainMag = 5 * Math.log10(mm / 6);
16
+ let limit = nakedEyeMag + gainMag;
17
+ if (bortle > 4) limit -= (bortle - 4) * 0.3;
18
+ return Math.max(0, Math.min(limit, 16.5));
19
+ }
20
+
21
+ export function apertureSliderToMm(sliderValue: number): number {
22
+ return Math.round(50 + (sliderValue / 100) * 350);
23
+ }
24
+
25
+ export const DEEP_SPACE_OBJECTS: DeepSpaceObject[] = [
26
+ { name: 'Venus', type: 'Planeta', mag: -4.5, az: 270, alt: 30, icon: 'mdi:circle', color: 'text-yellow-200', desc: 'El planeta más brillante del cielo nocturno. Visible a plena luz del día.' },
27
+ { name: 'Júpiter', type: 'Planeta', mag: -2.5, az: 180, alt: 40, icon: 'mdi:circle', color: 'text-yellow-100', desc: 'El gigante del sistema solar. Con binoculares se pueden ver sus cuatro lunas galileanas.' },
28
+ { name: 'Saturno', type: 'Planeta', mag: 0.8, az: 220, alt: 35, icon: 'mdi:circle', color: 'text-yellow-50', desc: 'Sus anillos son visibles con un telescopio de 60mm a 50 aumentos.' },
29
+ { name: 'Marte', type: 'Planeta', mag: 1.5, az: 150, alt: 25, icon: 'mdi:circle', color: 'text-red-400', desc: 'El planeta rojo. Varía de magnitud -2.9 en oposición a +1.8 en conjunción.' },
30
+ { name: 'Sirio', type: 'Estrella', mag: -1.46, az: 145, alt: 50, icon: 'mdi:star-four-points', color: 'text-blue-200', desc: 'La estrella más brillante del cielo nocturno. Está a solo 8.6 años-luz.' },
31
+ { name: 'Canopus', type: 'Estrella', mag: -0.74, az: 200, alt: 20, icon: 'mdi:star-four-points', color: 'text-yellow-100', desc: 'La segunda estrella más brillante, usada para navegar en el hemisferio sur.' },
32
+ { name: 'Arcturus', type: 'Estrella', mag: -0.05, az: 60, alt: 55, icon: 'mdi:star-four-points', color: 'text-orange-300', desc: 'Gigante naranja en la constelación del Boyero. A 36 años-luz de la Tierra.' },
33
+ { name: 'Vega', type: 'Estrella', mag: 0.03, az: 40, alt: 70, icon: 'mdi:star-four-points', color: 'text-blue-100', desc: 'Vértice del Triángulo de Verano. La estrella de referencia para magnitud 0.' },
34
+ { name: 'M42 Orión', type: 'Nebulosa', mag: 4.0, az: 140, alt: 45, icon: 'mdi:creation', color: 'text-indigo-300', desc: 'La gran nebulosa de Orión, a 1344 años-luz. Vivero de estrellas jóvenes.' },
35
+ { name: 'M45 Pléyades', type: 'Cúmulo', mag: 1.6, az: 100, alt: 60, icon: 'mdi:creation', color: 'text-blue-300', desc: 'Las Siete Hermanas. A 444 años-luz, el cúmulo abierto más famoso del cielo.' },
36
+ { name: 'M31 Andrómeda', type: 'Galaxia', mag: 3.4, az: 30, alt: 50, icon: 'mdi:creation', color: 'text-purple-300', desc: 'La galaxia vecina más grande. A 2.5 millones de años-luz, visible a simple vista en cielos oscuros.' },
37
+ { name: 'M13 Hércules', type: 'Cúmulo', mag: 5.8, az: 80, alt: 65, icon: 'mdi:creation', color: 'text-yellow-300', desc: 'El gran cúmulo globular de Hércules. Contiene 300.000 estrellas a 25.100 años-luz.' },
38
+ { name: 'M57 Anillo', type: 'Nebulosa', mag: 8.8, az: 50, alt: 58, icon: 'mdi:creation', color: 'text-cyan-300', desc: 'Nebulosa planetaria en Lyra. Anillo de gas expulsado por una enana blanca.' },
39
+ { name: 'M81 Bode', type: 'Galaxia', mag: 6.9, az: 340, alt: 55, icon: 'mdi:creation', color: 'text-violet-300', desc: 'Galaxia espiral en la Osa Mayor. Interactuando gravitatoriamente con M82.' },
40
+ { name: 'Plutón', type: 'Planeta Enano', mag: 14.3, az: 195, alt: 22, icon: 'mdi:circle-small', color: 'text-slate-300', desc: 'El planeta enano más famoso. Requiere un telescopio de 250mm o más y cielos oscuros.' },
41
+ ];
@@ -0,0 +1,61 @@
1
+ ---
2
+ import {
3
+ SEOTitle,
4
+ SEOTable,
5
+ SEOTip,
6
+ SEOCard,
7
+ SEOStats,
8
+ SEOGlossary,
9
+ SEOProsCons,
10
+ SEOSummary,
11
+ SEODiagnostic,
12
+ SEOArticle
13
+ } from '@jjlmoya/utils-shared';
14
+ import { deepSpaceScope } from './index';
15
+ import type { KnownLocale } from '../../types';
16
+
17
+ interface Props {
18
+ locale?: KnownLocale;
19
+ }
20
+
21
+ const { locale = 'es' } = Astro.props;
22
+ const content = await deepSpaceScope.i18n[locale]?.();
23
+ if (!content) return null;
24
+
25
+ const { seo } = content;
26
+ ---
27
+
28
+ <SEOArticle>
29
+ {seo.map((section: any) => {
30
+ switch (section.type) {
31
+ case 'summary':
32
+ return <SEOSummary title={section.title} items={section.items} />;
33
+ case 'title':
34
+ return <SEOTitle title={section.text} level={section.level || 2} />;
35
+ case 'paragraph':
36
+ return <p set:html={section.html} />;
37
+ case 'stats':
38
+ return <SEOStats stats={section.items} columns={section.columns} />;
39
+ case 'card':
40
+ return <SEOCard title={section.title} icon={section.icon}><Fragment set:html={section.html} /></SEOCard>;
41
+ case 'tip':
42
+ return <SEOTip title={section.title}><Fragment set:html={section.html} /></SEOTip>;
43
+ case 'table':
44
+ return (
45
+ <SEOTable headers={section.headers}>
46
+ {section.rows.map((row: string[]) => (
47
+ <tr>{row.map((cell: string) => <td set:html={cell} />)}</tr>
48
+ ))}
49
+ </SEOTable>
50
+ );
51
+ case 'proscons':
52
+ return <SEOProsCons title={section.title} items={section.items} />;
53
+ case 'diagnostic':
54
+ return <SEODiagnostic title={section.title} icon={section.icon} type={section.variant} badge={section.badge}><Fragment set:html={section.html} /></SEODiagnostic>;
55
+ case 'glossary':
56
+ return <SEOGlossary items={section.items} />;
57
+ default:
58
+ return null;
59
+ }
60
+ })}
61
+ </SEOArticle>
@@ -0,0 +1,5 @@
1
+ .scope-container {
2
+ width: 100%;
3
+ border-radius: 1.5rem;
4
+ overflow: hidden;
5
+ }
@@ -0,0 +1,14 @@
1
+ ---
2
+ import { Bibliography as SharedBibliography } from '@jjlmoya/utils-shared';
3
+ import { starExposureCalculator } 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 starExposureCalculator.i18n[locale]?.();
12
+ ---
13
+
14
+ {content && <SharedBibliography links={content.bibliography} />}