Connect V1 - Live.GetTraffic Packet Cut Off

When sending a Live.GetTraffic call to the connect v1 API, the API separates the data into different packets. The message itself is not getting cut off, indicated by the presence of the brackets present in the received packet; instead the API appears to be hitting some sort of limit and electing to send the rest of the data on the next call of Live.GetTraffic.

My guess is the TCP packet simply cannot contain the amount of data that is associated with so many aircraft, as it happens less frequently with less aircraft.

I’m using this data for position updates, with 5 seconds between calls. Any ideas or suggestions would be greatly appreciated.

Example:

First Call

[‘{“AircraftID”:“64568366-b72c-47bd-8bf6-6fdb81b683f9”,“Altitude”:21.2233486,“AppVersion”:“22.4.1.1878”,“CallSign”:“Delta 812”,“DeviceName”:“Apple iPad13,8”,“FlightID”:“db874b46-9547-4e45-9111-26f3563e0e7d”,“Heading”:300.82734916242418,“ID”:“5b8f9515-12ad-4922-ab38-5f79d82c2e71”,“Latitude”:40.637256539047506,“LiveryID”:“ed553760-866f-41a9-bda0-33da4d0ba8b3”,“Longitude”:-73.789388145156451,“Name”:“Caniac”,“Velocity”:13.684591910562892,“VerticalSpeed”:0},’, ‘{“AircraftID”:“958486b0-1ef4-4efd-bee0-ea94e96f6c96”,“Altitude”:24263.4473,“AppVersion”:“22.4.1.1878”,“CallSign”:“SkyWest 1663”,“DeviceName”:“Apple iPhone13,2”,“FlightID”:“f1812782-d7aa-4868-9f92-1d5a2746f572”,“Heading”:322.20723462315482,“ID”:“a956ecc0-bd38-4456-a0c7-acf64ce268c8”,“Latitude”:40.7297960898842,“LiveryID”:“8aefff86-a91b-4e9f-be05-15e536c1df45”,“Longitude”:-73.976849667619732,“Name”:“raulgglez”,“Velocity”:354.92943539969406,“VerticalSpeed”:0},’, ‘{“AircraftID”:“d7434d84-555a-4d9b-93a7-53c77cf846ea”,“Altitude”:34255.4336,“AppVersion”:“22.4.1.1878”,“CallSign”:“Avianca 002VA”,“DeviceName”:“Apple iPhone10,1”,“FlightID”:“44fdc823-9c50-43c3-9dca-417c25085372”,“Heading”:219.9639745974562,“ID”:“4705fcd8-fbc5-4d3d-abc6-66bf925cf534”,“Latitude”:39.733909924036837,“LiveryID”:“80fc182b-5e4c-4fd7-9103-7221a72091b5”,“Longitude”:-73.659878523062673,“Name”:“Daniel_Steinman”,“Velocity”:475.72918496433505,“VerticalSpeed”:0},’, ‘{“AircraftID”:“7de22dcf-91dd-4932-b225-533298873df2”,“Altitude”:34023.65,“AppVersion”:“22.4.1.1878”,“CallSign”:“JetBlue 270VA”,“DeviceName”:“Apple iPad8,1”,“FlightID”:“6f82ef31-a6c0-44a4-a054-0d9851d54998”,“Heading”:217.56946053861148,“ID”:“4ee25e66-6988-46f0-bafb-688cb07294df”,“Latitude”:37.9307882895802,“LiveryID”:“97b1b5ef-0db9-4bca-9bb5-5970ebbb83b1”,“Longitude”:-75.405005011877023,“Name”:“KASON009”,“Velocity”:472.41848583516463,“VerticalSpeed”:0},’, ‘{“AircraftID”:“61084cae-8aac-4da4-a7df-396ec6d9c870”,“Altitude”:34024.625,“AppVersion”:“22.4.1.1878”,“CallSign”:“Speedbird 772”,“DeviceName”:“Apple iPad8,1”,“FlightID”:“1a16e593-c9ee-4bdb-8181-c80a5e971b01”,“Heading”:51.507201021685688,“ID”:“81834cfd-17b9-451b-a173-de4cb3457fc2”,“Latitude”:41.917569843885218,“LiveryID”:“3ad0777a-2a57-4346-9e56-8f428c6ae893”,“Longitude”:-73.251747281658353,“Name”:“Swaggermoves13”,“Velocity”:502.229133782811,“VerticalSpeed”:0},’, ‘{“AircraftID”:“230ec095-5e36-4637-ba2f-68831b31e891”,“Altitude”:14236.3779,“AppVersion”:“22.4.1.1878”,“CallSign”:“Singapore 380VA Heavy”,“DeviceName”:“Apple iPhone11,8”,“FlightID”:“dea81ebd-6eb6-4d49-a1b7-a3edac49b381”,“Heading”:112.25999882089992,“ID”:“7994f66e-6c8e-46b8-b17c-dec20ab02b10”,“Latitude”:41.048645866520367,“LiveryID”:“020a573f-4d0d-47bc-ad0e-b21d08d0a81e”,“Longitude”:-75.0246342376674,“Name”:“M1llard”,“Velocity”:323.0409951819446,“VerticalSpeed”:0},’, ‘{“AircraftID”:“474810ee-503c-44f2-a305-c176ec8cc431”,“Altitude”:37026.3672,“AppVersion”:“22.4.1.1878”,“CallSign”:“Delta 4560”,“DeviceName”:“Apple iPhone9,4”,“FlightID”:“ed382db0-74e9-4c20-8fe2-244fa9f97b75”,“Heading”:52.240804319680073,“ID”:“39f44e6d-354f-4df1-9ec7-dfab4b90d2ad”,“Latitude”:41.829425297260109,“LiveryID”:“786f529b-d290-47fe-9ab5-77c89c39eb6a”,“Longitude”:-71.761495562805791,“Name”:“Pinto_Joel”,“Velocity”:469.92986302869997,“VerticalSpeed”:0},’, ‘{“AircraftID”:“f60a537d-5f83-4b68-8f66-b5f76d1e1775”,“Altitude”:36027.72,“AppVersion”:“22.4.1.1878”,“CallSign”:“P4-ANE”,“DeviceName”:“Apple iPad7,6”,“FlightID”:“c2b4808e-e588-43db-afa3-66b2d8a781fd”,“Heading”:319.43002506511425,“ID”:“88167d48-9b29-44c8-b0da-5649d0db6d98”,“Latitude”:39.231651982727129,“LiveryID”:“7da07d85-ac0b-42a7-a94d-91bb95bb23c2”,“Longitude”:-72.980624257396485,“Name”:“Ultimate_Shane”,“Velocity”:461.73268006851242,“VerticalSpeed”:0},’, ‘{“AircraftID”:“de510d3d-04f8-46e0-8d65-55b888f33129”,“Altitude”:34019.41,“AppVersion”:“22.4.1.1878”,“CallSign”:“Lufthansa 499”,“DeviceName”:“Apple iPad5,1”,“FlightID”:“e0f7c053-e672-4584-b792-49fadeb9056a”,“Heading”:59.66007681503892,“ID”:“b54d6aa1-5c95-4782-82bb-d3225468ec42”,“Latitude”:42.469754126660931,“LiveryID”:“402e9952-6086-4f54-90c4-d809b35b3c90”,“Longitude”:-74.98673365072554,“Name”:“Lulu06”,“Velocity”:489.73295673485325,“VerticalSpeed”:0},’, ‘{“AircraftID”:“8290107b-d728-4fc3-b36e-0224c1780bac”,“Altitude”:35015.0625,“AppVersion”:“22.4.1.1877”,“CallSign”:“Ethiopian 307VA”,“DeviceName”:“Apple iPad7,6”,“FlightID”:“36d0002a-0c14-4d6d-b40a-cd23118bf2a7”,“Heading”:47.758916148587751,“ID”:“a01fd7e7-891d-4123-9630-322a664ba6f4”,“Latitude”:40.126214288091205,“LiveryID”:“03949eb7-ff6a-4050-aaf6-511388690990”,“Longitude”:-74.104679875181247,“Name”:“Emmanuel_Mgilane”,“Velocity”:500.84237680518862,“VerticalSpeed”:0},’, ‘{“AircraftID”:“0c039044-1a57-48db-99c1-7570a6bf2b00”,“Altitude”:34995.43,“AppVersion”:“22.4.1.1878”,“CallSign”:“THICC1”,“DeviceName”:“Apple iPhone12,3”,“FlightID”:“9e37a328-37db-4c71-ab57-b2e41ab62f9e”,“Heading”:26.722677995568006,“ID”:“5b3567c4-30fc-4e37-babf-c751ce21e97a”,“Latitude”:40.609608692383681,“LiveryID”:“29c954e2-b2c8-4784-85b9-5f8f8d4d215d”,“Longitude”:-73.597757741406,“Name”:null,“Velocity”:509.04819103287173,“VerticalSpeed”:0},’, ‘{“AircraftID”:“6af2c9f8-abd8-4872-a9bc-4e79fd84fe77”,“Altitude”:36067.6172,“AppVersion”:“22.4.1.1878”,“CallSign”:“United 093VA Heavy”,“DeviceName”:“Apple iPad8,12”,“FlightID”:“fb14d418-2d1c-4927-a14b-cbbf3d16297d”,“Heading”:231.21936136845017,“ID”:“bd8b7102-d83c-4a19-8f38-0a1bdaf98d5f”,“Latitude”:42.935533850554251,“LiveryID”:“39c37dae-7aa8-4e95-a0fa-85c1391b0598”,“Longitude”:-71.424921596163685,“Name”:“Jake_Ferrer”,“Velocity”:475.42000169157257,“VerticalSpeed”:0},’, ‘{“AircraftID”:“bec63a00-a483-4427-a076-0f76dba0ee97”,“Altitude”:327.48175,“AppVersion”:“22.4.1.1878”,“CallSign”:“United 900 Heavy”,“DeviceName”:“Apple iPad13,1”,“FlightID”:“616a2149-a030-460a-b8a3-82393f9d2e19”,“Heading”:8.1299955134073336,“ID”:"39d0da},’]

Second Call

[‘f22-40d7-9a1a-1a4c9b2edf8e",“Latitude”:38.9481868813678,“LiveryID”:“83e3dc55-a29c-4737-a6d8-5255a442e326”,“Longitude”:-77.444746112403053,“Name”:null,“Velocity”:1.98576721607142E-05,“VerticalSpeed”:0},’, ‘{“AircraftID”:“a266b67f-03e3-4f8c-a2bb-b57cfd4b12f3”,“Altitude”:32086.26,“AppVersion”:“22.4.1.1878”,“CallSign”:“JetBlue 224”,“DeviceName”:“Apple iPhone9,1”,“FlightID”:“74e2db92-b75f-494c-9ebd-a1f9e3587e19”,“Heading”:15.429105344471786,“ID”:“37ca2de1-1585-48c7-89d1-267b0a6d1498”,“Latitude”:38.801733043311636,“LiveryID”:“8a660633-ef3f-4336-bedf-99878eeb678b”,“Longitude”:-75.3172879945442,“Name”:“Victor_Gamer04”,“Velocity”:443.41508385370241,“VerticalSpeed”:0},’, ‘{“AircraftID”:“d7434d84-555a-4d9b-93a7-53c77cf846ea”,“Altitude”:34065.3555,“AppVersion”:“22.4.1.1878”,“CallSign”:“American 1018 Flight of 2”,“DeviceName”:“Apple iPad8,12”,“FlightID”:“9d372e6c-dcee-4482-9606-532ddeacab5e”,“Heading”:11.307043491686779,“ID”:“f106cf1e-4942-4f0a-95af-1a4db810c383”,“Latitude”:37.624559813260433,“LiveryID”:“8ce5dac3-bea5-4b09-957b-7e8df7ce40d1”,“Longitude”:-74.834365430059563,“Name”:null,“Velocity”:473.68410846071856,“VerticalSpeed”:0},’, ‘{“AircraftID”:“f60a537d-5f83-4b68-8f66-b5f76d1e1775”,“Altitude”:33063.71,“AppVersion”:“22.4.1.1878”,“CallSign”:“American 535”,“DeviceName”:“Apple iPad13,1”,“FlightID”:“009250e6-503d-43d0-a34e-c3077894a34f”,“Heading”:81.575667672751948,“ID”:“151a20d1-2281-48f4-afb0-36e595941a0f”,“Latitude”:42.014923707941577,“LiveryID”:“3ae370a0-2162-423c-a8ec-41982f011436”,“Longitude”:-78.118800350121361,“Name”:“Stanley_Wu1”,“Velocity”:527.02721020829347,“VerticalSpeed”:0},’, ‘{“AircraftID”:“8f34680a-a4ad-4f21-91e9-3a932ab03ca4”,“Altitude”:23.6219769,“AppVersion”:“22.4.1.1878”,“CallSign”:“Wisconsin 1425”,“DeviceName”:“Apple iPhone12,8”,“FlightID”:“3e95c081-88dd-43b1-a4bc-57670416993a”,“Heading”:297.10833848010896,“ID”:“b1179f32-da1b-46a6-8ba3-b3b281f40866”,“Latitude”:42.36557797271707,“LiveryID”:“47be6bc0-9b26-42da-8278-954cb5c7d417”,“Longitude”:-71.013390397085288,“Name”:null,“Velocity”:5.4791349272185925E-05,“VerticalSpeed”:0},’, ‘{“AircraftID”:“a266b67f-03e3-4f8c-a2bb-b57cfd4b12f3”,“Altitude”:31726.6035,“AppVersion”:“22.4.0.1852”,“CallSign”:“JetBlue 173”,“DeviceName”:“Apple iPad11,2”,“FlightID”:“d423539b-e845-4292-b509-082ee2467103”,“Heading”:50.581601106122235,“ID”:“9c0ee5af-e6dc-435b-b3bc-db5b03b66f5b”,“Latitude”:38.074393485491179,“LiveryID”:“8a660633-ef3f-4336-bedf-99878eeb678b”,“Longitude”:-76.529328138305928,“Name”:“Ploqui16”,“Velocity”:474.21450133135727,“VerticalSpeed”:0},’, ‘{“AircraftID”:“dac4bb8e-6bb3-480a-a5a5-191d7d351e47”,“Altitude”:32068.2813,“AppVersion”:“22.4.1.1878”,“CallSign”:“Delta 5700”,“DeviceName”:“Apple iPhone12,8”,“FlightID”:“7f06c51b-992d-4560-bd80-5065db55277c”,“Heading”:33.990193932852918,“ID”:“665ac174-d7e5-49e0-bd12-18b352b838b4”,“Latitude”:38.228796108634008,“LiveryID”:“6421dce4-377f-4ba7-97ea-d838aff83813”,“Longitude”:-74.956506490063873,“Name”:“Chaseelliottfan9WG”,“Velocity”:459.97430401717162,“VerticalSpeed”:0},’, ‘{“AircraftID”:“8f34680a-a4ad-4f21-91e9-3a932ab03ca4”,“Altitude”:32042.14,“AppVersion”:“22.4.1.1878”,“CallSign”:“Endeavor 1015”,“DeviceName”:“Apple iPhone10,4”,“FlightID”:“32b8ff49-e7a3-4854-a794-666ba7aa3b7d”,“Heading”:16.083956561335928,“ID”:“d6336164-99b5-48ea-a9e0-c0deefec2e4f”,“Latitude”:38.443391871284689,“LiveryID”:“c041b986-73ca-4a7f-9b51-dab38e119353”,“Longitude”:-75.469947636120793,“Name”:null,“Velocity”:446.09083609875671,“VerticalSpeed”:0},’, ‘{“AircraftID”:“710c84ae-6fdc-4c4a-ac3b-4031c3036e98”,“Altitude”:33001.3,“AppVersion”:“22.4.1.1878”,“CallSign”:“JetBlue 68”,“DeviceName”:“Apple iPad14,1”,“FlightID”:“0f0644a5-61ea-4675-93f0-8c232fc4e3f0”,“Heading”:15.440298316974145,“ID”:“68e08578-ff7d-464a-aa85-b78f8f15bd50”,“Latitude”:38.5716109633206,“LiveryID”:“c04aef45-800a-4e54-91c7-84be3077891d”,“Longitude”:-75.413087930977454,“Name”:“barrel”,“Velocity”:437.89261501361267,“VerticalSpeed”:0},’, ‘{“AircraftID”:“d7434d84-555a-4d9b-93a7-53c77cf846ea”,“Altitude”:36016.9023,“AppVersion”:“22.4.1.1878”,“CallSign”:“JetBlue 1”,“DeviceName”:“Apple iPad7,5”,“FlightID”:“8b421272-efcf-4fb6-88a9-723b5f1b5dec”,“Heading”:13.616813685951868,“ID”:“2acf5dae-1e82-4dc3-9e2d-7238e8891727”,“Latitude”:38.654739215140644,“LiveryID”:“80fc182b-5e4c-4fd7-9103-7221a72091b5”,“Longitude”:-75.380394118673365,“Name”:null,“Velocity”:451.84118819715746,“VerticalSpeed”:0},’, ‘{“AircraftID”:“a266b67f-03e3-4f8c-a2bb-b57cfd4b12f3”,“Altitude”:36976.0977,“AppVersion”:“22.4.1.1878”,“CallSign”:“American 622VA”,“DeviceName”:“Apple iPad11,1”,“FlightID”:“f647a164-e35c-4d83-859a-1837737413ac”,“Heading”:347.23520608185925,“ID”:“57b2f10c-8336-4a10-8ed1-f59123bc7ff5”,“Latitude”:38.666239436677586,“LiveryID”:“9af3b872-384d-4c35-bbe7-c0e2f8bba721”,“Longitude”:-77.023390120164407,“Name”:“Jaytch12”,“Velocity”:423.66905735944431,“VerticalSpeed”:0},’, ‘{“AircraftID”:“e258f6d4-4503-4dde-b25c-1fb9067061e2”,“Altitude”:38075.31,“AppVersion”:“22.4.1.1878”,“CallSign”:“N424KE”,“DeviceName”:“Apple iPhone13,2”,“FlightID”:“6b73a4d9-9ec6-46a1-bed1-0fd7085a9ea6”,“Heading”:54.165913627815677,“ID”:“5a51de50-17c3-45e7-8c9c-e4ee890fb338”,“Latitude”:38.574465019134081,“LiveryID”:“c03797bf-658c-4683-a7a1-e8dcaafaa536”,“Longitude”:-75.233628883273681,“Name”:null,“Velocity”:504.0963349903073,“VerticalSpeed”:0},’, ‘{“AircraftID”:“474810ee-503c-44f2-a305-c176ec8cc431”,“Altitude”:40022.2969,“AppVersion”:“22.4.1.1878”,“CallSign”:“N250”,“DeviceName”:“Apple iPad7,5”,“FlightID”:“e9709de5-a61f-41cc-876e-48fd20e43435”,“Heading”:41.700275392503393,“ID”:“0a8c6177-2f48-44c0-91d6-c3906531c503”,“Latitude”:39.062356093945304,“LiveryID”:“786f529b-d290-47fe-9ab5-77c89c39eb6a”,“Longitude”:-77.025744850943781,“Name”:null,“Velocity”:493.597154430123,“VerticalSpeed”:0},’, ‘{“AircraftID”:“710c84ae-6fdc-4c4a-ac3b-4031c3036e98”,“Altitude”:32327.1914,“AppVersion”:“22.4.1.1971”,“CallSign”:“Air Canada 133VA”,“DeviceName”:“samsung SM-G998B”,“FlightID”:“f81ba24c-08f1-43b1-8bf9-ddc5166f9abb”,“Heading”:175.17364307726359,“ID”:“011a0449-25e8-436d-b5ad-fafae56cbdf7”,“Latitude”:44.279222684400388,“LiveryID”:“e300cabf-165d-48ea-8b5f-937f292ba7cf”,“Longitude”:-74.061273592817173,“Name”:null,“Velocity”:482.6374319785167,“VerticalSpeed”:0},’, ‘{“AircraftID”:“c1ae3647-f56a-4dc4-9007-cc8b1a2697a5”,“Altitude”:35017.81,“AppVersion”:“22.4.1.1878”,“CallSign”:“Aeromexico 1846 Heavy”,“DeviceName”:“Apple iPad5,1”,“FlightID”:“512d088f-7809-4714-b919-ddea280acbaf”,“Heading”:55.634988280542458,“ID”:“08d10e23-24b8-466d-8eea-5d4fe42aeccb”,“Latitude”:39.045775104946145,“LiveryID”:“e920e3ae-59a7-41d3-ad83-cbe53267efce”,“Longitude”:-78.56395796229792,“Name”:“Carlos_enriquec01”,“Velocity”:537.22159728124575,“VerticalSpeed”:0},’, ‘{“AircraftID”:“8b00fd70-d825-4c30-a52e-3a27a3a1a157”,“Altitude”:33035.44,“AppVersion”:“22.4.1.1878”,“CallSign”:“Lufthansa 222”,“DeviceName”:“Apple iPhone12,1”,“FlightID”:“07db16bf-41ac-4d78-ac2b-28b1d50fdaa7”,“Heading”:55.091800411324272,“ID”:“0e3b1cf2-d5fa-4a83-8428-cef975aadfee”,“Latitude”:39.348063006307413,“LiveryID”:“46688f70-ce7c-4a7f-b921-e1dd14219f15”,“Longitude”:-78.958304145379685,“Name”:“Richi_Brega”,“Velocity”:491.33297423925632,“VerticalSpeed”:0},’, ‘{“AircraftID”:“e258f6d4-4503-4dde-b25c-1fb9067061e2”,“Altitude”:40034.84,“AppVersion”:“22.4.1.1971”,“CallSign”:“Speedbird 162VA Heavy”,“DeviceName”:“motorola moto g(6) plus”,“FlightID”:“b0684d5f-15f9-477d-b475-6c1ffaa67c6b”,“Heading”:237.43048951284965,“ID”:“7c14fa33-4130-4ed2-9291-0c82532e77af”,“Latitude”:42.712647324551632,“LiveryID”:“c03797bf-658c-4683-a7a1-e8dcaafaa536”,“Longitude”:-68.970948729238472,“Name”:“Theus15”,“Velocity”:498.98703988290953,“VerticalSpeed”:0},’, ‘{“AircraftID”:“ed29f26b-774e-471e-a23a-ecb9b6f5da74”,“Altitude”:39004.957,“AppVersion”:“22.4.1.1878”,“CallSign”:“Delta 624”,“DeviceName”:“Apple iPad7,11”,“FlightID”:“5b0e81b1-2872-4b64-ace0-d1b2968d45ab”,“Heading”:71.83592036915131,“ID”:“5c59967b-eb8c-43b3-be33-f77dbe72e066”,“Latitude”:40.962637681933053,“LiveryID”:“be3e90ff-0ba3-4a65-a51f-118afd4b9505”,“Longitude”:-77.665884861022619,“Name”:“Joseph_Spinner”,“Velocity”:492.93364427934631,“VerticalSpeed”:0},’, ‘{“AircraftID”:“f60a537d-5f83-4b68-8f66-b5f76d1e1775”,“Altitude”:30004.97,“AppVersion”:“22.4.1.1878”,“CallSign”:“American 1911”,“DeviceName”:“Apple iPad13,1”,“FlightID”:“42c092b9-884f-42cc-aed0-7d97b8280741”,“Heading”:232.72596449557159,“ID”:“5f18e253-6742-428f-8b58-e6821791e482”,“Latitude”:38.694652479404525,“LiveryID”:“7da07d85-ac0b-42a7-a94d-91bb95bb23c2”,“Longitude”:-77.093688135657885,“Name”:“Jeffery_Elie”,“Velocity”:471.43980094759081,“VerticalSpeed”:0}},’]

3 Likes

realized that I could check for the end of the full packet, so solved by concatenating the data coming through recv() until }]} is detected at the end