5 4 5 Day 4

Adam Moore
Sep 4, 2018 · 4 min read

This project was completed on Sunday, September 2nd. I woke up, went through the submissions to my website and chose one submitted by a friend who also lives in New York. The prompt he submitted is:

Describe / catalog the trajectories and missions of all unmanned spacecraft that humans have ever sent into space, excluding those that simply orbit the earth (satellites)

This particular friend also works as a developer. I thought the most interesting way to execute this project would be to try to write the code with him. I felt like this would be a fun way to fully explore the collaborative aspect of 5 for 5.

After texting him in the morning we made a plan to work on this project together, he arrived at around 2pm.

This is him shortly after he arrived. Looks like it was quite a trip. After talking the project over a bit we decided to try to use P5 to map the paths of the two Voyager missions through our solar system. He had time constraints because of plans he made for the holiday weekend.

We first went to NASA’s website to find out all of the basic information about the Voyager missions. The most interesting detail to me was that Voyager 2 was actually launched before Voyager 1. These two missions happened because of a very rare alignment or planets within the solar system.

Because he works as a front developer I was very interested to hear about how he would approach this. After gathering the basic information we started writing out some pseudo code. Here it is:

We started out by making the sun the center of our mock solar system, naturally. We then found the distance of the planets from the sun, omitting the planets closer to the sun than the earth because they were not a part of the Voyager missions. For the sake of convenience we used AU’s rather than miles. AU stands for Astronomical Units. One AU is roughly equal to the distance from the earth to the sun. Here is the P5 code that we were able to write in during the next three hours:

This was all of the code we were able to write together before my friend had to leave. I decided to do this project as a completely collaborative project; because he wasn’t able to stay to finish, the project had to remain incomplete. We were able to write more pseudo code that should have been enough to finished the sketch. Since I was not able to implement it I cannot say this for certain.

When this code is run we are able to show all of the different orbits. All that was left to do was set up a few functions that would draw the arc of the two satellites. We thought this could be accomplished using trigonometric functions. Using the sine and cosine functions we could estimate the angle of the voyager craft, and its position on the x, y plain to show where it crossed the orbit of each of the outer planets.

Despite not being able to actually finish this project I’m actually quite happy with the way it turned out. I understood from the beginning this project was going to teach me more about process, and it was very satisfying to work with a friend on a project. It gets a bit lonely working on your computer by yourself all day. He is also a very experienced developer and to be able to talk through how he would approach something was very educational. In some ways it is not that different from how I and many of my fellow students approach coding challenges. In other ways he was far far more sophisticated, this is of course because he has much more experience. I may just finish this with him on another weekend, just for fun.

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade