@jjlmoya/utils-drones 1.3.0 → 1.5.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 +2 -2
- package/src/tool/antenna-length-calculator/component.astro +700 -30
- package/src/tool/drone-flight-time/component.astro +370 -75
- package/src/tool/gps-coordinates-converter/component.astro +305 -2
- package/src/tool/antenna-length-calculator/AntennaLengthCalculator.css +0 -670
- package/src/tool/drone-flight-time/FlightTimeCalculator.css +0 -370
- package/src/tool/gps-coordinates-converter/GpsCoordinatesConverter.css +0 -301
|
@@ -4,7 +4,6 @@ import BatterySpecs from "./components/BatterySpecs.astro";
|
|
|
4
4
|
import ConsumptionStats from "./components/ConsumptionStats.astro";
|
|
5
5
|
import FlightDashboard from "./components/FlightDashboard.astro";
|
|
6
6
|
import AutonomyChart from "./components/AutonomyChart.astro";
|
|
7
|
-
import "./FlightTimeCalculator.css";
|
|
8
7
|
---
|
|
9
8
|
|
|
10
9
|
<div class="flight-calculator-ui">
|
|
@@ -185,78 +184,374 @@ import "./FlightTimeCalculator.css";
|
|
|
185
184
|
</script>
|
|
186
185
|
|
|
187
186
|
<style>
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
187
|
+
.flight-calculator-ui {
|
|
188
|
+
--dft-accent: #f97316;
|
|
189
|
+
--dft-accent-glow: rgba(249, 115, 22, 0.15);
|
|
190
|
+
--dft-bg: #fff;
|
|
191
|
+
--dft-bg-muted: #f5f5f5;
|
|
192
|
+
--dft-bg-surface: #eee;
|
|
193
|
+
--dft-bg-overlay: #f0f0f0;
|
|
194
|
+
--dft-text: #1a1a1a;
|
|
195
|
+
--dft-text-muted: #4a4a4a;
|
|
196
|
+
--dft-text-dim: #707070;
|
|
197
|
+
--dft-border: #d0d0d0;
|
|
198
|
+
--dft-border-light: #e8e8e8;
|
|
199
|
+
--dft-shadow: 0 30px 60px rgba(0, 0, 0, 0.08);
|
|
200
|
+
--dft-success: #15803d;
|
|
201
|
+
--dft-success-bg: #dcfce7;
|
|
202
|
+
--dft-warning: #a16207;
|
|
203
|
+
--dft-warning-bg: #fef9c3;
|
|
204
|
+
--dft-danger: #b91c1c;
|
|
205
|
+
--dft-danger-bg: #fee2e2;
|
|
206
|
+
|
|
207
|
+
width: 100%;
|
|
208
|
+
max-width: 1100px;
|
|
209
|
+
margin: 0 auto;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
:global([data-theme="dark"]) .flight-calculator-ui,
|
|
213
|
+
:global(.theme-dark) .flight-calculator-ui {
|
|
214
|
+
--dft-bg: #1a1a1a;
|
|
215
|
+
--dft-bg-muted: #2d2d2d;
|
|
216
|
+
--dft-bg-surface: #3a3a3a;
|
|
217
|
+
--dft-bg-overlay: #292929;
|
|
218
|
+
--dft-text: #f5f5f5;
|
|
219
|
+
--dft-text-muted: #b0b0b0;
|
|
220
|
+
--dft-text-dim: #888;
|
|
221
|
+
--dft-border: #4a4a4a;
|
|
222
|
+
--dft-border-light: #525252;
|
|
223
|
+
--dft-shadow: 0 30px 60px rgba(0, 0, 0, 0.08);
|
|
224
|
+
--dft-success: #4ade80;
|
|
225
|
+
--dft-success-bg: rgba(21, 128, 61, 0.15);
|
|
226
|
+
--dft-warning: #facc15;
|
|
227
|
+
--dft-warning-bg: rgba(161, 98, 7, 0.15);
|
|
228
|
+
--dft-danger: #f87171;
|
|
229
|
+
--dft-danger-bg: rgba(185, 28, 28, 0.15);
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
.flight-calculator-ui .tech-mega-card {
|
|
233
|
+
background: var(--dft-bg);
|
|
234
|
+
backdrop-filter: blur(20px);
|
|
235
|
+
border: 1px solid var(--dft-border);
|
|
236
|
+
border-radius: 32px;
|
|
237
|
+
box-shadow: var(--dft-shadow);
|
|
238
|
+
overflow: hidden;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
.flight-calculator-ui .card-grid {
|
|
242
|
+
display: grid;
|
|
243
|
+
grid-template-columns: 380px 1fr;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
.flight-calculator-ui .config-sidebar {
|
|
247
|
+
padding: 2.5rem;
|
|
248
|
+
background: var(--dft-bg-overlay);
|
|
249
|
+
display: flex;
|
|
250
|
+
flex-direction: column;
|
|
251
|
+
gap: 2.5rem;
|
|
252
|
+
border-right: 1px solid var(--dft-border-light);
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
:global([data-theme="dark"]) .flight-calculator-ui .config-sidebar,
|
|
256
|
+
:global(.theme-dark) .flight-calculator-ui .config-sidebar {
|
|
257
|
+
background: var(--dft-bg-surface);
|
|
258
|
+
border-right-color: var(--dft-border-light);
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
.flight-calculator-ui .main-display {
|
|
262
|
+
padding: 2.5rem;
|
|
263
|
+
display: flex;
|
|
264
|
+
flex-direction: column;
|
|
265
|
+
gap: 2.5rem;
|
|
266
|
+
background: var(--dft-bg);
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
:global([data-theme="dark"]) .flight-calculator-ui .main-display,
|
|
270
|
+
:global(.theme-dark) .flight-calculator-ui .main-display {
|
|
271
|
+
background: var(--dft-bg);
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
.flight-calculator-ui .divider {
|
|
275
|
+
height: 1px;
|
|
276
|
+
width: 100%;
|
|
277
|
+
background: linear-gradient(90deg, transparent, var(--dft-border-light), transparent);
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
:global([data-theme="dark"]) .flight-calculator-ui .divider,
|
|
281
|
+
:global(.theme-dark) .flight-calculator-ui .divider {
|
|
282
|
+
background: linear-gradient(90deg, transparent, var(--dft-border-light), transparent);
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
.flight-calculator-ui .tech-section {
|
|
286
|
+
display: flex;
|
|
287
|
+
flex-direction: column;
|
|
288
|
+
gap: 1.5rem;
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
.flight-calculator-ui .section-title {
|
|
292
|
+
font-size: 0.95rem;
|
|
293
|
+
font-weight: 800;
|
|
294
|
+
color: var(--dft-text);
|
|
295
|
+
text-transform: uppercase;
|
|
296
|
+
letter-spacing: 0.05em;
|
|
297
|
+
margin: 0;
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
.flight-calculator-ui .input-group {
|
|
301
|
+
display: flex;
|
|
302
|
+
flex-direction: column;
|
|
303
|
+
gap: 0.75rem;
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
.flight-calculator-ui .label-row {
|
|
307
|
+
display: flex;
|
|
308
|
+
justify-content: space-between;
|
|
309
|
+
align-items: center;
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
.flight-calculator-ui .input-group label {
|
|
313
|
+
font-size: 0.85rem;
|
|
314
|
+
font-weight: 700;
|
|
315
|
+
color: var(--dft-text-muted);
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
.flight-calculator-ui .value-badge {
|
|
319
|
+
padding: 0.25rem 0.75rem;
|
|
320
|
+
background: var(--dft-accent-glow);
|
|
321
|
+
border-radius: 12px;
|
|
322
|
+
color: var(--dft-accent);
|
|
323
|
+
font-weight: 800;
|
|
324
|
+
font-size: 0.9rem;
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
.flight-calculator-ui .tech-slider {
|
|
328
|
+
width: 100%;
|
|
329
|
+
height: 6px;
|
|
330
|
+
appearance: none;
|
|
331
|
+
background: var(--dft-border);
|
|
332
|
+
border-radius: 3px;
|
|
333
|
+
outline: none;
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
.flight-calculator-ui .tech-slider::-webkit-slider-thumb {
|
|
337
|
+
appearance: none;
|
|
338
|
+
width: 18px;
|
|
339
|
+
height: 18px;
|
|
340
|
+
background: var(--dft-accent);
|
|
341
|
+
border: 3px solid var(--dft-bg);
|
|
342
|
+
border-radius: 50%;
|
|
343
|
+
cursor: pointer;
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
.flight-calculator-ui .tech-slider::-moz-range-thumb {
|
|
347
|
+
width: 18px;
|
|
348
|
+
height: 18px;
|
|
349
|
+
background: var(--dft-accent);
|
|
350
|
+
border: 3px solid var(--dft-bg);
|
|
351
|
+
border-radius: 50%;
|
|
352
|
+
cursor: pointer;
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
.flight-calculator-ui .tech-select {
|
|
356
|
+
width: 100%;
|
|
357
|
+
padding: 0.75rem;
|
|
358
|
+
background: var(--dft-bg-surface);
|
|
359
|
+
border: 1px solid var(--dft-border);
|
|
360
|
+
border-radius: 12px;
|
|
361
|
+
font-weight: 600;
|
|
362
|
+
color: var(--dft-text);
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
.flight-calculator-ui .tech-input {
|
|
366
|
+
width: 100%;
|
|
367
|
+
padding: 0.75rem;
|
|
368
|
+
background: var(--dft-bg-surface);
|
|
369
|
+
border: 1px solid var(--dft-border);
|
|
370
|
+
border-radius: 12px;
|
|
371
|
+
font-weight: 600;
|
|
372
|
+
color: var(--dft-text);
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
.flight-calculator-ui .presets {
|
|
376
|
+
display: flex;
|
|
377
|
+
gap: 0.5rem;
|
|
378
|
+
flex-wrap: wrap;
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
.flight-calculator-ui .preset-btn {
|
|
382
|
+
padding: 0.35rem 0.65rem;
|
|
383
|
+
background: var(--dft-bg-surface);
|
|
384
|
+
border: none;
|
|
385
|
+
border-radius: 8px;
|
|
386
|
+
font-size: 0.75rem;
|
|
387
|
+
font-weight: 700;
|
|
388
|
+
color: var(--dft-text-muted);
|
|
389
|
+
cursor: pointer;
|
|
390
|
+
transition: all 0.2s;
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
.flight-calculator-ui .preset-btn:hover {
|
|
394
|
+
background: var(--dft-border);
|
|
395
|
+
color: var(--dft-text);
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
.flight-calculator-ui .hint {
|
|
399
|
+
font-size: 0.75rem;
|
|
400
|
+
color: var(--dft-text-dim);
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
.flight-calculator-ui .dashboard-section {
|
|
404
|
+
display: flex;
|
|
405
|
+
flex-direction: column;
|
|
406
|
+
align-items: center;
|
|
407
|
+
gap: 2rem;
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
.flight-calculator-ui .main-result {
|
|
411
|
+
display: flex;
|
|
412
|
+
justify-content: center;
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
.flight-calculator-ui .radial-container {
|
|
416
|
+
position: relative;
|
|
417
|
+
width: 240px;
|
|
418
|
+
height: 240px;
|
|
419
|
+
display: flex;
|
|
420
|
+
justify-content: center;
|
|
421
|
+
align-items: center;
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
.flight-calculator-ui .radial-svg {
|
|
425
|
+
transform: rotate(-90deg);
|
|
426
|
+
width: 100%;
|
|
427
|
+
height: 100%;
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
.flight-calculator-ui .bg-circle {
|
|
431
|
+
fill: none;
|
|
432
|
+
stroke: var(--dft-bg-surface);
|
|
433
|
+
stroke-width: 8;
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
.flight-calculator-ui .fg-circle {
|
|
437
|
+
fill: none;
|
|
438
|
+
stroke: var(--dft-accent);
|
|
439
|
+
stroke-width: 8;
|
|
440
|
+
stroke-linecap: round;
|
|
441
|
+
stroke-dasharray: 283;
|
|
442
|
+
stroke-dashoffset: 0;
|
|
443
|
+
transition: stroke-dashoffset 0.8s cubic-bezier(0.4, 0, 0.2, 1);
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
.flight-calculator-ui .result-text {
|
|
447
|
+
position: absolute;
|
|
448
|
+
display: flex;
|
|
449
|
+
flex-direction: column;
|
|
450
|
+
align-items: center;
|
|
451
|
+
gap: 0.25rem;
|
|
452
|
+
}
|
|
453
|
+
|
|
454
|
+
.flight-calculator-ui .time-primary {
|
|
455
|
+
font-size: 4.5rem;
|
|
456
|
+
font-weight: 950;
|
|
457
|
+
color: var(--dft-text);
|
|
458
|
+
letter-spacing: -0.05em;
|
|
459
|
+
line-height: 1;
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
.flight-calculator-ui .time-label {
|
|
463
|
+
font-size: 0.9rem;
|
|
464
|
+
font-weight: 800;
|
|
465
|
+
color: var(--dft-text-muted);
|
|
466
|
+
text-transform: uppercase;
|
|
467
|
+
letter-spacing: 0.1em;
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
.flight-calculator-ui .secondary-stats {
|
|
471
|
+
display: grid;
|
|
472
|
+
grid-template-columns: repeat(3, 1fr);
|
|
473
|
+
gap: 1.5rem;
|
|
474
|
+
width: 100%;
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
.flight-calculator-ui .stat-box {
|
|
478
|
+
display: flex;
|
|
479
|
+
flex-direction: column;
|
|
480
|
+
align-items: center;
|
|
481
|
+
gap: 0.25rem;
|
|
482
|
+
padding: 1.25rem;
|
|
483
|
+
background: var(--dft-bg-overlay);
|
|
484
|
+
border: 1px solid var(--dft-border-light);
|
|
485
|
+
border-radius: 20px;
|
|
486
|
+
}
|
|
487
|
+
|
|
488
|
+
:global([data-theme="dark"]) .flight-calculator-ui .stat-box,
|
|
489
|
+
:global(.theme-dark) .flight-calculator-ui .stat-box {
|
|
490
|
+
background: var(--dft-bg-muted);
|
|
491
|
+
border-color: var(--dft-border);
|
|
492
|
+
}
|
|
493
|
+
|
|
494
|
+
.flight-calculator-ui .stat-label {
|
|
495
|
+
font-size: 0.7rem;
|
|
496
|
+
font-weight: 700;
|
|
497
|
+
color: var(--dft-text-dim);
|
|
498
|
+
text-transform: uppercase;
|
|
499
|
+
text-align: center;
|
|
500
|
+
}
|
|
501
|
+
|
|
502
|
+
.flight-calculator-ui .stat-value {
|
|
503
|
+
font-size: 1.2rem;
|
|
504
|
+
font-weight: 900;
|
|
505
|
+
color: var(--dft-text);
|
|
506
|
+
}
|
|
507
|
+
|
|
508
|
+
.flight-calculator-ui .chart-header {
|
|
509
|
+
display: flex;
|
|
510
|
+
justify-content: space-between;
|
|
511
|
+
align-items: center;
|
|
512
|
+
margin-bottom: 1rem;
|
|
513
|
+
}
|
|
514
|
+
|
|
515
|
+
.flight-calculator-ui .chart-subtitle {
|
|
516
|
+
font-size: 0.85rem;
|
|
517
|
+
font-weight: 600;
|
|
518
|
+
color: var(--dft-text-muted);
|
|
519
|
+
}
|
|
520
|
+
|
|
521
|
+
.flight-calculator-ui .chart-body {
|
|
522
|
+
position: relative;
|
|
523
|
+
height: 300px;
|
|
524
|
+
width: 100%;
|
|
525
|
+
}
|
|
526
|
+
|
|
527
|
+
@media (max-width: 992px) {
|
|
528
|
+
.flight-calculator-ui .card-grid {
|
|
529
|
+
grid-template-columns: 1fr;
|
|
530
|
+
}
|
|
531
|
+
|
|
532
|
+
.flight-calculator-ui .config-sidebar {
|
|
533
|
+
border-right: none;
|
|
534
|
+
border-bottom: 1px solid var(--dft-border-light);
|
|
535
|
+
}
|
|
536
|
+
|
|
537
|
+
:global([data-theme="dark"]) .flight-calculator-ui .config-sidebar,
|
|
538
|
+
:global(.theme-dark) .flight-calculator-ui .config-sidebar {
|
|
539
|
+
border-bottom-color: var(--dft-border-light);
|
|
540
|
+
}
|
|
541
|
+
}
|
|
542
|
+
|
|
543
|
+
@media (max-width: 600px) {
|
|
544
|
+
.flight-calculator-ui .secondary-stats {
|
|
545
|
+
grid-template-columns: 1fr;
|
|
546
|
+
}
|
|
547
|
+
|
|
548
|
+
.flight-calculator-ui .radial-container {
|
|
549
|
+
width: 200px;
|
|
550
|
+
height: 200px;
|
|
551
|
+
}
|
|
552
|
+
|
|
553
|
+
.flight-calculator-ui .time-primary {
|
|
554
|
+
font-size: 3.5rem;
|
|
555
|
+
}
|
|
556
|
+
}
|
|
262
557
|
</style>
|