💿🐜 Antkeeper source code https://antkeeper.com
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

71 lines
2.6 KiB

  1. /*
  2. * Copyright (C) 2021 Christopher J. Howard
  3. *
  4. * This file is part of Antkeeper source code.
  5. *
  6. * Antkeeper source code is free software: you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License as published by
  8. * the Free Software Foundation, either version 3 of the License, or
  9. * (at your option) any later version.
  10. *
  11. * Antkeeper source code is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License
  17. * along with Antkeeper source code. If not, see <http://www.gnu.org/licenses/>.
  18. */
  19. #ifndef ANTKEEPER_ENTITY_COMPONENT_CELESTIAL_BODY_HPP
  20. #define ANTKEEPER_ENTITY_COMPONENT_CELESTIAL_BODY_HPP
  21. namespace entity {
  22. namespace component {
  23. /// A simple celestial body.
  24. struct celestial_body
  25. {
  26. /// Mean radius of the body, in meters.
  27. double radius;
  28. /// Mass of the body, in kilograms.
  29. double mass;
  30. /// Right ascension of the body's north pole at epoch, in radians.
  31. double pole_ra;
  32. /// Declination of the body's north pole at epoch, in radians.
  33. double pole_dec;
  34. /// Location of the prime meridian at epoch, as a rotation about the north pole, in radians.
  35. double prime_meridian;
  36. /*
  37. /// Quadratic e coefficients for the right ascension of the body's north pole, in radians. Right ascension is calculated as `x + y * T + z * T^2`, where `T` is the Julian centuries (36525 days) from epoch.
  38. double3 pole_ra;
  39. /// Quadratic coefficients for the declination of the body's north pole, in radians. Declination is calculated as `x + y * T + z * T^2`, where `T` is the Julian centuries (36525 days) from epoch.
  40. double3 pole_ra;
  41. /// Quadratic coefficients for the rotation state of the body's prime meridian, in radians. Prime meridian rotation is calculated as `x + y * d + z * d^2`, where `d` is the days from epoch.
  42. double3 prime_meridian;
  43. /// Linear coefficients of the nutation and precession angles, in radians. Angles are calculated as `x + y * d`, where `d` is the days from epoch.
  44. std::vector<double2> nutation_precession_angles;
  45. std::vector<double> nutation_precession_ra;
  46. std::vector<double> nutation_precession_dec;
  47. std::vector<double> nutation_precession_pm;
  48. */
  49. /// Sidereal rotation period, in rotations per day.
  50. double rotation_period;
  51. /// Geometric albedo
  52. double albedo;
  53. };
  54. } // namespace component
  55. } // namespace entity
  56. #endif // ANTKEEPER_ENTITY_COMPONENT_CELESTIAL_BODY_HPP