Browse Source

first commit

master
cathaypacific8747 3 years ago
commit
200e102cd6
  1. 1
      .gitignore
  2. 9
      README.md
  3. 66
      coarse.csv
  4. 96
      combined.csv
  5. 33
      detailed.csv
  6. BIN
      detailed.png
  7. 21
      kml.py
  8. 23
      main.py
  9. 1
      out.kml
  10. BIN
      path.png

1
.gitignore vendored

@ -0,0 +1 @@ @@ -0,0 +1 @@
out/

9
README.md

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

66
coarse.csv

@ -0,0 +1,66 @@ @@ -0,0 +1,66 @@
timestamp,lat,lng,altitude,speed,vs,heading,squawk
1647839813,25.08835,102.905052,8400,183,1024,227,0
1647839824,25.08197,102.896881,8600,197,1088,229,0
1647839839,25.073175,102.885353,8875,211,1984,230,0
1647839854,25.064301,102.873535,9100,233,1344,230,0
1647839864,25.056061,102.862495,9300,242,1216,230,2101
1647839878,25.04557,102.84877,9825,254,3840,228,2101
1647839888,25.037796,102.838562,10475,249,4032,231,2101
1647839900,25.029789,102.827576,11100,245,3200,231,2101
1647839916,25.017883,102.813416,11875,249,2560,219,2101
1647839921,25.011122,102.809181,12125,254,3776,205,2101
1647839926,25.005116,102.807106,12350,260,3584,194,2101
1647839932,24.998566,102.805939,12550,266,3136,186,2101
1647839937,24.991196,102.806122,12775,275,2496,178,2101
1647839943,24.984833,102.807411,13050,280,3968,167,2101
1647839948,24.978115,102.809853,13325,285,3968,159,2101
1647839954,24.971054,102.813667,13450,298,2112,150,2101
1647839959,24.965561,102.817993,13625,307,3008,142,2101
1647839965,24.958374,102.825264,13850,316,2624,135,2101
1647839970,24.954025,102.830658,13950,322,1792,131,2101
1647839976,24.948042,102.8396,14100,336,2304,125,2101
1647839981,24.94368,102.847595,14300,342,2496,120,2101
1647839986,24.939972,102.855736,14500,347,2624,115,2101
1647839992,24.936638,102.863853,14725,349,2816,114,2101
1647839997,24.9331,102.872299,14975,350,2944,114,2101
1647840002,24.929306,102.881012,15200,352,2816,115,2101
1647840007,24.925873,102.888847,15425,355,2880,115,2101
1647840037,24.904449,102.93676,16950,353,2688,116,2101
1647840070,24.879519,102.991127,18250,358,1664,116,2101
1647840130,24.83399,103.09285,19950,388,2432,116,2101
1647840154,24.812716,103.134102,20700,387,1600,127,2101
1647840158,24.807175,103.140869,20825,386,1728,133,2101
1647840163,24.805872,103.142288,20850,386,1664,135,2101
1647840168,24.800518,103.147575,21100,384,1536,138,2101
1647840175,24.781403,103.160858,21350,382,1728,153,2101
1647840180,24.773191,103.16478,21500,384,1984,157,2101
1647840186,24.764236,103.168739,21700,386,2112,158,2101
1647840191,24.755493,103.172455,21850,387,1984,158,2101
1647840196,24.748077,103.175606,22000,390,2112,158,2101
1647840251,24.654922,103.219048,23875,405,2880,144,2101
1647840257,24.645639,103.226662,24050,406,1600,142,2101
1647840263,24.637527,103.23349,24150,408,1472,142,2101
1647840268,24.628555,103.241119,24350,410,2432,141,2101
1647840274,24.620129,103.24894,24525,413,2176,139,2101
1647840286,24.604208,103.266098,24850,418,1920,133,2101
1647840358,24.517731,103.388268,26800,435,1728,117,2101
1647840425,24.456219,103.523239,28475,447,1600,116,2101
1647840443,24.439739,103.559044,28875,449,1344,116,2101
1647842808,23.69034,108.971939,29100,457,-64,93,0
1647842867,23.6821,109.106262,29125,457,0,93,0
1647842933,23.655533,109.257454,29100,460,-64,102,0
1647842997,23.626373,109.40094,29100,457,0,102,0
1647843059,23.597946,109.540199,29100,455,0,102,0
1647843120,23.569702,109.678093,29100,455,64,102,0
1647843183,23.540955,109.817787,29100,455,0,102,0
1647843245,23.512024,109.957016,29100,455,0,102,0
1647843308,23.482864,110.097191,29100,455,0,102,0
1647843370,23.453979,110.235718,29100,455,0,102,0
1647843432,23.42625,110.374756,29100,454,0,100,0
1647843494,23.403809,110.513969,29100,455,64,99,0
1647843549,23.38353,110.638763,29100,457,0,100,0
1647843599,23.36508,110.751343,29100,457,0,100,2101
1647843736,23.327911,111.063889,9075,455,-6016,74,2101
1647843747,23.333084,111.086357,6525,414,-25792,75,2101
1647843751,23.335327,111.097542,4375,442,-26752,73,2101
1647843755,23.337524,111.105583,3225,376,-30976,87,2101

