Struct PntosCommonInertial

Struct Documentation

struct PntosCommonInertial

A common base type for an inertial. A user may use the PntosCommonInertial.mechanization_type field to discover what type of inertial this type actually is and then downcast to the appropriate inertial class. For example, if PntosCommonInertial.mechanization_type is PNTOS_STANDARD_INERTIAL_MECHANIZATION, then this instance is actually a PntosStandardInertialMechanization.

UNSTABLE: This feature is unstable and is not yet considered part of the stable pntOS API. Usage of this feature is highly discouraged in non-experimental code, and its definition may change at any time.

Public Members

PntosManagedMemory *memory
PntosInertialType inertial_type

The type of this inertial. Used to downcast to the appropriate child class.

PntosMessageType (*request_solution_message_type)(struct PntosCommonInertial *self)
Return

The message type that will be returned by request_current_solution, request_solution, and request_solutions.

PntosMessage *(*request_current_solution)(struct PntosCommonInertial *self)
Return

The current inertial solution.

PntosMessage *(*request_solution)(struct PntosCommonInertial *self, AspnTypeTimestamp time)
Param time

The time at which the returned solution should be valid.

Return

The solution computed by this inertial at time if time is in the valid range, NULL otherwise (is_time_in_range can be used to check time before calling this method).

PntosMessageArray *(*request_solutions)(struct PntosCommonInertial *self, AspnTypeTimestamp *times, size_t num_times, PntosInertialSolutionRangeType type)

Request a set of solutions computed by this inertial at the given times.

Param times

An array of times at which solutions are requested.

Param num_times

The length of times.

Param type

The type of solution requested.

Return

An array of solutions. Returns NULL if type is unsupported by this inertial or every instance of times is outside the valid range. Otherwise guaranteed to not be NULL.

bool (*is_time_in_range)(struct PntosCommonInertial *self, AspnTypeTimestamp time)
Param time

The query time.

Return

true if a solution exists at time, false otherwise. This result is only valid until another method (for example, process_pntos_message) is called.

AspnTypeTimestamp (*request_earliest_time)(struct PntosCommonInertial *self)
Return

The earliest available time at which a solution or forces and rates can be requested. This result is only valid until another method (for example, process_pntos_message) is called.

AspnTypeTimestamp (*request_latest_time)(struct PntosCommonInertial *self)
Return

The latest time at which a solution or forces and rates can be requested. This result is only valid until another method (for example, process_pntos_message) is called.

PntosMessageTypeArray *(*request_process_pntos_message_types)(struct PntosCommonInertial *self)
Return

An array of message types that are supported by this plugin as inputs to process_pntos_message.

void (*process_pntos_message)(struct PntosCommonInertial *self, PntosMessage *message)
Param message

A new message to be incorporated into the computed inertial solution.

PntosInertialForcesRates *(*request_forces_and_rates)(struct PntosCommonInertial *self, AspnTypeTimestamp time)
Param time

The time at which the forces and rates should be valid.

Return

The instantaneous forces and rates at time if time is in the valid range, NULL otherwise (is_time_in_range can be used to check time before calling this method).

PntosInertialForcesRates *(*request_average_forces_and_rates)(struct PntosCommonInertial *self, AspnTypeTimestamp time1, AspnTypeTimestamp time2)
Param time1

The start of the time range over which the forces and rates should be valid.

Param time2

The end of the time range over which the forces and rates should be valid.

Return

The average forces and rates over the period of time defined by time1 and time2 if at least one of them is in the valid range, NULL otherwise (is_time_in_range can be used to check both times before calling this method).