Browse Source

correct data and prepare for colour gradient implementations

master
cathaypacific8747 3 years ago
parent
commit
b342fd3d5b
  1. 1
      README.md
  2. 2
      combined.csv
  3. 66
      detailed.csv
  4. 15
      kml.py
  5. 2
      out.kml

1
README.md

@ -4,6 +4,7 @@ ADS-B data of the MU5735 crash, collected from flightradar24.
For educational purposes only. For educational purposes only.
`detailed` - https://twitter.com/flightradar24/status/1505863117343014916/photo/2 `detailed` - https://twitter.com/flightradar24/status/1505863117343014916/photo/2
`coarse` - https://www.flightradar24.com/data/aircraft/b-1791#2b367bc1 `coarse` - https://www.flightradar24.com/data/aircraft/b-1791#2b367bc1
![path](path.png) ![path](path.png)

2
combined.csv

@ -93,4 +93,4 @@ timestamp,lat,lng,altitude,speed,vs,heading,squawk
1647843741.870,23.33031,111.07468,8175,446,-13248,79,2101 1647843741.870,23.33031,111.07468,8175,446,-13248,79,2101
1647843747,23.333084,111.086357,6525,414,-25792,75,2101 1647843747,23.333084,111.086357,6525,414,-25792,75,2101
1647843751.888,23.33533,111.09754,4375,442,-26752,73,2101 1647843751.888,23.33533,111.09754,4375,442,-26752,73,2101
1647843755.972,23.33752,111.10558,3225,376,-30976,87,2101 1647843755.972,23.33752,111.10558,3225,376,-30976,87,2101
1 timestamp lat lng altitude speed vs heading squawk
93 1647843741.870 23.33031 111.07468 8175 446 -13248 79 2101
94 1647843747 23.333084 111.086357 6525 414 -25792 75 2101
95 1647843751.888 23.33533 111.09754 4375 442 -26752 73 2101
96 1647843755.972 23.33752 111.10558 3225 376 -30976 87 2101

66
detailed.csv