96
combined.csv

@ -0,0 +1,96 @@ @@ -0,0 +1,96 @@
timestamp,lat,lng,altitude,speed,vs,heading,squawk
1647839813,25.08835,102.905052,8400,183,1024,227,0
1647839824,25.08197,102.896881,8600,197,1088,229,0
1647839839,25.073175,102.885353,8875,211,1984,230,0
1647839854,25.064301,102.873535,9100,233,1344,230,0
1647839864,25.056061,102.862495,9300,242,1216,230,2101
1647839878,25.04557,102.84877,9825,254,3840,228,2101
1647839888,25.037796,102.838562,10475,249,4032,231,2101
1647839900,25.029789,102.827576,11100,245,3200,231,2101
1647839916,25.017883,102.813416,11875,249,2560,219,2101
1647839921,25.011122,102.809181,12125,254,3776,205,2101
1647839926,25.005116,102.807106,12350,260,3584,194,2101
1647839932,24.998566,102.805939,12550,266,3136,186,2101
1647839937,24.991196,102.806122,12775,275,2496,178,2101
1647839943,24.984833,102.807411,13050,280,3968,167,2101
1647839948,24.978115,102.809853,13325,285,3968,159,2101
1647839954,24.971054,102.813667,13450,298,2112,150,2101
1647839959,24.965561,102.817993,13625,307,3008,142,2101
1647839965,24.958374,102.825264,13850,316,2624,135,2101
1647839970,24.954025,102.830658,13950,322,1792,131,2101
1647839976,24.948042,102.8396,14100,336,2304,125,2101
1647839981,24.94368,102.847595,14300,342,2496,120,2101
1647839986,24.939972,102.855736,14500,347,2624,115,2101
1647839992,24.936638,102.863853,14725,349,2816,114,2101
1647839997,24.9331,102.872299,14975,350,2944,114,2101
1647840002,24.929306,102.881012,15200,352,2816,115,2101
1647840007,24.925873,102.888847,15425,355,2880,115,2101
1647840037,24.904449,102.93676,16950,353,2688,116,2101
1647840070,24.879519,102.991127,18250,358,1664,116,2101
1647840130,24.83399,103.09285,19950,388,2432,116,2101
1647840154,24.812716,103.134102,20700,387,1600,127,2101
1647840158,24.807175,103.140869,20825,386,1728,133,2101
1647840163,24.805872,103.142288,20850,386,1664,135,2101
1647840168,24.800518,103.147575,21100,384,1536,138,2101
1647840175,24.781403,103.160858,21350,382,1728,153,2101
1647840180,24.773191,103.16478,21500,384,1984,157,2101
1647840186,24.764236,103.168739,21700,386,2112,158,2101
1647840191,24.755493,103.172455,21850,387,1984,158,2101
1647840196,24.748077,103.175606,22000,390,2112,158,2101
1647840251,24.654922,103.219048,23875,405,2880,144,2101
1647840257,24.645639,103.226662,24050,406,1600,142,2101
1647840263,24.637527,103.23349,24150,408,1472,142,2101
1647840268,24.628555,103.241119,24350,410,2432,141,2101
1647840274,24.620129,103.24894,24525,413,2176,139,2101
1647840286,24.604208,103.266098,24850,418,1920,133,2101
1647840358,24.517731,103.388268,26800,435,1728,117,2101
1647840425,24.456219,103.523239,28475,447,1600,116,2101
1647840443,24.439739,103.559044,28875,449,1344,116,2101
1647842808,23.69034,108.971939,29100,457,-64,93,0
1647842867,23.6821,109.106262,29125,457,0,93,0
1647842933,23.655533,109.257454,29100,460,-64,102,0
1647842997,23.626373,109.40094,29100,457,0,102,0
1647843059,23.597946,109.540199,29100,455,0,102,0
1647843120,23.569702,109.678093,29100,455,64,102,0
1647843183,23.540955,109.817787,29100,455,0,102,0
1647843245,23.512024,109.957016,29100,455,0,102,0
1647843308,23.482864,110.097191,29100,455,0,102,0
1647843370,23.453979,110.235718,29100,455,0,102,0
1647843432,23.42625,110.374756,29100,454,0,100,0
1647843494,23.403809,110.513969,29100,455,64,99,0
1647843549,23.38353,110.638763,29100,457,0,100,0
1647843556.570,23.38095,110.6546,29100,457,0,100,2101
1647843566.908,23.37723,110.67724,29100,457,64,100,2101
1647843572.020,23.37524,110.6894,29100,457,64,100,2101
1647843577.038,23.37337,110.70074,29100,457,0,100,2101
1647843587.156,23.36948,110.72466,29100,457,-64,100,2101
1647843590.666,23.36829,110.7319,29100,457,0,100,2101
1647843592.580,23.36769,110.73554,29100,457,0,100,2101
1647843593.572,23.36732,110.73782,29100,458,0,100,2101
1647843596.386,23.36618,110.74458,29100,457,0,100,2101
1647843597.120,23.36583,110.74682,29100,457,0,100,2101
1647843599.386,23.36508,110.75134,29100,457,0,100,2101
1647843607.620,23.36182,110.77128,29100,457,0,100,2101
1647843612.932,23.35987,110.78303,29100,457,0,100,2101
1647843618.822,23.35791,110.79478,29100,457,0,100,2101
1647843623.936,23.35593,110.80695,29100,457,0,100,2101
1647843633.596,23.35236,110.82868,29100,457,0,100,2101
1647843638.772,23.35043,110.84042,29100,457,0,100,2101
1647843643.714,23.34874,110.85083,29100,457,0,100,2101
1647843659.832,23.35812,110.88536,27025,433,-21696,98,2101
1647843664.116,23.35744,110.89615,24925,425,-30784,91,2101
1647843669.150,23.35661,110.90543,22250,386,-30976,100,2101
1647843674.952,23.35263,110.91592,17325,429,-30976,123,2101
1647843679.828,23.34474,110.92432,15325,520,-22528,140,2101
1647843690.678,23.3231,110.94439,12725,551,-16832,127,2101
1647843695.160,23.31711,110.95592,11000,556,-21312,112,2101
1647843700.820,23.3142,110.96949,9150,558,-21888,100,2101
1647843705.578,23.3149,110.98338,7850,590,-15744,81,2101
1647843715.848,23.30773,111.01476,7425,565,3520,75,2101
1647843721.064,23.3094,111.02875,8025,531,7360,84,2101
1647843725.000,23.30974,111.04041,8600,507,8448,88,2101
1647843736,23.327911,111.063889,9075,455,-6016,74,2101
1647843741.870,23.33031,111.07468,8175,446,-13248,79,2101
1647843747,23.333084,111.086357,6525,414,-25792,75,2101
1647843751.888,23.33533,111.09754,4375,442,-26752,73,2101
1647843755.972,23.33752,111.10558,3225,376,-30976,87,2101

