new SampledPositionProperty(referenceFrame, numberOfDerivatives)
It is both a SampledProperty and a PositionProperty.
| Name | Type | Default | Description |
|---|---|---|---|
referenceFrame |
ReferenceFrame | ReferenceFrame.FIXED |
optional
Define the reference frame for the position. |
numberOfDerivatives |
Number | 0 |
optional
The number of derivatives accompanying each position, such as velocity, acceleration, etc |
Members
-
backwardExtrapolationDurationNumber
-
Gets or sets the amount of time to infer backwards before the attribute becomes undefined. If the value is 0, it will be extrapolated forever.
- Default Value: 0
backwardExtrapolationTypeExtrapolationType
Get or set the type of extrapolation method, which is executed when the requested value is earlier than any available sample.
- Default Value: ExtrapolationType.NONE
readonly definitionChangedEvent
Get the event thrown when the property definition changes. If calling getValue returns different results within the same time frame, it is considered that the definition has changed.
forwardExtrapolationDurationNumber
Gets or sets the amount of time to infer forward before the attribute becomes undefined. If the value is 0, it will be extrapolated forever.
- Default Value: 0
forwardExtrapolationTypeExtrapolationType
Retrieve or set the type of extrapolation method to be executed when requesting values after any available samples.
- Default Value: ExtrapolationType.NONE
interpolationAlgorithmInterpolationAlgorithm
Obtain the interpolation algorithm used when obtaining numerical values.
- Default Value: LinearApproximation
interpolationDegreeNumber
The degree of interpolation to be performed when obtaining numerical values.
- Default Value: 1
readonly isConstantBoolean
Get a value indicating whether the attribute is a constant. If getValue always returns the same result in the current definition, then the property is considered a constant.
numberOfDerivativesBoolean
The number of derivatives contained in this attribute, i.e. 0 represents position, 1 represents velocity, etc.
- Default Value: false
referenceFrameReferenceFrame
Get the reference frame for defining the location.
- Default Value: ReferenceFrame.FIXED;
Methods
-
addSample(time, position, derivatives)
-
Add a new sample.
Name Type Description timeJulianDate Sampling time.
positionCartesian3 T is at the designated time location.
derivativesArray.<Cartesian3> optional The derivative value array at the provided time point.
-
addSamples(times, positions, derivatives)
-
Add multiple samples through a parallel array.
Name Type Description timesArray.<JulianDate> An array of JulianDate instances, where each index is an example time.
positionsArray.<Cartesian3> An array of Cartesian3 positional instances, where each value corresponds to the provided time index.
derivativesArray.<Array> optional An array where each value is another array containing the derivative of the corresponding time index.
Throws:
-
All arrays must have the same length.
- Type
- DeveloperError
-
-
addSamplesPackedArray(packedSamples, epoch)
-
Add samples in the form of a single packaged array, where each new sample is represented by a date, followed by a packaged representation of the corresponding value and derivative.
Name Type Description packedSamplesArray.<Number> An array of packaged samples.
epochJulianDate optional If any date in packkedsamples is a number, they are considered as the offset of that epoch, measured in seconds.
-
equals(other){Boolean}
-
Compare this attribute with the provided attribute, return true if they are equal, otherwise return false.
Name Type Description otherProperty optional A property value.
Returns:
Type Description Boolean If left and right are equal, it is true; otherwise, it is false. -
getValue(time, result){Cartesian3}
-
Obtain the location of the provided time.
Name Type Description timeJulianDate The time to retrieve the value.
resultCartesian3 optional If the object to store numerical values is omitted, a new instance will be created and returned.
Returns:
Type Description Cartesian3 The modified result parameters, or a new instance (if no result parameters are provided). -
getValueInReferenceFrame(time, referenceFrame, result){Cartesian3}
-
Obtain the position in the provided time and reference frame.
Name Type Description timeJulianDate The time to retrieve the value.
referenceFrameReferenceFrame The required result reference frame.
resultCartesian3 optional If the object to store numerical values is omitted, a new instance will be created and returned.
Returns:
Type Description Cartesian3 The modified result parameters, or a new instance (if no result parameters are provided). -
removeSample(time){Boolean}
-
Delete a sample at a specified time
Name Type Description timeJulianDate specified time
Returns:
Type Description Boolean Sample deletion returns true, otherwise returns false. -
removeSamples(time)
-
Delete samples from the specified time period
Name Type Description timeTimeInterval Specify a time period.
-
setInterpolationOptions()
-
The algorithm and degree used when setting position interpolation.
Name Type Description options.interpolationAlgorithmInterpolationAlgorithm optional New interpolation algorithm. If not defined, existing attributes will remain unchanged.
options.interpolationDegreeNumber optional New interpolation degree. If not defined, existing attributes will remain unchanged.