{"id":5369,"date":"2016-12-11T14:10:32","date_gmt":"2016-12-11T19:10:32","guid":{"rendered":"http:\/\/pages.vassar.edu\/magnes\/?p=5369"},"modified":"2016-12-11T14:10:32","modified_gmt":"2016-12-11T19:10:32","slug":"solving-keplers-equation","status":"publish","type":"post","link":"https:\/\/pages.vassar.edu\/magnes\/2016\/12\/11\/solving-keplers-equation\/","title":{"rendered":"Solving Kepler\u2019s Equation"},"content":{"rendered":"<p class=\"p1\"><span class=\"s1\">Overview<\/span><\/p>\n<p class=\"p1\"><span class=\"s1\">For my final project I solved Kepler\u2019s Equation numerically using Newton\u2019s Method. Because it is a transcendental equation and thus cannot be used to solve for the eccentric anomaly directly, I created a program that uses iterative methods to solve it and then plots the solutions. Beyond this, I focused in particular on making the program user friendly to make it more usable as a teaching tool. For instance, I included detailed explanations of Kepler\u2019s Equation as well as the ability for the user to change parameters. The reason I chose this project was because I wanted to deepen my own understanding of Kepler\u2019s Equation and creating a program that teaches people about the equation helped me do that.<\/span><\/p>\n<p class=\"p1\"><span class=\"s1\">Program<\/span><\/p>\n<p class=\"p1\"><span class=\"s1\">Kepler\u2019s Equation is as follows: M = E &#8211; e*sin(E) where M is mean anomaly, E is eccentric anomaly and e is eccentricity. The program focuses on explaining these three quantities and the roles they have in calculating orbits. The following picture (from www.jgiesen.<span class=\"s2\">de<\/span>) depicts mean and eccentric anomaly:<\/span><\/p>\n<p class=\"p1\"><a href=\"http:\/\/pages.vassar.edu\/magnes\/files\/2016\/12\/jgiesen.gif\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-5370\" src=\"http:\/\/pages.vassar.edu\/magnes\/files\/2016\/12\/jgiesen.gif\" alt=\"jgiesen\" width=\"175\" height=\"175\" \/><\/a><\/p>\n<p class=\"p1\"><span class=\"s1\">In the picture, the black ellipse is the actual orbit being calculated (slightly eccentric) and the blue circle is the orbit without any eccentricity. The mean anomaly is the angle from the main body (in the solar system: the sun) to where a planet would be if its orbit were perfectly circular.The eccentric anomaly is the angle from the main body to a point above the actual orbit on a tangent circle.<\/span><\/p>\n<p class=\"p1\"><a href=\"http:\/\/pages.vassar.edu\/magnes\/files\/2016\/12\/fig1.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-5375\" src=\"http:\/\/pages.vassar.edu\/magnes\/files\/2016\/12\/fig1-300x225.jpg\" alt=\"fig1\" width=\"300\" height=\"225\" srcset=\"https:\/\/pages.vassar.edu\/magnes\/files\/2016\/12\/fig1-300x225.jpg 300w, https:\/\/pages.vassar.edu\/magnes\/files\/2016\/12\/fig1-768x576.jpg 768w, https:\/\/pages.vassar.edu\/magnes\/files\/2016\/12\/fig1-1024x768.jpg 1024w, https:\/\/pages.vassar.edu\/magnes\/files\/2016\/12\/fig1-624x468.jpg 624w, https:\/\/pages.vassar.edu\/magnes\/files\/2016\/12\/fig1.jpg 1120w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p class=\"p1\"><span class=\"s1\">The first graph that the program produces is a plot of eccentric anomaly versus mean anomaly at all values of eccentricity (0 to 1) in steps of 0.1. The shaded region represents possible values for E at fixed M or vice versa. As eccentricity is increased from 0 to 1, M and E get further apart. Next, we look at the extremes: e = 0 and e = 1:<\/span><\/p>\n<p class=\"p1\"><a href=\"http:\/\/pages.vassar.edu\/magnes\/files\/2016\/12\/fig3.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-5377\" src=\"http:\/\/pages.vassar.edu\/magnes\/files\/2016\/12\/fig3-300x225.jpg\" alt=\"fig3\" width=\"300\" height=\"225\" srcset=\"https:\/\/pages.vassar.edu\/magnes\/files\/2016\/12\/fig3-300x225.jpg 300w, https:\/\/pages.vassar.edu\/magnes\/files\/2016\/12\/fig3-768x576.jpg 768w, https:\/\/pages.vassar.edu\/magnes\/files\/2016\/12\/fig3-1024x768.jpg 1024w, https:\/\/pages.vassar.edu\/magnes\/files\/2016\/12\/fig3-624x468.jpg 624w, https:\/\/pages.vassar.edu\/magnes\/files\/2016\/12\/fig3.jpg 1120w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a> <a href=\"http:\/\/pages.vassar.edu\/magnes\/files\/2016\/12\/fig2.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-5376\" src=\"http:\/\/pages.vassar.edu\/magnes\/files\/2016\/12\/fig2-300x225.jpg\" alt=\"fig2\" width=\"300\" height=\"225\" srcset=\"https:\/\/pages.vassar.edu\/magnes\/files\/2016\/12\/fig2-300x225.jpg 300w, https:\/\/pages.vassar.edu\/magnes\/files\/2016\/12\/fig2-768x576.jpg 768w, https:\/\/pages.vassar.edu\/magnes\/files\/2016\/12\/fig2-1024x768.jpg 1024w, https:\/\/pages.vassar.edu\/magnes\/files\/2016\/12\/fig2-624x468.jpg 624w, https:\/\/pages.vassar.edu\/magnes\/files\/2016\/12\/fig2.jpg 1120w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p class=\"p1\"><span class=\"s1\">As you can see, when e = 1, M and E are very different at most points. However, at e = 0, M<span class=\"Apple-converted-space\">\u00a0 <\/span>and E are the same and the plot is a straight line. This makes sense looking back at the definition of M and E; an e value of 1 means that the orbit is a perfect circle and therefore the mean and eccentric anomaly are equal.<\/span><\/p>\n<p class=\"p1\"><a href=\"http:\/\/pages.vassar.edu\/magnes\/files\/2016\/12\/Screen-Shot-2016-12-11-at-2.00.43-PM.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-5381\" src=\"http:\/\/pages.vassar.edu\/magnes\/files\/2016\/12\/Screen-Shot-2016-12-11-at-2.00.43-PM-300x50.png\" alt=\"screen-shot-2016-12-11-at-2-00-43-pm\" width=\"330\" height=\"55\" srcset=\"https:\/\/pages.vassar.edu\/magnes\/files\/2016\/12\/Screen-Shot-2016-12-11-at-2.00.43-PM-300x50.png 300w, https:\/\/pages.vassar.edu\/magnes\/files\/2016\/12\/Screen-Shot-2016-12-11-at-2.00.43-PM-768x128.png 768w, https:\/\/pages.vassar.edu\/magnes\/files\/2016\/12\/Screen-Shot-2016-12-11-at-2.00.43-PM-1024x170.png 1024w, https:\/\/pages.vassar.edu\/magnes\/files\/2016\/12\/Screen-Shot-2016-12-11-at-2.00.43-PM-624x104.png 624w, https:\/\/pages.vassar.edu\/magnes\/files\/2016\/12\/Screen-Shot-2016-12-11-at-2.00.43-PM.png 1970w\" sizes=\"auto, (max-width: 330px) 100vw, 330px\" \/><\/a><\/p>\n<p class=\"p1\"><span class=\"s1\">The program also allows for some interactivity so it can be used as a teaching tool; above is how the program explains the graphs of mean anomaly versus eccentric anomaly. After the explanation, it waits for user input and then graphs mean anomaly versus eccentric anomaly with the user-specified eccentricity.<\/span><\/p>\n<p class=\"p1\"><span class=\"s1\">Conclusion<\/span><\/p>\n<p class=\"p1\"><span class=\"s1\">Overall, I\u2019m happy with the outcome of this program. I think that Newton\u2019s Method worked well to solve Kepler\u2019s Equation and it was fairly straightforward to implement in Matlab. I also liked how the educational part of the program came out. However, if I were to redo this program I would possibly use a different programming language because I was unable to find any way to make the interactive part of the program user friendly. For example, I would\u2019ve liked the text explanations to display somewhere besides the command window and would\u2019ve added a button to advance in the program rather than through typed numbers.<\/span><\/p>\n<p class=\"p1\"><span class=\"s1\">References<\/span><\/p>\n<p class=\"p1\"><span class=\"s2\">http:\/\/www.jgiesen.de\/kepler\/img\/keplerEllipse.gif<\/span><\/p>\n<p class=\"p1\"><span class=\"s2\">https:\/\/www.csun.edu\/~hcmth017\/master\/node16.html<\/span><\/p>\n<p class=\"p1\"><span class=\"s1\">http:\/\/mathworld.wolfram.com\/KeplersEquation.html<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Overview For my final project I solved Kepler\u2019s Equation numerically using Newton\u2019s Method. Because it is a transcendental equation and thus cannot be used to solve for the eccentric anomaly directly, I created a program that uses iterative methods to solve it and then plots the solutions. Beyond this, I focused in particular on making [&hellip;]<\/p>\n","protected":false},"author":5772,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[62954],"tags":[],"class_list":["post-5369","post","type-post","status-publish","format-standard","hentry","category-jake"],"_links":{"self":[{"href":"https:\/\/pages.vassar.edu\/magnes\/wp-json\/wp\/v2\/posts\/5369","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pages.vassar.edu\/magnes\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pages.vassar.edu\/magnes\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pages.vassar.edu\/magnes\/wp-json\/wp\/v2\/users\/5772"}],"replies":[{"embeddable":true,"href":"https:\/\/pages.vassar.edu\/magnes\/wp-json\/wp\/v2\/comments?post=5369"}],"version-history":[{"count":2,"href":"https:\/\/pages.vassar.edu\/magnes\/wp-json\/wp\/v2\/posts\/5369\/revisions"}],"predecessor-version":[{"id":5382,"href":"https:\/\/pages.vassar.edu\/magnes\/wp-json\/wp\/v2\/posts\/5369\/revisions\/5382"}],"wp:attachment":[{"href":"https:\/\/pages.vassar.edu\/magnes\/wp-json\/wp\/v2\/media?parent=5369"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pages.vassar.edu\/magnes\/wp-json\/wp\/v2\/categories?post=5369"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pages.vassar.edu\/magnes\/wp-json\/wp\/v2\/tags?post=5369"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}