Skip to content

Commit a0fa77c

Browse files
feat: Energy-based Torino Scale + comprehensive documentation (v2.0.1)
- Torino Scale: Kinetic energy (Joules Megatons TNT) classification - Energy thresholds: harmless/local/regional/national/global/extinction - Probability Energy matrix for threat levels - NEW: wiki/Torino-Scale.md - Complete methodology - Updated: README.md, ROADMAP.md, DISCLAIMER.md, wiki files
1 parent 7c8f1e8 commit a0fa77c

9 files changed

Lines changed: 285 additions & 53 deletions

File tree

CHANGELOG.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ All notable changes to CosmoRisk will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8-
## [2.0.0] - 18.12.2025
8+
## [2.0.1] - 18.12.2025
99

1010
### Added - Branding & Polish
1111
- CosmoRisk branding throughout application
@@ -25,7 +25,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2525
- Collision warning banner with pulse animation
2626

2727
### Added - Analysis Tools
28-
- Torino Scale (0-10) impact hazard assessment
28+
- Torino Scale (0-10) impact hazard assessment with energy-based classification:
29+
- Kinetic energy conversion: Joules → Megatons TNT
30+
- Energy thresholds: harmless (<1 kt), local (1 kt-1 MT), regional (1-100 MT), national (100-1000 MT), global (1-100 GT), extinction (>100 GT)
31+
- Probability × Energy matrix for accurate threat levels
32+
- NASA CNEOS reference integration
33+
- Display shows asteroid diameter and energy in MT/GT format
2934
- MOID Calculator with real distance-based calculations
3035
- Spectral type analysis (C/S/M/X/V)
3136
- Side-by-side asteroid comparison table modal

DISCLAIMER.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,12 @@ based on simplified physical models and may not accurately represent real-world
2626

2727
3. **MOID Calculation**: Uses 72×72 point orbital sampling for accuracy, but is not JPL-grade precision.
2828

