Planes on a Serverless

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hey how you guys doing good good thanks for uh thanks for coming out i wanted to give this talk purely because it was fun to do uh to to make this little thing i didn't realize as you'll find out i didn't realize you could actually do this with lambda and python so i figured to serve up html you had to do some other stuff but aws actually provides you a method to do this purely in python which is well it's not purely in python you still have to write some javascript which totally sucks i'm sure there's easier ways to do that i picked the hardest way don't judge my code you'll see it later it works that's all that matters um some of you know me i am the director of cloud infrastructure at ironette i do uh get to write code still in fact i had a couple of pr's today so i i still get to do code it's very rare it sucks the code part not the writing code part not writing code sucks that's what i meant to say um our aws account manager likes me a lot we spend a lot of money on amazon not nearly as much as other people but i am liked at least by one person even though he's paid to like me i like data we were kind of just joking earlier about uh nlp and pushing data through things but you'll see here i've i've been collecting this uh airplane data since 2018 and it's a it's a lot of data it's it's not a it's a big data problem even though it's only like 50 gigabytes of data now it's uh big data is what you make of it 50 gigabytes of compressed json is a big data problem uh but yeah like i said collecting it since 2018 you'll see it's it's it's an it's a weird data set i like it uh and i love some aws that's why i'm here so i think i wanted to start i know we kind of already figured out that a lot of us already know what serverless is but i wanted to clearly define serverless versus serverless there is obviously lambda microsoft functions or whatever it's called google's functions that is the idea that you can provide using somebody else's computer uh on demand processing to the microsecond essentially you pay you know a couple of micro pennies per invocation that's serverless when you're not using it doesn't cost you any money the other serverless term you'll hear in this is actually the serverless framework which is what i use to actually deploy this it's just an open source framework that a lot of people use there's a lot of different frameworks that you can use i forget all the different ones out there i think even aws has a mechanism to do it through cdk there's there's a whole slew of ways to do it you can even manually deploy it out there yourself if you create the zip file properly and push it to amazon it's serverless makes a little bit easier because you'll see you'll get to actually i can create other important parts not just the actual function itself there's other parts to it that you need to include to make it work properly included this purely because i think what you'll see here is there's there's clearly the way that you would display static html via something like s3 or cloudfront you can put static resources in github there's just serving it through a a web server apache nginx just putting those files there you can serve it out there obviously dynamic generated html django is obviously the one we all love here other server side rendering html who cares about that stuff we're actually talking about the way we're doing it today we're gonna dynamically generate some html with python uh for almost free so i wanted to kind of show why this whole thing is set up the way it is i have this raspberry pi i'll talk about it here in a second i have this raspberry pi at my house that is collecting this airplane data with a radio receiver listening on 1090 megahertz it presents the data that i'm trying to that i want to look at in a really nice format problem is if i wanted to see that data outside of my house i'd have to expose my raspberry pi through the firewall i'm not an idiot i'm not going to do that because there are mean people out there that can mess with it and i don't i don't want them to do that so since 2018 i've had a little piece of python code running on that raspberry pi that listens to a uh web point on the actual raspberry pi and it's just every 30 seconds sends the complete json list of aircraft 2s3 and i just did stuff with it i'd throw it into athena i'd query things at one point i got bored i took it all and i threw it into elasticsearch did a heat map and found out that i had actually with my raspberry pi sitting in my house i had picked up aircraft all the way up in ottawa and all the way down in georgia for like a split second you'd look at it and like the heat map over the dc area was like hundreds of millions of collections down in georgia one so the radio wave had bounced just ever so perfectly at one split second that i picked up that aircraft all the way down there and all the way up in ottawa fascinating just just had to balance just right and it got picked up so it's cool like the data is really interesting because it you find out that you can actually get the curvature of the earth just right and pick up this plane in ottawa like where the heck that come from it's probably one of those aliens we were talking about before broadcasting adsb uh i didn't i i'll talk about it here in a second that uh when i when i actually show the raspberry pi side of this it's just a frequency protocol that airplanes broadcast we'll get to that in a second on the other side because i didn't want to expose the raspberry pi i said okay let's actually build a mechanism by which i can view this data it's not as pretty as as the way that it gets displayed through the raspberry pi again you could make it pretty we'd need a web designer and some smart people with django to do that in my case i just wanted to pull the data out of s3 and then format it to make it look a little pretty and serve it out i didn't when i found out that you could use lambda and api gateway to serve that that html i said hey that's great i don't have to build a web server i don't have to serve up the content it actually just has the actual lambda when you hit the api gateway endpoint the lambda actually reaches into the bucket pulls the information that we need as you'll find out i'm actually just pulling the last 90 seconds worth so three three objects worth of data and it just serves it out like it's a fairly simple it's actually one of the simplest uh aws environments that i've ever seen it's really only like three resources pretty simple nice thing is the actual cost super cheap two dollars a month 31 dollars a a year that's actually all s3 costs the lambda and api gateway doesn't even register on my bill it's still within the free tier because it's only the amount of times that i hit it now if this goes viral on youtube and somebody hits that end point it's still only going to cost me like 10 bucks because you get like 100 million invocations for nothing so uh have at it people that are watching this on youtube i'll post the link later hit it all day long i don't care it's not going to cost me a dime because really all the just the biggest part of it is the storage and i can even probably optimize that and say like if it's past a certain age put it in infrequent access and then the cost will even drop lower than that so it's pretty good any questions on that so far sweet so i know this says demo i want to actually pull up the uh the actual article i wrote initially on this back in april of 2018. so this is the raspberry pi it's uh it's it's it's just a raspberry pie that's all it is it's running it's running pioware so it's a version of uh linux distro that runs on uh raspberry pi's it's created by the company flightaware or the the organization flightaware all this stuff you'll see here is all from flightaware because what they want is they want these devices out there sending data to them and then they correlate that or they not correlate they condense all that data and then they sell it to like google and all the other companies that when you look for flight information they're all getting it from these things so it's like 20 000 raspberry pi's distributed all throughout the world are providing google and truthfully i think it's even like delta and all the other airlines they all get this data from idiots like me putting these raspberry pies in their house so it's a little 35 raspberry pie a little dongle that's the that blue one on the left is the actual uh software defined radio but it's only tuned to 1090 megahertz so you can have a software-defined radio that like picks anywhere from 30 megahertz all the way up to 1.6 gigahertz and then you can tune it there's another talk on uh the python frederick or actually you're matt lehman your uh your youtube for my ads or not my ads be my too many acronyms way too many acronyms in this stuff uh software-defined radio talk on python frederick kind of talks about just a software-defined radio this is specifically tuned to the 1090 megahertz which is the adsb frequency that all these airplanes are broadcasting and they all are required now as of 2020 they all have to broadcast it if you're a commercial plane you have to broadcast this frequency and it includes a whole slew of information i'll get to here in a second the little circular thing on the right hand side is just a filter so the the stick the the software-defined radio is only tuned to pick up 1090 megahertz but if you put an actual hardware filter in there it'll actually clean up the frequency and it just increases the range at which your your device can pick up and then lastly i have a 1090 megahertz tuned antenna uh mounted to the chicken coop that's just ever so slightly above my roof line so uh it's close enough to the house so that if it gets struck by lightning the house will get struck by lightning not the antenna because the house is insured not the antenna but it's high enough so that i can i can actually pick up uh all of the airplanes in a huge area i mean you'll see here in a second this is i don't remember what time i took this at but this was back in 2018 when i took it i don't know what time of day but uh hundreds of airplanes overhead you get all the way down to on an average day i'm picking all the way up down to newport news richmond all the way up into scranton usually i can pick up planes flying landing into uh jfk in newark they they drop out at around like 30 000 feet but i can see flying into dulles at 2000 feet there was even one time i saw a plane at dulles on my machine on the on the view it was at ground level so it was broadcasting 80sb on the ground but at such a probably a massive plane just like a bunch of broadcast capability and i was picking it up his color altitude yeah so all the purple ones are around forty thousand feet uh or the greenish ones the yellowish ones are thirty thousand and twenty thousand yeah this is this part club sorry is this part of the flightaware link yeah so it actually has a ui that you go to the ip address of the raspberry pi sky aware they actually updated because now this old picture i should have taken a new picture it'll show weather data and flight maps and all that now um i saw i don't even go to weather underground anymore for like the radar i like today the the weather that came in i quickly just go to the raspberry pi and use i can see the incoming weather it's it's not the raspberry pi is not picking up the weather it's pulling the weather from whether underground or some other open source location but it's a great view because it like centers right over top of my house i don't have to go to weather underground click on frederick pull up the nexrad radar i can just go to the ip address that's on my machine and pull it up and it's and it's there i got the weather data right can you see planes like avoiding weather packs today yeah totally i i should have screenshotted it um and i closed it out but when i pulled up the weather the uh the actual uh front that was coming in there was the front that was directly over top of frederick and right behind it in between us and like uh hagerstown see where those planes are going there was a little bit of space and they were all skirting through there to get down to dulles it was crazy and you could see them going up around hagerstown to come down the same line pretty interesting all right uh yeah it's super simple it's just raspberry pi anyways so i started this is just the this is basically the python script that i wrote i definitely want to refactor this someday because i'm like passing in access keys and secrets like they're hard-coded into the python script it's it's on the raspberry pi i don't care i could i should do it better environment variables or or an actual like config file again this was 2018 this was like five years ago this is when i was a little baby python kid right i don't even think python frederick existed yet so don't judge anyways so it just pulls the data and kicks it off to s3 very simple and just loops and every 30 seconds it just pushes it up there so that's really all that is you can see that has been doing that for um a long time uh so long in fact that actually it also does one other thing not only does it push to s3 i also publish a cloud watch metric so it'll uh actually keep track of all the airplanes like the maximum count those uh gaps are i got lazy and i forgot to make sure that it was still running for like multiple months it would happen it would just break and i'd forget to check it surprisingly when you set up a cloudwatch alarm to send you an email when the metric stops reporting it motivates you to go fix it um back when uh covid was big i don't know that i have that data anymore um because i think it maxes out at 15 months but when kovid was uh was really bad it was it dropped super low like down in the 50s on a daily basis because no planes were flying it was crazy but now we're back up there's tons of airplanes overhead we can actually zoom in to the last three hours i think oh i need to change the time period let's go 15 minutes yeah so like right overhead right now uh there's 148 planes overhead that's cool anyways we're talking about how do i get this information out of my house so that you guys can see it i think that's the next part i wanted to get to oh uh yeah like i said 50 50 50.2 gigabytes of json data and actually a single snapshot it's almost like i paid you to ask that question um [Music] i mean i guess it depends on the number of plans in the air but yeah it's entirely dependent on the number of planes here is one that i wanted to look at um give me a second it's okay this can get broadcasted purely because they're only short-term short-lived credentials cool all right i'm in there let's take a look at this one so this command i just pulled the json in one of the records from yesterday from the s3 bucket and passed it through jq and this is what it looks like this is uh this is a single entry here actually let's go ahead and helps if i can spell aircraft i'm so lazy i'm just pulling it multiple times let's get it actually uh oh come on there we go so you remember director of cloud infrastructure i do write code just not much i just i think it starts with oh geez i forgot about that hold on yeah aircraft i knew it was something like that i just spelt it wrong there we go all right so this is just one entry well i guess i didn't do it uh helps if i do there first entry so it's not always the same size it's json it's sometimes you get some information like in this particular case i think it means it was seen 0.6 seconds ago i think the hex the hexadecimal there is actually a unique identifier that the aircraft actually broadcasts rssi is the signal to it which is a radio thing that i used to know what rssi stood but i think the lower the number the better the signal um and then the number of messages that's not a very good one let's uh let's pick randomly 10. there we go so this is flight awi 3843 we can actually go to flightaware and because i broadcast this or because i pick up this data for them i get an enterprise user account so i can get a whole bunch of cool information but that is actually air wisconsin 3843 and it is somewhere where is the log from that you just pulled um it's it's actually hasn't taken off yet so i'm i guess i'm picking it up from uh from the ground that's weird maybe oh you know what so flightaware delays the data because they don't want bad guys using that information i forgot they delay it like five to ten minutes so i'm probably picking this up what's the altitude yeah seven thousand feet it just took off it just took off flightaware is it's supposed to have taken off here well it says it's oh it got it's it uh it got delayed that's the problem it was scheduled to take off at 6 10 p.m so it had taken off flightaware is not showing that it had taken off yet because the date is delayed but my raspberry pi has picked up that data so it provides other things like latitude and longitude like i said that hexadecimal you can look up you can actually look up that hex and it reports to the actual aircraft a whole bunch of other stuff the direction that it's going occasionally it'll show that a whole bunch of other information it's all very useful if you're building a uh application to display this data as you'll see here in a little bit all right is there any account with the number of planes from the yeah i don't know the jq query that would do that i think it actually is retained at the end of the no that's total messages um i think it's i think it you can count it somehow close the quote figure after the aircraft when fighting the account it's there's a it's actually uh you could do word count yeah i think that'll count because jq is going to print it out their jq has a count we'll just use it i just need to remember what it is length oh yeah well that didn't work um hold on i could i could tell you here uh it's 148 because that python script that's pushing 2s3 i am counting the uh the length of that array of that list and uh i post that to cloudwatch yeah what if you pipe the file or push it through du what's the distance on it 59 kilobytes we got 50 gigs worth of kilobyte little files every 30 seconds sweet yeah there's a lot of data it takes a long time to push that through stuff when i when i pushed it to elasticsearch i had to uh because it was all in s3 and i think at the time there wasn't a mechanism to like set up an automatic uh message like to you couldn't i don't think you can either now you can't say take this entire bucket and create sqs messages to then process through lambda i had to identify all of the objects in the bucket create sqs messages i pushed them to lambda and then lambda would take that data and throw it into the elastic search cluster i had created that was the only way i could have processed all that data in any assemblance of time because if i had just set up a single client to like read through all the buckets all the bucket data would take like six weeks and so i used lambda again i haven't found a perfect use case for lambda yet a set aside from like one offs of oh i want to process 50 gigabytes of compressed json uh let's let's do it concurrent times a thousand lambdas and have it pick up off an sqsq and send to elasticsearch that worked out great it only took three hours that did cost me like 100 bucks though after the fact i was like oh man i probably should have rethought that but it's okay all right so we got uh we got the data that's coming out right because we just we want that data so i said hey let's let's build this uh that's this is actually the script that that dumps the data we don't want that we don't care about that we want to actually look at the data that's coming in uh to actually view it so let's actually take a look at this here so serverless is great because you can just run like serverless and knit or whatever it is to create like a base project you can say hey i want to do python it'll create the lambda handler it'll create the serverless the ammo and then you just you write your code right again don't stare too deeply at the code because you're gonna be like wow this is stupid i agree it gets the job done though uh so ultimately what we're doing is we say uh we need a lot of imports the imports are all there for various things that we you do later but uh we go in here i load a template that template file is just some very basic html that gets passed in we'll get to that in a second set count to a couple of different things just preset them to false i use them later for stuff uh i wanted i originally did one data point but then i thought it would be cool just to have multiple data points i wanted i do you'll see when you actually see this you're like oh that looks like crap i agree uh there's probably a better way to view that data instead of you'll see airplanes that are in like a line of three it's because i've collected three collections of it and uh you can tell that it's the same airplane because it's all traveling the same direction and they're all pointing the same way some we don't actually have the direction so they're pointing up even though they're going this way it can all be cleaned up i think over time like i would probably change it that instead of essentially the first collection have the airplane nikon but then have just like a dot and like connect the dots that's what the pi air ui does i didn't i just didn't do that you'll see so we get all that information we pull out of s3 uh we get the objects of whenever they were last modified so we want the want the last modification so like i said it's collected every 30 seconds so we go somewhere between now and 30 seconds ago to get that last third the last collection and then between 30 seconds and 60 seconds we get that collection and then between 60 and 90 we get that third collection funny thing is i found a bug while writing this talk if you go to the url at you know the top of the hour it breaks because it's not smart enough to collect 30 seconds ago and then oh more than a minute ago is the hour previous so it just it returns an error so you have to wait like a minute and 30 seconds and then you'll be able to see stuff again oh i'm sure yeah yeah oh there's oh trust me i i'm presenting this purely because i know after the talk we're gonna figure out how to make it a little bit better all that data gets collected i pass it in to actually render it i pass in a bunch of the things uh like i'm using mapbox to make the pretty ui it's cheap and free i'll probably have to update my matte box token after this talk because that is definitely seeable in here if i click the wrong page yeah because you can see it right there i'm not going to click it but it's it's there um let's see render all that html send it through yep what are you rendering uh yeah yep yep ginger template we get down so yeah so these are the these are all the pretty much the same function just with last modified second last modified third last modified obviously it could be condensed into a single function that takes in which iteration we want to get we could even once we did that it would be easy to add in like a fourth last modified go back as far back as the plane came into existence we could probably render all all of the data going all the way back to 2018. that's when it would start costing me some money lambda would probably not survive there's some other stuff in here where we just you know a very simple function of saying okay we have the key location that we want let's go out to aws to s3 and actually pull that obviously like a bad person i'm hard coding the actual bucket name in there but whatever don't do that i did it um i have the i get the plane count because i think initially before i actually started displaying it i just wanted to show how many planes were in the air i don't actually show that anymore actually if you if you slowly load the page like if you pass it through like one of chrome's dev tools where it says you know induce some uh time into the system you'll actually see it render total plane count 140 and then the actual image shows up it's just because i'm lazy i didn't delete the old code this is uh to actually render that stuff i had to do some creating of the actual uh dictionaries of the latitude and longitude of the aircraft which is an odd it's just one of the pieces of information that's in there the flight name and the direction that it's heading all that's very useful partly because like like you saw you don't always have that information so i drop any aircraft that we don't actually have the latitude and longitude of i just don't plot it we're collecting information from it it just may not be giving us the full message and we just might not know where it's located uh this is a pretty simple function that just says okay uh here is the actual features that we're going to display on this so mapbox wants i guess it's not map box js javascript to display these things properly want a array a list of features that get displayed on this we're creating that information for the javascript later to say here's your list of features it's all of these latitude and longitudes we give them a specific title and uh the specific rotation that they're supposed to display at as the title is the flight name and then the rotation or the direction of where it's going in the 360 degrees of its heading again we don't always have that heading and i don't know that i'm always passing it right because you'll see a lot of these planes are actually pointing straight and they may be going west it's dumb i'll fix it someday but i mean that's 110 lines of python to what you'll see is it displays some pretty cool stuff this uh this is the actual index html this is that template so like i said shows the number of planes and then it actually goes out to mapbox and creates that layer i just have it centered over top of frederick because that's where we're at uh loads up the i i pull up some images from uh i think in the uh the top one there's actually just a wikipedi wiki media airplane at 25 pixels for the first layer and then 20 pixels for the second layer and then 15 pixels for the third layer just to show the age of it i could totally make it just a dot and connect them just haven't done it yet but it passes in the latitudes longitudes of all the different features and it displays it so that's that's pretty it um let me actually talk about the serverless one here the serverless email just to explain that so this is actually what's telling serverless the thing the application to how to deploy it um i should actually i updated this there's i meant to remove this before the talk it's just commenting out that we're obviously using the the new format of i am roles but using least privileges i've said that it can only get uh the bucket information from the actual s3 bucket that i have i don't want anybody else any other i don't want it reaching out to any other buckets because i'm paranoid and then through serverless you can actually have it set up a http event and then what it does is it actually creates the api gateway for you automatically so i don't have to write any code i don't have to write any cloud formation or terraform to create the uh api gateway it does it for me just by adding in that part there you can do a whole slew of other things i only just cared that you can actually connect to it so i have just the annie slash there's copious amounts of other things that you could append to that to pass it through cognito uh authentication or any other crazy stuff um i don't care about that so let me i could probably do a deployment and you can see yeah because i wanna uh yeah we'll do that so very simple just doing something like a uh serverless let me make sure yeah i'm still there so serverless deploy it'll probably fail because um there's no changes it'll probably come back and say there's no changes it might push out a package hopefully it pushes out the package so we can actually see yeah cool so it created this endpoint for us anybody that has that endpoint can use it and you get to see the airplanes overhead frederick so you saw that just display real quickly the number of planes but we zoom in it's uh aware of the density of the of the icons so you only see four but as we zoom in we see more and more you start seeing the size of the air icons change so we're actually seeing the directions that they're going see so like forge 94 that's an actual airplane overhead we could look up forge 94 who knows what it is let's see if we can type in uh probably some pretty unknown owner that's exciting position only flight so this is someone owns this airplane called forge 94 they've actually contacted flightaware to to not retain their data you can do that you can contact flightaware and say you don't want you don't want them to keep your data they will purge it but when you're in flight they will keep a position on you and obviously my raspberry pi is adding some of that information so we see it out there that's that's a bad example because we don't have an actual direction for them but here's a good one here uh swa 5405 that's the southwest airlines flight that's currently over centerville and uh has probably taken off from uh no it's probably flying overhead it's probably flying somewhere down south but uh yeah like this this is exactly what i wanted to be able to do i wanted to display the data somewhere outside of my house so i didn't have my raspberry pi exposed to the public internet and i'm able to display the data so much more i can do with it obviously i can make it a lot more pretty but it works it's pretty slick yeah it's all served in python too like i said it's it's a javascript template but the actual execution is python and it runs every single time i click that so we can actually click it a bunch of times and let's go check out cloudwatch we can actually see actually i probably want to go to lambda i'm probably the only person that's executed that today because nobody else knows what the url is now is is api gateway a required element of this in order to make uh need a landlord that's that's what i didn't realize was uh the actual api gateway is the thing that's returning the html um the lambda you you you can get the html out of lambda but you can't you can't render that into anything the api gateway is the thing that's re sending the rendered html to you now i can i can show you that because we'll test it in lambda you'll see that it does return html but you have no way to interface with the lambda to be able to render that html yeah we see the here's my invocations there it's just returning that if we go to test it i can just hit the test here and [Music] it sends back rendered uh html but that's as the body and it returns the the event that's an event to uh api gateway api gateway gets that and says oh i know what to do with that i take the body and i send that to the person that requested it oh and there there's my map box token all right so that's the thing that i i think actually probably doesn't matter because you have to you have to display that yeah so enjoy really private yeah so yeah that's that's what we're uh that's what i did i i wanted to get my plane data out of my house and uh 100 lines of python and some pretty simple aws knowledge i didn't have to expose a raspberry pi to the public internet well worth the time investment because you put that raspberry pi on the internet somebody's going to screw it up so yeah that's that's it have you um shared this project with other skyware users like anybody else that i've met one other uh pi aware person and uh you're pretty sweet if there were like collections you know like somebody in arizona so i i was briefly very uh interested in trying to have multiple pio wears out there i actually had a buddy of mine run one and send it to this s3 bucket for a while he he got out of it but um yeah he only did it in 2018 for two months but uh it would be entirely possible to make s3 the collection point for this right you could just have these all over the united states from various people just sending it there and then if you've you've got it displayed properly you could see all the planes all over it i mean that's kind of what uh they're doing with flightaware like you can see the real-time worldwide traffic is so flightaware is a company is there an open source thing that can also parse the um the signal stuff that comes off and because it sounds like flightwear is doing the work to package that up yeah they are with their with their pie where they i don't know that there's anybody else that has done kind of the same thing they make it available to you on your device i don't know that they i don't know that they've said anything about not letting saying hey this is i can't make a copy of this no it's my data i'm giving it to them i just use their open source it is open source application uh running on uh raspberry pi they're they're using i forget the name of the actual i think it's i think it's called dump 1090 is the application they actually use dump 1090 to pull the aes asdb yeah asdb data they use dump 1090 to pull that data and put it into a a format that they then put a web server around and then also a thing that publishes to them so they they have some open source applications that they're using which is probably why they don't care that you can pull the data yourself because it's open source i mean it's it's radio waves so 1090 is probably some binary format yeah the dump 1090 parses correct which is why you get some of those partial messages which is super fascinating to me like that one message i was looking at where um that's not we're not going to see it but one of these like this one like this message here is not a full message because we we collected something but we don't have a position we don't have a direction we're missing some stuff either either it's not broadcasting that information or more likely we just didn't capture what that full message was so yeah that's very very simple little python display i like it because like i said it costs nothing unless thousands of people go to it yeah all right well thanks patrick thanks you guys have any questions um what do you do with the javascript or how do you how do you pull it into the web browser so uh like how does it get rendered yeah that so that all gets passed through uh this response that the lambda sends back it includes it in that body and the uh api gateway renders based off of that body there renders the actual html and sends it over to the to the receiver i think what i saw is in your handler code you built up the dictionary the data structure yeah of all what was it fields or um no that wasn't features yeah so features were the things that then was a structure that got rendered into the template itself and that template appeared to be doing the javascript call here so we render we render a map it loads the image like that top image is the feature collection that's that geojson right there of feature collections with the lat lawns of features and so it's it's taking in it says okay i'm going to create this image and that image is going to be these these 25 pixel plane icons and it's going to create a plane icon at every lat lat long feature in that list of lat longs and then we do uh each after that we do another one but with a smaller icon another set of lat longs and then a third set at that 15 pixel and a another set of lat longs i'm very confident there's a cleaner way to do it but uh yeah cool uh which part is kind of uh where you have the larger planes as you're zoomed out and then that i don't so i'm going to answer that with i don't actually know that is a from my understanding that is actually a feature of either how i'm rendering it in javascript or like how the mapbox interface is working it's saying i can't display those all hundreds of those planes in that area so it it condenses it and says i'm only going to display these to show the user that there's something there i mean you can see here there's even airplanes that are broad that we get a zero zero zero on uh so they show up at zero latitude longitude right yeah yeah but uh yeah so it's it's that's that's not anything i'm doing that's that's the built-in thing it's it's doing that for me which is really nice i assume it helps with rendering it helps with page loading like there's a whole slew of things that it's doing to just make that an easier it didn't seem like there were any like conflicts between that so there must be some basic logic of yeah figuring that out too it's pretty cool yeah do you do any other like radio projects i haven't recently i want to i want so along with adsb there's a radio frequency that the airplanes broadcast that's actually like plain text text i forget what frequency it's on but you can pick that up as well and i've toyed with the idea of like having a stock ticker that just is broadcasting what like pilots are saying to each other oh is that what it is yeah it's a lot of times it's either like uh like a flight dispatch talking to a pilot or pilots talking to each other um so it's like cb radio for airplanes well it's it's so it's not even cb it's it's it's tech space um and i watched this one uh this one pilot his name's uh he's on youtube as four seven gear or something like that four seven yeah four seven gear he's a 747 long haul pilot he doesn't he doesn't really fly people he flies cargo and then he flies i think for boeing a lot to like deliver aircraft and he was saying like that's really all they talk over now is they'll send messages to each other over that system instead of calling over the radio because there's so much traffic out there now that it would just be constant radio communications so they just if it's something simple like they're just checking in with their if they're if they're let's say you're a plane flying uh you know from jfk to dulles and you're you know on getting ready to be on final approach or whatever i don't know all the terms there but they will send the message to the air traffic control like saying hey we're on our way we're getting in this location tell me what frequency i'm supposed to be on or whatever and air traffic control will respond over that instead of calling them up on the radio and saying hey here's your frequencies just because it keeps the channel clear for more important things like emergencies but i thought about doing that just because it's it's all text and you could you could totally have a website that's just constantly throwing up those messages yeah that's super cool is that something that um like flightaware has an interface for if you have to like there's i i forget i could i could do some googling and find out that the what the actual protocol is just like that dump 1090 there's an open source project that lets you display that stuff as well but it you have to you have to you have to have a different so 80sb is on 1090 megahertz that other frequency we're talking about or that other protocol is actually it depends like delta has their own set of frequencies southwest has their own set of frequencies and that's what they're all listening to each other on you if you were playing like if you were trying to pull that data you have to pre-program into it what frequencies to listen on and then it's essentially an in ascii text broadcast i can just imagine using like the marquee tag to have my old school texts going across my website would be epic yeah yeah i told you i like weird data like this is just this this is constantly broadcasted out there you just it's just out there constantly and you can pick it up and throw it out onto a stupid website it's a pretty fun random set yeah that's cool man this is neat you too can collect this think about it it's it it's like not even a hundred dollars to to build the stuff out uh i closed out the window i think the raspberry pi was 35 the uh dongle and the filter and the antenna like in total was 75 dollars in total for the entire thing it's been running since then occasionally it goes down i gotta reset it but it works
Info
Channel: Matt Layman
Views: 293
Rating: 5 out of 5
Keywords: Python, Serverless, AWS, ADS-B, 1090, SkyAware, PiAware, airplanes, flights
Id: dMFWMTIyEgU
Channel Id: undefined
Length: 53min 32sec (3212 seconds)
Published: Wed Aug 11 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.