33
detailed.csv

@ -0,0 +1,33 @@ @@ -0,0 +1,33 @@
1647843557,23.38095,110.6546,29100,457,0,100
1647843567,23.37723,110.67724,29100,457,64,100
1647843572,23.37524,110.6894,29100,457,64,100
1647843577,23.37337,110.70074,29100,457,0,100
1647843587,23.36948,110.72466,29100,457,-64,100
1647843591,23.36829,110.7319,29100,457,0,100
1647843593,23.36769,110.73554,29100,457,0,100
1647843594,23.36732,110.73782,29100,458,0,100
1647843596,23.36618,110.74458,29100,457,0,100
1647843597,23.36583,110.74682,29100,457,0,100
1647843599,23.36508,110.75134,29100,457,0,100
1647843608,23.36182,110.77128,29100,457,0,100
1647843613,23.35987,110.78303,29100,457,0,100
1647843619,23.35791,110.79478,29100,457,0,100
1647843624,23.35593,110.80695,29100,457,0,100
1647843634,23.35236,110.82868,29100,457,0,100
1647843639,23.35043,110.84042,29100,457,0,100
1647843644,23.34874,110.85083,29100,457,0,100
1647843660,23.35812,110.88536,27025,433,-21696,98
1647843664,23.35744,110.89615,24925,425,-30784,91
1647843669,23.35661,110.90543,22250,386,-30976,100
1647843675,23.35263,110.91592,17325,429,-30976,123
1647843680,23.34474,110.92432,15325,520,-22528,140
1647843691,23.3231,110.94439,12725,551,-16832,127
1647843695,23.31711,110.95592,11000,556,-21312,112
1647843701,23.3142,110.96949,9150,558,-21888,100
1647843706,23.3149,110.98338,7850,590,-15744,81
1647843716,23.30773,111.01476,7425,565,3520,75
1647843721,23.3094,111.02875,8025,531,7360,84
1647843725,23.30974,111.04041,8600,507,8448,88
1647843742,23.33031,111.07468,8175,446,-13248,79
1647843752,23.33533,111.09754,4375,442,-26752,73
1647843756,23.33752,111.10558,3225,376,-30976,87

