CenterName.java

  1. /* Copyright 2002-2019 CS Systèmes d'Information
  2.  * Licensed to CS Systèmes d'Information (CS) under one or more
  3.  * contributor license agreements.  See the NOTICE file distributed with
  4.  * this work for additional information regarding copyright ownership.
  5.  * CS licenses this file to You under the Apache License, Version 2.0
  6.  * (the "License"); you may not use this file except in compliance with
  7.  * the License.  You may obtain a copy of the License at
  8.  *
  9.  *   http://www.apache.org/licenses/LICENSE-2.0
  10.  *
  11.  * Unless required by applicable law or agreed to in writing, software
  12.  * distributed under the License is distributed on an "AS IS" BASIS,
  13.  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14.  * See the License for the specific language governing permissions and
  15.  * limitations under the License.
  16.  */
  17. package org.orekit.files.ccsds;

  18. import org.orekit.bodies.CelestialBody;
  19. import org.orekit.bodies.CelestialBodyFactory;

  20. /** Orbit central bodies for which a Celestial body can be created.
  21.  * @author sports
  22.  * @since 6.1
  23.  */
  24. public enum CenterName {
  25.     /** Solar system barycenter aggregated body. */
  26.     SOLAR_SYSTEM_BARYCENTER {

  27.         /** {@inheritDoc} */
  28.         public CelestialBody getCelestialBody() {
  29.             return CelestialBodyFactory.getSolarSystemBarycenter();
  30.         }
  31.     },
  32.     /** Sun body. */
  33.     SUN {

  34.         /** {@inheritDoc} */
  35.         public CelestialBody getCelestialBody() {
  36.             return CelestialBodyFactory.getSun();
  37.         }
  38.     },
  39.     /** Mercury body. */
  40.     MERCURY {

  41.         /** {@inheritDoc} */
  42.         public CelestialBody getCelestialBody() {
  43.             return CelestialBodyFactory.getMercury();
  44.         }
  45.     },
  46.     /** Venus body. */
  47.     VENUS {

  48.         /** {@inheritDoc} */
  49.         public CelestialBody getCelestialBody() {
  50.             return CelestialBodyFactory.getVenus();
  51.         }
  52.     },
  53.     /** Earth-Moon barycenter bodies pair. */
  54.     EARTH_MOON {

  55.         /** {@inheritDoc} */
  56.         public CelestialBody getCelestialBody() {
  57.             return CelestialBodyFactory.getEarthMoonBarycenter();
  58.         }
  59.     },
  60.     /** Earth body. */
  61.     EARTH {

  62.         /** {@inheritDoc} */
  63.         public CelestialBody getCelestialBody() {
  64.             return CelestialBodyFactory.getEarth();
  65.         }
  66.     },
  67.     /** Moon body. */
  68.     MOON {

  69.         /** {@inheritDoc} */
  70.         public CelestialBody getCelestialBody() {
  71.             return CelestialBodyFactory.getMoon();
  72.         }
  73.     },
  74.     /** Mars body. */
  75.     MARS {

  76.         /** {@inheritDoc} */
  77.         public CelestialBody getCelestialBody() {
  78.             return CelestialBodyFactory.getMars();
  79.         }
  80.     },
  81.     /** Jupiter body. */
  82.     JUPITER {

  83.         /** {@inheritDoc} */
  84.         public CelestialBody getCelestialBody() {
  85.             return CelestialBodyFactory.getJupiter();
  86.         }
  87.     },
  88.     /** Saturn body. */
  89.     SATURN {

  90.         /** {@inheritDoc} */
  91.         public CelestialBody getCelestialBody() {
  92.             return CelestialBodyFactory.getSaturn();
  93.         }
  94.     },
  95.     /** Uranus body. */
  96.     URANUS {

  97.         /** {@inheritDoc} */
  98.         public CelestialBody getCelestialBody() {
  99.             return CelestialBodyFactory.getUranus();
  100.         }
  101.     },
  102.     /** Neptune body. */
  103.     NEPTUNE {

  104.         /** {@inheritDoc} */
  105.         public CelestialBody getCelestialBody() {
  106.             return CelestialBodyFactory.getNeptune();
  107.         }
  108.     },
  109.     /** Pluto body. */
  110.     PLUTO {

  111.         /** {@inheritDoc} */
  112.         public CelestialBody getCelestialBody() {
  113.             return CelestialBodyFactory.getPluto();
  114.         }
  115.     };

  116.     /**
  117.      * Get the celestial body corresponding to the CCSDS constant.
  118.      * @return celestial body corresponding to the CCSDS constant
  119.      */
  120.     public abstract CelestialBody getCelestialBody();

  121. }