{"id":890,"date":"2018-07-22T04:11:43","date_gmt":"2018-07-22T02:11:43","guid":{"rendered":"https:\/\/aerospaceresearch.net\/?p=890"},"modified":"2018-07-22T14:12:03","modified_gmt":"2018-07-22T12:12:03","slug":"gsoc2018orbitdeterminatorjorge-week-7-8-refining-gauss-method-implementation","status":"publish","type":"post","link":"https:\/\/aerospaceresearch.net\/?p=890","title":{"rendered":"[GSoC2018|OrbitDeterminator|Jorge] Week #7-8 \u2013 Refining Gauss method implementation"},"content":{"rendered":"<div>\n<div>During these weeks, I worked on coding a high-level interface for two Gauss\u00a0method applications of orbit determination: Earth satellites and asteroids.<\/div>\n<div>One of the main differences with respect to my previous work, is that we relied\u00a0heavily on the <code>astropy<\/code>\u00a0library (www.astropy.org), a Python library for astronomical calculations. One of the main factors which inclined us to use this library, is that it has a lot of useful functions, it is relatively well-tested, gives more consistency to the code, and also avoids typos (e.g., in numerical values of astronomical constants). We also incorporated the <code>poliastro<\/code>\u00a0library, mainly to use its implementation of the Stumpff functions.<\/div>\n<\/div>\n<h3>Changes in implementation<\/h3>\n<div>One of the main changes with respect to the previous version of our implementation, was the abstraction of a &#8222;core&#8220; computation of the Gauss method and its refinement iterative stage, regardless of the case being handled, whether it is an Earth-orbiting object (satellite, space debris, etc.) or a Sun-orbiting object (main-belt asteroid, Near-Earth asteroid, comet, etc.). This abstraction is implemented in the <code>gauss_method_core<\/code>\u00a0and <code>gauss_refinement<\/code>\u00a0function, which are low level functions and may be adapted for user-defined applications.<\/div>\n<div><\/div>\n<div>A new feature of the latest version of the code, is that in case of having multiple solutions to the Gauss polynomial, now the user is able to select distinct roots for each occurrence of the multiple solutions. As we will see in examples below, multiple positive solutions to the Gauss polynomial are common when handling real-world data. In the case of finding more than one feasible solution to the Gauss polynomial, the code spits out all the feasible roots found; this allow the user to select the adequate root to the polynomial.<\/div>\n<div><\/div>\n<div>Also, the execution speed was improved for the Near-Earth asteroids case: when handling multiple observations, instead of reading the MPC-formatted file each time and retrieving the relevant triplet of observations, now the file is read only once. Since the observation files from MPC are typically a few thousand lines long, this improved the execution speeds about 10x.<\/div>\n<div><\/div>\n<div>Another important change, is that now the local mean sidereal time is computed using <code>astropy<\/code>\u00a0&#8217;s <code>sidereal_time<\/code>\u00a0method for <code>SkyCoord<\/code>\u00a0objects instead of using our own implementation. While doing this, we were able to identify a bug in our implementation of the computation of the local sidereal time!<\/div>\n<div><\/div>\n<div>Finally, in the case of Sun-orbiting bodies, the average orbital elements are computed in the heliocentric J2000.0 ecliptic frame; this allows us to directly compare our results, for example, with the orbital elements listed in the JPL&#8217;s Horizons online ephemeris service.<\/div>\n<div><\/div>\n<p><!--more--><\/p>\n<h2>Example 1: Ceres<\/h2>\n<div>The code needed to run this example may be found in the <code>gauss_example_ceres.py<\/code>\u00a0in the <code>orbitdeterminator\/kep_determination<\/code>\u00a0folder. There, a high-level interface for processing of multiple observations of MPC-formatted files is used in order to compute a preliminary orbit for Ceres, using 27 observations of this body. The example may be run from the command line simply by doing <code>$ python gauss_example_ceres.py<\/code>. The only caveat is that, as stated in the previous blog post, the computation relies on using the NASA-JPL DE 430 ephemeris for the Earth and the Sun in SPK format, so in order to run this example the <code>de430t.bsp<\/code>\u00a0file must be present in the <code>kep_determination<\/code>\u00a0folder. This file may be found at <code>ssd.jpl.nasa.gov\/pub\/eph\/planets\/bsp\/de430t.bsp<\/code>\u00a0and may be downloaded via FTP. We decided against uploading this file to the <code>orbitdeterminator<\/code>\u00a0repo, since it&#8217;s around 100MB in size.<\/div>\n<div><\/div>\n<div>After running a few preliminary code, the example calls the <code>gauss_method_mpc<\/code>\u00a0function, which takes 27 ra\/dec observations in total, separated by time intervals of around 1 month, in order to compute the orbit of Ceres. That is, this function read the whole MPC file for Ceres, reads from it only 27 lines, and from it then computes the Ceres orbit using the Gauss method taking three by three observations. We noticed that, if shorter intervals were taken, then the Gauss method showed some convergence problems. We also found that these problems with very short observational arcs for the Gauss method have been described, e.g., in [1].<\/div>\n<div><\/div>\n<div>Below, we show the output from the <code>gauss_method_mpc<\/code>\u00a0function. There, the Sun is shown as a yellow dot at the center of the plot. The computed orbit of Ceres is shown in red along with the estimated states using the Gauss method. Also, in blue, the orbit of the Earth is shown.<\/div>\n<div><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-891\" src=\"https:\/\/aerospaceresearch.net\/wp-content\/uploads\/2018\/07\/Screen-Shot-2018-07-21-at-19.37.23.png\" alt=\"\" width=\"1102\" height=\"876\" \/><\/div>\n<div><\/div>\n<div>\n<div>The heliocentric ecliptic average orbital elements (we use <code>astropy<\/code>&#8217;s value for the mean J2000.0 obliquity of the ecliptic), are:<\/div>\n<div><\/div>\n<div>a = 2.768129232786505 au<\/div>\n<div>e = 0.07938073212954426<\/div>\n<div>I =\u00a010.584725369990045 deg<\/div>\n<div>\u03a9 =\u00a080.4066281982582 deg<\/div>\n<div>\n<p>\u03c9 =\u00a073.07336134446685 deg<\/p>\n<\/div>\n<div>On the other hand, the heliocentric ecliptic orbital elements reported by NASA-JPL in Horizons are:<\/div>\n<\/div>\n<div><\/div>\n<div>a = 2.767218108003098 au<\/div>\n<div>e = 0.07610292126891821<\/div>\n<div>I = 10.60069567603618 deg<\/div>\n<div>\u03a9 = 80.65851514365535 deg<\/div>\n<div>\u03c9 =<span class=\"Apple-converted-space\">\u00a0<\/span>71.44921526124109 deg<\/div>\n<div><\/div>\n<div>Thus, we see that although some differences exist, our results give a very good first approximation to the orbit of Ceres, using only 27 observations! Indeed, Gauss method is really powerful!<\/div>\n<h2>Example 2: Eros<\/h2>\n<p>In this example we compute the orbit of the first-ever discovered Near-Earth asteroid: 433 Eros. Here, we use the Gauss method with only 4 ra\/dec observations.<\/p>\n<div><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-892\" src=\"https:\/\/aerospaceresearch.net\/wp-content\/uploads\/2018\/07\/Screen-Shot-2018-07-21-at-19.37.47.png\" alt=\"\" width=\"1058\" height=\"838\" \/><\/div>\n<div><\/div>\n<div>For the heliocentric ecliptic orbital elements, we got the following results:<\/div>\n<div><\/div>\n<div>\n<div>a = 1.4900359723265548 au<\/div>\n<div>e = 0.2222907524713779<\/div>\n<div>I = 10.87373869230558 deg<\/div>\n<div>\u03a9 = 303.89500826351457 deg<\/div>\n<div>\u03c9 = 175.09494980703403<\/div>\n<div><\/div>\n<\/div>\n<div>JPL Horizons online service tells us, on the other hand, that:<\/div>\n<div><\/div>\n<div>\n<div>a = 1.458251585462893\u00a0au<\/div>\n<div>e = 0.2229072630918923<\/div>\n<div>I = 10.82944790594134 deg<\/div>\n<div>\u03a9 = 304.4109222194975 deg<\/div>\n<div>\u03c9 = 178.6283758645153 deg<\/div>\n<div><\/div>\n<\/div>\n<div>Again, although we observe some small differences, the results we have are pretty close to the ones computed by JPL. And now, we used only 4 observations!<\/div>\n<h2>References<\/h2>\n<div>[1]\u00a0Milani, A., Gronchi, G. F., Vitturi, M. D. M., &amp; Kne\u017eevi\u0107, Z. (2004). Orbit determination with very short arcs. I admissible regions. <i>Celestial Mechanics and Dynamical Astronomy<\/i>, <i>90<\/i>(1-2), 57-85.<\/div>\n","protected":false},"excerpt":{"rendered":"<p>During these weeks, I worked on coding a high-level interface for two Gauss\u00a0method applications of orbit determination: Earth satellites and asteroids. One of the main differences with respect to my previous work, is that we relied\u00a0heavily on the astropy\u00a0library (www.astropy.org), a Python library for astronomical calculations. One of the main factors which inclined us to &hellip; <a href=\"https:\/\/aerospaceresearch.net\/?p=890\" class=\"more-link\"><span class=\"screen-reader-text\">\u201e[GSoC2018|OrbitDeterminator|Jorge] Week #7-8 \u2013 Refining Gauss method implementation\u201c<\/span> weiterlesen<\/a><\/p>\n","protected":false},"author":15,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/aerospaceresearch.net\/index.php?rest_route=\/wp\/v2\/posts\/890"}],"collection":[{"href":"https:\/\/aerospaceresearch.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/aerospaceresearch.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/aerospaceresearch.net\/index.php?rest_route=\/wp\/v2\/users\/15"}],"replies":[{"embeddable":true,"href":"https:\/\/aerospaceresearch.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=890"}],"version-history":[{"count":2,"href":"https:\/\/aerospaceresearch.net\/index.php?rest_route=\/wp\/v2\/posts\/890\/revisions"}],"predecessor-version":[{"id":895,"href":"https:\/\/aerospaceresearch.net\/index.php?rest_route=\/wp\/v2\/posts\/890\/revisions\/895"}],"wp:attachment":[{"href":"https:\/\/aerospaceresearch.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=890"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/aerospaceresearch.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=890"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/aerospaceresearch.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=890"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}