orbit
Implementation of formulae for calculating orbits
earth = PlanetParameters.earth()
module-attribute
An instance of PlanetParameters representing Earth
OrbitDateAndAngle
dataclass
Pairing of a date and the corresponding orbit angle
Source code in src/analemma/orbit.py
205 206 207 208 209 210 211 212 | |
PlanetParameters
dataclass
Parameters defining a planet for sundial calculation purposes
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
N
|
float
|
Number of mean days in a year |
required |
T_d
|
int
|
Number of seconds in a mean day |
required |
rho
|
float
|
Angle between axes of the ellipse and the equinoxes / solstices |
required |
alpha
|
float
|
Inclination of the earths axis of rotation |
required |
a
|
float
|
Length of the planet's orbit's semi-major axis |
required |
e
|
float
|
Eccentricity of the planet's orbit |
required |
The following attributes are calculated given the above parameters.
Attributes:
| Name | Type | Description |
|---|---|---|
T_y |
int
|
Number of seconds in a mean year |
om_y |
float
|
Mean angular speed of the earth's centre of mass in its orbit |
om_d |
float
|
Angular speed of a point on the earth about the earth's centre of mass |
om_sd |
float
|
Angular speed of a point on an earth that revolves once per siderial day |
T_sd |
float
|
Number of seconds in a siderial day |
Om |
float
|
Angular speed parameter used in the spinor orbit formalism ( = om_y / 2 * a ) |
Source code in src/analemma/orbit.py
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 | |
clone_with_eccentricity(e)
Return a new instance with the same parameters but a different eccentricity
Source code in src/analemma/orbit.py
64 65 66 67 68 69 70 71 72 73 74 75 | |
daily_noons()
Daily time samples in seconds from noon at perihelion
Source code in src/analemma/orbit.py
77 78 79 80 81 | |
earth()
classmethod
Return a PlanetParameters instance representing Earth
Source code in src/analemma/orbit.py
112 113 114 115 116 117 118 119 120 121 122 123 124 | |
orbit_angle(t)
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
t
|
ArrayLike
|
Collection of time in seconds starting at perihelion at which to calculate the planet's angle of rotation |
required |
Source code in src/analemma/orbit.py
96 97 98 99 100 101 102 103 104 105 | |
rotation_angle(t)
Angle of planetary rotation increases linearly with time, one complete revolution after one siderial day, and an offset of rho
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
t
|
ArrayLike
|
Collection of time in seconds starting at perihelion at which to calculate the planet's angle of rotation |
required |
Returns:
| Type | Description |
|---|---|
ArrayLike
|
The angle \(\psi\) measuring planetary rotation at the input times |
Source code in src/analemma/orbit.py
83 84 85 86 87 88 89 90 91 92 93 94 | |
orbit_date_to_day(the_date, year=None)
Convert from the date to the number of days since perihelion
Source code in src/analemma/orbit.py
261 262 263 264 265 266 267 | |
orbit_day_to_date(orbit_day, year=None)
Convert from the number of days since perihelion to the date
Source code in src/analemma/orbit.py
252 253 254 255 256 257 258 | |
orbital_angle(s, planet=earth)
Calculate orbital angular coordinate given time parameter, phi(s)
Source code in src/analemma/orbit.py
182 183 184 185 186 187 188 189 | |
orbital_radius(s, planet=earth)
Calculate orbital radial coordinate given spinor time parameter, r(s)
Source code in src/analemma/orbit.py
174 175 176 177 178 179 | |
orbital_time(s, planet=earth)
Calculate orbital time given time parameter, t(s)
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
s
|
ArrayLike
|
Spinor time parameter (note, called $ au$ in the paper) |
required |
planet
|
PlanetParameters
|
Planet whose orbit is being analyzed |
earth
|
e
|
Optional override for the orbit's eccentricity |
required |
Source code in src/analemma/orbit.py
142 143 144 145 146 147 148 149 150 151 152 | |
season_event_info(season_value, year)
Return the date and orbit angle for an equinox or solstice in a given year, identified by the season's value as per analemma.geometry.Season.
Source code in src/analemma/orbit.py
215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 | |
spinor_time(t, planet=earth)
Invert t(s), the relationship of orbital time t with the parameter in the spinor treatment of the Kepler problem, s, to give s(t).
Source code in src/analemma/orbit.py
165 166 167 168 169 170 171 | |