public class SphericalHarmonicGravityModel extends Object
SphericalHarmonicGravityField
which down selects to the desired subset of this full model, and sets other configuration options.
The field is then used by SphericalHarmonicGravity
in order to calculate the
gravitational force.Constructor and Description |
---|
SphericalHarmonicGravityModel()
Initializes a new instance.
|
SphericalHarmonicGravityModel(String modelName,
String centralBodyName,
double gravitationalParameter,
double referenceDistance,
double[] zonalCoefficients,
double[][] cosineCoefficients,
double[][] sineCoefficients,
boolean normalized,
boolean includesPermanentTides)
Initializes a new instance.
|
SphericalHarmonicGravityModel(String modelName,
String centralBodyName,
double gravitationalParameter,
double referenceDistance,
double[] zonalCoefficients,
double[][] cosineCoefficients,
double[][] sineCoefficients,
boolean normalized,
boolean includesPermanentTides,
SphericalHarmonicGravitySecularVariations secularVariations)
Initializes a new instance.
|
Modifier and Type | Method and Description |
---|---|
static SphericalHarmonicCoefficients |
createEarthPermanentTideCoefficients()
Creates a set of the default IERS 2003 permanent tide coefficients for Earth.
|
String |
getCentralBodyName()
Gets the name of the central body described by the model.
|
double[][] |
getCosineCoefficients()
Gets the list of this model's Cosine coefficients (m= [1, L])
|
int |
getFileDegree()
Gets the maximum degree of the gravitation coefficients defined by the .grv file.
|
int |
getFileOrder()
Gets the maximum order of the gravitation coefficients defined by the .grv file.
|
double |
getGravitationalParameter()
Gets the gravitational parameter of the central body.
|
boolean |
getIncludesPermanentTides()
Gets a value indicating whether the coefficients of the gravity model include permanent tides.
|
String |
getModelName()
Gets the name of the gravity model being used.
|
boolean |
getNormalized()
Gets a value indicating whether the coefficients of the gravity model are normalized.
|
double |
getReferenceDistance()
Gets the reference distance of the central body.
|
SphericalHarmonicGravitySecularVariations |
getSecularVariations()
Gets the linear model for the secular variations of this gravity model.
|
double[][] |
getSineCoefficients()
Gets the list of this model's Sine coefficients (m= [1, L])
|
double[] |
getZonalCoefficients()
Gets the list of this model's zonal coefficients (cosine coefficients for m=0).
|
static SphericalHarmonicGravityModel |
readFrom(BufferedReader reader)
Reads the gravity model information in from a
BufferedReader and
returns a SphericalHarmonicGravityModel |
static SphericalHarmonicGravityModel |
readFrom(String fileName)
Reads the gravity model information in from a file (most likely a .grv) and
returns a
SphericalHarmonicGravityModel . |
void |
setCentralBodyName(String value)
Sets the name of the central body described by the model.
|
void |
setFileDegree(int value)
Sets the maximum degree of the gravitation coefficients defined by the .grv file.
|
void |
setFileOrder(int value)
Sets the maximum order of the gravitation coefficients defined by the .grv file.
|
void |
setGravitationalParameter(double value)
Sets the gravitational parameter of the central body.
|
void |
setIncludesPermanentTides(boolean value)
Sets a value indicating whether the coefficients of the gravity model include permanent tides.
|
void |
setModelName(String value)
Sets the name of the gravity model being used.
|
void |
setNormalized(boolean value)
Sets a value indicating whether the coefficients of the gravity model are normalized.
|
void |
setReferenceDistance(double value)
Sets the reference distance of the central body.
|
void |
setSecularVariations(SphericalHarmonicGravitySecularVariations value)
Sets the linear model for the secular variations of this gravity model.
|
SphericalHarmonicGravityModel |
withoutEarthPermanentTides()
Removes the IERS2003 Earth permanent tide contributions so that a time-varying tide model can be applied instead.
|
SphericalHarmonicGravityModel |
withoutPermanentTides(SphericalHarmonicCoefficients permanentTideCoefficients)
Removes the permanent tide contributions so that a time-varying tide model can be applied instead.
|
public SphericalHarmonicGravityModel()
public SphericalHarmonicGravityModel(String modelName, String centralBodyName, double gravitationalParameter, double referenceDistance, @Nonnull double[] zonalCoefficients, @Nonnull double[][] cosineCoefficients, @Nonnull double[][] sineCoefficients, boolean normalized, boolean includesPermanentTides)
modelName
- The name of the gravitational model.centralBodyName
- The name of the central body.gravitationalParameter
- The gravitational parameter described by the central body.referenceDistance
- The reference distance of the body.zonalCoefficients
- The zonal gravity coefficients.cosineCoefficients
- The cosine gravity coefficients.sineCoefficients
- The sine gravity coefficients.normalized
- The flag representing whether the coefficients are normalized.includesPermanentTides
- The flag representing whether the coefficients include the effect of permanent tides.public SphericalHarmonicGravityModel(String modelName, String centralBodyName, double gravitationalParameter, double referenceDistance, @Nonnull double[] zonalCoefficients, @Nonnull double[][] cosineCoefficients, @Nonnull double[][] sineCoefficients, boolean normalized, boolean includesPermanentTides, @Nullable SphericalHarmonicGravitySecularVariations secularVariations)
modelName
- The name of the gravitational model.centralBodyName
- The name of the central body.gravitationalParameter
- The gravitational parameter described by the central body.referenceDistance
- The reference distance of the body.zonalCoefficients
- The zonal gravity coefficients.cosineCoefficients
- The cosine gravity coefficients.sineCoefficients
- The sine gravity coefficients.normalized
- The flag representing whether the coefficients are normalized.includesPermanentTides
- The flag representing whether the coefficients include the effect of permanent tides.secularVariations
- A linear model for the secular variations of this gravity model.
null
if the model does not contain secular variations.@Nonnull public static SphericalHarmonicGravityModel readFrom(@Nonnull String fileName)
SphericalHarmonicGravityModel
.
If the .grv file contains uncommented SecularVariation RefEpochTDT and LinearRate lines,
the returned gravity model will include secular variations by default. If secular variations
are not desired, SecularVariations
(get
/ set
) must be manually set to null
.
fileName
- Name of the gravity file from which to read.ArgumentNullException
- Thrown when fileName
is null
.@Nonnull public static SphericalHarmonicGravityModel readFrom(@Nonnull BufferedReader reader)
BufferedReader
and
returns a SphericalHarmonicGravityModel
If the .grv file contains uncommented SecularVariation RefEpochTDT and LinearRate lines,
the returned gravity model will include secular variations by default. If secular variations
are not desired, SecularVariations
(get
/ set
) must be manually set to null
.
reader
- BufferedReader
for the .grv file to read.ArgumentNullException
- Thrown when reader
is null
.@Nonnull public final SphericalHarmonicGravityModel withoutEarthPermanentTides()
PropertyInvalidException
- Thrown when CentralBodyName
(get
/ set
) is not Earth.@Nonnull public final SphericalHarmonicGravityModel withoutPermanentTides(@Nonnull SphericalHarmonicCoefficients permanentTideCoefficients)
permanentTideCoefficients
- The permanent tide contribution that must be subtracted from a model that includes permanent tides.ArgumentNullException
- Thrown when permanentTideCoefficients
is null
.@Nonnull public static SphericalHarmonicCoefficients createEarthPermanentTideCoefficients()
PermanentSolidTideModel
.public final String getModelName()
public final void setModelName(String value)
public final String getCentralBodyName()
public final void setCentralBodyName(String value)
public final int getFileDegree()
public final void setFileDegree(int value)
public final int getFileOrder()
public final void setFileOrder(int value)
public final double getGravitationalParameter()
public final void setGravitationalParameter(double value)
public final double getReferenceDistance()
public final void setReferenceDistance(double value)
public final boolean getNormalized()
public final void setNormalized(boolean value)
public final boolean getIncludesPermanentTides()
public final void setIncludesPermanentTides(boolean value)
public final double[] getZonalCoefficients()
public final double[][] getCosineCoefficients()
public final double[][] getSineCoefficients()
@Nullable public final SphericalHarmonicGravitySecularVariations getSecularVariations()
If null
, then secular variations will not be applied to the gravity field.
public final void setSecularVariations(@Nullable SphericalHarmonicGravitySecularVariations value)
If null
, then secular variations will not be applied to the gravity field.