BIN
detailed.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

21
kml.py

@ -0,0 +1,21 @@ @@ -0,0 +1,21 @@
import pandas
from fastkml import kml
from fastkml.geometry import Geometry
from shapely.geometry import Point, LineString
k = kml.KML()
d = kml.Document()
line = []
df = pandas.read_csv('combined.csv')
for i in df.itertuples():
line.append(Point(i.lng, i.lat, i.altitude * 0.3048))
p = kml.Placemark()
p.geometry = Geometry(geometry=LineString(line), altitude_mode="absolute")
d.append(p)
k.append(d)
with open('out.kml', 'w+', encoding='utf-8') as f:
f.write(k.to_string(prettyprint=True))

23
main.py

@ -0,0 +1,23 @@ @@ -0,0 +1,23 @@
import json
import urllib3
import pandas
flight_id = '2b367bc1' # MU5735
http = urllib3.PoolManager()
data = json.loads(http.request('GET', f'https://api.flightradar24.com/common/v1/flight-playback.json?flightId={flight_id}').data)
extracted_data = []
for point in data['result']['response']['data']['flight']['track']:
timestamp = point['timestamp']
lat, lng = point['latitude'], point['longitude']
altitude = point['altitude']['feet']
speed = point['speed']['kts']
vs = point['verticalSpeed']['fpm']
heading = point['heading']
squawk = point['squawk']
extracted_data.append((timestamp, lat, lng, altitude, speed, vs, heading, squawk))
df = pandas.DataFrame(extracted_data, columns=['timestamp', 'lat', 'lng', 'altitude', 'speed', 'vs', 'heading', 'squawk'])
df.to_csv('coarse.csv', index=False)

1
out.kml

