diff --git a/astronomy/date_time.hpp b/astronomy/date_time.hpp index bbea485560..bd924d1400 100644 --- a/astronomy/date_time.hpp +++ b/astronomy/date_time.hpp @@ -23,12 +23,12 @@ namespace internal { class Date final { public: // The calendar is Gregorian by default starting in 1583; before that, - // |calendar| is required. + // `calendar` is required. static constexpr Date YYYYMMDD( std::int64_t digits, std::optional calendar = std::nullopt); // The calendar is Gregorian by default starting in 1583; before that, - // |calendar| is required. + // `calendar` is required. static constexpr Date YYYYDDD( std::int64_t digits, std::optional calendar = std::nullopt); @@ -37,12 +37,12 @@ class Date final { static constexpr Date YYYYwwD(std::int64_t digits); // The calendar is Gregorian by default starting in 1583; before that, - // |calendar| is required. + // `calendar` is required. static constexpr Date Calendar( int year, int month, int day, std::optional calendar = std::nullopt); // The calendar is Gregorian by default starting in 1583; before that, - // |calendar| is required. + // `calendar` is required. static constexpr Date Ordinal( int year, int day, std::optional<_date_time::Calendar> calendar = std::nullopt); @@ -50,8 +50,8 @@ class Date final { // at least 1583, and the calendar is Gregorian. static constexpr Date Week(int year, int week, int day); - // The julian date |jd| must not be negative; its fractional part must be one - // half, corresponding to 00:00 on the resulting |Date|. + // The julian date `jd` must not be negative; its fractional part must be one + // half, corresponding to 00:00 on the resulting `Date`. static constexpr Date JD(double jd); constexpr int year() const; @@ -61,7 +61,7 @@ class Date final { constexpr int ordinal() const; - // The fractional part of |jd()| is one half, corresponding to 00:00 on the + // The fractional part of `jd()` is one half, corresponding to 00:00 on the // day represented by this object. constexpr double jd() const; constexpr int mjd() const; @@ -93,7 +93,7 @@ class TimeOfDay final { constexpr int millisecond() const; constexpr bool is_leap_second() const; - // Whether |*this| is 24:00:00. + // Whether `*this` is 24:00:00. constexpr bool is_end_of_day() const; private: @@ -107,7 +107,7 @@ class TimeOfDay final { class DateTime final { public: - // Checks that |time| does not represent a leap second unless |date| is the + // Checks that `time` does not represent a leap second unless `date` is the // last day of the month. constexpr DateTime(Date date, TimeOfDay time); @@ -116,8 +116,8 @@ class DateTime final { constexpr Date const& date() const; constexpr TimeOfDay const& time() const; - // If |time()| is 24:00:00, returns an equivalent DateTime where midnight is - // expressed as 00:00:00 on the next day; otherwise, returns |*this|. + // If `time()` is 24:00:00, returns an equivalent DateTime where midnight is + // expressed as 00:00:00 on the next day; otherwise, returns `*this`. constexpr DateTime normalized_end_of_day() const; private: @@ -146,7 +146,7 @@ class JulianDate final { std::int64_t fraction_numerator, std::int64_t fraction_denominator); - // These numbers are relative to J2000. |fraction_denominator| is a positive + // These numbers are relative to J2000. `fraction_denominator` is a positive // power of 10. std::int64_t const day_; std::int64_t const fraction_numerator_; diff --git a/astronomy/date_time_body.hpp b/astronomy/date_time_body.hpp index e65658e308..e726c3c883 100644 --- a/astronomy/date_time_body.hpp +++ b/astronomy/date_time_body.hpp @@ -56,17 +56,17 @@ constexpr int number_of_iso_weeks_in_year(int const year) { : 52; } -// Returns the ordinal in |year| of the first day of the first week of |year|. +// Returns the ordinal in `year` of the first day of the first week of `year`. // The result is in [-2, 4], with values in [-2, 0] meaning that the first week -// of |year| starts in |year - 1|. -// A result in [-2, 1] means that the first day of |year| is in the first week -// of |year|; otherwise, it is in the last week of |year - 1|. +// of `year` starts in `year - 1`. +// A result in [-2, 1] means that the first day of `year` is in the first week +// of `year`; otherwise, it is in the last week of `year - 1`. constexpr int ordinal_of_w_01_1(int const year) { return mod(2 - day_of_week_on_january_1st(year), 7, -2); } -// Returns the number formed by taking |end - begin| increasingly significant -// digits, starting from the digit of the (10 ** |begin|)s. +// Returns the number formed by taking `end - begin` increasingly significant +// digits, starting from the digit of the (10 ** `begin`)s. constexpr std::int64_t digit_range(std::int64_t const digits, int const begin, int const end) { @@ -94,7 +94,7 @@ constexpr std::int64_t shift_right(std::int64_t const x, int const count) { return count == 0 ? x : shift_right(x / 10, count - 1); } -// Implementation of class |Date|. +// Implementation of class `Date`. constexpr Date Date::YYYYMMDD( std::int64_t const digits, @@ -466,12 +466,12 @@ constexpr CStringIterator::CStringIterator(char const* const str, // Date parsing. -// A |DateParser| contains information about a string necessary to interpret it +// A `DateParser` contains information about a string necessary to interpret it // as a date representation. class DateParser final { public: - // Returns a |Date| corresponding to the representation |str|. - // Fails unless |str| is a date representation of one of the following forms: + // Returns a `Date` corresponding to the representation `str`. + // Fails unless `str` is a date representation of one of the following forms: // [YYYY-MM-DD], [YYYYMMDD], [YYYY-Www-D], [YYYYWwwD], [YYYY-DDD], [YYYYDDD], // with an optional prefix [J] or [G] and an optional sign. static constexpr Date Parse(char const* str, std::size_t size); @@ -485,7 +485,7 @@ class DateParser final { bool has_w, int w_index); - // Returns a |DateParser| describing the given string. Fails if the string + // Returns a `DateParser` describing the given string. Fails if the string // does not exclusively consist of: // - any number of decimal digits; // - at most two hyphens; @@ -501,7 +501,7 @@ class DateParser final { bool has_w, int w_index); - // Returns a |Date| corresponding to the string that |*this| describes. + // Returns a `Date` corresponding to the string that `*this` describes. // Fails if the format is invalid or the string represents an invalid date. constexpr Date ToDate(std::optional calendar, bool negative) const; @@ -661,12 +661,12 @@ constexpr Date DateParser::ToDate(std::optional const calendar, // TimeOfDay parsing. -// A |TimeParser| contains information about a string necessary to interpret it +// A `TimeParser` contains information about a string necessary to interpret it // as a time representation. class TimeParser final { public: - // Returns a |TimeOfDay| corresponding to the representation |str|. - // Fails unless |str| is a valid time representation of one of the following + // Returns a `TimeOfDay` corresponding to the representation `str`. + // Fails unless `str` is a valid time representation of one of the following // forms: [hh:mm:ss], [hhmmss], [hh:mm:ss.ss̲], [hh:mm:ss,ss̲], [hhmmss.ss̲], // [hhmmss,ss̲], with at most three digits after the decimal mark. static constexpr TimeOfDay Parse(char const* str, std::size_t size); @@ -680,7 +680,7 @@ class TimeParser final { bool has_decimal_mark, int decimal_mark_index); - // Returns a |TimeParser| describing the given string. Fails if the string + // Returns a `TimeParser` describing the given string. Fails if the string // does not exclusively consist of: // Fails if the string does not exclusively consist of: // - any number of decimal digits; @@ -697,7 +697,7 @@ class TimeParser final { bool has_decimal_mark, int decimal_mark_index); - // Returns a |TimeOfDay| corresponding to the string that |*this| describes. + // Returns a `TimeOfDay` corresponding to the string that `*this` describes. // Fails if the format is invalid or the string represents an invalid time. constexpr TimeOfDay ToTime() const; @@ -837,15 +837,15 @@ constexpr TimeOfDay TimeParser::ToTime() const { // Julian date parsing. -// A |JulianDateParser| contains information about a string necessary to +// A `JulianDateParser` contains information about a string necessary to // interpret it as a Julian date. class JulianDateParser final { public: - // Returns a |JulianDate| corresponding to the representation |str|. - // Fails unless |str| is a valid time representation of the form [ddd] or + // Returns a `JulianDate` corresponding to the representation `str`. + // Fails unless `str` is a valid time representation of the form [ddd] or // [ddd.fff]. - // Returns a |JulianDate| object corresponding to the given string interpreted + // Returns a `JulianDate` object corresponding to the given string interpreted // a Julian Date or a Modified Julian Date, respectively. static constexpr JulianDate ParseJD(char const* str, std::size_t size); static constexpr JulianDate ParseMJD(char const* str, std::size_t size); @@ -855,7 +855,7 @@ class JulianDateParser final { int digit_count, int decimal_mark_index); - // Returns a |JulianDateParser| describing the given string. Fails if the + // Returns a `JulianDateParser` describing the given string. Fails if the // string is not of the form [ddd] or [ddd.fff] or if it has too many digits // to fit in a std::int64_t. static constexpr JulianDateParser ReadToEnd(char const* str, @@ -866,7 +866,7 @@ class JulianDateParser final { bool has_decimal_mark, int decimal_mark_index); - // Returns a |JulianDate| corresponding to the string that |*this| describes. + // Returns a `JulianDate` corresponding to the string that `*this` describes. // Fails if the format is invalid. constexpr JulianDate ToJD() const; constexpr JulianDate ToMJD() const; diff --git a/astronomy/epoch.hpp b/astronomy/epoch.hpp index f5421ac6ba..964776a6bb 100644 --- a/astronomy/epoch.hpp +++ b/astronomy/epoch.hpp @@ -2,7 +2,7 @@ #include "geometry/instant.hpp" -// |geometry::Instant| represents instants of Terrestrial Time (TT). The +// `geometry::Instant` represents instants of Terrestrial Time (TT). The // utilities in this file provide its standard epoch and two ways of specifying // TT dates. @@ -13,7 +13,7 @@ namespace internal { using namespace principia::geometry::_instant; -// |J2000| represents to the standard epoch J2000.0. +// `J2000` represents to the standard epoch J2000.0. // According to Resolution B1 (On the Use of Julian Dates) of the XXIIIrd IAU // general assembly, "it is recommended that JD be specified as SI seconds in // Terrestrial Time (TT)", see http://goo.gl/oPemRm. J2000.0 is by definition diff --git a/astronomy/frames.hpp b/astronomy/frames.hpp index 62ff05298a..4d079ccf3f 100644 --- a/astronomy/frames.hpp +++ b/astronomy/frames.hpp @@ -57,7 +57,7 @@ using ICRS = Frame| on ITRS coordinates is +// Caveat: using `SphericalCoordinates` on ITRS coordinates is // inconsistent with WGS 84 latitudes; the WGS 84 geoid should be used. // - The ITRS is related to the European Terrestrial Reference System (ETRS89) // by a time-dependent rigid transformation. diff --git a/astronomy/lunar_eclipse_test.cpp b/astronomy/lunar_eclipse_test.cpp index d444924933..fa7c9fc79c 100644 --- a/astronomy/lunar_eclipse_test.cpp +++ b/astronomy/lunar_eclipse_test.cpp @@ -77,8 +77,8 @@ class LunarEclipseTest : public ::testing::Test { atmospheric_depth_ = (1.0 / 85.0 - 1.0 / 594.0) * r_earth_; } - // A positive |time_error| means that the actual contact happens after - // |current_time|. + // A positive `time_error` means that the actual contact happens after + // `current_time`. void CheckLunarUmbralEclipse(Instant const& current_time, Sign const moon_offset_sign, ApproximateQuantity const& angular_error, @@ -112,7 +112,7 @@ class LunarEclipseTest : public ::testing::Test { (r_earth_ + atmospheric_depth_ + moon_offset_sign * r_moon_) / Sin(umbral_half_aperture(t)); // Angle between Earth and Moon as seen at - // |apex_of_moon_locus_at_umbral_contact|. + // `apex_of_moon_locus_at_umbral_contact`. return AngleBetween(apex_of_moon_locus_at_umbral_contact - q_earth, apex_of_moon_locus_at_umbral_contact - q_moon); }; @@ -139,8 +139,8 @@ class LunarEclipseTest : public ::testing::Test { << " " << actual_contact_time - current_time; } - // A positive |time_error| means that the actual contact happens after - // |current_time|. + // A positive `time_error` means that the actual contact happens after + // `current_time`. void CheckLunarPenumbralEclipse( Instant const& current_time, Sign const moon_offset_sign, diff --git a/astronomy/lunar_orbit_test.cpp b/astronomy/lunar_orbit_test.cpp index 2af0917ec8..69234bf2c2 100644 --- a/astronomy/lunar_orbit_test.cpp +++ b/astronomy/lunar_orbit_test.cpp @@ -157,11 +157,11 @@ class LunarOrbitTest : public ::testing::TestWithParam { // This reference frame is non-rotating, with its origin at the selenocentre. // The axes are those of LunarSurface at J2000. // Note that this frame is not actually inertial, but we want to use it with - // |KeplerOrbit|. Perhaps we should have a concept of non-rotating, and - // |KeplerOrbit| should check that; this is good enough for a test. + // `KeplerOrbit`. Perhaps we should have a concept of non-rotating, and + // `KeplerOrbit` should check that; this is good enough for a test. using Selenocentric = Frame; - // We do not use a |BodyCentredNonRotatingReferenceFrame| since that would use + // We do not use a `BodyCentredNonRotatingReferenceFrame` since that would use // ICRS axes. RigidMotion ToSelenocentric(Instant const& t) { return RigidMotion( diff --git a/astronomy/orbit_analysis_test.cpp b/astronomy/orbit_analysis_test.cpp index 7ad6bfa997..7a7542c23a 100644 --- a/astronomy/orbit_analysis_test.cpp +++ b/astronomy/orbit_analysis_test.cpp @@ -153,7 +153,7 @@ class OrbitAnalysisTest : public ::testing::Test { earth_(*earth_1957_.rotating_body(*ephemeris_, "Earth")) {} // Returns a GCRS trajectory obtained by stitching together the trajectories - // of |sp3_orbit.satellites| in |sp3_orbit.files|. + // of `sp3_orbit.satellites` in `sp3_orbit.files`. not_null>> EarthCentredTrajectory( SP3Orbit const& sp3_orbit) { BodyCentredNonRotatingReferenceFrame gcrs{ephemeris_.get(), diff --git a/astronomy/orbit_ground_track.hpp b/astronomy/orbit_ground_track.hpp index b5d10e8446..db44e9dbd3 100644 --- a/astronomy/orbit_ground_track.hpp +++ b/astronomy/orbit_ground_track.hpp @@ -30,11 +30,11 @@ class OrbitGroundTrack { struct MeanSun { Instant epoch; // This mean longitude of the sun is with respect to the axes of - // |PrimaryCentred|. + // `PrimaryCentred`. Angle mean_longitude_at_epoch; // This year is the period of the above mean longitude; which kind of year - // it is depends on the definition of |PrimaryCentred|. If |PrimaryCentred| - // has ICRS axes, it is the sidereal year; if |PrimaryCentred| is the + // it is depends on the definition of `PrimaryCentred`. If `PrimaryCentred` + // has ICRS axes, it is the sidereal year; if `PrimaryCentred` is the // reference frame of the equator & equinox of the date, it is the tropical // year. Time year; @@ -66,7 +66,7 @@ class OrbitGroundTrack { OrbitGroundTrack& operator=(OrbitGroundTrack&&) = default; // Returns an object that describes the properties of the ground track of - // |trajectory| as an orbit around |primary|; if |mean_sun| is provided, + // `trajectory` as an orbit around `primary`; if `mean_sun` is provided, // sun-synchronicity is analysed. template static absl::StatusOr ForTrajectory( @@ -76,7 +76,7 @@ class OrbitGroundTrack { // Given a nominal recurrence and the index of the first ascending pass east // of the equator (which must be odd and in [1, 2 Nᴛₒ - 1], where Nᴛₒ is - // |nominal_recurrence.number_of_revolutions()|), returns an object describing + // `nominal_recurrence.number_of_revolutions()`), returns an object describing // how the recurrence grid is aligned in longitude, and how well the actual // orbit follows that grid. EquatorCrossingLongitudes equator_crossing_longitudes( @@ -97,9 +97,9 @@ class OrbitGroundTrack { std::vector longitudes_of_equator_crossings_of_ascending_passes_; std::vector longitudes_of_equator_crossings_of_descending_passes_; - // Whether |longitudes_of_equator_crossings_of_descending_passes_.front()| is + // Whether `longitudes_of_equator_crossings_of_descending_passes_.front()` is // the longitude of the pass preceding - // |longitudes_of_equator_crossings_of_ascending_passes_.front()|, rather than + // `longitudes_of_equator_crossings_of_ascending_passes_.front()`, rather than // the following one. bool first_descending_pass_before_first_ascending_pass_; std::optional> mean_solar_times_of_ascending_nodes_; diff --git a/astronomy/orbit_ground_track_body.hpp b/astronomy/orbit_ground_track_body.hpp index 7ff96d23fc..1769b971de 100644 --- a/astronomy/orbit_ground_track_body.hpp +++ b/astronomy/orbit_ground_track_body.hpp @@ -25,12 +25,12 @@ using namespace principia::quantities::_elementary_functions; using namespace principia::quantities::_si; // Note that the origin of this celestial longitude is arbitrary: it is not the -// node of the orbit around the sun (the equinox). If |PrimaryCentred| is the +// node of the orbit around the sun (the equinox). If `PrimaryCentred` is the // GCRS, this is the right ascension (with respect to the mean equinox of // J2000). template Angle CelestialLongitude(Position const& q) { - // TODO(egg): |ToSpherical| is wasteful, as we discard the latitude. + // TODO(egg): `ToSpherical` is wasteful, as we discard the latitude. return (q - PrimaryCentred::origin).coordinates().ToSpherical().longitude; } @@ -79,7 +79,7 @@ Interval MeanSolarTimesOfNodes( // Returns the interval spanned by the unwound angles // longitudes_of_equatorial_crossings[n] - initial_offset - n * Δλᴇ, -// where Δλᴇ is |nominal_recurrence.equatorial_shift()|, and the first angle is +// where Δλᴇ is `nominal_recurrence.equatorial_shift()`, and the first angle is // in [0, 2π]. inline Interval ReducedLongitudesOfEquatorialCrossings( std::vector const& longitudes_of_equatorial_crossings, @@ -102,8 +102,8 @@ inline Interval ReducedLongitudesOfEquatorialCrossings( inline Interval OrbitGroundTrack::EquatorCrossingLongitudes::longitudes_reduced_to_pass( int const pass_index) const { - // |shift| applies the number of equatorial shifts corresponding to the pass - // number; |reduction| puts the midpoint of the shifted interval in [0, 2π]. + // `shift` applies the number of equatorial shifts corresponding to the pass + // number; `reduction` puts the midpoint of the shifted interval in [0, 2π]. Angle shift; Interval longitudes; if (pass_index % 2 == 1) { @@ -180,7 +180,7 @@ OrbitGroundTrack::equator_crossing_longitudes( initial_offset); if (first_descending_pass_before_first_ascending_pass_) { // Since the first descending pass is before the first ascending pass, using - // the same offset in |ReducedLongitudesOfEquatorialCrossings| would compute + // the same offset in `ReducedLongitudesOfEquatorialCrossings` would compute // the longitude reduced to pass 0; adjust by one equatorial shift to get // pass 2. initial_offset -= Δλᴇ; diff --git a/astronomy/orbit_recurrence.hpp b/astronomy/orbit_recurrence.hpp index 3d5d521d43..ec6c254d05 100644 --- a/astronomy/orbit_recurrence.hpp +++ b/astronomy/orbit_recurrence.hpp @@ -47,7 +47,7 @@ class OrbitRecurrence final { // Returns the recurrence that mostly matches the given orbital // characteristics, limiting the value of |Cᴛₒ|. // The Nᴛₒ / Cᴛₒ of the result is the last convergent of the κ obtained from - // the given arguments whose denominator is less than |max_abs_Cᴛₒ|. + // the given arguments whose denominator is less than `max_abs_Cᴛₒ`. template static OrbitRecurrence ClosestRecurrence( Time const& nodal_period, diff --git a/astronomy/orbital_elements.hpp b/astronomy/orbital_elements.hpp index 0d9a04a1f1..28236f3e46 100644 --- a/astronomy/orbital_elements.hpp +++ b/astronomy/orbital_elements.hpp @@ -151,9 +151,9 @@ class OrbitalElements { private: OrbitalElements() = default; - // For |t| between |t_min| and |t_max|, - // |relative_degrees_of_freedom_at_time(t)| should return - // |DegreesOfFreedom|. + // For `t` between `t_min` and `t_max`, + // `relative_degrees_of_freedom_at_time(t)` should return + // `DegreesOfFreedom`. template static absl::StatusOr ForRelativeDegreesOfFreedom( RelativeDegreesOfFreedomComputation const& @@ -165,16 +165,16 @@ class OrbitalElements { bool fill_osculating_equinoctial_elements); // The functor EquinoctialElementsComputation must have the profile - // |EquinoctialElements(Instant const&)|. + // `EquinoctialElements(Instant const&)`. template static absl::StatusOr