pint.utils.PosVel

class pint.utils.PosVel(pos, vel, obj=None, origin=None)[source]

Bases: object

Position/Velocity class.

The class is used to represent the 6 values describing position and velocity vectors. Instances have ‘pos’ and ‘vel’ attributes that are numpy arrays of floats (and can have attached astropy units). The ‘pos’ and ‘vel’ params are 3-vectors of the positions and velocities respectively.

The coordinates are generally assumed to be aligned with ICRF (J2000), i.e. they are in an inertial, not earth-rotating frame

The ‘obj’ and ‘origin’ components are strings that can optionally be used to specify names for endpoints of the vectors. If present, addition/subtraction will check that vectors are being combined in a consistent way.

Specifically, if two PosVel objects are added, the obj of one must equal the origin of the other (either way around). If the two vectors agree on both ends, then the result vector will choose the origin of the vector on the left.

Methods