You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In place version of the compute function. Does not perform any checks!
139
+
Compute position and velocity of target with respect to center
140
+
at epoch jd0+time.
141
+
To get the best precision for the interpolation, the time is splitted in two
142
+
floating-point numbers. The argument jd0 should be an integer and time should
143
+
be a fraction of the day. But you may call this function with time=0 and jd0,
144
+
the desired time, if you don't take care about precision.
145
+
146
+
# Arguments
147
+
- `result`: container for result. It is not checked if it is sufficiently large enough!
148
+
- `jd0::Float64`: jd0+time must be equal to the Julian Day for the time coordinate corresponding to the ephemeris (usually TDB or TCB)
149
+
- `time::Float64`: jd0+time must be equal to the Julian Day for the time coordinate corresponding to the ephemeris (usually TDB or TCB)
150
+
- `target::Integer`: The body or reference point whose coordinates are required. The numbering system depends on the parameter unit.
151
+
- `center::Integer`: The origin of the coordinate system. The numbering system depends on the parameter unit.
152
+
- `unit::Integer` : The units of the result. This integer is a sum of some unit constants (unit*) and/or the constant useNaifId. If the unit contains useNaifId, the NAIF identification numbering system is used for the target and the center. If the unit does not contain useNaifId, the old number system is used for the target and the center.
In place version of the compute function. Does not perform any checks!
200
+
Compute position and derivatives up to order of target with respect to center
201
+
at epoch jd0+time.
202
+
To get the best precision for the interpolation, the time is splitted in two
203
+
floating-point numbers. The argument jd0 should be an integer and time should
204
+
be a fraction of the day. But you may call this function with time=0 and jd0,
205
+
the desired time, if you don't take care about precision.
206
+
207
+
# Arguments
208
+
- `result`: container for result. It is not checked if it is sufficiently large enough!
209
+
- `jd0::Float64`: jd0+time must be equal to the Julian Day for the time coordinate corresponding to the ephemeris (usually TDB or TCB)
210
+
- `time::Float64`: jd0+time must be equal to the Julian Day for the time coordinate corresponding to the ephemeris (usually TDB or TCB)
211
+
- `target::Integer`: The body or reference point whose coordinates are required. The numbering system depends on the parameter unit.
212
+
- `center::Integer`: The origin of the coordinate system. The numbering system depends on the parameter unit.
213
+
- `unit::Integer` : The units of the result. This integer is a sum of some unit constants (unit*) and/or the constant useNaifId. If the unit contains useNaifId, the NAIF identification numbering system is used for the target and the center. If the unit does not contain useNaifId, the old number system is used for the target and the center.
214
+
- `order::Integer` : The order of derivatives
215
+
* 0: only the position is computed.
216
+
* 1: only the position and velocity are computed.
217
+
* 2: only the position, velocity and acceleration are computed.
218
+
* 3: the position, velocity and acceleration and jerk are computed.
Copy file name to clipboardExpand all lines: src/orient.jl
+61-6Lines changed: 61 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@
3
3
4
4
Compute Euler angles and first derivative for the orientation of target at
5
5
epoch jd0+time.
6
-
To get the best precision for the interpolation, the time is splitted in two
6
+
To get the best precision for the interpolation, the time is split in two
7
7
floating-point numbers. The argument jd0 should be an integer and time should
8
8
be a fraction of the day. But you may call this function with time=0 and jd0,
9
9
the desired time, if you don't take care about precision.
@@ -19,19 +19,44 @@ function orient(eph::Ephem,jd0::Float64,time::Float64,
19
19
target::Integer,unit::Integer)
20
20
@_checkPointer eph.data "Ephemeris is not properly initialized!"
21
21
result =Array{Float64,1}(undef,6)
22
+
stat =unsafe_orient!(result,eph,jd0,time,target,unit)
23
+
@_checkStatus stat "Unable to compute ephemeris"
24
+
return result
25
+
end
26
+
27
+
"""
28
+
unsafe_orient!(result,eph,jd0,time,target,unit)
29
+
30
+
In place version of the orient function. Does not perform any checks!
31
+
Compute Euler angles and first derivative for the orientation of target
32
+
at epoch jd0+time.
33
+
To get the best precision for the interpolation, the time is split in two
34
+
floating-point numbers. The argument jd0 should be an integer and time should
35
+
be a fraction of the day. But you may call this function with time=0 and jd0,
36
+
the desired time, if you don't take care about precision.
37
+
38
+
# Arguments
39
+
- `result`: container for result. It is not checked if it is sufficiently large enough!
40
+
- `jd0::Float64`: jd0+time must be equal to the Julian Day for the time coordinate corresponding to the ephemeris (usually TDB or TCB)
41
+
- `time::Float64`: jd0+time must be equal to the Julian Day for the time coordinate corresponding to the ephemeris (usually TDB or TCB)
42
+
- `target::Integer`: The body whose orientation is required. The numbering system depends on the parameter unit.
43
+
- `unit::Integer` : The units of the result. This integer is a sum of some unit constants (unit*) and/or the constant useNaifId. If the unit contains useNaifId, the NAIF identification numbering system is used for the target and the center. If the unit does not contain useNaifId, the old number system is used for the target and the center (see the list in the documentation of function compute). If the unit contains outputNutationAngles, the nutation angles are computed rather than the Euler angles.
In place version of the orient function. Does not perform any checks!
90
+
Compute Euler angles and derivatives up to order for the orientation of target
91
+
at epoch jd0+time.
92
+
To get the best precision for the interpolation, the time is split in two
93
+
floating-point numbers. The argument jd0 should be an integer and time should
94
+
be a fraction of the day. But you may call this function with time=0 and jd0,
95
+
the desired time, if you don't take care about precision.
96
+
97
+
# Arguments
98
+
- `result`: container for result. It is not checked if it is sufficiently large enough!
99
+
- `jd0::Float64`: jd0+time must be equal to the Julian Day for the time coordinate corresponding to the ephemeris (usually TDB or TCB)
100
+
- `time::Float64`: jd0+time must be equal to the Julian Day for the time coordinate corresponding to the ephemeris (usually TDB or TCB)
101
+
- `target::Integer`: The body whose orientation is required. The numbering system depends on the parameter unit.
102
+
- `unit::Integer` : The units of the result. This integer is a sum of some unit constants (unit*) and/or the constant useNaifId. If the unit contains useNaifId, the NAIF identification numbering system is used for the target and the center. If the unit does not contain useNaifId, the old number system is used for the target and the center (see the list in the documentation of function compute). If the unit contains outputNutationAngles, the nutation angles are computed rather than the Euler angles.
103
+
- `order::Integer` : The order of derivatives
104
+
* 0: only the angles are computed.
105
+
* 1: only the angles and 1st derivatives are computed.
106
+
* 2: only the angles, the 1st derivatives and 2nd derivatives are computed.
107
+
* 3: the angles, the 1st derivatives, 2nd derivatives and 3rd derivatives are computed.
In place version of the rotAngMom function. Does not perform any checks!
31
+
Compute angular momentum due to rotation and first derivative of target at
32
+
epoch jd0+time.
33
+
To get the best precision for the interpolation, the time is splitted in two
34
+
floating-point numbers. The argument jd0 should be an integer and time should
35
+
be a fraction of the day. But you may call this function with time=0 and jd0,
36
+
the desired time, if you don't take care about precision.
37
+
38
+
# Arguments
39
+
- `result`: container for result. It is not checked if it is sufficiently large enough!
40
+
- `jd0::Float64`: jd0+time must be equal to the Julian Day for the time coordinate corresponding to the ephemeris (usually TDB or TCB)
41
+
- `time::Float64`: jd0+time must be equal to the Julian Day for the time coordinate corresponding to the ephemeris (usually TDB or TCB)
42
+
- `target::Integer`: The body whose angular momentum is required. The numbering system depends on the parameter unit.
43
+
- `unit::Integer` : The units of the result. This integer is a sum of some unit constants (unit*) and/or the constant useNaifId. If the unit contains useNaifId, the NAIF identification numbering system is used for the target and the center. If the unit does not contain useNaifId, the old number system is used for the target and the center (see the list in the documentation of function compute). The angles are expressed in radians if unit contains unitRad.
In place version of the rotAngMom function. Does not perform any checks!
90
+
Compute angular momentum due to rotation and derivatives up to order of target
91
+
at epoch jd0+time.
92
+
To get the best precision for the interpolation, the time is splitted in two
93
+
floating-point numbers. The argument jd0 should be an integer and time should
94
+
be a fraction of the day. But you may call this function with time=0 and jd0,
95
+
the desired time, if you don't take care about precision.
96
+
97
+
# Arguments
98
+
- `result`: container for result. It is not checked if it is sufficiently large enough!
99
+
- `jd0::Float64`: jd0+time must be equal to the Julian Day for the time coordinate corresponding to the ephemeris (usually TDB or TCB)
100
+
- `time::Float64`: jd0+time must be equal to the Julian Day for the time coordinate corresponding to the ephemeris (usually TDB or TCB)
101
+
- `target::Integer`: The body whose angular momentum is required. The numbering system depends on the parameter unit.
102
+
- `unit::Integer` : The units of the result. This integer is a sum of some unit constants (unit*) and/or the constant useNaifId. If the unit contains useNaifId, the NAIF identification numbering system is used for the target and the center. If the unit does not contain useNaifId, the old number system is used for the target and the center (see the list in the documentation of function compute).
103
+
- `order::Integer` : The order of derivatives
104
+
* 0: only the angles are computed.
105
+
* 1: only the angles and 1st derivatives are computed.
106
+
* 2: only the angles, the 1st derivatives and 2nd derivatives are computed.
107
+
* 3: the angles, the 1st derivatives, 2nd derivatives and 3rd derivatives are computed.
0 commit comments