Table of Contents

Class Kit

Namespace
Pamoja.Kit
Assembly
Pamoja.Kit.dll

The stateless helpers from the pamoja kit.

public static class Kit
Inheritance
Kit
Inherited Members

Remarks

The stateful helpers are their own types (Smoother, Pid, Thermostat and the rest); what remains here is the arithmetic that needs no memory of previous calls.

Methods

BearingBetween(Coordinate, Coordinate)

Returns the initial bearing from one coordinate to another.

public static double BearingBetween(Coordinate origin, Coordinate destination)

Parameters

origin Coordinate

The coordinate to measure from.

destination Coordinate

The coordinate to measure to.

Returns

double

The bearing in degrees, clockwise from north.

Deadband(float, float, float)

Suppresses movement within a band, so noise does not act.

public static float Deadband(float value, float center, float width)

Parameters

value float

The latest reading.

center float

The value the band sits around.

width float

The full width of the band.

Returns

float

center while the reading is inside the band, and otherwise the reading shifted toward the centre by half the band width, so the output is continuous.

DistanceBetween(Coordinate, Coordinate)

Returns the great-circle distance between two coordinates.

public static double DistanceBetween(Coordinate origin, Coordinate destination)

Parameters

origin Coordinate

The coordinate to measure from.

destination Coordinate

The coordinate to measure to.

Returns

double

The distance in metres.