@ -0,0 +1 @@ @@ -0,0 +1 @@
<kml:kml xmlns:kml="http://www.opengis.net/kml/2.2"><kml:Document><kml:visibility>1</kml:visibility><kml:Placemark><kml:visibility>1</kml:visibility><kml:LineString><kml:altitudeMode>absolute</kml:altitudeMode><kml:coordinates>102.905052,25.088350,2560.320000 102.896881,25.081970,2621.280000 102.885353,25.073175,2705.100000 102.873535,25.064301,2773.680000 102.862495,25.056061,2834.640000 102.848770,25.045570,2994.660000 102.838562,25.037796,3192.780000 102.827576,25.029789,3383.280000 102.813416,25.017883,3619.500000 102.809181,25.011122,3695.700000 102.807106,25.005116,3764.280000 102.805939,24.998566,3825.240000 102.806122,24.991196,3893.820000 102.807411,24.984833,3977.640000 102.809853,24.978115,4061.460000 102.813667,24.971054,4099.560000 102.817993,24.965561,4152.900000 102.825264,24.958374,4221.480000 102.830658,24.954025,4251.960000 102.839600,24.948042,4297.680000 102.847595,24.943680,4358.640000 102.855736,24.939972,4419.600000 102.863853,24.936638,4488.180000 102.872299,24.933100,4564.380000 102.881012,24.929306,4632.960000 102.888847,24.925873,4701.540000 102.936760,24.904449,5166.360000 102.991127,24.879519,5562.600000 103.092850,24.833990,6080.760000 103.134102,24.812716,6309.360000 103.140869,24.807175,6347.460000 103.142288,24.805872,6355.080000 103.147575,24.800518,6431.280000 103.160858,24.781403,6507.480000 103.164780,24.773191,6553.200000 103.168739,24.764236,6614.160000 103.172455,24.755493,6659.880000 103.175606,24.748077,6705.600000 103.219048,24.654922,7277.100000 103.226662,24.645639,7330.440000 103.233490,24.637527,7360.920000 103.241119,24.628555,7421.880000 103.248940,24.620129,7475.220000 103.266098,24.604208,7574.280000 103.388268,24.517731,8168.640000 103.523239,24.456219,8679.180000 103.559044,24.439739,8801.100000 108.971939,23.690340,8869.680000 109.106262,23.682100,8877.300000 109.257454,23.655533,8869.680000 109.400940,23.626373,8869.680000 109.540199,23.597946,8869.680000 109.678093,23.569702,8869.680000 109.817787,23.540955,8869.680000 109.957016,23.512024,8869.680000 110.097191,23.482864,8869.680000 110.235718,23.453979,8869.680000 110.374756,23.426250,8869.680000 110.513969,23.403809,8869.680000 110.638763,23.383530,8869.680000 110.654600,23.380950,8869.680000 110.677240,23.377230,8869.680000 110.689400,23.375240,8869.680000 110.700740,23.373370,8869.680000 110.724660,23.369480,8869.680000 110.731900,23.368290,8869.680000 110.735540,23.367690,8869.680000 110.737820,23.367320,8869.680000 110.744580,23.366180,8869.680000 110.746820,23.365830,8869.680000 110.751340,23.365080,8869.680000 110.771280,23.361820,8869.680000 110.783030,23.359870,8869.680000 110.794780,23.357910,8869.680000 110.806950,23.355930,8869.680000 110.828680,23.352360,8869.680000 110.840420,23.350430,8869.680000 110.850830,23.348740,8869.680000 110.885360,23.358120,8237.220000 110.896150,23.357440,7597.140000 110.905430,23.356610,6781.800000 110.915920,23.352630,5280.660000 110.924320,23.344740,4671.060000 110.944390,23.323100,3878.580000 110.955920,23.317110,3352.800000 110.969490,23.314200,2788.920000 110.983380,23.314900,2392.680000 111.014760,23.307730,2263.140000 111.028750,23.309400,2446.020000 111.040410,23.309740,2621.280000 111.063889,23.327911,2766.060000 111.074680,23.330310,2491.740000 111.086357,23.333084,1988.820000 111.097540,23.335330,1333.500000 111.105580,23.337520,982.980000</kml:coordinates></kml:LineString></kml:Placemark></kml:Document></kml:kml>

BIN
path.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1010 KiB

Loading…
Cancel
Save