@smartnet360/svelte-components 0.0.102 → 0.0.104
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/dist/apps/antenna-pattern/index.d.ts +1 -0
- package/dist/apps/antenna-pattern/index.js +1 -0
- package/dist/apps/antenna-pattern/utils/load-static-antennas.d.ts +17 -0
- package/dist/apps/antenna-pattern/utils/load-static-antennas.js +83 -0
- package/dist/apps/site-check/SiteCheck.svelte +13 -81
- package/dist/apps/site-check/SiteCheckControls.svelte +0 -7
- package/dist/apps/site-check/helper.js +0 -33
- package/dist/apps/site-check/transforms.js +15 -65
- package/dist/core/CellTable/CellTable.svelte +456 -0
- package/dist/core/CellTable/CellTable.svelte.d.ts +27 -0
- package/dist/core/CellTable/CellTablePanel.svelte +211 -0
- package/dist/core/CellTable/CellTablePanel.svelte.d.ts +49 -0
- package/dist/core/CellTable/CellTableToolbar.svelte +218 -0
- package/dist/core/CellTable/CellTableToolbar.svelte.d.ts +32 -0
- package/dist/core/CellTable/column-config.d.ts +63 -0
- package/dist/core/CellTable/column-config.js +465 -0
- package/dist/core/CellTable/index.d.ts +10 -0
- package/dist/core/CellTable/index.js +11 -0
- package/dist/core/CellTable/types.d.ts +166 -0
- package/dist/core/CellTable/types.js +6 -0
- package/dist/core/Charts/ChartCard.svelte +118 -31
- package/dist/core/Charts/ChartCard.svelte.d.ts +2 -0
- package/dist/core/Charts/ChartComponent.svelte +8 -31
- package/dist/core/Charts/data-processor.js +1 -19
- package/dist/core/CoverageMap/ai/AITools.d.ts +117 -0
- package/dist/core/CoverageMap/ai/AITools.js +380 -0
- package/dist/core/CoverageMap/core/CoverageCalculator.d.ts +138 -0
- package/dist/core/CoverageMap/core/CoverageCalculator.js +375 -0
- package/dist/core/CoverageMap/core/GridCalculator.d.ts +115 -0
- package/dist/core/CoverageMap/core/GridCalculator.js +484 -0
- package/dist/core/CoverageMap/core/PathLossModels.d.ts +253 -0
- package/dist/core/CoverageMap/core/PathLossModels.js +380 -0
- package/dist/core/CoverageMap/core/SignalProcessor.d.ts +288 -0
- package/dist/core/CoverageMap/core/SignalProcessor.js +424 -0
- package/dist/core/CoverageMap/data/AntennaStore.d.ts +165 -0
- package/dist/core/CoverageMap/data/AntennaStore.js +327 -0
- package/dist/core/CoverageMap/data/SiteStore.d.ts +155 -0
- package/dist/core/CoverageMap/data/SiteStore.js +355 -0
- package/dist/core/CoverageMap/index.d.ts +74 -0
- package/dist/core/CoverageMap/index.js +103 -0
- package/dist/core/CoverageMap/types.d.ts +252 -0
- package/dist/core/CoverageMap/types.js +7 -0
- package/dist/core/CoverageMap/utils/geoUtils.d.ts +223 -0
- package/dist/core/CoverageMap/utils/geoUtils.js +374 -0
- package/dist/core/CoverageMap/utils/rfUtils.d.ts +329 -0
- package/dist/core/CoverageMap/utils/rfUtils.js +434 -0
- package/dist/core/CoverageMap/visualization/ColorSchemes.d.ts +149 -0
- package/dist/core/CoverageMap/visualization/ColorSchemes.js +377 -0
- package/dist/core/TreeView/index.d.ts +4 -4
- package/dist/core/TreeView/index.js +5 -5
- package/dist/core/TreeView/tree-utils.d.ts +12 -0
- package/dist/core/TreeView/tree-utils.js +115 -6
- package/dist/core/TreeView/tree.store.svelte.d.ts +94 -0
- package/dist/core/TreeView/tree.store.svelte.js +274 -0
- package/dist/core/index.d.ts +1 -0
- package/dist/core/index.js +2 -0
- package/dist/map-v2/features/cells/controls/CellFilterControl.svelte +16 -27
- package/dist/map-v2/features/repeaters/controls/RepeaterFilterControl.svelte +33 -42
- package/dist/map-v2/features/sites/controls/SiteFilterControl.svelte +12 -19
- package/dist/map-v3/core/components/Map.svelte +4 -0
- package/dist/map-v3/core/stores/map.store.svelte.js +2 -0
- package/dist/map-v3/features/cells/components/CellFilterControl.svelte +24 -30
- package/dist/map-v3/features/coverage/index.d.ts +12 -0
- package/dist/map-v3/features/coverage/index.js +16 -0
- package/dist/map-v3/features/coverage/layers/CoverageLayer.svelte +198 -0
- package/dist/map-v3/features/coverage/layers/CoverageLayer.svelte.d.ts +10 -0
- package/dist/map-v3/features/coverage/logic/coloring.d.ts +28 -0
- package/dist/map-v3/features/coverage/logic/coloring.js +77 -0
- package/dist/map-v3/features/coverage/logic/geometry.d.ts +33 -0
- package/dist/map-v3/features/coverage/logic/geometry.js +112 -0
- package/dist/map-v3/features/coverage/stores/coverage.data.svelte.d.ts +46 -0
- package/dist/map-v3/features/coverage/stores/coverage.data.svelte.js +95 -0
- package/dist/map-v3/features/coverage/stores/coverage.display.svelte.d.ts +33 -0
- package/dist/map-v3/features/coverage/stores/coverage.display.svelte.js +90 -0
- package/dist/map-v3/features/coverage/types.d.ts +52 -0
- package/dist/map-v3/features/coverage/types.js +7 -0
- package/dist/map-v3/features/repeaters/components/RepeaterFilterControl.svelte +14 -20
- package/dist/map-v3/features/sites/components/SiteFilterControl.svelte +23 -33
- package/dist/map-v3/index.d.ts +4 -0
- package/dist/map-v3/index.js +5 -0
- package/package.json +4 -3
- package/dist/apps/site-check/transforms-old.d.ts +0 -56
- package/dist/apps/site-check/transforms-old.js +0 -273
- package/dist/core/TreeView/tree.store.d.ts +0 -10
- package/dist/core/TreeView/tree.store.js +0 -320
|
@@ -0,0 +1,355 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Site Store
|
|
3
|
+
*
|
|
4
|
+
* This module manages site and cell/sector data for the coverage calculator.
|
|
5
|
+
* It provides integration with existing map cell data and converts it
|
|
6
|
+
* to the format needed for coverage calculations.
|
|
7
|
+
*
|
|
8
|
+
* Integration points:
|
|
9
|
+
* - map-v2 and map-v3 cell data
|
|
10
|
+
* - Antenna store (for loading antenna patterns)
|
|
11
|
+
* - Coverage calculator (for creating configurations)
|
|
12
|
+
*/
|
|
13
|
+
import { antennaStore } from './AntennaStore';
|
|
14
|
+
// ============================================================================
|
|
15
|
+
// SITE STORE CLASS
|
|
16
|
+
// ============================================================================
|
|
17
|
+
/**
|
|
18
|
+
* Site Store - Manages site and sector data
|
|
19
|
+
*
|
|
20
|
+
* Converts cell data from map components into site configurations
|
|
21
|
+
* suitable for coverage calculations.
|
|
22
|
+
*/
|
|
23
|
+
export class SiteStore {
|
|
24
|
+
/**
|
|
25
|
+
* Create site configuration from cell data
|
|
26
|
+
*
|
|
27
|
+
* Takes an array of cells (sectors) that belong to the same site
|
|
28
|
+
* and creates a complete site configuration for coverage calculation.
|
|
29
|
+
*
|
|
30
|
+
* Process:
|
|
31
|
+
* 1. Group cells by site (use siteName or siteId)
|
|
32
|
+
* 2. For each cell, create sector configuration
|
|
33
|
+
* 3. Load antenna patterns
|
|
34
|
+
* 4. Set RF parameters (power, frequency, tilts)
|
|
35
|
+
* 5. Assign colors for visualization
|
|
36
|
+
*
|
|
37
|
+
* @param cells - Array of cells from map component
|
|
38
|
+
* @param siteId - Optional site ID to filter (if cells from multiple sites)
|
|
39
|
+
* @returns Site configuration ready for coverage calculation
|
|
40
|
+
*
|
|
41
|
+
* @example
|
|
42
|
+
* const cells = getCellsForSite("SITE_001");
|
|
43
|
+
* const siteConfig = await siteStore.createSiteConfiguration(cells);
|
|
44
|
+
*
|
|
45
|
+
* // Use for coverage calculation
|
|
46
|
+
* const calculator = new CoverageCalculator();
|
|
47
|
+
* const result = await calculator.calculate({ site: siteConfig, ... });
|
|
48
|
+
*/
|
|
49
|
+
async createSiteConfiguration(cells, siteId) {
|
|
50
|
+
if (!cells || cells.length === 0) {
|
|
51
|
+
console.error('No cells provided for site configuration');
|
|
52
|
+
return null;
|
|
53
|
+
}
|
|
54
|
+
// Filter to specific site if provided
|
|
55
|
+
const siteCells = siteId
|
|
56
|
+
? cells.filter((c) => c.siteId === siteId || c.cellName.startsWith(siteId))
|
|
57
|
+
: cells;
|
|
58
|
+
if (siteCells.length === 0) {
|
|
59
|
+
console.error(`No cells found for site: ${siteId}`);
|
|
60
|
+
return null;
|
|
61
|
+
}
|
|
62
|
+
// Use first cell to get site information
|
|
63
|
+
const firstCell = siteCells[0];
|
|
64
|
+
const siteName = firstCell.siteId || firstCell.cellName.split('_')[0] || 'Unknown Site';
|
|
65
|
+
const sitePosition = {
|
|
66
|
+
lat: firstCell.siteLatitude || firstCell.latitude,
|
|
67
|
+
lng: firstCell.siteLongitude || firstCell.longitude
|
|
68
|
+
};
|
|
69
|
+
// Create sector configurations
|
|
70
|
+
const sectors = [];
|
|
71
|
+
for (let i = 0; i < siteCells.length; i++) {
|
|
72
|
+
const cell = siteCells[i];
|
|
73
|
+
try {
|
|
74
|
+
const sectorConfig = await this.createSectorConfig(cell, i);
|
|
75
|
+
if (sectorConfig) {
|
|
76
|
+
sectors.push(sectorConfig);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
catch (error) {
|
|
80
|
+
console.error(`Failed to create sector config for cell ${cell.cellName}:`, error);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
if (sectors.length === 0) {
|
|
84
|
+
console.error('Failed to create any sector configurations');
|
|
85
|
+
return null;
|
|
86
|
+
}
|
|
87
|
+
return {
|
|
88
|
+
siteId: siteId || siteName,
|
|
89
|
+
siteName,
|
|
90
|
+
position: sitePosition,
|
|
91
|
+
sectors
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Create sector configuration from a single cell
|
|
96
|
+
*
|
|
97
|
+
* @param cell - Cell data from map
|
|
98
|
+
* @param index - Sector index (for color assignment)
|
|
99
|
+
* @returns Sector configuration
|
|
100
|
+
*/
|
|
101
|
+
async createSectorConfig(cell, index) {
|
|
102
|
+
// Load antenna pattern
|
|
103
|
+
let antennaPattern = await antennaStore.getAntenna(cell.antenna, String(cell.electricalTilt || '0'));
|
|
104
|
+
if (!antennaPattern) {
|
|
105
|
+
console.warn(`Failed to load antenna pattern for ${cell.cellName}: ${cell.antenna}`);
|
|
106
|
+
// Create a default omnidirectional pattern
|
|
107
|
+
const defaultPattern = new Array(360).fill(0);
|
|
108
|
+
antennaPattern = {
|
|
109
|
+
name: cell.antenna || 'Unknown',
|
|
110
|
+
model: cell.antenna || 'Unknown',
|
|
111
|
+
frequency: this.parseFrequency(cell.fband),
|
|
112
|
+
gain_dBd: 0, // Assume 0 dBd if unknown
|
|
113
|
+
gain_dBi: 2.15, // 0 dBd = 2.15 dBi
|
|
114
|
+
pattern: defaultPattern,
|
|
115
|
+
vertical_pattern: defaultPattern,
|
|
116
|
+
availableTilts: ['0']
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
// Determine TX power (priority: atollPW > nwtP1 > default)
|
|
120
|
+
const txPower = cell.atollPW || cell.nwtP1 || 43; // Default to 43 dBm (20W)
|
|
121
|
+
// Determine frequency from band
|
|
122
|
+
const frequency = antennaPattern.frequency || this.parseFrequency(cell.fband);
|
|
123
|
+
// Get mechanical tilt (might need to parse from string)
|
|
124
|
+
// Note: Cell has electricalTilt string, mechanical tilt may need to be derived or defaulted
|
|
125
|
+
const mechanicalTilt = 0; // TODO: Extract from cell data if available
|
|
126
|
+
// Get electrical tilt
|
|
127
|
+
const electricalTilt = parseFloat(String(cell.electricalTilt || '0'));
|
|
128
|
+
// Assign sector color (rotate through standard colors)
|
|
129
|
+
const color = this.getSectorColor(index);
|
|
130
|
+
// Create sector name (extract from cell name or use index)
|
|
131
|
+
const sectorName = this.extractSectorName(cell.cellName, index);
|
|
132
|
+
return {
|
|
133
|
+
sectorId: cell.cellName,
|
|
134
|
+
sectorName,
|
|
135
|
+
position: {
|
|
136
|
+
lat: cell.latitude,
|
|
137
|
+
lng: cell.longitude,
|
|
138
|
+
height: cell.height
|
|
139
|
+
},
|
|
140
|
+
azimuth: cell.azimuth,
|
|
141
|
+
mechanicalTilt,
|
|
142
|
+
electricalTilt,
|
|
143
|
+
txPower,
|
|
144
|
+
frequency,
|
|
145
|
+
antennaPattern,
|
|
146
|
+
enabled: true, // Enable by default
|
|
147
|
+
color
|
|
148
|
+
};
|
|
149
|
+
} /**
|
|
150
|
+
* Group cells by site
|
|
151
|
+
*
|
|
152
|
+
* Takes an array of cells and groups them by site for batch processing.
|
|
153
|
+
*
|
|
154
|
+
* @param cells - Array of all cells
|
|
155
|
+
* @returns Map of siteId → cells
|
|
156
|
+
*/
|
|
157
|
+
groupCellsBySite(cells) {
|
|
158
|
+
const siteMap = new Map();
|
|
159
|
+
for (const cell of cells) {
|
|
160
|
+
const siteId = cell.siteId || cell.cellName.split('_')[0] || 'Unknown';
|
|
161
|
+
if (!siteMap.has(siteId)) {
|
|
162
|
+
siteMap.set(siteId, []);
|
|
163
|
+
}
|
|
164
|
+
siteMap.get(siteId).push(cell);
|
|
165
|
+
}
|
|
166
|
+
return siteMap;
|
|
167
|
+
}
|
|
168
|
+
/**
|
|
169
|
+
* Create site configurations for multiple sites
|
|
170
|
+
*
|
|
171
|
+
* @param cells - Array of all cells
|
|
172
|
+
* @returns Array of site configurations
|
|
173
|
+
*/
|
|
174
|
+
async createMultipleSiteConfigurations(cells) {
|
|
175
|
+
const siteMap = this.groupCellsBySite(cells);
|
|
176
|
+
const configurations = [];
|
|
177
|
+
for (const [siteId, siteCells] of siteMap.entries()) {
|
|
178
|
+
try {
|
|
179
|
+
const config = await this.createSiteConfiguration(siteCells, siteId);
|
|
180
|
+
if (config) {
|
|
181
|
+
configurations.push(config);
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
catch (error) {
|
|
185
|
+
console.error(`Failed to create configuration for site ${siteId}:`, error);
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
return configurations;
|
|
189
|
+
}
|
|
190
|
+
// ========================================================================
|
|
191
|
+
// PRIVATE HELPER METHODS
|
|
192
|
+
// ========================================================================
|
|
193
|
+
/**
|
|
194
|
+
* Parse frequency from band string
|
|
195
|
+
*
|
|
196
|
+
* Examples:
|
|
197
|
+
* "700" → 700 MHz
|
|
198
|
+
* "1800" → 1800 MHz
|
|
199
|
+
* "L700" → 700 MHz
|
|
200
|
+
* "B3" → 1800 MHz (LTE Band 3)
|
|
201
|
+
*
|
|
202
|
+
* @param band - Band identifier
|
|
203
|
+
* @returns Frequency in MHz
|
|
204
|
+
*/
|
|
205
|
+
parseFrequency(band) {
|
|
206
|
+
if (!band)
|
|
207
|
+
return 1800; // Default to 1800 MHz
|
|
208
|
+
// Remove non-numeric characters
|
|
209
|
+
const numericBand = band.replace(/[^0-9]/g, '');
|
|
210
|
+
if (numericBand) {
|
|
211
|
+
const freq = parseInt(numericBand, 10);
|
|
212
|
+
// Handle LTE band numbers (need conversion)
|
|
213
|
+
if (freq < 100) {
|
|
214
|
+
// Assume it's a band number, not frequency
|
|
215
|
+
return this.bandNumberToFrequency(freq);
|
|
216
|
+
}
|
|
217
|
+
return freq;
|
|
218
|
+
}
|
|
219
|
+
return 1800; // Default
|
|
220
|
+
}
|
|
221
|
+
/**
|
|
222
|
+
* Convert LTE band number to center frequency
|
|
223
|
+
*
|
|
224
|
+
* @param bandNumber - LTE band number
|
|
225
|
+
* @returns Center frequency in MHz
|
|
226
|
+
*/
|
|
227
|
+
bandNumberToFrequency(bandNumber) {
|
|
228
|
+
const bandMap = {
|
|
229
|
+
1: 2100, // Band 1 (2100 MHz)
|
|
230
|
+
2: 1900, // Band 2 (PCS 1900)
|
|
231
|
+
3: 1800, // Band 3 (DCS 1800)
|
|
232
|
+
4: 1700, // Band 4 (AWS)
|
|
233
|
+
5: 850, // Band 5 (850 MHz)
|
|
234
|
+
7: 2600, // Band 7 (2600 MHz)
|
|
235
|
+
8: 900, // Band 8 (900 MHz)
|
|
236
|
+
12: 700, // Band 12 (700 MHz)
|
|
237
|
+
13: 700, // Band 13 (700 MHz)
|
|
238
|
+
20: 800, // Band 20 (800 MHz DD)
|
|
239
|
+
28: 700, // Band 28 (APT 700)
|
|
240
|
+
66: 1700 // Band 66 (AWS extension)
|
|
241
|
+
};
|
|
242
|
+
return bandMap[bandNumber] || 1800;
|
|
243
|
+
}
|
|
244
|
+
/**
|
|
245
|
+
* Parse mechanical tilt value
|
|
246
|
+
*
|
|
247
|
+
* Handles various formats:
|
|
248
|
+
* - Number: 3 → 3
|
|
249
|
+
* - String: "3" → 3
|
|
250
|
+
* - String with units: "3°" → 3
|
|
251
|
+
*
|
|
252
|
+
* @param tilt - Tilt value (various formats)
|
|
253
|
+
* @returns Tilt as number
|
|
254
|
+
*/
|
|
255
|
+
parseTilt(tilt) {
|
|
256
|
+
if (typeof tilt === 'number') {
|
|
257
|
+
return tilt;
|
|
258
|
+
}
|
|
259
|
+
if (typeof tilt === 'string') {
|
|
260
|
+
const numeric = parseFloat(tilt.replace(/[^0-9.-]/g, ''));
|
|
261
|
+
return isNaN(numeric) ? 0 : numeric;
|
|
262
|
+
}
|
|
263
|
+
return 0;
|
|
264
|
+
}
|
|
265
|
+
/**
|
|
266
|
+
* Get color for sector visualization
|
|
267
|
+
*
|
|
268
|
+
* Standard sector colors (3-sector site):
|
|
269
|
+
* - Sector 0 (Alpha): Blue
|
|
270
|
+
* - Sector 1 (Beta): Green
|
|
271
|
+
* - Sector 2 (Gamma): Red
|
|
272
|
+
*
|
|
273
|
+
* @param index - Sector index
|
|
274
|
+
* @returns Hex color
|
|
275
|
+
*/
|
|
276
|
+
getSectorColor(index) {
|
|
277
|
+
const colors = [
|
|
278
|
+
'#0066CC', // Blue
|
|
279
|
+
'#00CC66', // Green
|
|
280
|
+
'#CC0066', // Red/Magenta
|
|
281
|
+
'#CC6600', // Orange
|
|
282
|
+
'#6600CC', // Purple
|
|
283
|
+
'#CCCC00' // Yellow
|
|
284
|
+
];
|
|
285
|
+
return colors[index % colors.length];
|
|
286
|
+
}
|
|
287
|
+
/**
|
|
288
|
+
* Extract sector name from cell name
|
|
289
|
+
*
|
|
290
|
+
* Examples:
|
|
291
|
+
* "SITE001_Alpha" → "Alpha"
|
|
292
|
+
* "SITE001_A" → "A"
|
|
293
|
+
* "SITE001_1" → "Sector 1"
|
|
294
|
+
*
|
|
295
|
+
* @param cellName - Full cell name
|
|
296
|
+
* @param index - Fallback index
|
|
297
|
+
* @returns Sector name
|
|
298
|
+
*/
|
|
299
|
+
extractSectorName(cellName, index) {
|
|
300
|
+
// Try to extract sector name after underscore
|
|
301
|
+
const parts = cellName.split('_');
|
|
302
|
+
if (parts.length > 1) {
|
|
303
|
+
const lastPart = parts[parts.length - 1];
|
|
304
|
+
// Check if it's a common sector name
|
|
305
|
+
if (/^(Alpha|Beta|Gamma|A|B|C|[123])$/i.test(lastPart)) {
|
|
306
|
+
return lastPart;
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
// Fallback to index-based naming
|
|
310
|
+
const sectorNames = ['Alpha', 'Beta', 'Gamma', 'Delta', 'Epsilon', 'Zeta'];
|
|
311
|
+
return sectorNames[index] || `Sector ${index + 1}`;
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
// ============================================================================
|
|
315
|
+
// SINGLETON INSTANCE
|
|
316
|
+
// ============================================================================
|
|
317
|
+
/**
|
|
318
|
+
* Global site store instance
|
|
319
|
+
*
|
|
320
|
+
* @example
|
|
321
|
+
* import { siteStore } from './SiteStore';
|
|
322
|
+
*
|
|
323
|
+
* const siteConfig = await siteStore.createSiteConfiguration(cells);
|
|
324
|
+
*/
|
|
325
|
+
export const siteStore = new SiteStore();
|
|
326
|
+
// ============================================================================
|
|
327
|
+
// UTILITY FUNCTIONS
|
|
328
|
+
// ============================================================================
|
|
329
|
+
/**
|
|
330
|
+
* Quick site configuration creation
|
|
331
|
+
*
|
|
332
|
+
* Convenience function for creating a single site configuration.
|
|
333
|
+
*
|
|
334
|
+
* @param cells - Cells for the site
|
|
335
|
+
* @returns Site configuration or null
|
|
336
|
+
*/
|
|
337
|
+
export async function createQuickSiteConfig(cells) {
|
|
338
|
+
return siteStore.createSiteConfiguration(cells);
|
|
339
|
+
}
|
|
340
|
+
/**
|
|
341
|
+
* Get sites from cell array
|
|
342
|
+
*
|
|
343
|
+
* Returns unique site identifiers from an array of cells.
|
|
344
|
+
*
|
|
345
|
+
* @param cells - Array of cells
|
|
346
|
+
* @returns Array of site IDs
|
|
347
|
+
*/
|
|
348
|
+
export function getSiteIds(cells) {
|
|
349
|
+
const siteIds = new Set();
|
|
350
|
+
for (const cell of cells) {
|
|
351
|
+
const siteId = cell.siteId || cell.cellName.split('_')[0] || 'Unknown';
|
|
352
|
+
siteIds.add(siteId);
|
|
353
|
+
}
|
|
354
|
+
return Array.from(siteIds).sort();
|
|
355
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Coverage Map System - Main Export
|
|
3
|
+
*
|
|
4
|
+
* This is the main entry point for the coverage map system.
|
|
5
|
+
* Import from here to access all functionality.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* import {
|
|
9
|
+
* CoverageCalculator,
|
|
10
|
+
* antennaStore,
|
|
11
|
+
* siteStore,
|
|
12
|
+
* COLOR_SCHEMES
|
|
13
|
+
* } from './';
|
|
14
|
+
*/
|
|
15
|
+
export type { Position2D, Position3D, GeoBounds, AntennaPattern, RFParameters, SectorConfig, SiteConfiguration, PathLossModel, GridSettings, SignalThresholds, CoverageConfig, GridCell, CoverageGrid, CoverageStats, CoverageResult, SignalQuality, CalculationProgress, ProgressCallback, AIAnalysisRequest, AIAnalysisResponse, AIRecommendation, AIToolFunction, VisualizationOptions, MapIntegration } from './types';
|
|
16
|
+
export { CoverageCalculator, quickCalculate, calculateForAI } from './core/CoverageCalculator';
|
|
17
|
+
export { calculateSingleSectorCoverage, calculateMultiSectorCoverage, extractMetrics } from './core/GridCalculator';
|
|
18
|
+
export { calculatePathLoss, calculateFSPL, calculateHata, calculateCOST231, getRecommendedModel } from './core/PathLossModels';
|
|
19
|
+
export { calculateSignalStrength, calculateMultiSectorSignal, calculateCombinedGain } from './core/SignalProcessor';
|
|
20
|
+
export { AntennaStore, antennaStore, loadAntennaForSector } from './data/AntennaStore';
|
|
21
|
+
export { SiteStore, siteStore, createQuickSiteConfig, getSiteIds } from './data/SiteStore';
|
|
22
|
+
export { calculateDistance, calculate3DDistance, calculateBearing, calculateDestinationPoint, calculateElevationAngle, calculateBounds, calculateBoundsArea, normalizeAngle, angleDifference, isPointInBounds } from './utils/geoUtils';
|
|
23
|
+
export { dBmToWatts, wattsTodBm, dBdTodBi, dBiTodBd, addPowersdB, subtractPowersdB, calculateEIRP, calculateEffectiveEIRP, calculateReceivedPower, calculateMaxRange, attenuationToGain, interpolatePattern, classifySignalQuality, calculateSNR, calculateNoiseFloor } from './utils/rfUtils';
|
|
24
|
+
export { HEATMAP_RED_BLUE, HEATMAP_GREEN_RED, VIRIDIS, PLASMA, CATEGORICAL, interpolateColor, getCategoricalColor, getColorForSignal, addOpacity, createLegend, type ColorStop, type ColorScheme } from './visualization/ColorSchemes';
|
|
25
|
+
export { analyzeCoverageQuality, generateOptimizationSuggestions, compareCoverageScenarios, extractAIMetrics, AI_TOOLS, getAITool, executeAITool } from './ai/AITools';
|
|
26
|
+
/**
|
|
27
|
+
* Default grid settings for quick calculations
|
|
28
|
+
*/
|
|
29
|
+
export declare const DEFAULT_GRID_SETTINGS: {
|
|
30
|
+
cellSizeMeters: number;
|
|
31
|
+
maxRadiusKm: number;
|
|
32
|
+
pathLossModel: "free-space";
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* Default signal thresholds (dBm)
|
|
36
|
+
*/
|
|
37
|
+
export declare const DEFAULT_SIGNAL_THRESHOLDS: {
|
|
38
|
+
excellent: number;
|
|
39
|
+
good: number;
|
|
40
|
+
fair: number;
|
|
41
|
+
edge: number;
|
|
42
|
+
};
|
|
43
|
+
/**
|
|
44
|
+
* Typical antenna heights by site type (meters)
|
|
45
|
+
*/
|
|
46
|
+
export declare const TYPICAL_ANTENNA_HEIGHTS: {
|
|
47
|
+
macroCell: number;
|
|
48
|
+
microCell: number;
|
|
49
|
+
picoCell: number;
|
|
50
|
+
femtoCell: number;
|
|
51
|
+
};
|
|
52
|
+
/**
|
|
53
|
+
* Typical TX power by technology (dBm)
|
|
54
|
+
*/
|
|
55
|
+
export declare const TYPICAL_TX_POWERS: {
|
|
56
|
+
lte: number;
|
|
57
|
+
umts: number;
|
|
58
|
+
gsm: number;
|
|
59
|
+
fiveG: number;
|
|
60
|
+
wifi: number;
|
|
61
|
+
};
|
|
62
|
+
/**
|
|
63
|
+
* Common frequency bands (MHz)
|
|
64
|
+
*/
|
|
65
|
+
export declare const COMMON_FREQUENCIES: {
|
|
66
|
+
band_700: number;
|
|
67
|
+
band_850: number;
|
|
68
|
+
band_900: number;
|
|
69
|
+
band_1800: number;
|
|
70
|
+
band_1900: number;
|
|
71
|
+
band_2100: number;
|
|
72
|
+
band_2600: number;
|
|
73
|
+
band_3500: number;
|
|
74
|
+
};
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Coverage Map System - Main Export
|
|
3
|
+
*
|
|
4
|
+
* This is the main entry point for the coverage map system.
|
|
5
|
+
* Import from here to access all functionality.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* import {
|
|
9
|
+
* CoverageCalculator,
|
|
10
|
+
* antennaStore,
|
|
11
|
+
* siteStore,
|
|
12
|
+
* COLOR_SCHEMES
|
|
13
|
+
* } from './';
|
|
14
|
+
*/
|
|
15
|
+
// ============================================================================
|
|
16
|
+
// CORE CALCULATION
|
|
17
|
+
// ============================================================================
|
|
18
|
+
export { CoverageCalculator, quickCalculate, calculateForAI } from './core/CoverageCalculator';
|
|
19
|
+
export { calculateSingleSectorCoverage, calculateMultiSectorCoverage, extractMetrics } from './core/GridCalculator';
|
|
20
|
+
export { calculatePathLoss, calculateFSPL, calculateHata, calculateCOST231, getRecommendedModel } from './core/PathLossModels';
|
|
21
|
+
export { calculateSignalStrength, calculateMultiSectorSignal, calculateCombinedGain } from './core/SignalProcessor';
|
|
22
|
+
// ============================================================================
|
|
23
|
+
// DATA STORES
|
|
24
|
+
// ============================================================================
|
|
25
|
+
export { AntennaStore, antennaStore, loadAntennaForSector } from './data/AntennaStore';
|
|
26
|
+
export { SiteStore, siteStore, createQuickSiteConfig, getSiteIds } from './data/SiteStore';
|
|
27
|
+
// ============================================================================
|
|
28
|
+
// UTILITIES
|
|
29
|
+
// ============================================================================
|
|
30
|
+
export {
|
|
31
|
+
// Geographic
|
|
32
|
+
calculateDistance, calculate3DDistance, calculateBearing, calculateDestinationPoint, calculateElevationAngle, calculateBounds, calculateBoundsArea, normalizeAngle, angleDifference, isPointInBounds } from './utils/geoUtils';
|
|
33
|
+
export {
|
|
34
|
+
// RF calculations
|
|
35
|
+
dBmToWatts, wattsTodBm, dBdTodBi, dBiTodBd, addPowersdB, subtractPowersdB, calculateEIRP, calculateEffectiveEIRP, calculateReceivedPower, calculateMaxRange, attenuationToGain, interpolatePattern, classifySignalQuality, calculateSNR, calculateNoiseFloor } from './utils/rfUtils';
|
|
36
|
+
// ============================================================================
|
|
37
|
+
// VISUALIZATION
|
|
38
|
+
// ============================================================================
|
|
39
|
+
export {
|
|
40
|
+
// Color schemes
|
|
41
|
+
HEATMAP_RED_BLUE, HEATMAP_GREEN_RED, VIRIDIS, PLASMA, CATEGORICAL,
|
|
42
|
+
// Functions
|
|
43
|
+
interpolateColor, getCategoricalColor, getColorForSignal, addOpacity, createLegend } from './visualization/ColorSchemes';
|
|
44
|
+
// ============================================================================
|
|
45
|
+
// AI INTEGRATION
|
|
46
|
+
// ============================================================================
|
|
47
|
+
export {
|
|
48
|
+
// Tool functions
|
|
49
|
+
analyzeCoverageQuality, generateOptimizationSuggestions, compareCoverageScenarios, extractAIMetrics,
|
|
50
|
+
// Tool registry
|
|
51
|
+
AI_TOOLS, getAITool, executeAITool } from './ai/AITools';
|
|
52
|
+
// ============================================================================
|
|
53
|
+
// CONSTANTS
|
|
54
|
+
// ============================================================================
|
|
55
|
+
/**
|
|
56
|
+
* Default grid settings for quick calculations
|
|
57
|
+
*/
|
|
58
|
+
export const DEFAULT_GRID_SETTINGS = {
|
|
59
|
+
cellSizeMeters: 50,
|
|
60
|
+
maxRadiusKm: 10,
|
|
61
|
+
pathLossModel: 'free-space'
|
|
62
|
+
};
|
|
63
|
+
/**
|
|
64
|
+
* Default signal thresholds (dBm)
|
|
65
|
+
*/
|
|
66
|
+
export const DEFAULT_SIGNAL_THRESHOLDS = {
|
|
67
|
+
excellent: -70,
|
|
68
|
+
good: -85,
|
|
69
|
+
fair: -95,
|
|
70
|
+
edge: -105
|
|
71
|
+
};
|
|
72
|
+
/**
|
|
73
|
+
* Typical antenna heights by site type (meters)
|
|
74
|
+
*/
|
|
75
|
+
export const TYPICAL_ANTENNA_HEIGHTS = {
|
|
76
|
+
macroCell: 30, // Typical rooftop/tower
|
|
77
|
+
microCell: 10, // Street lamp/small pole
|
|
78
|
+
picoCell: 3, // Indoor/wall-mount
|
|
79
|
+
femtoCell: 2 // Desktop/home
|
|
80
|
+
};
|
|
81
|
+
/**
|
|
82
|
+
* Typical TX power by technology (dBm)
|
|
83
|
+
*/
|
|
84
|
+
export const TYPICAL_TX_POWERS = {
|
|
85
|
+
lte: 43, // 20W
|
|
86
|
+
umts: 43, // 20W
|
|
87
|
+
gsm: 43, // 20W
|
|
88
|
+
fiveG: 46, // 40W (higher for mmWave)
|
|
89
|
+
wifi: 20 // 100mW
|
|
90
|
+
};
|
|
91
|
+
/**
|
|
92
|
+
* Common frequency bands (MHz)
|
|
93
|
+
*/
|
|
94
|
+
export const COMMON_FREQUENCIES = {
|
|
95
|
+
band_700: 700,
|
|
96
|
+
band_850: 850,
|
|
97
|
+
band_900: 900,
|
|
98
|
+
band_1800: 1800,
|
|
99
|
+
band_1900: 1900,
|
|
100
|
+
band_2100: 2100,
|
|
101
|
+
band_2600: 2600,
|
|
102
|
+
band_3500: 3500 // 5G
|
|
103
|
+
};
|