Coding 101 9 (Transcript)
Today on Coding 101 we speak with Liam Kennedy, the inventor of ISS-Above. It's time to get Coding.
Net casts you love, from people you trust. This is Twit!
Coding 101 is brought to you by . Learn what you want, when you want with access to over 2000 high quality online courses and training videos. All for one low monthly price! To try it free for seven days visit lynda.com/c101.
Father Robert Ballecer: Welcome to Coding 101. It's the Twit show where we show you the secrets at the code monkey. I’m Father Robert Ballecer.
Shannon Morse: And I’m Shannon Morse. Today we have some really interesting fun stuff happening and it's a little different, for anybody watching the stream right now, it's a little different so don't freak out. We are actually sitting in the living room set because we have an interview today. We just finished our C# module. We did 8 episodes of our C# module and we went through everything from the beginning to some crazy advanced stuff. And today, since we're going to be moving to a different mom will in two weeks we decided to break up with a really cool interview from somebody that we know in the tech sphere that knows a little bit about some code and what you can do once you become a true Advanced Code Monkey.
Fr. Robert: That’s right, folks. Now remember when we created this show we didn’t want to just jump from one language to another. Now Snubs and I met and we said, “We’ve got to give them a chance to recover. Give them a chance to step back from that coding ledge and maybe look at a couple of people who have successfully turned code into something wonderful”. Which is why I am so happy to welcome to the show, Mr. Liam Kennedy. Liam thank you so much for coming up.
Liam Kennedy: Thank you for inviting me.
Fr. Robert: Now, you are from Pasadena right?
Liam: I am. Yes, I am the little Coder from Pasadena.
Fr. Robert: The home of the Big Bang Theory!
Liam: The home of the Big Bang Theory and yes, if you look at what I’ve got going on in front of me, and imagine my house. We’ve pretty much been living in the Big Bang Theory in my house for the last three months.
Fr. Robert: Now Liam, before we get into the wonderful hardware that is in front of us, could you give the Twit Army, the Coding 101 Code Monkeys a little idea of who you are, where you come from, and why you’re standing in front of the ISS-Above.
Liam: Sure. So, the ISS-Above obviously, what it does is on the basics of it, it just lights up whenever the space station is around. Which happens more frequently than you’d imagine. My interest in the ISS is really what brought me to develop this. So for many years I’ve been passionate about public outreach for astronomy. A common thing that I would always get involved in is looking out for when the Space Station is coming over because the public just really loves to be surprised by things that they didn’t realize was there. Many people don’t realize that it is actually around.
Shannon: You mentioned to me previously that you can actually see the Space Station come over especially at night when the sun is reflecting off of it, about every 90 minutes or so. According to gravity at least.
Liam: That is right. It comes over, it really covers 90% of the world’s population, every day. And that is because it’s in its orbit spinning around at 17,000 mph about 260 miles up. And the earth spins underneath it. So imagine that is what is really going on, so it covers a lot of ground. So that sort of gives you an idea of what my interest in the Space Station. And then how I then came to do this development. I have been a developer for many years. So I started out on the Sinclair AT1, I think I’ve destroyed it when I tried to solder it together.
Fr. Robert: That is what we love, right? Shannon and I are always talking about if you like something and you really want to play with it, get in there, see what makes it work and break a few things.
Liam: Break it. Yes. Thankfully I haven’t broken too many of these so far. But I have tried to! So my history is sort of somewhat as a developer and a hacker. Up until this project, I would’ve called myself a developer. That was my street cred, was working in that environment. And then the opportunity came up to look at this project and Python was the way to go. So, I very quickly sort of got into that mode of working.
Robert: So do you
have pretty good experience with, not only with Python but with C# and Java and
all those different ones?
Liam: Yes, I do. But I would really classify myself as someone who is self-trained. So, I didn’t do a lot of this in college. I mostly learnt what I learnt by just getting involved in the first computers that were available for home use and then programming it.
Fr. Robert: I actually really like to hear that because one of the things that we’ve run into a lot is our audience is mixed. We have people who have never coded before and we have people who have been coding for years and years. And you know this programmers get incredibly protective about their language, their way of learning and it is true, when I was teaching programming, there was always a curriculum. Step one, step two, step three, step four. I think Shannon and I have been trying to do something different. WE’ve been trying to give people interesting projects and give them little steps forward and then let them go out and figure out how it works. It sounds to me like your lineage is more of that second way of doing it.
Liam: It really is. And when I go back to thinking how I started out creating this code, I start out just by actually trying out little things and seeing if I can get a little bit working first and then build on that. So rather than coming at a project thinking well, this is what I’ve got to get the whole thing to do in the end, firstly it is just too big of a problem to tackle. So I just take on little bits and get them working and then I get some good feedback, “Yeah I got that working” and then I can move on from there. The disadvantage though, potentially, is if you look at my code it’s the most embarrassing code around. Because it contains work arounds for problems that I encountered while I was developing in that mode. And then it turned out to be all the problems so if you look at the code you’ll see comments about what went wrong and “oh I’ve tried to fix it by doing this”, so that is my programming style.
Shannon: I think we’ll take a look at your code later, shall we?
Fr. Robert: I understand this. If you sit down and you map everything out with your team and you're all responsible for modules, then yeah, you really do need to adhere to certain principles to make sure everyone’s code is going to interact properly. But if you are the hacker and you’re sitting in your garage and you’re like, “I’m going to make this light blink. Oh it blinks, okay I’m going to make that sound board turn on. Now I”m going to activate this IO”. I think it is actually acceptable. In fact it is preferred to have spaghetti code. We understand. We know how this works, right? It is just getting it to work. That first feeling of “Wow! Look at that!”. It is cool. But let me ask you this. When you are developing a project like ISS-Above, do you just try to break down real world problems into the little pieces that can be solved by code? How do you go about moving from “I live the ISS. I like Space Exploration” to “I’m going to make a Raspberry Pie program that can tell me when it’s above me”?
Liam: So yes. Go back three years. I think this bears mentioning. Three years ago, I heard about a project, another project, called ISS-Notify that was going to create a little Arduino based device that would light up whenever the Space Station comes over. I backed it, along with quite a few other people. After seeing a lot of great progress by the creator for a couple of years. And then it looked like things just stopped happening. You can speculate as to why that happened, but the end result is that three years and I didn’t have this cool little device that lit up when the space stain came by. So I just really gave up waiting. And decided to see what I could create. And thankfully, in the time that elapsed from then to now, we ended up building the Raspberry Pie version. Now, I never knew really about the Raspberry Pie seriously until October of last year, although it’s been around several years before then. And it’s British. It was developed by , so with a name like that it should be right? And I started to look at the Raspberry Pie for a different reason. I do video streaming and web shows a little bit like this, not really! But with Bill Nye, the Science Guy. I needed a way to play out videos and one of the uses of the switch that I use actually showed a video of how they created the video play out system using the Raspberry Pie. I bought one to see whether I could use it for that. When I got it, I was blown away with just how flexible the Raspberry Pie platform was. The two things just came together. Me being fed up with not having a little device that lit up when the Space Station was coming over, because I wanted to get that. And here is a Raspberry Pie. I just decided to take a look. And very quickly found out that I could actually do things with it, beyond what I thought was going to be possible.
Fr. Robert: I know that the original ISS-Above project wasn’t based on the Pie it was based on the Arduino which might explain some of the difficulties they had in getting it to work right. You always have to balance the capabilities of the platform with what you are trying to make it do. But even though the Pie is a wonderful device, we use it here on Know How, our DIY show l the time. It is a great, inexpensive device that gets you to hack and program. Gets you to play with what is possible. Why would you choose the Pie over anything else? Was it just convenience, was it just because you already had one for this other project?
Liam: So I would say it was a matter of coincidence that I happened to have the Raspberry Pie in front of me. But I did some very quick testing of what I needed my code to do and it’s perfectly adequate for it. Absolutely. The other project that I believe the way it was going to work was pull information every few days off of the web and some websites out there that list the same data. But my code actually does all of the calculations for where the ISS is on the device. There’s basically a standard library you can get called EPHEM, its an astronomical term. But I used that to do the calculations on the device and it works just great.
Fr. Robert: Wait. I was under the impression that your projects scrapes some sort of public data base to say, “Oh, yeah it is over your latitude and longitude”. You’re saying Pie would know just because of the calculations you’ve programmed in.
Liam: Yeah. I tell you, if I didn’t need the access to the internet for the clock you could just unplug it from the internet and it would just work perfectly well. What it does pull down every few days is what’s called the NASA 2 line element. It is actually basically a set of data points that defines the orbit. And NASA updates that every few days. But they probably update it minute by minute. But the ISS shifts its position, usually it is dropping down naturally because although it is up in space it is still impacted a little bit by the upper atmosphere. So it tends to drag itself back down and then they use rockets to push it back up. So the equation has to be updated. So that is why the Raspberry Pie does use the internet for is to pull down that information every few days.
Shannon: That is a lot of information for it to pull down.
Fr. Robert: Why would you take that approach? I mean, because, my first inkling would be to reach out to NASA and say, “If you’re offering data where the station is orbiting, I’m going to scrape your public available feed and just match that up with a location selection inside the UI”. Instead you decided to bake the calculations into the Pie with that external variable of, “Okay, what have they done to orbit adjustment”.
Liam: There were several reasons. The most important one to me was that i did want this to be something that I could actually put a real time clock on it and then it would only need infrequent connection to the internet to actually pull that information. The other thing is the main site where people get the data for where the ISS is per their location is actually a site called and that site has been crashing because of the number of apps, mostly on smart phones, that do exactly what you say. They didn’t public an API so the way that every developer has done it is to do exactly what you say. But unfortunately it puts a hit on their server. I don’t know if they still have it there, but they actually…
Fr. Robert: It is up at the moment. But you are right because this puts you at the mercy of a server that you have no control over.
Shannon: You don’t want to depend on an external source.
Fr. Robert: If they go down, your product doesn’t work anymore.
Liam; And also, I had an experience with this because my first App that I ever developed for a phone was for a Windows Phone and it is called Look Up Tonight and it does really this and more. But what it’s really doing is exactly that - it is pulling data from Heavens Above and then displaying it on the smart phone. And they changed the page, so Oops! The code broke, so I had to update the App and release it to the market place again.
It reminds me of every Twitter app that ever tried to run. It would work until Twitter changed the API and suddenly, nope! Actually have you ever read our Chat Room? We’ve got people in the Chat Room that are impressed. They understand what you are trying to do. We’ve got people that are saying, “Look the calculations to do that, the number crunching that you have to make your Pie do in order to figure out the orbit, that’s not trivial”. That is actually a lot of work.
Liam: It is. And I am not a rocket scientist. So I really couldn’t do that math but this library that you can get, you just install it with one line, you’ve seen it. Pseudo…. blah, blah, blah. Python installed whatever it is, I’ve forgotten it. Then there is the FN library. Then you can start coding against that yourself. Of course the code is visible for anyone to see, you can look at what I’ve done.
Shannon: So you had this code figured out,
all this mathematical equations to find the ISS above you at a certain time,
you figured out that you can put this on the Raspberry Pie… what is next?
Liam: What was next was just figuring out how I could use the Raspberry Pie display options to indicate what’s going on and that is really what you see in front of you here.
Shannon: So that is why we have these little LEDs blinking!
Liam: Yeah. I’ve always enjoyed anything with a blinking light.
Fr. Robert: Let’s get into the hardware. Our guys love hardware and we’ve got all these wonderful boxes sitting in front of us. Tell us what are they doing!
Liam: Yes. So where do I start? I’ll start with this one that is just very easy to look at. Well maybe I will go over here. Okay, here we go. So this is the basic one with the Raspberry Pie platform and it simply has a very simple display on it called a Pie Glove.
Fr. Robert: A shield right?
Liam: It plugs right into the GPIO port, in fact you can even see that I haven’t put it in very nicely. But that is all it is. And then I just programmed the light to do a certain sequence based on where the Space Station is. This is another version.
Shannon: So that one is blinking.
Liam: If you count the number of green flashes, okay. Four, five… Six flashes. So if it approximately an hour or less the ISS above flashes green the number of time to the number of 10 minute intervals. So now I’ve messed around with the time on these so I’m not sure if this is real time now. I don’t think it is. But this essentially says that it is 60 minutes away from the next pass of the ISS. So, not all the passes are visible and that is why I have another website. So the other thing I’ve got going on here, you know you were talking about the Raspberry Pie being underpowered just think of this. This things tweets so when the Space Station is particularly close to you all of the lights on here will start going crazy but it also sends a tweet!
Fr. Robert: So I could program it to say, “The ISS is above me”!
Shannon: Is the tweet to the ISS?
Liam: Well, sort of. It tweets to the ISS by tagging at the request of NASA. So, during the kickstarter program they got wind of what was going on and their public affairs called NASA Johnson Space Center which is Mission Control for ISS, they sent me an email saying, “Could you please make sure you tag @NASA_Johnson”. So that was neat. They also do tweet to @ISS_Research which is the research arm. They’re the organization for NASA that actually determines what research has done on the Space Station by the Astronauts.
Fr. Robert: So they are receiving thousands of tweets from all your Pies saying ,”Hey, I see your ISS”!
Liam: Well yes. And that is a good point. So, I’ve run a kickstarter that was very successful but before that I wanted to make absolutely certain that people wanted this and also that they could see that it was working already. So, bearing in mind the other kick starter didn’t fulfill what it was going to do, so I created a beta program and I was heading over to the UK in December and installed a couple of them for my grandkids so my grandkids got them. And then there was a post on HackerDay and on Reddick and then people suddenly started to approach me saying, “Hey can I get in on this Beta program”? So I had about 20 sites. So what you’re seeing now are the tweets, so I’m just on my page you’ll actually see the tweets that are coming from those Beta sites that are around the world.
Shannon: That is so cool.
Liam: The way that it is done is that this little device is posting to my WordPress site. And the WordPress site is sending the tweet.
Fr. Robert: What I like about this is that you are leveraging a lot of existing tools to do something that is very different and that is very much in the Hacker spirit. Now Liam we want to come back to this. We want to talk all about your kick starter because I know there are people out there who are wondering how they create their own successful kick starter, and yours, by any measure, was immensely successful. We also want to look at some of this other hardware. You showed us some of the finished product. A Rasp Pie with an LED shield in a nice finished enclosure. You've got some interesting projects on this table over here that I think they’d be interested to see. But before that, I want to take just a moment to thank our sponsor.
Fr. Robert: Now you know them, you love them, they’ve been with us from the beginning of Coding 101. They’re Lynda. What is Lynda? Why simply, Lynda is how you learn online. Lynda is an online learning company that can help anyone learn creative software and business skills to achieve both personal and professional goals. With a subscription members receive unlimited access to a vast library of current and engaging video tutorials across a wide variety of subjects. Everything from creative and software skills to business negotiation and programming. At you’ll learn how to code, create, and build applications from the foundations of object oriented programming in C and C++ to desktop and mobile apps for today’s popular operating systems. You’ll explore the fundamentals of programming, building web applications with dot, net, php, and my sequel. Managing data with simple data bases, connecting to cloud services and much more. Now we love Lynda because we understand with Coding 101 we’re not giving you all the steps, we’re not giving you all the knowledge, you’re not going to finish an 8 week module and say, “Oh, well now I know how to program, now I know what C# is”. That is why you need something like Lynda. Which will guide you through the steps, which will teach you the correct way to program, which will give you all the information that we can’t give you each and every week of Coding 101. lets you improve your skills, learn new software and keep up with technology. With over 2000 courses with more added daily. Their popular courses right now include Foundations in Programming, HTML, PHP with my Sequl, Objective C, Java, Java Script, and Word Press. Their Instructors are working professionals at the top of the fields. They are all expert teachers and those two don’t necessarily go together. But Lynda has gathered together the staff, the faculty to make sure that they have competent teachers that know how to present the information. Lynda has high quality video productions from state of the art studios, these aren’t your home made videos that you’ll find on YouTube. Although we love YouTube, I mean we’re on YouTube. There is something to be said about using good video and good lighting and good audio because it doesn’t matter how wonderful the knowledge is, if you can’t stand the sound or the video you’re not going to watch it. Lynda also offers you curated course content. Each course is carefully strutted so that users can learn from start to finish or jump to a specific chapter. They have easy to follow videos that can help you find the answers that you need in searchable transcripts that even let you search with innovative video to save you time in finding exactly what you’re looking for. No more scanning through a video to find some random piece of information that comes 15 seconds into the fourth season. No, no, no. You can search for exactly what you are looking for and find the answers you need right now. They have courses for all experience levels, from beginner to intermediate and advanced, covering a wide range of technical skills, creative techniques, business strategies, and oh so much more. You can watch from your computer, your tablet or your mobile device, and Lynda even lets you switch and pick up the chapter where you left off from device to device. In other words you get to learn at your pace, on your own time, on your own schedule, when you want to. So here is what we want you to do. We want you to try . It’s only $25 a month for access to Lynda’s entire course library or for $37.50 a month you can subscribe to the premium plan which includes exercise files that let you follow along with the instructor’s projects using the exact same assets. And you can try free right now with a seven day trial. Visit to access the entire library. That is over 2000 courses free for 7 days. That’s . And we thank Lynda for their support of Coding 101.
Shannon: No guys! Blinking lights!
Fr. Robert: Blinking, blinking!!!
Shannon: What is going on?
Liam: This thing thinks it is 12:30 PM. So it is. Yeah, this is what it does when the Space Station is getting closer. So it starts off going slow but then as the Space Station gets closer to you and higher up in the sky it then goes crazy wild!
Fr. Robert: It goes nuclear!
Shannon: That is awesome. It is very noticeable!
Liam: A really great companion to this is a little App, if you have an iOS device there is an App called Solar Walk and this is it right here.
Fr. Robert: Wait a minute. I think I saw this in a movie!
Liam: Yeah, almost. I did the animation for Gravity. Not really. So this is real time and this is actually showing it as it is coming.
Fr. Robert: That is exactly what I thought this was going to be. This is ISS-Above so it will tell you where the space junk it.
Shannon: We had seen the ISS above California just a little bit earlier, maybe a half an hour ago and now it is over an ocean.
Liam: Yeah. So it is almost, I think it was a little bit longer than you probably remembering because I’ve been talking for so long.
Fr. Robert: Our TD is enjoying Space. If you talk about Space in a room full of geeks, everything is going to come out.
Shannon: Where is it now?
Liam: That is the Aleutian Islands now. I can zoom way out. And you can see it’s…. did i get that right? Is it the Aleutian Islands? I’ve got it going…. I’m upside down!
Robert: Those are
other space craft?
Liam: Yes, those are other satellites. You look at this and you think, “Oh of course in Gravity they were going from the Space Station to the Shuttle” but when you see this they are in different orbits. So yes, so this I think is going in that direction so in a short while I think it is actually going to be visible over here again. But the Pie glow here, this version I’ve got it on a different time.
Fr. Robert: Now our Chat Room is right now. Erick is saying, “No, no, no”. The ISS isn’t moving that quickly. We are”. They always remind us that we are the ones spinning.
Shannon: Because we’re rotating on our axis and the ISS is also….
Liam; Most of the 17,000 speed though is falling around the earth. Obviously the Earth is spinning and it takes us a day, surprisingly, to spin around once so that’s why it traverses different parts of the Globe every time it comes around. It will be a different distance from us at its closest point each time.
Fr. Robert: Now we want to take a look at this hardware because our TD has been trying to focus on this table forever. What am I looking at?
Liam: Let me introduce you to what I’ve got over here. So, there’s two different display items here. This one is a custom light that was also a successful kick starter. But what it did was just looked good as a representation of the ISS. Now the creator of this, we were just looking at working together initially, he wanted to get one himself. And so he modified the electronics of this. So that I could do a little bit of control just basic controls. So there’s really two colored lamps in here.
Shannon: And that is what we have going on.
Liam: Yeah, that is my very amazingly proud and lovely bread board that I put together there.
Fr. Robert: We all start with bread boards so there is no shame here.
Liam: I was just amazed at how these things could be added on. They are just a couple of transistors.
Shannon: This is connected into the Raspberry Pie.
Liam: Yes. Two of the control ports I used in the code because part of the code configuration is choosing what display device is attached. So I’ve just set it when you use the ISS lights that it would just flash GPIO pens 24 and 25. Depending on which one I have cabled in there it’ll either be the earth or the Space Station you can see it flashes every now and again. That is really, really simple. And I’ve got to say that there is no guarantee that this will be made available to the general public but last I saw…
Shannon: But it is one of those fun Hacker things that you can do with it.
Liam: Yes. So I think what this shows is that you can get the Raspberry Pie hacker code and you can build whatever you want with it.
Fr. Robert: Now this one over here. I really like this. It looks a little more what I would have on my desk.
Liam: So this one.
Fr. Robert: You’ve put an LED display on it.
Liam: An Adafruit 16 character x 2 line display. And this is an RTB one so it can change colors as well. But this gives a lot of information about the next pass of the Space Station and the current pass that is happening in real time.
Fr. Robert: With this. With the software package that you’ve downloaded, would it be possible to give people Admin information?
Liam: Yes, this does do that. During it an active pass it does tell you how high up it is and where in the sky to look.
Fr. Robert: So someone could actually take this and use it immobile. Plug it in, since we know it doesn’t need access to the internet as long as the software is running on it, they could use to know exactly where to point their telescope to know where to get the best possible view of the ISS.
Liam: They could do, and I think that is where I think the power of Raspberry Pie might not be sufficient to do that because the number of calculations that you need to do per second to keep a telescope aligned on the Space Station is quite a lot.
Fr. Robert: But it could at least tell you where to look.
Liam: Absolutely. It would do that. And this one also has an additional display sticking out of it. This is called a blink stick. And that has the really bright RTB LED that lights up. I can probably actually get on there and tell it to light up in a minute as well. So there’s two display devices plugged into the same unit there. I’m also working on, I’ve got a couple of blink ones which is another kick starter. All these kick starter projects. Just a little USB LED as well. I’m looking to get that supported and a lot of different display types as well, coming up.
Shannon: Speaking of your kick starter. You’re obviously successful, congratulations to that too.
Fr. Robert: You asked for $5000 and you got $17,600.
Liam: Yeah. Yeah. You know I’ve never done anything like this before. I came at it completely green. And I just didn’t know what to expect. What I tried to do was to look at what would be a minimum for me to be able to get all of the components with free shipping so that the cost of putting a system together would be as low as I could make it. What that was really all about was just trying to keep…. so there was the individual component costs, so when I went out there…. I’ve lost my train of thought here. That’s cool.
Shannon: I could buy one though, I missed the kick starter myself unfortunately, but I could still buy one from your website?
Liam: You can. Because I haven’t yet completed the order of all the component parts.
Shannon: Did you hear that, Chat Room?
Liam: You can still purchase them right now. The whole kick starter was just a an amazing blast. It doesn’t just happen by putting a kick starter up there and then sitting back. There was a lot that went on behind the scenes of doing twitter and a lot twitter posts, actually connecting with the Astronomical blogging community and I had a few people that were well known in that community that blogged about it. Stuff on Google Plus and things just sort of came together. So it went very well.
Shannon: I really want to see some code!
Fr. Robert: We’ve been teasing our audience long enough. Now here’s the thing, we don’t want to just hand your code out to everyone. In fact that was one of the questions I want to ask you, I’ll ask it later. About how difficult it is to monetize something on a platform that everything just assumes is free. But first I don’t want to see all your code. But I would love to segments of your code that you’re particularly proud of. Is there something that you figured out how to do that you think maybe our audience might be able to play with?
Liam: Yeah, I’m going to go you a bit of my spaghetti code. This was… so there is an attribute of the Space Station when it is coming over that is it’s visual magnitude, how bright it is in the sky, if it happens to be a pass when it might be visible. Not all passes at night time are visible.
Fr. Robert: Because it could be passing over you in complete darkness with no angle to the sun it would be black.
Liam: Right. But oftentimes if it’s passing early in the morning just before sunrise or in the evening within a few hours after sunset when it’s going over it’s still visible to the sun so it is up there. Now the EFHEM library did not have any function to figure out the visual map that would give you the satellite so I had to figure out how that was done. And I did the usual googling and various people came back with, “That’s pretty difficult to do and blah, blah, blah” and I just didn’t want to give up. So all it came down to in the end was a bit of high school math. Remember that Algebra thing?
Fr. Robert: So you were figuring out a triangle?
Liam: Yeah. It was just crazy, crazy. So what’s going on here is I have, using the code that I’ve already got, the distance between you and the Space Station and I have the angle of it so I know where it is, I have the distance between you and the Sun and the angles of the sun so I have those two angles that I had to figure out this missing angle. It’s called the Phase Angle between you, the Space Station and the Sun. And this is the code that does it! Anyway, I was just so amazed when I figured it out.
Fr. Robert: You remember back in high school when your teacher told you the Trigonometry would save y our life? Well here it is! So now you’ve figured this out, which automatically is fantastic because I can imagine the people on google saying, “Oh that’s really hard. Why do you want to do that, because I can’t figure it out” but now, you persisted and you figured it out. Wait a minute there is a spatial thing here… if I can see the sun and the sun can see the ISS that means I can see the sun bouncing off the ISS. How do you turn that into code?
Liam: Into code. Yeah. So that is really what I’ve got here. Gosh. How could I take you through what is here? Because it is math, but I’ve forgotten it already. But you can actually see some of the components in it that I’ve talked about here.
Robert: This is all
in Python by the way right?
Liam: Yes, this is all in Python. There’s a couple of things going on, this first thing is if ISS.eclipsed. Now ISS is an object that actually is the current status of the ISS. And if it is eclipsed it means it is actually eclipsed by the shadow so it won’t be visible. But then what I do is I have the sun and I compute the details for the sun and this will give me a whole load of data about the distance between me and the sun at that particular point and that is what we have going here. So these are the equations. A, B, and C. You know that’s to do with the triangle.
Fr. Robert: Distance to the sun, distance to the ISS and then figuring out the angle between the two.
Liam: Right. So what I’ve got here is A is the distance to the sun so the sun.earth distance is the distance is between the earth and the sun times the astronomical unit which is to do with how many kilometers it is to the sun minus the radius of the earth. Because you know we’re sitting up from the center of the earth so I had to subtract that. I don’t think it would’ve made a big difference.
Fr. Robert: But we love the fact that you thought about that.
Liam: There you go. And then the side B is the range to the ISS and in the object here it gives it in I think meters, so I divide it by 1000 to get it in kilometers and then there’s this angle, one of the angles that I have is the angle to do with Asymyth and Altitude so this is where you would say, “This is where that data comes from”.
Fr. Robert: And so you’re pulling from the ephemeral framework here?
Liam: Exactly. So it is just there. That does that. And finally I have this C, which is that square you need… A squared, plus B squared equals C squared!
Fr.Robert: There it is folks! There you go! There is the proof. That is why you need to learn that!
Liam: Anyhow. I just want to let you know that I did forget it and had to relearn it for this. But hey, at least I knew what I had forgotten! And then this is where finally, this last bit is the bit that I needed the Phase Angle. Look it is Pi Day!
Fr. Robert: It is pi day. 3.14. We just passed super pie which was 3.14.15 so yes.
Fr. Robert: I will say this. I love the fact that you are bringing this up because we just introduced objects and classes to our Coding 101 crew and some people were a little confused by the class and the property. You were just showing us some things and if they were paying attention to the Coding 101 lessons they should’ve been able to see that and even though it is a completely different language, they should have seen some of the similarities. Some of the things, you can look at this and go, “Oh, I see F statement there, I seen a variable. I see playing with the property of a class and a object. I see a return”. These are all elements that recur in whatever programming language we are using. It just happens that this one is Python. So thank you for that.
Liam: You are very welcome. And the final piece just on here is the bit is the visual magnitude and this is where I plug in my Phase Angle to this equation. That equation I didn’t create, it was out there on the web on some site that said this is how as long as you have the Phase Angle this is how you can figure out the visual magnitude.
Fr. Robert: So you worked backwards.
Liam: Exactly. I often work backwards. Life just occurs better if you do it backwards.
Shannon: So the Phase Angles. Is that the part that I see on the website when I’m using my own ISS-Above Raspberry Pie?
Liam: Oh, you mean? No that is magnitude. So if I bring up the web page here, this is the other thing that the Raspberry Pie has running on it. It has this web server on it, using another installation that you can just download yourself that is called Flask.
Shannon: We use it on our website.
Liam: This is another Python file called and it then gives all of this information so this again is coming directly from the Raspberry Pie itself. It doesn’t have to go to any website to do it. It’s got it right here. This is where you can see at 6:40 AM tomorrow, if you happen to be in Petaluma or anywhere in San Francisco area you would be able to see a very bright International Space Station.
Shannon: So negative numbers mean it is brighter.
Liam: Negative is better, in this case it is better. So if you go out and you happen to look up at the moment at night time you’ll see the brightest star above you.
Fr. Robert: Which seems to be moving rather quickly!
Liam: The one I’m talking about, not the Space Station, the brightest star every night you look above you. It is the one not twinkling. It is the planet Jupiter. It is almost directly up. The reason I’m bringing that up is because it is approximately the same brightness as this. So the Space Station, it can get a lot brighter than this as well. It’s a little bit dimmer.
Fr. Robert: I remember when the ISS first went up in it’s complete configuration. People were saying, “It is now the brightest object in the sky” but with this device you can tell when it will be the brightest object in the sky.
Liam: Very true.
Fr. Robert: That is fantastic. Let’s back up a little bit. I hope people have geeked out a bit over that. I love that fact that you’re so proud of that little piece of code. That functions that calculates the angle and the phase. Fantastic, thank you so very much. But let’s talk a little bit to the people who might now think, “Oh. I’m going to create a kick starter. I’m going to grab the pie and like Liam, I’m going to figure out a problem. I’m going to hard code it in my Pie and it’s going to be wonderful”. I alluded to this a little earlier and that is that the Pie is considered a hacking tool. Typically the people who use the Raspberry Pie expect everything to be free. I know that whenever I do my projects I’m always downloading packages. How difficult is it for you trying to monetize a product on the Pie when people kind of expect, “Well once I’ve got the code I can share it with anyone”.
Liam: It is interesting and that depends on who the audience is. I’m pretty sure that most of the people who actually purchased and backed the kick starter and who got the complete unit themselves, that was where it came with everything needed, just plug it in and go. They are not the hacker type. So, for them this is something that allows them to just get something and work with it right away. So that is not the issue. But I did provide a version of the code that is customized to your location and also set up so it tweets and it’s a custom image on the SD card. And the cost of that was on the kick start, $42.00. But I’ve got to admit that sounds quite expensive. This is what I was going through. It’s like, “How can I get beyond the question that is out there that this is all open source”? It really just speaks to what you are talking about. And I’ve got to say I’ve been a bit conflicted about it because I’ve invested a lot of time in what I’ve produced here so far. And I’m still conflicted about it. At some point maybe I’ll just put it out there. Because I know, well firstly the code is available. When you get it, you can do whatever you want to it. And I’ve already had people on the Beta program develop stuff for it. And I’m just not sure where it is going to go from there. There was even on some of the boards I think HackerDay or on Reddick someone said, “Why on earth would somebody pay $42, you can just do this yourself”.
Shannon: I think it comes down to supporting something that you love. That is what it is for me. It might not be open source, but I’m supporting a person that I love and a project that I really think I’d get children inspired and get people really inspired in learning about Astronomy and learning about code. That is why I would purchase it.
Liam: And you said you. You put aside the fact that it is open source. One of the comments I had from Reddick was, “Well my Raspberry Pie has been sitting, gathering dust because I couldn’t find something that I wanted to use it for”. And they saw this as a reason why they would get it out of it’s dusty box and put it on it. So even if you are someone who’s got a Raspberry Pie, this is what you can use it for.
Fr. Robert: Of course you could figure out how to do this, of course you could’ve busted this out and downloaded a bunch of packages and done a little bit of math but someone actually did it. And if you like what he did and if you want him to continue doing what he did, why not support him? I think that is good. We do that in content. Our content is free. You don’t have to do anything with our content. You don’t have to do anything with the code that we create, but we offer it out there and we hope that people like it enough that they will feel compelled to support it. That is about what we can say.
Liam: And Shannon. I wanted to speak to what you brought up that this is something that inspires kids. Because that was the point to this. The vision I had was that I was just creating this for my Grandkids.
Shannon: Oh. That is so cool.
Liam: And when i was initially started messing with this I took it to the San Diego Make It Fair in December, a very early version of this, I didn’t know how well it was going to be received there. And it was when a young kid, who was probably nine years old, came up to me near the end of it and just sort of whispered to me and said, “This is the coolest thing here”.
Fr. Robert: There is nothing better than that.
Liam: I didn’t need anything else. That is what this is about for me. I think there is an opportunity to inspire people all around the world with this. I’ve got one of these going to Beirut. And the Backer emailed me and said, “Does the Space Station even come over here. I don’t care because I just want to back this”. That is the point. There are no borders in Space. This Space Station has been manned for 13 years, built by 16 Nations, has Russian Astronauts and American Astronauts while down below we’re at odds politically right now. But hey guys, they are just getting on with stuff. It is just a model.
Shannon: It gives me chills just thinking about it. It is amazing. I love it.
Fr. Robert: Liam, unfortunately we’ve run out of time. We’ve gone way over time just because we’ve had so much fun and enjoying ourselves. But I do want to give you some time to talk directly to the audience and tell them what we can expect out of ISS-Above. Will you expand this project, do you have another project coming, where can they find you, where can they find about the work you do?
Liam: Sure okay. Well first of all you can go to my website: that has a lot of information about the current project and how you can also purchase one right now. Only for the next couple of days because I’ve got to complete the order. But going forward from here, I really wan to create some more custom versions of this. But this works great in the home and on a shelf. But I really see this as being something that could be at the Exploratorium and at any Planetarium and for those I want to create something that has a bigger type of interface. So something more like this but possibly with an embedded LCD display in it. So that is one aspect. The other thing is that I’ve been politely hammered by the ham radio community. It just sort of came out. The ham radio community because the ISS plus many other satellites up there do act as radio repeaters so you can extend your range but even more exciting you can occasionally speak to a real Astronaut live. When I was at the San Diego Make A Fair one of the Ham radio guys came over and said, “The other day I just happened to be listening on their Band as they came over and they said they wanted to test something out and I got talking to a Russian Cosmonaut".
Shannon: I just got into Ham Radio myself. I just bought an SDR and I’ve been playing with software to find radio and that is so cool.
Fr. Robert: And then all you need is a directional antennae and positioning information, you know where to point it.
Liam: That is exactly it. And that version I’ve already registered the domain. It is called SAT-Above. It is designed to track up to 16 satellites from the selection of the appropriate ones that Hams would be interested in. So that is another little project.
Shannon: I’m going to follow that. I’m excited!
Liam: And I’m going to get in Ham as well. I just haven’t gotten into that at all. So I’m sure that is where I”m going as well.
Fr. Robert: Liam, it’s been an absolute pleasure. Thank you so much for coming up. Thank you for speaking to our audience. And you know, the reason why we had this episode is that we want to show the Coders out there, the future Code Monkeys what they can do with a couple of ideas, a little bit of hardware and some software knowledge. So once again, thank you so very much.
Liam: That you. It has been a pleasure being here. Thank you so much. This is my heaven to be in the Brick House.
Shannon: Well we loved having you. And of course, as usual, you can always find all of our information over at twit.tv/c101. That is our site where we have show notes and links to all of Liam’s information on there.
Fr. Robert: That is right. If you can, why not jump over to our Google Plus page which I believe is gplus.to/twitcoding101. It is a growing community and we will be supporting each other’s projects. If you think that you want to hack something together with a Raspberry Pie, that little bit of Python knowledge, why not jump into the community and ask them how. Liam had to search Google, why not just ask the people that we know and that are a part of the Twit community? Again that is gplus.to/twitcoding101.
Shannon: And if you are watching live, live.twit.tv and IRC.twit.tv that is the IRC so you can jump in the chat room and ask us questions while we are doing the show live. It is very fun so definitely join us.
Fr. Robert: Now both of us were pulling from the Chat Room while this episode was going. Now also you can find us if you don’t do the whole Google Social Media thing on Twitter. You can find me at , that’s @PadreSJ.
Shannon: And I’m @Snubbs.
Fr. Robert: Until next time, I’m Father Robert Ballecer.
Shannon: And I’m Shannon Morse. End of line!