TopocentricFrame.java

  1. /* Copyright 2002-2024 CS GROUP
  2.  * Licensed to CS GROUP (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.frames;

  18. import org.hipparchus.Field;
  19. import org.hipparchus.CalculusFieldElement;
  20. import org.hipparchus.analysis.UnivariateFunction;
  21. import org.hipparchus.analysis.solvers.BracketingNthOrderBrentSolver;
  22. import org.hipparchus.analysis.solvers.UnivariateSolver;
  23. import org.hipparchus.exception.MathRuntimeException;
  24. import org.hipparchus.geometry.euclidean.threed.FieldVector3D;
  25. import org.hipparchus.geometry.euclidean.threed.Rotation;
  26. import org.hipparchus.geometry.euclidean.threed.Vector3D;
  27. import org.hipparchus.util.FastMath;
  28. import org.hipparchus.util.FieldSinCos;
  29. import org.hipparchus.util.MathUtils;
  30. import org.hipparchus.util.SinCos;
  31. import org.orekit.bodies.BodyShape;
  32. import org.orekit.bodies.FieldGeodeticPoint;
  33. import org.orekit.bodies.GeodeticPoint;
  34. import org.orekit.errors.OrekitException;
  35. import org.orekit.time.AbsoluteDate;
  36. import org.orekit.time.FieldAbsoluteDate;
  37. import org.orekit.utils.Constants;
  38. import org.orekit.utils.FieldPVCoordinates;
  39. import org.orekit.utils.FieldTrackingCoordinates;
  40. import org.orekit.utils.PVCoordinates;
  41. import org.orekit.utils.PVCoordinatesProvider;
  42. import org.orekit.utils.TimeStampedPVCoordinates;
  43. import org.orekit.utils.TrackingCoordinates;


  44. /** Topocentric frame.
  45.  * <p>Frame associated to a position near the surface of a body shape.</p>
  46.  * <p>
  47.  * The origin of the frame is at the defining {@link GeodeticPoint geodetic point}
  48.  * location, and the right-handed canonical trihedra is:
  49.  * </p>
  50.  * <ul>
  51.  *   <li>X axis in the local horizontal plane (normal to zenith direction) and
  52.  *   following the local parallel towards East</li>
  53.  *   <li>Y axis in the horizontal plane (normal to zenith direction) and
  54.  *   following the local meridian towards North</li>
  55.  *   <li>Z axis towards Zenith direction</li>
  56.  * </ul>
  57.  * @author V&eacute;ronique Pommier-Maurussane
  58.  */
  59. public class TopocentricFrame extends Frame implements PVCoordinatesProvider {

  60.     /** Serializable UID. */
  61.     private static final long serialVersionUID = -5997915708080966466L;

  62.     /** Body shape on which the local point is defined. */
  63.     private final BodyShape parentShape;

  64.     /** Geodetic point where the topocentric frame is defined. */
  65.     private final GeodeticPoint point;

  66.     /** Cartesian point where the topocentric frame is defined.
  67.      * @since 12.0
  68.      */
  69.     private final Vector3D cartesianPoint;

  70.     /** Simple constructor.
  71.      * @param parentShape body shape on which the local point is defined
  72.      * @param point local surface point where topocentric frame is defined
  73.      * @param name the string representation
  74.      */
  75.     public TopocentricFrame(final BodyShape parentShape, final GeodeticPoint point,
  76.                             final String name) {

  77.         super(parentShape.getBodyFrame(),
  78.                 new Transform(AbsoluteDate.ARBITRARY_EPOCH,
  79.                         new Transform(AbsoluteDate.ARBITRARY_EPOCH,
  80.                                 parentShape.transform(point).negate()),
  81.                         new Transform(AbsoluteDate.ARBITRARY_EPOCH,
  82.                                 new Rotation(point.getEast(), point.getZenith(),
  83.                                         Vector3D.PLUS_I, Vector3D.PLUS_K),
  84.                                 Vector3D.ZERO)),
  85.                 name, false);
  86.         this.parentShape    = parentShape;
  87.         this.point          = point;
  88.         this.cartesianPoint = getTransformProvider().
  89.                 getStaticTransform(AbsoluteDate.ARBITRARY_EPOCH).
  90.                 getInverse().
  91.                 transformPosition(Vector3D.ZERO);
  92.     }

  93.     /** Get the body shape on which the local point is defined.
  94.      * @return body shape on which the local point is defined
  95.      */
  96.     public BodyShape getParentShape() {
  97.         return parentShape;
  98.     }

  99.     /** Get the surface point defining the origin of the frame.
  100.      * @return surface point defining the origin of the frame
  101.      */
  102.     public GeodeticPoint getPoint() {
  103.         return point;
  104.     }

  105.     /** Get the surface point defining the origin of the frame.
  106.      * @return surface point defining the origin of the frame in body frame
  107.      * @since 12.0
  108.      */
  109.     public Vector3D getCartesianPoint() {
  110.         return cartesianPoint;
  111.     }

  112.     /** Get the surface point defining the origin of the frame.
  113.      * @param <T> type of the elements
  114.      * @param field of the elements
  115.      * @return surface point defining the origin of the frame
  116.      * @since 9.3
  117.      */
  118.     public <T extends CalculusFieldElement<T>> FieldGeodeticPoint<T> getPoint(final Field<T> field) {
  119.         final T zero = field.getZero();
  120.         return new FieldGeodeticPoint<>(zero.newInstance(point.getLatitude()),
  121.                 zero.newInstance(point.getLongitude()),
  122.                 zero.newInstance(point.getAltitude()));
  123.     }

  124.     /** Get the zenith direction of topocentric frame, expressed in parent shape frame.
  125.      * <p>The zenith direction is defined as the normal to local horizontal plane.</p>
  126.      * @return unit vector in the zenith direction
  127.      * @see #getNadir()
  128.      */
  129.     public Vector3D getZenith() {
  130.         return point.getZenith();
  131.     }

  132.     /** Get the nadir direction of topocentric frame, expressed in parent shape frame.
  133.      * <p>The nadir direction is the opposite of zenith direction.</p>
  134.      * @return unit vector in the nadir direction
  135.      * @see #getZenith()
  136.      */
  137.     public Vector3D getNadir() {
  138.         return point.getNadir();
  139.     }

  140.     /** Get the north direction of topocentric frame, expressed in parent shape frame.
  141.      * <p>The north direction is defined in the horizontal plane
  142.      * (normal to zenith direction) and following the local meridian.</p>
  143.      * @return unit vector in the north direction
  144.      * @see #getSouth()
  145.      */
  146.     public Vector3D getNorth() {
  147.         return point.getNorth();
  148.     }

  149.     /** Get the south direction of topocentric frame, expressed in parent shape frame.
  150.      * <p>The south direction is the opposite of north direction.</p>
  151.      * @return unit vector in the south direction
  152.      * @see #getNorth()
  153.      */
  154.     public Vector3D getSouth() {
  155.         return point.getSouth();
  156.     }

  157.     /** Get the east direction of topocentric frame, expressed in parent shape frame.
  158.      * <p>The east direction is defined in the horizontal plane
  159.      * in order to complete direct triangle (east, north, zenith).</p>
  160.      * @return unit vector in the east direction
  161.      * @see #getWest()
  162.      */
  163.     public Vector3D getEast() {
  164.         return point.getEast();
  165.     }

  166.     /** Get the west direction of topocentric frame, expressed in parent shape frame.
  167.      * <p>The west direction is the opposite of east direction.</p>
  168.      * @return unit vector in the west direction
  169.      * @see #getEast()
  170.      */
  171.     public Vector3D getWest() {
  172.         return point.getWest();
  173.     }

  174.     /** Get the tracking coordinates of a point with regards to the local point.
  175.      * @param extPoint point for which elevation shall be computed
  176.      * @param frame frame in which the point is defined
  177.      * @param date computation date
  178.      * @return tracking coordinates of the point
  179.      * @since 12.0
  180.      */
  181.     public TrackingCoordinates getTrackingCoordinates(final Vector3D extPoint, final Frame frame,
  182.                                                       final AbsoluteDate date) {

  183.         // transform given point from given frame to topocentric frame
  184.         final Vector3D extPointTopo = transformPoint(extPoint, frame, date);

  185.         final double azimuth = computeAzimuthFromTopoPoint(extPointTopo);

  186.         return new TrackingCoordinates(azimuth, extPointTopo.getDelta(), extPointTopo.getNorm());

  187.     }

  188.     /** Get the tracking coordinates of a point with regards to the local point.
  189.      * @param <T> type of the field elements
  190.      * @param extPoint point for which elevation shall be computed
  191.      * @param frame frame in which the point is defined
  192.      * @param date computation date
  193.      * @return tracking coordinates of the point
  194.      * @since 12.0
  195.      */
  196.     public <T extends CalculusFieldElement<T>> FieldTrackingCoordinates<T> getTrackingCoordinates(final FieldVector3D<T> extPoint,
  197.                                                                                                   final Frame frame,
  198.                                                                                                   final FieldAbsoluteDate<T> date) {

  199.         // Transform given point from given frame to topocentric frame
  200.         final FieldVector3D<T> extPointTopo = transformPoint(extPoint, frame, date);

  201.         final T azimuth = computeAzimuthFromTopoPoint(extPointTopo);

  202.         return new FieldTrackingCoordinates<>(azimuth, extPointTopo.getDelta(), extPointTopo.getNorm());

  203.     }

  204.     /** Get the elevation of a point with regards to the local point.
  205.      * <p>The elevation is the angle between the local horizontal and
  206.      * the direction from local point to given point.</p>
  207.      * @param extPoint point for which elevation shall be computed
  208.      * @param frame frame in which the point is defined
  209.      * @param date computation date
  210.      * @return elevation of the point
  211.      */
  212.     public double getElevation(final Vector3D extPoint, final Frame frame,
  213.                                final AbsoluteDate date) {

  214.         // Transform given point from given frame to topocentric frame
  215.         final Vector3D extPointTopo = transformPoint(extPoint, frame, date);

  216.         return extPointTopo.getDelta();
  217.     }

  218.     /** Get the elevation of a point with regards to the local point.
  219.      * <p>The elevation is the angle between the local horizontal and
  220.      * the direction from local point to given point.</p>
  221.      * @param <T> type of the elements
  222.      * @param extPoint point for which elevation shall be computed
  223.      * @param frame frame in which the point is defined
  224.      * @param date computation date
  225.      * @return elevation of the point
  226.      * @since 9.3
  227.      */
  228.     public <T extends CalculusFieldElement<T>> T getElevation(final FieldVector3D<T> extPoint, final Frame frame,
  229.                                                               final FieldAbsoluteDate<T> date) {

  230.         // Transform given point from given frame to topocentric frame
  231.         final FieldVector3D<T> extPointTopo = transformPoint(extPoint, frame, date);

  232.         return extPointTopo.getDelta();
  233.     }

  234.     /** Get the azimuth of a point with regards to the topocentric frame center point.
  235.      * <p>The azimuth is the angle between the North direction at local point and
  236.      * the projection in local horizontal plane of the direction from local point
  237.      * to given point. Azimuth angles are counted clockwise, i.e positive towards the East.</p>
  238.      * @param extPoint point for which elevation shall be computed
  239.      * @param frame frame in which the point is defined
  240.      * @param date computation date
  241.      * @return azimuth of the point
  242.      */
  243.     public double getAzimuth(final Vector3D extPoint, final Frame frame,
  244.                              final AbsoluteDate date) {

  245.         // Transform given point from given frame to topocentric frame
  246.         final Vector3D extPointTopo = transformPoint(extPoint, frame, date);

  247.         return computeAzimuthFromTopoPoint(extPointTopo);

  248.     }

  249.     /** Get the azimuth of a point with regards to the topocentric frame center point.
  250.      * <p>The azimuth is the angle between the North direction at local point and
  251.      * the projection in local horizontal plane of the direction from local point
  252.      * to given point. Azimuth angles are counted clockwise, i.e positive towards the East.</p>
  253.      * @param <T> type of the elements
  254.      * @param extPoint point for which elevation shall be computed
  255.      * @param frame frame in which the point is defined
  256.      * @param date computation date
  257.      * @return azimuth of the point
  258.      * @since 9.3
  259.      */
  260.     public <T extends CalculusFieldElement<T>> T getAzimuth(final FieldVector3D<T> extPoint, final Frame frame,
  261.                                                             final FieldAbsoluteDate<T> date) {

  262.         // Transform given point from given frame to topocentric frame
  263.         final FieldVector3D<T> extPointTopo = transformPoint(extPoint, frame, date);

  264.         return computeAzimuthFromTopoPoint(extPointTopo);

  265.     }

  266.     /** Get the range of a point with regards to the topocentric frame center point.
  267.      * @param extPoint point for which range shall be computed
  268.      * @param frame frame in which the point is defined
  269.      * @param date computation date
  270.      * @return range (distance) of the point
  271.      */
  272.     public double getRange(final Vector3D extPoint, final Frame frame,
  273.                            final AbsoluteDate date) {

  274.         // Transform given point from given frame to topocentric frame
  275.         final Vector3D extPointTopo = transformPoint(extPoint, frame, date);

  276.         return extPointTopo.getNorm();

  277.     }

  278.     /** Get the range of a point with regards to the topocentric frame center point.
  279.      * @param <T> type of the elements
  280.      * @param extPoint point for which range shall be computed
  281.      * @param frame frame in which the point is defined
  282.      * @param date computation date
  283.      * @return range (distance) of the point
  284.      * @since 9.3
  285.      */
  286.     public <T extends CalculusFieldElement<T>> T getRange(final FieldVector3D<T> extPoint, final Frame frame,
  287.                                                           final FieldAbsoluteDate<T> date) {

  288.         // Transform given point from given frame to topocentric frame
  289.         final FieldVector3D<T> extPointTopo = transformPoint(extPoint, frame, date);

  290.         return extPointTopo.getNorm();

  291.     }

  292.     /** Get the range rate of a point with regards to the topocentric frame center point.
  293.      * @param extPV point/velocity for which range rate shall be computed
  294.      * @param frame frame in which the point is defined
  295.      * @param date computation date
  296.      * @return range rate of the point (positive if point departs from frame)
  297.      */
  298.     public double getRangeRate(final PVCoordinates extPV, final Frame frame,
  299.                                final AbsoluteDate date) {

  300.         // Transform given point from given frame to topocentric frame
  301.         final KinematicTransform t = frame.getKinematicTransformTo(this, date);
  302.         final PVCoordinates extPVTopo = t.transformOnlyPV(extPV);

  303.         // Compute range rate (doppler) : relative rate along the line of sight
  304.         return Vector3D.dotProduct(extPVTopo.getPosition(), extPVTopo.getVelocity()) /
  305.                 extPVTopo.getPosition().getNorm();

  306.     }

  307.     /** Get the range rate of a point with regards to the topocentric frame center point.
  308.      * @param <T> type of the elements
  309.      * @param extPV point/velocity for which range rate shall be computed
  310.      * @param frame frame in which the point is defined
  311.      * @param date computation date
  312.      * @return range rate of the point (positive if point departs from frame)
  313.      * @since 9.3
  314.      */
  315.     public <T extends CalculusFieldElement<T>> T getRangeRate(final FieldPVCoordinates<T> extPV, final Frame frame,
  316.                                                               final FieldAbsoluteDate<T> date) {

  317.         // Transform given point from given frame to topocentric frame
  318.         final FieldKinematicTransform<T> t = frame.getKinematicTransformTo(this, date);
  319.         final FieldPVCoordinates<T> extPVTopo = t.transformOnlyPV(extPV);

  320.         // Compute range rate (doppler) : relative rate along the line of sight
  321.         return FieldVector3D.dotProduct(extPVTopo.getPosition(), extPVTopo.getVelocity()).divide(
  322.                 extPVTopo.getPosition().getNorm());

  323.     }

  324.     /**
  325.      * Compute the limit visibility point for a satellite in a given direction.
  326.      * <p>
  327.      * This method can be used to compute visibility circles around ground stations
  328.      * for example, using a simple loop on azimuth, with either a fixed elevation
  329.      * or an elevation that depends on azimuth to take ground masks into account.
  330.      * </p>
  331.      * @param radius satellite distance to Earth center
  332.      * @param azimuth pointing azimuth from station
  333.      * @param elevation pointing elevation from station
  334.      * @return limit visibility point for the satellite
  335.      */
  336.     public GeodeticPoint computeLimitVisibilityPoint(final double radius,
  337.                                                      final double azimuth, final double elevation) {
  338.         try {
  339.             // convergence threshold on point position: 1mm
  340.             final double deltaP = 0.001;
  341.             final UnivariateSolver solver =
  342.                     new BracketingNthOrderBrentSolver(deltaP / Constants.WGS84_EARTH_EQUATORIAL_RADIUS,
  343.                             deltaP, deltaP, 5);

  344.             // find the distance such that a point in the specified direction and at the solved-for
  345.             // distance is exactly at the specified radius
  346.             final double distance = solver.solve(1000, new UnivariateFunction() {
  347.                 /** {@inheritDoc} */
  348.                 public double value(final double x) {
  349.                     final GeodeticPoint gp = pointAtDistance(azimuth, elevation, x);
  350.                     return parentShape.transform(gp).getNorm() - radius;
  351.                 }
  352.             }, 0, 2 * radius);

  353.             // return the limit point
  354.             return pointAtDistance(azimuth, elevation, distance);

  355.         } catch (MathRuntimeException mrte) {
  356.             throw new OrekitException(mrte);
  357.         }
  358.     }

  359.     /** Compute the point observed from the station at some specified distance.
  360.      * @param azimuth pointing azimuth from station
  361.      * @param elevation pointing elevation from station
  362.      * @param distance distance to station
  363.      * @return observed point
  364.      */
  365.     public GeodeticPoint pointAtDistance(final double azimuth, final double elevation,
  366.                                          final double distance) {
  367.         final SinCos scAz  = FastMath.sinCos(azimuth);
  368.         final SinCos scEl  = FastMath.sinCos(elevation);
  369.         final Vector3D  observed = new Vector3D(distance * scEl.cos() * scAz.sin(),
  370.                 distance * scEl.cos() * scAz.cos(),
  371.                 distance * scEl.sin());
  372.         return parentShape.transform(observed, this, AbsoluteDate.ARBITRARY_EPOCH);
  373.     }

  374.     /** {@inheritDoc} */
  375.     @Override
  376.     public Vector3D getPosition(final AbsoluteDate date, final Frame frame) {
  377.         return getStaticTransformTo(frame, date).transformPosition(Vector3D.ZERO);
  378.     }

  379.     /** Get the {@link PVCoordinates} of the topocentric frame origin in the selected frame.
  380.      * @param date current date
  381.      * @param frame the frame where to define the position
  382.      * @return position/velocity of the topocentric frame origin (m and m/s)
  383.      */
  384.     public TimeStampedPVCoordinates getPVCoordinates(final AbsoluteDate date, final Frame frame) {
  385.         return getTransformTo(frame, date).transformPVCoordinates(new TimeStampedPVCoordinates(date,
  386.                 Vector3D.ZERO,
  387.                 Vector3D.ZERO,
  388.                 Vector3D.ZERO));
  389.     }

  390.     /** Get the topocentric position from {@link TrackingCoordinates}.
  391.      * @param coords The coordinates that are to be converted.
  392.      * @return The topocentric coordinates.
  393.      * @since 12.1
  394.      */
  395.     public static Vector3D getTopocentricPosition(final TrackingCoordinates coords) {
  396.         return getTopocentricPosition(coords.getAzimuth(), coords.getElevation(), coords.getRange());
  397.     }

  398.     /** Get the topocentric position from {@link FieldTrackingCoordinates}.
  399.      * @param coords The coordinates that are to be converted.
  400.      * @param <T> Type of the field coordinates.
  401.      * @return The topocentric coordinates.
  402.      * @since 12.1
  403.      */
  404.     public static <T extends CalculusFieldElement<T>> FieldVector3D<T> getTopocentricPosition(final FieldTrackingCoordinates<T> coords) {
  405.         return getTopocentricPosition(coords.getAzimuth(), coords.getElevation(), coords.getRange());
  406.     }

  407.     /**
  408.      * Gets the topocentric position from a set of az/el/ra coordinates.
  409.      * @param azimuth the angle of rotation around the vertical axis, going East.
  410.      * @param elevation the elevation angle from the local horizon.
  411.      * @param range the distance from the goedetic position.
  412.      * @return the topocentric position.
  413.      * @since 12.1
  414.      */
  415.     private static Vector3D getTopocentricPosition(final double azimuth, final double elevation, final double range) {
  416.         final SinCos sinCosAz = FastMath.sinCos(azimuth);
  417.         final SinCos sinCosEL = FastMath.sinCos(elevation);
  418.         return new Vector3D(range * sinCosEL.cos() * sinCosAz.sin(), range * sinCosEL.cos() * sinCosAz.cos(), range * sinCosEL.sin());
  419.     }

  420.     /**
  421.      * Gets the topocentric position from a set of az/el/ra coordinates.
  422.      * @param azimuth the angle of rotation around the vertical axis, going East.
  423.      * @param elevation the elevation angle from the local horizon.
  424.      * @param range the distance from the geodetic position.
  425.      * @return the topocentric position.
  426.      * @param <T> the type of the az/el/ra coordinates.
  427.      * @since 12.1
  428.      */
  429.     private static <T extends CalculusFieldElement<T>> FieldVector3D<T> getTopocentricPosition(final T azimuth, final T elevation, final T range) {
  430.         final FieldSinCos<T> sinCosAz = FastMath.sinCos(azimuth);
  431.         final FieldSinCos<T> sinCosEl = FastMath.sinCos(elevation);
  432.         return new FieldVector3D<>(
  433.                 range.multiply(sinCosEl.cos()).multiply(sinCosAz.sin()),
  434.                 range.multiply(sinCosEl.cos()).multiply(sinCosAz.cos()),
  435.                 range.multiply(sinCosEl.sin())
  436.         );
  437.     }

  438.     /** Transform point in topocentric frame.
  439.      * @param extPoint point
  440.      * @param date current date
  441.      * @param frame the frame where to define the position
  442.      * @return transformed point in topocentric frame
  443.      */
  444.     private Vector3D transformPoint(final Vector3D extPoint, final Frame frame, final AbsoluteDate date) {
  445.         final StaticTransform t = frame.getStaticTransformTo(this, date);
  446.         return t.transformPosition(extPoint);
  447.     }

  448.     /** Transform point in topocentric frame.
  449.      * @param <T> type of the field elements
  450.      * @param extPoint point
  451.      * @param date current date
  452.      * @param frame the frame where to define the position
  453.      * @return transformed point in topocentric frame
  454.      */
  455.     private <T extends CalculusFieldElement<T>> FieldVector3D<T> transformPoint(final FieldVector3D<T> extPoint,
  456.                                                                                 final Frame frame,
  457.                                                                                 final FieldAbsoluteDate<T> date) {
  458.         final FieldStaticTransform<T> t = frame.getStaticTransformTo(this, date);
  459.         return t.transformPosition(extPoint);
  460.     }

  461.     /** Compute azimuth from topocentric point.
  462.      * @param extPointTopo topocentric point
  463.      * @return azimuth
  464.      */
  465.     private double computeAzimuthFromTopoPoint(final Vector3D extPointTopo) {
  466.         final double azimuth = FastMath.atan2(extPointTopo.getX(), extPointTopo.getY());
  467.         if (azimuth < 0.0) {
  468.             return azimuth + MathUtils.TWO_PI;
  469.         } else {
  470.             return azimuth;
  471.         }
  472.     }

  473.     /** Compute azimuth from topocentric point.
  474.      * @param <T> type of the field elements
  475.      * @param extPointTopo topocentric point
  476.      * @return azimuth
  477.      */
  478.     private <T extends CalculusFieldElement<T>> T computeAzimuthFromTopoPoint(final FieldVector3D<T> extPointTopo) {
  479.         final T azimuth = FastMath.atan2(extPointTopo.getX(), extPointTopo.getY());
  480.         if (azimuth.getReal() < 0.0) {
  481.             return azimuth.add(MathUtils.TWO_PI);
  482.         } else {
  483.             return azimuth;
  484.         }
  485.     }

  486. }