{"id":9551,"date":"2023-03-31T20:06:15","date_gmt":"2023-03-31T20:06:15","guid":{"rendered":"https:\/\/max-drake.cc\/?p=9551"},"modified":"2023-04-01T20:42:02","modified_gmt":"2023-04-01T20:42:02","slug":"pythohttps-www-youtube-com-watchvpgxy1g1wpman-and-visualising-planet-orbits","status":"publish","type":"post","link":"https:\/\/max-drake.cc\/?p=9551","title":{"rendered":"Python and visualising Planet Orbits"},"content":{"rendered":"\n<p>I wanted to be able to visualise a Kepler Orbit and found some code to do this. After being able to plot the orbit I decided that I wanted to represent the solar system planets orbiting the sun and looked for some code to do this. <\/p>\n\n\n\n<p>I was still thinking about launch windows from a science fiction book I was reading and wanted to figure out how that would work. So being able to show the orbiting planets I&#8217;d be able to see where the orbits of earth and the mars were closest and where they were far apart. <\/p>\n\n\n\n<p>I did a video on the methods I&#8217;d used :<\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe title=\"Python and visualising Planet Orbits\" width=\"678\" height=\"381\" data-src=\"https:\/\/www.youtube.com\/embed\/pGXY1g1WPMA?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" allowfullscreen src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" class=\"lazyload\" data-load-mode=\"1\"><\/iframe>\n<\/div><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\">Links to sources and to code below <\/h4>\n\n\n\n<p>Further to my previous video Python, Bing Chat &amp; Astronomy <a href=\"https:\/\/www.youtube.com\/watch?v=xVaUncOLiig&amp;t=0s\">&nbsp;&nbsp;&nbsp;\u2022&nbsp;Video&nbsp;&nbsp;<\/a> I wanted to look at being able to use a python method to calculate a Kepler Planet Orbit andfound a script that will do that. Kepler orbit &#8211; <a rel=\"noreferrer noopener\" href=\"https:\/\/www.youtube.com\/redirect?event=video_description&amp;redir_token=QUFFLUhqbS1Fay0wMVEyMFdJbk1uR3N4NnBuMkM5WEdrZ3xBQ3Jtc0tscHBHWDdnTllNUC1vb2lTaF84Slc0bFdZTW1UVGtWLWNzLVdnTnVKUlRiN0h3OWdHd0IxSW1HY1I2UnlQNGFtZU9qM0RERzhqbV93VmhadVI4UVVxSmxSa2hZcjlwdWpEdVZNMEhvRTFxQ3FfV0NqWQ&amp;q=https%3A%2F%2Fpyastronomy.readthedocs.io%2Fen%2Flatest%2FpyaslDoc%2FaslDoc%2FkeplerOrbit.html&amp;v=pGXY1g1WPMA\" target=\"_blank\">https:\/\/pyastronomy.readthedocs.io\/en&#8230;<\/a> After finding the script I then wanted to look at planets in their orbit to look at the idea of a \u201claunch window\u201d fror a hypothetical rocket going between earth and Mars. So tried to use Ptyhon to draw planets in orbital motion to visualize the progression of the planets around the sun. 1-A More Approximate Position of the Planets using JPL Ephemerides (Spirographs!!)- <a href=\"https:\/\/www.youtube.com\/watch?v=uS9BL9soxT0&amp;t=0s\">&nbsp;&nbsp;&nbsp;\u2022&nbsp;A&nbsp;More&nbsp;Approximat&#8230;&nbsp;&nbsp;<\/a> 2-Python &#8211; How to Program the Solar System- <a href=\"https:\/\/www.youtube.com\/watch?v=2XOvdxi3kBI&amp;t=0s\">&nbsp;&nbsp;&nbsp;\u2022&nbsp;Python&nbsp;&#8211;&nbsp;How&nbsp;to&nbsp;P&#8230;&nbsp;&nbsp;<\/a> 3-Planet Simulation In Python \u2013 Tutorial- <a href=\"https:\/\/www.youtube.com\/watch?v=WTLPmUHTPqo&amp;t=0s\">&nbsp;&nbsp;&nbsp;\u2022&nbsp;Planet&nbsp;Simulation&#8230;&nbsp;&nbsp;<\/a> Simulating Planetary Orbits- <a rel=\"noreferrer noopener\" href=\"https:\/\/www.youtube.com\/redirect?event=video_description&amp;redir_token=QUFFLUhqbldyNjF1NUVEeV96LTROZXJaYmV5eXhyM1Nud3xBQ3Jtc0ttcm51YnVnMWk2VW52NW0xUnB1QnNwT2tQOF9mdDlNQUVWWTRibjIwZEhpTDg5Mnp1S2VwOGE5RU9Iekh6U3owR3lkS3lCc3FxcUVja2ZraDRkcWFKWllnNS1PMmZydXJHRFdtU1lGeklteHFYYy1NUQ&amp;q=https%3A%2F%2Ffiftyexamples.readthedocs.io%2Fen%2Flatest%2Fgravity.html&amp;v=pGXY1g1WPMA\" target=\"_blank\">https:\/\/fiftyexamples.readthedocs.io\/&#8230;<\/a> JPL Orbit Viewer- <a rel=\"noreferrer noopener\" href=\"https:\/\/www.youtube.com\/redirect?event=video_description&amp;redir_token=QUFFLUhqazhzaV9vTHphem1VUWJNTzZRTHRMYkNNdVJlZ3xBQ3Jtc0trVjYtTkJ6U3c0MEdIWlo5LWFwVHZoNzR3N1lLem15ZzZmenJyb3F4WW5LS1IwbTd2MjB4V004Z3pEckc0QVVZRm43c3lzaUxiRWJ1YkpjbUJpNGk5Slc5bG1oOHVoVTlfbDRqSjhkQnJ1QzdaMmlWYw&amp;q=https%3A%2F%2Fssd.jpl.nasa.gov%2Ftools%2Forbit_viewer.html&amp;v=pGXY1g1WPMA\" target=\"_blank\">https:\/\/ssd.jpl.nasa.gov\/tools\/orbit_&#8230;<\/a> Kepler orbit &#8211; <a rel=\"noreferrer noopener\" href=\"https:\/\/www.youtube.com\/redirect?event=video_description&amp;redir_token=QUFFLUhqa2FGQ0dxTWFNYzYxYUR0N094OVJXX3VBeEVwUXxBQ3Jtc0tsRXFUTkx1TzNTeTdHNXZIUVAtRWJPNS1DY091QUZ0X0Rsc21USUF0VUR6MzIwWmdjZEg5VkdjNmhzdW5TNmdsaUNSa0NpTElQRk8xWUdGVFdXYXZ6RVJvQ3R2ZkhucEc0VDZCTnFzNDVCYUlGYXlNUQ&amp;q=https%3A%2F%2Fpyastronomy.readthedocs.io%2Fen%2Flatest%2FpyaslDoc%2FaslDoc%2FkeplerOrbit.html&amp;v=pGXY1g1WPMA\" target=\"_blank\">https:\/\/pyastronomy.readthedocs.io\/en&#8230;<\/a> A bit of a play with some codes and I will park this exercise and move on to making a local e ephemeris for my location in Wellington NZ with Alt\/Az coordinates. I may come back to this project later, and enjoyed what I have done to date. You can download all the code that was demonstrated in this video: Link to scripts for download- <a rel=\"noreferrer noopener\" href=\"https:\/\/www.youtube.com\/redirect?event=video_description&amp;redir_token=QUFFLUhqbi1wamJWcTlVSnFqZzJxT2JEZ0R5UWZhLXRLUXxBQ3Jtc0tuSHhzY1dheDFsc0RXemFTNkc3Y0ZSWnZzWDdhSDdEU2M5SDRBcXZOU2ZGQ05feWRodVpIcXYyUHphWkF1UHlsbVYwRHhHQ1ZRWDBYaEdEUVJFY0U3em5lajFSQ051d0xRQVNCSDM5cllpQUVQU1c3QQ&amp;q=https%3A%2F%2Fdrive.google.com%2Fdrive%2Ffolders%2F1OTnOtiI2--kEJmY6S21Xbzyp4yq_JJy3%3Fusp%3Dshare_link&amp;v=pGXY1g1WPMA\" target=\"_blank\">https:\/\/drive.google.com\/drive\/folder&#8230;<\/a><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Update to traveling to Mars <\/h3>\n\n\n\n<p>Image below from <strong><a href=\"https:\/\/mars.nasa.gov\/mars2020\/timeline\/cruise\/\" target=\"_blank\" rel=\"noreferrer noopener\">here<\/a><\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"1200\" height=\"675\" data-src=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2023\/03\/image.png\" alt=\"\" class=\"wp-image-9554 lazyload\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1200px; --smush-placeholder-aspect-ratio: 1200\/675;\" \/><\/figure>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p>I looked on the NASA website and for <strong><a rel=\"noreferrer noopener\" href=\"https:\/\/mars.nasa.gov\/msl\/timeline\/summary\/\" target=\"_blank\">Mars Curiosity Rover<\/a><\/strong> it took 7 months but as it was unmanned I suppose it could withstand much higher accelerations than if it was manned, so could go faster and brake harder. So where I was estimating around 88 days or 3 months I was way off. (<a rel=\"noreferrer noopener\" href=\"https:\/\/www.esa.int\/Science_Exploration\/Human_and_Robotic_Exploration\/Exploration\/ExoMars\/The_way_forward_to_Mars\" target=\"_blank\">Image below from Here<\/a>)<\/p>\n\n\n\n<p><a rel=\"noreferrer noopener\" href=\"http:\/\/How long does it take to get to Mars?\" target=\"_blank\">How long does it take to get to Mars?<\/a> In this article it suggests around 9 months.<\/p>\n\n\n\n\n<cite><a rel=\"noreferrer noopener\" href=\"https:\/\/image.gsfc.nasa.gov\/poetry\/venus\/q2811.html\" target=\"_blank\">According to NASA<\/a> (opens in new tab), a one-way trip to Mars would take about nine months. If you wanted to make it a round-trip, all in all, it would take about 21 months as you will need to wait about three months on Mars to make sure <a href=\"https:\/\/www.space.com\/54-earth-history-composition-and-atmosphere.html\">Earth<\/a> and Mars are in a suitable location to make the trip back home.&nbsp;<\/cite><\/blockquote>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"1712\" height=\"600\" data-src=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2023\/03\/ESA-The-way-forward-to-Mars-\u2014-Mozilla-Firefox50_04.jpg\" alt=\"\" class=\"wp-image-9552 lazyload\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1712px; --smush-placeholder-aspect-ratio: 1712\/600;\" \/><\/figure>\n\n\n\n<p>Image below from <a href=\"\\Users\\drake\\Downloads\\__Screenshots\\merl2.jpg (JPEG Image, 1431&nbsp;\u00d7&nbsp;1021 pixels) \u2014 Mozilla Firefox53_44.jpg\" target=\"_blank\" rel=\"noreferrer noopener\">here<\/a> <\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"1595\" height=\"1114\" data-src=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2023\/03\/merl2.jpg-JPEG-Image-1431-\u00d7-1021-pixels-\u2014-Mozilla-Firefox53_44.jpg\" alt=\"\" class=\"wp-image-9553 lazyload\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1595px; --smush-placeholder-aspect-ratio: 1595\/1114;\" \/><\/figure>\n\n\n\n\n\n\n\n<h3 class=\"wp-block-heading\">End comment <\/h3>\n\n\n\n<p>The video goes through all the issues so I didn&#8217;t want to discuss in article as they are already covered. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>I wanted to be able to visualise a Kepler Orbit and found some code to do this. After being able to plot the orbit I decided that I wanted to represent the solar system planets orbiting the sun and looked for some code to do this. I was still thinking about launch windows from a [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":9553,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[480,34],"tags":[],"class_list":["post-9551","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-astronomy","category-python"],"featured_image_src":"https:\/\/max-drake.cc\/wp-content\/uploads\/2023\/03\/merl2.jpg-JPEG-Image-1431-\u00d7-1021-pixels-\u2014-Mozilla-Firefox53_44.jpg","featured_image_src_square":"https:\/\/max-drake.cc\/wp-content\/uploads\/2023\/03\/merl2.jpg-JPEG-Image-1431-\u00d7-1021-pixels-\u2014-Mozilla-Firefox53_44.jpg","author_info":{"display_name":"Max Drake","author_link":"https:\/\/max-drake.cc\/?author=1"},"_links":{"self":[{"href":"https:\/\/max-drake.cc\/index.php?rest_route=\/wp\/v2\/posts\/9551","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/max-drake.cc\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/max-drake.cc\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/max-drake.cc\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/max-drake.cc\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=9551"}],"version-history":[{"count":2,"href":"https:\/\/max-drake.cc\/index.php?rest_route=\/wp\/v2\/posts\/9551\/revisions"}],"predecessor-version":[{"id":9556,"href":"https:\/\/max-drake.cc\/index.php?rest_route=\/wp\/v2\/posts\/9551\/revisions\/9556"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/max-drake.cc\/index.php?rest_route=\/wp\/v2\/media\/9553"}],"wp:attachment":[{"href":"https:\/\/max-drake.cc\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=9551"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/max-drake.cc\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=9551"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/max-drake.cc\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=9551"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}