positions module

Contains entities to represent positions in the data model.

class jinete.models.positions.GeometricPosition(coordinates, *args, **kwargs)[source]

Bases: jinete.models.positions.Position

Represents a geometric point on the Surface to which belongs.

__init__(coordinates, *args, **kwargs)[source]
Parameters
  • coordinates (Sequence[float]) – The coordinates which identifies the position.

  • args – Additional positional parameters.

  • kwargs – Additional named parameters.

coordinates

The coordinated representation of self.

distance_to(other)

Computes the distance from self to other.

Parameters

other (jinete.models.positions.Position) – Position to compute the distance from self.

Return type

float

Returns

distance between self and other.

time_to(other, now=None)

Computes the time from self to other.

Parameters
Return type

float

Returns

time between self and other.

class jinete.models.positions.Position(surface)[source]

Bases: jinete.models.abc.Model, abc.ABC

Represents a point on the Surface to which belongs.

__init__(surface)[source]

Constructor of the class.

Parameters

surface (Surface) – The surface to which the position belongs.

abstract property coordinates

The coordinated representation of self.

Return type

Tuple[Any]

Returns

The coordinated representation of self.

distance_to(other)[source]

Computes the distance from self to other.

Parameters

other (jinete.models.positions.Position) – Position to compute the distance from self.

Return type

float

Returns

distance between self and other.

time_to(other, now=None)[source]

Computes the time from self to other.

Parameters
Return type

float

Returns

time between self and other.