29-
4. **Impact Predictions**: All "hazard" or "impact" assessments are **NOT** official NASA/ESA
29+
4. **Torino Scale**: Our energy-based Torino classification is a simplified model that:
30+
- Converts kinetic energy to Megatons TNT
31+
- Uses probability × energy thresholds
32+
- Does NOT replace official NASA Sentry or ESA NEOCC assessments
33+
34+
5. **Impact Predictions**: All "hazard" or "impact" assessments are **NOT** official NASA/ESA
3035
determinations. For official assessments, consult:
3136
- [NASA Center for Near Earth Object Studies (CNEOS)](https://cneos.jpl.nasa.gov/)
3237
- [ESA NEO Coordination Centre (NEOCC)](https://neo.ssa.esa.int/)

README.md

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
- **Post-Processing** - Unreal Bloom, SSAO, FXAA for cinematic quality
3636

3737
### Analysis Tools
38-
- **Torino Scale** - 0-10 impact hazard classification
38+
- **Torino Scale** - 0-10 impact hazard classification based on kinetic energy (Joules → Megatons TNT) and probability
3939
- **MOID Calculator** - Proper orbital intersection distance using 72×72 point sampling
4040
- **3D Orbit Visualization** - Accurate Keplerian orbits with inclination, RAAN, and argument of perihelion
4141
- **Spectral Type Analysis** - C/S/M/X/V composition types
@@ -90,6 +90,23 @@ R_Earth = 6.378137×10⁶ m Earth equatorial radius
9090
P_SRP = 4.56×10⁻⁶ N/m² Solar radiation pressure (1 AU)
9191
```
9292

93+
### Torino Scale Methodology
94+
95+
Kinetic energy is converted to Megatons TNT for threat classification:
96+
97+
$$E_{MT} = \frac{E_{Joules}}{4.184 \times 10^{15}}$$
98+
99+
| Energy Range | Classification | Example |
100+
|--------------|----------------|---------|
101+
| < 1 kiloton | Harmless | Burns up |
102+
| 1 kt - 1 MT | Local | Chelyabinsk (~500 kt) |
103+
| 1 - 100 MT | Regional | Tunguska (~15 MT) |
104+
| 100 MT - 1 GT | National | Large city destruction |
105+
| 1 - 100 GT | Global | Nuclear winter |
106+
| > 100 GT | Extinction | Chicxulub |
107+
108+
Reference: [NASA CNEOS Torino Scale](https://cneos.jpl.nasa.gov/sentry/torino_scale.html)
109+
93110
---
94111

95112
## 🛠️ Installation

ROADMAP.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,11 @@ J2_EARTH = 1.08263e-3 // Earth oblateness coefficient
8080

8181
### Sağ Panel - Bilgi & Analiz
8282
- **Selected Object**: Seçili cismin pozisyon, hız, yarıçap bilgileri
83-
- **Torino Scale**: 0-10 tehlike seviyesi görselleştirmesi
83+
- **Torino Scale**: 0-10 tehlike seviyesi (enerji tabanlı: Joules → Megaton TNT)
84+
- < 1 kt: Zararsız (atmosferde yanar)
85+
- 1 kt - 1 MT: Yerel hasar
86+
- 1 - 100 MT: Bölgesel
87+
- > 100 MT: Ulusal/Küresel
8488
- **MOID Calculator**: Orbital kesişim mesafesi (72×72 nokta örnekleme)
8589
- **Asteroid Info**: Spektral tip, kütle, yoğunluk
8690
- **Deflection Control**:

src/main.ts

Lines changed: 83 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1775,58 +1775,100 @@ class OrbitalSentinelApp {
17751775

17761776
private updateTorinoScale(
17771777
probability: number,
1778-
energy: number,
1778+
energyJoules: number,
17791779
distanceAU: number,
1780-
radiusKm: number
1780+
radiusMeters: number
17811781
): void {
1782-
// Enhanced Torino scale calculation
1783-
// Based on impact probability, kinetic energy, proximity, and size
1782+
// Scientifically accurate Torino Scale calculation
1783+
// Based on: https://cneos.jpl.nasa.gov/sentry/torino_scale.html
1784+
1785+
// Convert kinetic energy from Joules to Megatons TNT
1786+
// 1 Megaton = 4.184e15 Joules
1787+
const energyMT = energyJoules / 4.184e15;
1788+
1789+
// Energy-based threat thresholds (in Megatons TNT)
1790+
const isHarmless = energyMT < 0.001; // < 1 kiloton - burns up
1791+
const isLocal = energyMT >= 0.001 && energyMT < 1; // 1kt-1MT - local damage
1792+
const isRegional = energyMT >= 1 && energyMT < 100; // 1-100 MT - regional
1793+
const isNational = energyMT >= 100 && energyMT < 1000; // 100-1000 MT - national
1794+
const isGlobal = energyMT >= 1000 && energyMT < 100000; // 1-100 Gigatons
1795+
const isExtinction = energyMT >= 100000; // > 100 Gigatons
1796+
1797+
// MOID-based hazard assessment
1798+
const isPHA = distanceAU < 0.05; // Potentially Hazardous Asteroid threshold
1799+
17841800
let level = 0;
17851801

1786-
// Distance-based assessment (closer = higher level)
1787-
const isClose = distanceAU < 0.05; // < 0.05 AU is concerning
1788-
const isVeryClose = distanceAU < 0.01; // < 0.01 AU is very concerning
1789-
1790-
// Size-based assessment
1791-
const isLarge = radiusKm > 0.05; // > 50m can cause local damage
1792-
const isVeryLarge = radiusKm > 0.5; // > 500m can cause regional damage
1793-
const isMassive = radiusKm > 1.0; // > 1km can cause global effects
1794-
1795-
// Base level from probability
1796-
if (probability < 1e-6 && !isVeryClose) {
1797-
level = 0; // No hazard
1798-
} else if (probability < 1e-4 && !isClose) {
1799-
level = 1; // Normal
1800-
} else if (isVeryClose && isMassive) {
1801-
// Very close + massive = high threat
1802-
level = Math.min(10, 7 + Math.floor(probability * 6));
1803-
} else if (isVeryClose && isVeryLarge) {
1804-
level = Math.min(8, 5 + Math.floor(probability * 6));
1805-
} else if (isClose && isLarge) {
1806-
level = Math.min(6, 3 + Math.floor(Math.log10(energy + 1) / 4));
1802+
// Torino Scale Logic (simplified from official scale)
1803+
// Level 0: No hazard - collision extremely unlikely
1804+
// Level 1: Normal - routine discovery, very unlikely collision
1805+
// Levels 2-4: Meriting attention by astronomers
1806+
// Levels 5-7: Threatening - governmental attention warranted
1807+
// Levels 8-10: Certain/near-certain collision
1808+
1809+
if (probability < 1e-7 || isHarmless) {
1810+
// No real hazard - energy too low or probability negligible
1811+
level = 0;
1812+
} else if (probability < 1e-6) {
1813+
// Very low probability
1814+
level = isPHA ? 1 : 0;
1815+
} else if (probability < 1e-4) {
1816+
// Low probability, merit attention
1817+
if (isExtinction) level = 4;
1818+
else if (isGlobal) level = 3;
1819+
else if (isNational) level = 2;
1820+
else level = 1;
18071821
} else if (probability < 1e-2) {
1808-
level = Math.min(4, Math.floor(2 + Math.log10(energy + 1) / 5));
1822+
// Moderate probability
1823+
if (isExtinction) level = 6;
1824+
else if (isGlobal) level = 5;
1825+
else if (isNational) level = 4;
1826+
else if (isRegional) level = 3;
1827+
else level = 2;
18091828
} else if (probability < 0.5) {
1810-
level = Math.min(7, Math.floor(4 + Math.log10(energy + 1) / 5));
1829+
// Significant probability
1830+
if (isExtinction) level = 8;
1831+
else if (isGlobal) level = 7;
1832+
else if (isNational) level = 6;
1833+
else if (isRegional) level = 5;
1834+
else level = 4;
1835+
} else if (probability < 0.99) {
1836+
// High probability
1837+
if (isExtinction) level = 9;
1838+
else if (isGlobal) level = 8;
1839+
else if (isNational) level = 7;
1840+
else if (isRegional) level = 6;
1841+
else level = 5;
18111842
} else {
1812-
level = Math.min(10, Math.floor(7 + probability * 6));
1843+
// Certain collision (>99%)
1844+
if (isExtinction) level = 10;
1845+
else if (isGlobal) level = 10;
1846+
else if (isNational) level = 9;
1847+
else if (isRegional) level = 8;
1848+
else if (isLocal) level = 8;
1849+
else level = 0; // Too small to matter even with certain collision
18131850
}
18141851

1815-
// Ensure level is valid
1852+
// Ensure level is valid 0-10
18161853
level = Math.max(0, Math.min(10, Math.floor(level)));
18171854

1855+
// Format energy and size for display
1856+
const energyStr = energyMT >= 1000 ? `${(energyMT / 1000).toFixed(0)} GT` : `${energyMT.toFixed(2)} MT`;
1857+
const diameterM = radiusMeters * 2;
1858+
const sizeStr = diameterM >= 1000 ? `${(diameterM / 1000).toFixed(1)} km` : `${diameterM.toFixed(0)} m`;
1859+
18181860
const torinoDescriptions: Record<number, string> = {
1819-
0: 'No hazard - Likelihood of collision is zero',
1820-
1: 'Normal - A routine discovery with no unusual concern',
1821-
2: 'Meriting attention - A somewhat close but not unusual encounter',
1822-
3: 'Meriting attention - Close encounter deserving attention',
1823-
4: 'Meriting attention - Close encounter with 1%+ chance of collision',
1824-
5: 'Threatening - Close encounter posing a serious threat',
1825-
6: 'Threatening - Close encounter with large object, significant threat',
1826-
7: 'Threatening - Extremely close encounter with large object',
1827-
8: 'Certain collision - Localized destruction expected',
1828-
9: 'Certain collision - Regional devastation expected',
1829-
10: 'Certain collision - Global climatic catastrophe'
1861+
0: `No hazard - ${isHarmless ? 'Energy too low (<1 kt)' : 'Collision impossible'}`,
1862+
1: `Normal - ${sizeStr} object (${energyStr})`,
1863+
2: `Meriting attention - ${sizeStr} close pass (${energyStr})`,
1864+
3: `Meriting attention - ${sizeStr} regional threat (${energyStr})`,
1865+
4: `Meriting attention - ${sizeStr} 1%+ collision (${energyStr})`,
1866+
5: `Threatening - ${sizeStr} regional destruction (${energyStr})`,
1867+
6: `Threatening - ${sizeStr} national threat (${energyStr})`,
1868+
7: `Threatening - ${sizeStr} global effects (${energyStr})`,
1869+
8: `Certain impact - ${sizeStr} local destruction (${energyStr})`,
1870+
9: `Certain impact - ${sizeStr} continental (${energyStr})`,
1871+
10: `Certain impact - ${sizeStr} global catastrophe (${energyStr})`
18301872
};
18311873

18321874
const torinoDisplay = document.getElementById('torino-display');
@@ -1838,7 +1880,7 @@ class OrbitalSentinelApp {
18381880
torinoValue.textContent = String(level);
18391881
torinoDescription.textContent = torinoDescriptions[level] || 'Unknown';
18401882

1841-
// Highlight active segment
1883+
// Highlight active segment based on Torino color coding
18421884
document.querySelectorAll('.torino-segment').forEach(seg => seg.classList.remove('active'));
18431885
if (level === 0) {
18441886
document.querySelector('.torino-segment.white')?.classList.add('active');

wiki/FAQ.md

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,23 @@ sudo apt-get install libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev pat
6464
## Scientific
6565

6666
### What is the Torino Scale?
67-
A 0-10 scale for categorizing asteroid impact threat:
68-
- 0: No hazard
69-
- 1: Normal discovery, low threat
70-
- 2-4: Meriting concern
71-
- 5-7: Threatening
72-
- 8-10: Certain collision
67+
A 0-10 scale for categorizing asteroid impact threat based on **probability** and **kinetic energy**:
68+
69+
| Level | Color | Category |
70+
|-------|-------|----------|
71+
| 0 | ⬜ White | No hazard - too small or impossible collision |
72+
| 1 | 🟩 Green | Normal - routine discovery, very low threat |
73+
| 2-4 | 🟨 Yellow | Meriting attention - deserves monitoring |
74+
| 5-7 | 🟧 Orange | Threatening - contingency planning needed |
75+
| 8-10 | 🟥 Red | Certain collision - impact will occur |
76+
77+
**Energy Thresholds:**
78+
- **< 1 kiloton**: Burns up in atmosphere
79+
- **1 kt - 1 MT**: Local damage (e.g., Chelyabinsk)
80+
- **1 - 100 MT**: Regional devastation (e.g., Tunguska)
81+
- **> 100 MT**: National/global effects
82+
83+
📖 See [Torino Scale wiki page](https://github.com/SpaceEngineerSS/CosmoRisk/wiki/Torino-Scale) for full methodology.
7384

7485
### What deflection method is most realistic?
7586
Currently, the **Kinetic Impactor** (proven by NASA's DART mission in 2022) is the most technologically ready.

wiki/Home.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ Welcome to the **CosmoRisk** documentation! This wiki provides comprehensive gui
1010
| [Getting Started](Getting-Started) | First steps and basic usage |
1111
| [Keyboard Shortcuts](Keyboard-Shortcuts) | All hotkeys and controls |
1212
| [Physics Engine](Physics-Engine) | Scientific methodology explained |
13+
| [Torino Scale](Torino-Scale) | Impact hazard classification (0-10) |
1314
| [Deflection Methods](Deflection-Methods) | Kinetic Impactor, Ion Beam, Gravity Tractor |
1415
| [NASA API](NASA-API) | NeoWs API integration guide |
1516
| [FAQ](FAQ) | Frequently asked questions |

wiki/Physics-Engine.md

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,13 +83,35 @@ E - e·sin(E) = M
8383

8484
Solved using Newton-Raphson iteration.
8585

86+
## Torino Scale
87+
88+
CosmoRisk implements energy-based Torino Scale assessment:
89+
90+
| Level | Color | Meaning |
91+
|-------|-------|---------|
92+
| 0 | White | No hazard |
93+
| 1 | Green | Normal discovery |
94+
| 2-4 | Yellow | Meriting attention |
95+
| 5-7 | Orange | Threatening |
96+
| 8-10 | Red | Certain collision |
97+
98+
Energy thresholds (Megatons TNT):
99+
- **< 1 kt**: Burns up (Level 0)
100+
- **1 kt - 1 MT**: Local damage
101+
- **1 - 100 MT**: Regional damage
102+
- **100 - 1000 MT**: National scale
103+
- **> 1000 MT**: Global effects
104+
105+
📖 See [Torino Scale](Torino-Scale) for complete methodology.
106+
86107
## References
87108

88109
1. NASA JPL Solar System Dynamics
89110
2. Velocity Verlet: Swope et al. (1982)
90111
3. Orbital Mechanics: Vallado (2007)
91112
4. Asteroid Densities: Carry (2012)
113+
5. Torino Scale: Morrison et al. (2004)
92114

93115
---
94116

95-
[← Keyboard Shortcuts](Keyboard-Shortcuts) | [Next: Deflection Methods](Deflection-Methods)
117+
[← Keyboard Shortcuts](Keyboard-Shortcuts) | [Next: Torino Scale](Torino-Scale)

0 commit comments

Comments
 (0)