@ -1,33 +1,33 @@
1647843557,23.38095,110.6546,29100,457,0,100 1647843556.570,23.38095,110.6546,29100,457,0,100
1647843567,23.37723,110.67724,29100,457,64,100 1647843566.908,23.37723,110.67724,29100,457,64,100
1647843572,23.37524,110.6894,29100,457,64,100 1647843572.020,23.37524,110.6894,29100,457,64,100
1647843577,23.37337,110.70074,29100,457,0,100 1647843577.038,23.37337,110.70074,29100,457,0,100
1647843587,23.36948,110.72466,29100,457,-64,100 1647843587.156,23.36948,110.72466,29100,457,-64,100
1647843591,23.36829,110.7319,29100,457,0,100 1647843590.666,23.36829,110.7319,29100,457,0,100
1647843593,23.36769,110.73554,29100,457,0,100 1647843592.580,23.36769,110.73554,29100,457,0,100
1647843594,23.36732,110.73782,29100,458,0,100 1647843593.572,23.36732,110.73782,29100,458,0,100
1647843596,23.36618,110.74458,29100,457,0,100 1647843596.386,23.36618,110.74458,29100,457,0,100
1647843597,23.36583,110.74682,29100,457,0,100 1647843597.120,23.36583,110.74682,29100,457,0,100
1647843599,23.36508,110.75134,29100,457,0,100 1647843599.386,23.36508,110.75134,29100,457,0,100
1647843608,23.36182,110.77128,29100,457,0,100 1647843607.620,23.36182,110.77128,29100,457,0,100
1647843613,23.35987,110.78303,29100,457,0,100 1647843612.932,23.35987,110.78303,29100,457,0,100
1647843619,23.35791,110.79478,29100,457,0,100 1647843618.822,23.35791,110.79478,29100,457,0,100
1647843624,23.35593,110.80695,29100,457,0,100 1647843623.936,23.35593,110.80695,29100,457,0,100
1647843634,23.35236,110.82868,29100,457,0,100 1647843633.596,23.35236,110.82868,29100,457,0,100
1647843639,23.35043,110.84042,29100,457,0,100 1647843638.772,23.35043,110.84042,29100,457,0,100
1647843644,23.34874,110.85083,29100,457,0,100 1647843643.714,23.34874,110.85083,29100,457,0,100
1647843660,23.35812,110.88536,27025,433,-21696,98 1647843659.832,23.35812,110.88536,27025,433,-21696,98
1647843664,23.35744,110.89615,24925,425,-30784,91 1647843664.116,23.35744,110.89615,24925,425,-30784,91
1647843669,23.35661,110.90543,22250,386,-30976,100 1647843669.150,23.35661,110.90543,22250,386,-30976,100
1647843675,23.35263,110.91592,17325,429,-30976,123 1647843674.952,23.35263,110.91592,17325,429,-30976,123
1647843680,23.34474,110.92432,15325,520,-22528,140 1647843679.828,23.34474,110.92432,15325,520,-22528,140
1647843691,23.3231,110.94439,12725,551,-16832,127 1647843690.678,23.3231,110.94439,12725,551,-16832,127
1647843695,23.31711,110.95592,11000,556,-21312,112 1647843695.160,23.31711,110.95592,11000,556,-21312,112
1647843701,23.3142,110.96949,9150,558,-21888,100 1647843700.820,23.3142,110.96949,9150,558,-21888,100
1647843706,23.3149,110.98338,7850,590,-15744,81 1647843705.578,23.3149,110.98338,7850,590,-15744,81
1647843716,23.30773,111.01476,7425,565,3520,75 1647843715.848,23.30773,111.01476,7425,565,3520,75
1647843721,23.3094,111.02875,8025,531,7360,84 1647843721.064,23.3094,111.02875,8025,531,7360,84
1647843725,23.30974,111.04041,8600,507,8448,88 1647843725.000,23.30974,111.04041,8600,507,8448,88
1647843742,23.33031,111.07468,8175,446,-13248,79 1647843741.870,23.33031,111.07468,8175,446,-13248,79
1647843752,23.33533,111.09754,4375,442,-26752,73 1647843751.888,23.33533,111.09754,4375,442,-26752,73
1647843756,23.33752,111.10558,3225,376,-30976,87 1647843755.972,23.33752,111.10558,3225,376,-30976,87
1 1647843557 1647843556.570 23.38095 110.6546 29100 457 0 100
2 1647843567 1647843566.908 23.37723 110.67724 29100 457 64 100
3 1647843572 1647843572.020 23.37524 110.6894 29100 457 64 100
4 1647843577 1647843577.038 23.37337 110.70074 29100 457 0 100
5 1647843587 1647843587.156 23.36948 110.72466 29100 457 -64 100
6 1647843591 1647843590.666 23.36829 110.7319 29100 457 0 100
7 1647843593 1647843592.580 23.36769 110.73554 29100 457 0 100
8 1647843594 1647843593.572 23.36732 110.73782 29100 458 0 100
9 1647843596 1647843596.386 23.36618 110.74458 29100 457 0 100
10 1647843597 1647843597.120 23.36583 110.74682 29100 457 0 100
11 1647843599 1647843599.386 23.36508 110.75134 29100 457 0 100
12 1647843608 1647843607.620 23.36182 110.77128 29100 457 0 100
13 1647843613 1647843612.932 23.35987 110.78303 29100 457 0 100
14 1647843619 1647843618.822 23.35791 110.79478 29100 457 0 100
15 1647843624 1647843623.936 23.35593 110.80695 29100 457 0 100
16 1647843634 1647843633.596 23.35236 110.82868 29100 457 0 100
17 1647843639 1647843638.772 23.35043 110.84042 29100 457 0 100
18 1647843644 1647843643.714 23.34874 110.85083 29100 457 0 100
19 1647843660 1647843659.832 23.35812 110.88536 27025 433 -21696 98
20 1647843664 1647843664.116 23.35744 110.89615 24925 425 -30784 91
21 1647843669 1647843669.150 23.35661 110.90543 22250 386 -30976 100
22 1647843675 1647843674.952 23.35263 110.91592 17325 429 -30976 123
23 1647843680 1647843679.828 23.34474 110.92432 15325 520 -22528 140
24 1647843691 1647843690.678 23.3231 110.94439 12725 551 -16832 127
25 1647843695 1647843695.160 23.31711 110.95592 11000 556 -21312 112
26 1647843701 1647843700.820 23.3142 110.96949 9150 558 -21888 100
27 1647843706 1647843705.578 23.3149 110.98338 7850 590 -15744 81
28 1647843716 1647843715.848 23.30773 111.01476 7425 565 3520 75
29 1647843721 1647843721.064 23.3094 111.02875 8025 531 7360 84
30 1647843725 1647843725.000 23.30974 111.04041 8600 507 8448 88
31 1647843742 1647843741.870 23.33031 111.07468 8175 446 -13248 79
32 1647843752 1647843751.888 23.33533 111.09754 4375 442 -26752 73
33 1647843756 1647843755.972 23.33752 111.10558 3225 376 -30976 87

15
kml.py

@ -1,6 +1,7 @@
import pandas import pandas
from fastkml import kml from fastkml import kml
from fastkml.geometry import Geometry from fastkml.geometry import Geometry
from fastkml.styles import LineStyle
from shapely.geometry import Point, LineString from shapely.geometry import Point, LineString
k = kml.KML() k = kml.KML()
@ -8,13 +9,17 @@ d = kml.Document()
line = [] line = []
df = pandas.read_csv('combined.csv') df = pandas.read_csv('combined.csv')
for i in df.itertuples(): df_s = [(i.lng, i.lat, i.altitude * 0.3048) for i in df.itertuples()]
line.append(Point(i.lng, i.lat, i.altitude * 0.3048))
p = kml.Placemark() for j in range(len(df_s)-1):
p.geometry = Geometry(geometry=LineString(line), altitude_mode="absolute") p = kml.Placemark()
p.geometry = Geometry(geometry=LineString([
Point(*df_s[j]),
Point(*df_s[j+1]),
]), altitude_mode="absolute")
d.append(p)
d.append(p)
k.append(d) k.append(d)
with open('out.kml', 'w+', encoding='utf-8') as f: with open('out.kml', 'w+', encoding='utf-8') as f:

2
out.kml

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save