Commit 5600aca5 authored by Luc Maisonobe's avatar Luc Maisonobe

Merge branch 'issue-498' into develop

parents 0b386fbe 82ab1f43
...@@ -175,6 +175,9 @@ ...@@ -175,6 +175,9 @@
<contributor> <contributor>
<name>Espen Bj&#248;rntvedt</name> <name>Espen Bj&#248;rntvedt</name>
</contributor> </contributor>
<contributor>
<name>Bryan Cazabonne</name>
</contributor>
<contributor> <contributor>
<name>Paul Cefola</name> <name>Paul Cefola</name>
</contributor> </contributor>
......
...@@ -218,7 +218,10 @@ public enum OrekitMessages implements Localizable { ...@@ -218,7 +218,10 @@ public enum OrekitMessages implements Localizable {
DIMENSION_INCONSISTENT_WITH_PARAMETERS("dimension {0} is inconsistent with parameters list: {1}"), DIMENSION_INCONSISTENT_WITH_PARAMETERS("dimension {0} is inconsistent with parameters list: {1}"),
NOT_A_SUPPORTED_UNIX_COMPRESSED_FILE("file {0} is not a supported Unix-compressed file"), NOT_A_SUPPORTED_UNIX_COMPRESSED_FILE("file {0} is not a supported Unix-compressed file"),
UNEXPECTED_END_OF_FILE("unexpected end of file {0}"), UNEXPECTED_END_OF_FILE("unexpected end of file {0}"),
CORRUPTED_FILE("file {0} is corrupted"); CORRUPTED_FILE("file {0} is corrupted"),
VIENNA_ACOEF_OR_ZENITH_DELAY_NOT_LOADED("Vienna coefficients ah or aw or zh or zw could not be loaded from {0}"),
VIENNA_ACOEF_OR_ZENITH_DELAY_NOT_AVAILABLE_FOR_DATE("Vienna coefficients ah or aw or zh or zw not available for date {0}"),
NO_VIENNA_ACOEF_OR_ZENITH_DELAY_IN_FILE("file {0} does not contain Vienna coefficients ah, aw, zh or zw");
// CHECKSTYLE: resume JavadocVariable check // CHECKSTYLE: resume JavadocVariable check
......
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
*/ */
package org.orekit.estimation.measurements.modifiers; package org.orekit.estimation.measurements.modifiers;
import java.util.Collections;
import java.util.List; import java.util.List;
import org.hipparchus.geometry.euclidean.threed.Vector3D; import org.hipparchus.geometry.euclidean.threed.Vector3D;
...@@ -26,7 +25,7 @@ import org.orekit.estimation.measurements.EstimatedMeasurement; ...@@ -26,7 +25,7 @@ import org.orekit.estimation.measurements.EstimatedMeasurement;
import org.orekit.estimation.measurements.EstimationModifier; import org.orekit.estimation.measurements.EstimationModifier;
import org.orekit.estimation.measurements.GroundStation; import org.orekit.estimation.measurements.GroundStation;
import org.orekit.frames.Frame; import org.orekit.frames.Frame;
import org.orekit.models.earth.TroposphericModel; import org.orekit.models.earth.DiscreteTroposphericModel;
import org.orekit.propagation.SpacecraftState; import org.orekit.propagation.SpacecraftState;
import org.orekit.time.AbsoluteDate; import org.orekit.time.AbsoluteDate;
import org.orekit.utils.Constants; import org.orekit.utils.Constants;
...@@ -47,13 +46,13 @@ import org.orekit.utils.ParameterDriver; ...@@ -47,13 +46,13 @@ import org.orekit.utils.ParameterDriver;
public class AngularTroposphericDelayModifier implements EstimationModifier<AngularAzEl> { public class AngularTroposphericDelayModifier implements EstimationModifier<AngularAzEl> {
/** Tropospheric delay model. */ /** Tropospheric delay model. */
private final TroposphericModel tropoModel; private final DiscreteTroposphericModel tropoModel;
/** Constructor. /** Constructor.
* *
* @param model Tropospheric delay model appropriate for the current angular measurement method. * @param model Tropospheric delay model appropriate for the current angular measurement method.
*/ */
public AngularTroposphericDelayModifier(final TroposphericModel model) { public AngularTroposphericDelayModifier(final DiscreteTroposphericModel model) {
tropoModel = model; tropoModel = model;
} }
...@@ -89,7 +88,7 @@ public class AngularTroposphericDelayModifier implements EstimationModifier<Angu ...@@ -89,7 +88,7 @@ public class AngularTroposphericDelayModifier implements EstimationModifier<Angu
final double height = getStationHeightAMSL(station); final double height = getStationHeightAMSL(station);
// delay in meters // delay in meters
final double delay = tropoModel.pathDelay(elevation, height); final double delay = tropoModel.pathDelay(elevation, height, tropoModel.getParameters(), state.getDate());
// one-way measurement. // one-way measurement.
return delay; return delay;
...@@ -101,7 +100,7 @@ public class AngularTroposphericDelayModifier implements EstimationModifier<Angu ...@@ -101,7 +100,7 @@ public class AngularTroposphericDelayModifier implements EstimationModifier<Angu
/** {@inheritDoc} */ /** {@inheritDoc} */
@Override @Override
public List<ParameterDriver> getParametersDrivers() { public List<ParameterDriver> getParametersDrivers() {
return Collections.emptyList(); return tropoModel.getParametersDrivers();
} }
@Override @Override
......
...@@ -16,19 +16,25 @@ ...@@ -16,19 +16,25 @@
*/ */
package org.orekit.frames; package org.orekit.frames;
import org.hipparchus.Field;
import org.hipparchus.RealFieldElement;
import org.hipparchus.analysis.UnivariateFunction; import org.hipparchus.analysis.UnivariateFunction;
import org.hipparchus.analysis.solvers.BracketingNthOrderBrentSolver; import org.hipparchus.analysis.solvers.BracketingNthOrderBrentSolver;
import org.hipparchus.analysis.solvers.UnivariateSolver; import org.hipparchus.analysis.solvers.UnivariateSolver;
import org.hipparchus.exception.MathRuntimeException; import org.hipparchus.exception.MathRuntimeException;
import org.hipparchus.geometry.euclidean.threed.FieldVector3D;
import org.hipparchus.geometry.euclidean.threed.Rotation; import org.hipparchus.geometry.euclidean.threed.Rotation;
import org.hipparchus.geometry.euclidean.threed.Vector3D; import org.hipparchus.geometry.euclidean.threed.Vector3D;
import org.hipparchus.util.FastMath; import org.hipparchus.util.FastMath;
import org.hipparchus.util.MathUtils; import org.hipparchus.util.MathUtils;
import org.orekit.bodies.BodyShape; import org.orekit.bodies.BodyShape;
import org.orekit.bodies.FieldGeodeticPoint;
import org.orekit.bodies.GeodeticPoint; import org.orekit.bodies.GeodeticPoint;
import org.orekit.errors.OrekitException; import org.orekit.errors.OrekitException;
import org.orekit.time.AbsoluteDate; import org.orekit.time.AbsoluteDate;
import org.orekit.time.FieldAbsoluteDate;
import org.orekit.utils.Constants; import org.orekit.utils.Constants;
import org.orekit.utils.FieldPVCoordinates;
import org.orekit.utils.PVCoordinates; import org.orekit.utils.PVCoordinates;
import org.orekit.utils.PVCoordinatesProvider; import org.orekit.utils.PVCoordinatesProvider;
import org.orekit.utils.TimeStampedPVCoordinates; import org.orekit.utils.TimeStampedPVCoordinates;
...@@ -95,6 +101,19 @@ public class TopocentricFrame extends Frame implements PVCoordinatesProvider { ...@@ -95,6 +101,19 @@ public class TopocentricFrame extends Frame implements PVCoordinatesProvider {
return point; return point;
} }
/** Get the surface point defining the origin of the frame.
* @param <T> tyoe of the elements
* @param field of the elements
* @return surface point defining the origin of the frame
* @since 9.3
*/
public <T extends RealFieldElement<T>> FieldGeodeticPoint<T> getPoint(final Field<T> field) {
final T zero = field.getZero();
return new FieldGeodeticPoint<>(zero.add(point.getLatitude()),
zero.add(point.getLongitude()),
zero.add(point.getAltitude()));
}
/** Get the zenith direction of topocentric frame, expressed in parent shape frame. /** Get the zenith direction of topocentric frame, expressed in parent shape frame.
* <p>The zenith direction is defined as the normal to local horizontal plane.</p> * <p>The zenith direction is defined as the normal to local horizontal plane.</p>
* @return unit vector in the zenith direction * @return unit vector in the zenith direction
...@@ -170,6 +189,27 @@ public class TopocentricFrame extends Frame implements PVCoordinatesProvider { ...@@ -170,6 +189,27 @@ public class TopocentricFrame extends Frame implements PVCoordinatesProvider {
return extPointTopo.getDelta(); return extPointTopo.getDelta();
} }
/** Get the elevation of a point with regards to the local point.
* <p>The elevation is the angle between the local horizontal and
* the direction from local point to given point.</p>
* @param <T> type of the elements
* @param extPoint point for which elevation shall be computed
* @param frame frame in which the point is defined
* @param date computation date
* @return elevation of the point
* @since 9.3
*/
public <T extends RealFieldElement<T>> T getElevation(final FieldVector3D<T> extPoint, final Frame frame,
final FieldAbsoluteDate<T> date) {
// Transform given point from given frame to topocentric frame
final FieldTransform<T> t = frame.getTransformTo(this, date);
final FieldVector3D<T> extPointTopo = t.transformPosition(extPoint);
// Elevation angle is PI/2 - angle between zenith and given point direction
return extPointTopo.getDelta();
}
/** Get the azimuth of a point with regards to the topocentric frame center point. /** Get the azimuth of a point with regards to the topocentric frame center point.
* <p>The azimuth is the angle between the North direction at local point and * <p>The azimuth is the angle between the North direction at local point and
* the projection in local horizontal plane of the direction from local point * the projection in local horizontal plane of the direction from local point
...@@ -195,6 +235,33 @@ public class TopocentricFrame extends Frame implements PVCoordinatesProvider { ...@@ -195,6 +235,33 @@ public class TopocentricFrame extends Frame implements PVCoordinatesProvider {
} }
/** Get the azimuth of a point with regards to the topocentric frame center point.
* <p>The azimuth is the angle between the North direction at local point and
* the projection in local horizontal plane of the direction from local point
* to given point. Azimuth angles are counted clockwise, i.e positive towards the East.</p>
* @param <T> type of the elements
* @param extPoint point for which elevation shall be computed
* @param frame frame in which the point is defined
* @param date computation date
* @return azimuth of the point
* @since 9.3
*/
public <T extends RealFieldElement<T>> T getAzimuth(final FieldVector3D<T> extPoint, final Frame frame,
final FieldAbsoluteDate<T> date) {
// Transform given point from given frame to topocentric frame
final FieldTransform<T> t = getTransformTo(frame, date).getInverse();
final FieldVector3D<T> extPointTopo = t.transformPosition(extPoint);
// Compute azimuth
T azimuth = FastMath.atan2(extPointTopo.getX(), extPointTopo.getY());
if (azimuth.getReal() < 0.) {
azimuth = azimuth.add(MathUtils.TWO_PI);
}
return azimuth;
}
/** Get the range of a point with regards to the topocentric frame center point. /** Get the range of a point with regards to the topocentric frame center point.
* @param extPoint point for which range shall be computed * @param extPoint point for which range shall be computed
* @param frame frame in which the point is defined * @param frame frame in which the point is defined
...@@ -213,6 +280,26 @@ public class TopocentricFrame extends Frame implements PVCoordinatesProvider { ...@@ -213,6 +280,26 @@ public class TopocentricFrame extends Frame implements PVCoordinatesProvider {
} }
/** Get the range of a point with regards to the topocentric frame center point.
* @param <T> type of the elements
* @param extPoint point for which range shall be computed
* @param frame frame in which the point is defined
* @param date computation date
* @return range (distance) of the point
* @since 9.3
*/
public <T extends RealFieldElement<T>> T getRange(final FieldVector3D<T> extPoint, final Frame frame,
final FieldAbsoluteDate<T> date) {
// Transform given point from given frame to topocentric frame
final FieldTransform<T> t = frame.getTransformTo(this, date);
final FieldVector3D<T> extPointTopo = t.transformPosition(extPoint);
// Compute range
return extPointTopo.getNorm();
}
/** Get the range rate of a point with regards to the topocentric frame center point. /** Get the range rate of a point with regards to the topocentric frame center point.
* @param extPV point/velocity for which range rate shall be computed * @param extPV point/velocity for which range rate shall be computed
* @param frame frame in which the point is defined * @param frame frame in which the point is defined
...@@ -232,6 +319,27 @@ public class TopocentricFrame extends Frame implements PVCoordinatesProvider { ...@@ -232,6 +319,27 @@ public class TopocentricFrame extends Frame implements PVCoordinatesProvider {
} }
/** Get the range rate of a point with regards to the topocentric frame center point.
* @param <T> type of the elements
* @param extPV point/velocity for which range rate shall be computed
* @param frame frame in which the point is defined
* @param date computation date
* @return range rate of the point (positive if point departs from frame)
* @since 9.3
*/
public <T extends RealFieldElement<T>> T getRangeRate(final FieldPVCoordinates<T> extPV, final Frame frame,
final FieldAbsoluteDate<T> date) {
// Transform given point from given frame to topocentric frame
final FieldTransform<T> t = frame.getTransformTo(this, date);
final FieldPVCoordinates<T> extPVTopo = t.transformPVCoordinates(extPV);
// Compute range rate (doppler) : relative rate along the line of sight
return FieldVector3D.dotProduct(extPVTopo.getPosition(), extPVTopo.getVelocity()).divide(
extPVTopo.getPosition().getNorm());
}
/** /**
* Compute the limit visibility point for a satellite in a given direction. * Compute the limit visibility point for a satellite in a given direction.
* <p> * <p>
......
/* Copyright 2011-2012 Space Applications Services
* Licensed to CS Communication & Systèmes (CS) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* CS licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.orekit.models.earth;
import org.hipparchus.RealFieldElement;
import org.orekit.time.AbsoluteDate;
import org.orekit.time.FieldAbsoluteDate;
/** Defines a tropospheric model, used to calculate the path delay imposed to
* electro-magnetic signals between an orbital satellite and a ground station.
* <p>
* Models that implement this interface split the delay into hydrostatic
* and non-hydrostatic part:
* </p>
* <pre>
* δ = δ<sub>h</sub> + δ<sub>nh</sub>
* </pre>
* With:
* <ul>
* <li> δ<sub>h</sub> = hydrostatic delay </li>
* <li> δ<sub>nh</sub> = non-hydrostatic (or wet) delay </li>
* </ul>
* @author Bryan Cazabonne
*/
public interface DiscreteTroposphericModel extends MappingFunction {
/** Calculates the tropospheric path delay for the signal path from a ground
* station to a satellite.
*
* @param elevation the elevation of the satellite, in radians
* @param height the height of the station in m above sea level
* @param parameters tropospheric model parameters.
* @param date current date
* @return the path delay due to the troposphere in m
*/
double pathDelay(double elevation, double height, double[] parameters, AbsoluteDate date);
/** Calculates the tropospheric path delay for the signal path from a ground
* station to a satellite.
*
* @param <T> type of the elements
* @param elevation the elevation of the satellite, in radians
* @param height the height of the station in m above sea level
* @param parameters tropospheric model parameters.
* @param date current date
* @return the path delay due to the troposphere in m
*/
<T extends RealFieldElement<T>> T pathDelay(T elevation, T height, T[] parameters, FieldAbsoluteDate<T> date);
/** This method allows the computation of the zenith hydrostatic and
* zenith wet delay. The resulting element is an array having the following form:
* <ul>
* <li>double[0] = D<sub>hz</sub> -&gt zenith hydrostatic delay
* <li>double[1] = D<sub>wz</sub> -&gt zenith wet delay
* </ul>
* @param height the height of the station in m above sea level.
* @param parameters tropospheric model parameters.
* @param date current date
* @return a two components array containing the zenith hydrostatic and wet delays.
*/
double[] computeZenithDelay(double height, double[] parameters, AbsoluteDate date);
/** This method allows the computation of the zenith hydrostatic and
* zenith wet delay. The resulting element is an array having the following form:
* <ul>
* <li>T[0] = D<sub>hz</sub> -&gt zenith hydrostatic delay
* <li>T[1] = D<sub>wz</sub> -&gt zenith wet delay
* </ul>
* @param <T> type of the elements
* @param height the height of the station in m above sea level.
* @param parameters tropospheric model parameters.
* @param date current date
* @return a two components array containing the zenith hydrostatic and wet delays.
*/
<T extends RealFieldElement<T>> T[] computeZenithDelay(T height, T[] parameters, FieldAbsoluteDate<T> date);
}
/* Copyright 2002-2019 CS Systèmes d'Information
* Licensed to CS Systèmes d'Information (CS) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* CS licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.orekit.models.earth;
import java.util.Collections;
import java.util.List;
import org.hipparchus.Field;
import org.hipparchus.RealFieldElement;
import org.hipparchus.util.FastMath;
import org.hipparchus.util.MathArrays;
import org.orekit.time.AbsoluteDate;
import org.orekit.time.FieldAbsoluteDate;
import org.orekit.utils.ParameterDriver;
/** An estimated tropospheric model. The tropospheric delay is computed according to the formula:
* <pre>
* δ = δ<sub>h</sub> * m<sub>h</sub> + (δ<sub>t</sub> - δ<sub>h</sub>) * m<sub>w</sub>
* </pre>
* With:
* <ul>
* <li>δ<sub>h</sub>: Tropospheric zenith hydro-static delay.</li>
* <li>δ<sub>t</sub>: Tropospheric total zenith delay.</li>
* <li>m<sub>h</sub>: Hydro-static mapping function.</li>
* <li>m<sub>w</sub>: Wet mapping function.</li>
* </ul>
* <p>
* The mapping functions m<sub>h</sub>(e) and m<sub>w</sub>(e) are
* computed thanks to a {@link #model} initialized by the user.
* The user has the possiblility to use several mapping function models for the computations:
* the {@link GlobalMappingFunctionModel Global Mapping Function}, or
* the {@link NiellMappingFunctionModel Niell Mapping Function}
* </p> <p>
* The tropospheric zenith delay δ<sub>h</sub> is computed empirically with a {@link SaastamoinenModel}
* while the tropospheric total zenith delay δ<sub>t</sub> is estimated as a {@link ParameterDriver}
*/
public class EstimatedTroposphericModel implements DiscreteTroposphericModel {
/** Name of the parameter of this model: the total zenith delay. */
public static final String TOTAL_ZENITH_DELAY = "total zenith delay";
/** Serializable UID. */
private static final long serialVersionUID = 3550108249909528948L;
/** Mapping Function model. */
private final MappingFunction model;
/** Driver for the tropospheric zenith total delay.*/
private final ParameterDriver totalZenithDelay;
/** The temperature at the station [K]. */
private double t0;
/** The atmospheric pressure [mbar]. */
private double p0;
/** Build a new instance using the given environmental conditions.
* @param t0 the temperature at the station [K]
* @param p0 the atmospheric pressure at the station [mbar]
* @param model mapping function model (NMF or GMF).
* @param totalDelay initial value for the tropospheric zenith total delay [m]
*/
public EstimatedTroposphericModel(final double t0, final double p0,
final MappingFunction model, final double totalDelay) {
totalZenithDelay = new ParameterDriver(EstimatedTroposphericModel.TOTAL_ZENITH_DELAY,
totalDelay, FastMath.scalb(1.0, 0), 0.0, Double.POSITIVE_INFINITY);
this.t0 = t0;
this.p0 = p0;
this.model = model;
}
/** Build a new instance using a standard atmosphere model.
* <ul>
* <li>temperature: 18 degree Celsius
* <li>pressure: 1013.25 mbar
* </ul>
* @param model mapping function model (NMF or GMF).
* @param totalDelay initial value for the tropospheric zenith total delay [m]
*/
public EstimatedTroposphericModel(final MappingFunction model, final double totalDelay) {
this(273.15 + 18.0, 1013.25, model, totalDelay);
}
@Override
public double[] mappingFactors(final double elevation, final double height,
final double[] parameters, final AbsoluteDate date) {
return model.mappingFactors(elevation, height, parameters, date);
}
@Override
public <T extends RealFieldElement<T>> T[] mappingFactors(final T elevation, final T height,
final T[] parameters, final FieldAbsoluteDate<T> date) {
return model.mappingFactors(elevation, height, parameters, date);
}
@Override
public List<ParameterDriver> getParametersDrivers() {
return Collections.singletonList(totalZenithDelay);
}
@Override
public double pathDelay(final double elevation, final double height,
final double[] parameters, final AbsoluteDate date) {
// Mapping functions
final double[] mf = mappingFactors(elevation, height, parameters, date);
// Zenith delays
final double[] delays = computeZenithDelay(height, parameters, date);
// Total delay
return mf[0] * delays[0] + mf[1] * (delays[1] - delays[0]);
}
@Override
public <T extends RealFieldElement<T>> T pathDelay(final T elevation, final T height,
final T[] parameters, final FieldAbsoluteDate<T> date) {
// Mapping functions
final T[] mf = mappingFactors(elevation, height, parameters, date);
// Zenith delays
final T[] delays = computeZenithDelay(height, parameters, date);
// Total delay
return mf[0].multiply(delays[0]).add(mf[1].multiply(delays[1].subtract(delays[0])));
}
/** This method allows the computation of the zenith hydrostatic and zenith total delays.
* The resulting element is an array having the following form:
* <ul>
* <li>double[0] = D<sub>hz</sub> -&gt zenith hydrostatic delay
* <li>double[1] = D<sub>tz</sub> -&gt zenith total delay
* </ul>
* <p>
* The user have to be careful because the others tropospheric models in Orekit
* compute the zenith wet delay instead of the total zenith delay.
* </p>
* @param height the height of the station in m above sea level.
* @param parameters tropospheric model parameters.
* @param date current date
* @return a two components array containing the zenith hydrostatic and wet delays.
*/
public double[] computeZenithDelay(final double height, final double[] parameters,
final AbsoluteDate date) {
// Use an empirical model for tropospheric zenith hydro-static delay : Saastamoinen model
final SaastamoinenModel saastamoinen = new SaastamoinenModel(t0, p0, 0.0, (String) null);
// elevation = pi/2 because we compute the delay in the zenith direction
final double zhd = saastamoinen.pathDelay(0.5 * FastMath.PI, height, parameters, date);
final double ztd = parameters[0];
return new double[] {
zhd,
ztd
};
}
/** This method allows the computation of the zenith hydrostatic and zenith total delays.
* The resulting element is an array having the following form:
* <ul>
* <li>double[0] = D<sub>hz</sub> -&gt zenith hydrostatic delay
* <li>double[1] = D<sub>tz</sub> -&gt zenith total delay
* </ul>
* <p>
* The user have to be careful because the others tropospheric models in Orekit
* compute the zenith wet delay instead of the total zenith delay.
* </p>
* @param <T> type of the elements
* @param height the height of the station in m above sea level.
* @param parameters tropospheric model parameters.
* @param date current date
* @return a two components array containing the zenith hydrostatic and wet delays.
*/
public <T extends RealFieldElement<T>> T[] computeZenithDelay(final T height, final T[] parameters,
final FieldAbsoluteDate<T> date) {
// Field
final Field<T> field = date.getField();
final T zero = field.getZero();
// Use an empirical model for tropospheric zenith hydro-static delay : Saastamoinen model
final SaastamoinenModel saastamoinen = new SaastamoinenModel(t0, p0, 0.0, (String) null);
// elevation = pi/2 because we compute the delay in the zenith direction
final T zhd = saastamoinen.pathDelay(zero.add(0.5 * FastMath.PI), height, parameters, date);
final T ztd = parameters[0];
final T[] delays = MathArrays.buildArray(field, 2);
delays[0] = zhd;
delays[1] = ztd;
return delays;
}
}
/* Copyright 2011-2012 Space Applications Services
* Licensed to CS Communication & Systèmes (CS) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* CS licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.orekit.models.earth;
import java.io.Serializable;
import java.util.List;
import org.hipparchus.Field;
import org.hipparchus.RealFieldElement;
import org.hipparchus.util.MathArrays;
import org.orekit.time.AbsoluteDate;
import org.orekit.time.FieldAbsoluteDate;
import org.orekit.utils.ParameterDriver;
/** Interface for mapping functions used in the tropospheric delay computation.
* @author Bryan Cazabonne
*/
public interface MappingFunction extends Serializable {
/** This method allows the computation of the hydrostatic and
* wet mapping functions. The resulting element is an array having the following form:
* <ul>
* <li>double[0] = m<sub>h</sub>(e) -&gt hydrostatic mapping function
* <li>double[1] = m<sub>w</sub>(e) -&gt wet mapping function
* </ul>
* @param elevation the elevation of the satellite, in radians.
* @param height the height of the station in m above sea level.
* @param parameters tropospheric model parameters.
* @param date current date
* @return a two components array containing the hydrostatic and wet mapping functions.
*/
double[] mappingFactors(double elevation, double height, double[] parameters, AbsoluteDate date);
/** This method allows the computation of the hydrostatic and
* wet mapping functions. The resulting element is an array having the following form:
* <ul>
* <li>T[0] = m<sub>h</sub>(e) -&gt hydrostatic mapping function
* <li>T[1] = m<sub>w</sub>(e) -&gt wet mapping function
* </ul>
* @param elevation the elevation of the satellite, in radians.
* @param height the height of the station in m above sea level.
* @param parameters tropospheric model parameters.
* @param date current date
* @param <T> type of the elements