Angles – ephemerista.angles
¶
The angles.py module.
This module contains the Angle
class which provides a generic angle model for other Ephemerista data structures.
- pydantic model ephemerista.angles.Angle¶
Generic angle model.
Notes
Subclasses of
Angle
may override thedegrees
field to customise constraints.Examples
>>> class Inclination(Angle): ... degrees: float = Field(ge=0, le=180) >>> inc = Inclination.from_radians(1.5707963267948966) >>> inc.degrees 90.0
- Fields:
-
field degrees:
float
[Required]¶ Value of the angle in degrees
- Constraints:
ge = -360
le = 360
- classmethod from_degrees(degrees)¶
Construct an
Angle
object from a value in degrees.- Parameters:
degrees (float) – The value of the angle in degrees
- Return type:
Self
- classmethod from_radians(radians)¶
Construct an
Angle
object from a value in radians.- Parameters:
radians (float) – The value of the angle in radians
- Return type:
Self
- property radians¶
Value of the angle in radians.
- Type:
float
- pydantic model ephemerista.angles.Latitude¶
Latitude.
- Fields:
-
field degrees:
float
[Required]¶ Latitude in degrees
- Constraints:
ge = -90
le = 90