Struct PntosStandardStateModelProvider

Struct Documentation

struct PntosStandardStateModelProvider

A collection of tools for modeling the propagation and innovation of state spaces using pntOS’ standard fusion model. Specifically, a PntosStandardStateModelProvider provides three types of tools:

  1. State Blocks - Define a set of states and a model for propagating those states

  2. Virtual State Blocks - Relate two statespaces to each other

  3. Measurement Processors - Relate measurements to a statespace

A PntosStandardStateModelProvider conceptually models a set of zero or more PntosStandardStateBlocks and a set of zero or more PntosStandardMeasurementProcessors which together model the phenomenology of sensor data that is being brought into a fusion engine. The first type, state blocks, describe how a set of states propagates forward through time. The second type, measurement processors, describe how a measurement relates to a set of state blocks.

Each PntosStandardStateModelProvider consists of factory methods which generate instances of the state blocks and measurement processors it provides. The PntosStandardStateModelProvider.new_block method is a factory method that returns a newly created state block on each invocation. Because the PntosStandardStateModelProvider can provide more than one kind of state block, the PntosStandardStateModelProvider.new_block method takes a block_index parameter which allows the user to request which kind of state block is created by the factory. The number of different kinds of state block this state model provider has is given by num_blocks. block_identifiers[i] gives a description of the ith kind of state block returned when block_index=i.

Similarly, PntosStandardStateModelProvider.new_processor is a factory method for returning new measurement processors, num_processors is the number of different kinds of measurement processors available in this state model provider, and processor_identifiers is a set of identifiers for each available kind of measurement processor that can be returned by the factory.

Public Members

PntosCommonStateModelProvider common
size_t num_processors

The number of different kinds of measurement processors that this PntosStandardStateModelProvider can create. This field describes the length of processor_identifiers as well as the set of valid values for the processor_index parameter to new_processor.

char **processor_identifiers

A list of identifying strings for each kind of measurement processor that this PntosStandardStateModelProvider can create instances of.

The field is a num_processors sized array of pointers to \0 terminated C strings. The processor_index parameter of new_processor is an index into this array.

This field will be null when this state model provider does not provide any measurement processors.

PntosStandardMeasurementProcessor *(*new_processor)(struct PntosStandardStateModelProvider *self, size_t processor_index, struct PntosStandardFusionEngine *engine, char *label, char **state_block_labels, size_t num_state_block_labels, char *config_group)
Param processor_index

Since the PntosStandardStateModelProvider can create num_processors different kinds of measurement processors, the processor_index parameter is used to select which kind of measurement processor to create a new instance of. The processor_identifiers field contains identifying strings for the kinds of processors. For example, if the model can create 45 different processors, the identifier of the last processor that can be created is found in processor_identifiers[44]. An instance of this processor can be created by calling new_processor(self, 44, ...). Note that 0 <= processor_index < num_processors.

Param engine

is an optional parameter that may be provided to the new processor, such that the processor may interact with the fusion engine it is being used in (for example, to add/remove states). Set it to null when no engine is available for the processor to use.

Param label

is a string which will be used to populate the label field of the newly created processor. This label will be the unique name for the returned instance of a processor, and used to track the processor throughout its lifecycle. Note that it differs from processor_identifiers which is the model’s mechanism for selecting the kind of processor to create.

Param state_block_labels

is a num_state_block_labels sized array of pointers to \0 terminated C strings which will be used to populate the state_block_labels field of the newly created processor.

Param num_state_block_labels

The length of state_block_labels.

Param config_group

Indicates which (if any) parameter group in the registry may be used to obtain additional configuration values to generate the new processor. If the processor requires no outside configuration, config_group may be null.

Return

A newly created PntosStandardMeasurementProcessor, which describes the relationship between a measurement and a set of state blocks. Returns null when no measurement processor can be produced with the given processor_index, engine, and config_group.

size_t num_blocks

The number of different kinds of state blocks that this PntosStandardStateModelProvider can create. This field describes the length of block_identifiers as well as the set of valid values for the block_index parameter to new_block.

char **block_identifiers

A list of identifying strings for each kind of state block that this PntosStandardStateModelProvider can create instances of.

The field is a num_blocks sized array of pointers to \0 terminated C strings. The block_index parameter of new_block is an index into this array.

This field will be null when this state model provider does not provide any state blocks.

PntosStandardStateBlock *(*new_block)(struct PntosStandardStateModelProvider *self, size_t block_index, struct PntosStandardFusionEngine *engine, char *label, char *config_group)
Param block_index

Since the PntosStandardStateModelProvider can create num_blocks different kinds of state blocks, the block_index parameter is used to select which kind of state block to create a new instance of. The block_identifiers field contains identifying strings for the kinds of state blocks. For example, if the model can create 45 different state blocks, the identifier of the last state block that can be created is found in block_identifiers[44]. An instance of this state block can be created by calling new_block(self, 44, ...). Note that 0 <= block_index < num_blocks.

Param engine

An optional parameter that may be provided to the new block, such that the block may interact with the fusion engine it is being used in (for example, to add/remove states). Set it to null when no engine is available for the block to use.

Param label

A string which will be used to populate the label field of the newly created state block. This label will be the unique name for the returned instance of a state block, and used to track the state block throughout its lifecycle. Note that it differs from block_identifiers which is the model’s mechanism for selecting the kind of state block to create.

Param config_group

Indicates which (if any) parameter group in the registry may be used to obtain additional configuration values to generate the new state block. If the state block requires no outside configuration, config_group may be null.

Return

a newly created PntosStandardStateBlock, which describes a set of states and how they propagate over time. The return value will be null when no state block can be produced with the given block_index, engine, and config_group.

size_t num_virtual_blocks

The number of different kinds of virtual state blocks that this PntosStandardStateModelProvider can create. This field describes the length of virtual_block_identifiers as well as the set of valid values for the virtual_block_index parameter to new_virtual_block.

char **virtual_block_identifiers

A list of identifying strings for each kind of virtual state block that this PntosStandardStateModelProvider can create instances of.

The field is a num_virtual_blocks sized array of pointers to \0 terminated C strings. The virtual_block_index parameter of new_virtual_block is an index into this array.

This field will be null when this state model provider does not provide any virtual state blocks.

PntosVirtualStateBlock *(*new_virtual_block)(struct PntosStandardStateModelProvider *self, size_t virtual_block_index, char *source_label, char *target_label, char *config_group)
Param virtual_block_index

Since the PntosStandardStateModelProvider can create num_virtual_blocks different kinds of virtual state blocks, the virtual_block_index parameter is used to select which kind of virtual state block to create a new instance of. The virtual_block_identifiers field contains identifying strings for the kinds of virtual state blocks. For example, if the model can create 45 different virtual state blocks, the identifier of the last virtual state block that can be created is found in virtual_block_identifiers[44]. An instance of this virtual state block can be created by calling new_virtual_block(self, 44, ...). Note that 0 <= virtual_block_index < num_virtual_blocks.

Param source_label

The label of the state block or virtual state block whose states this virtual state block transforms.

Param target_label

A unique identifier for this virtual state block.

Param config_group

Indicates which (if any) parameter group in the registry may be used to obtain additional configuration values to generate the new virtual state block. If the virtual state block requires no outside configuration, config_group may be null.

Return

A newly created PntosVirtualStateBlock, which is used to convert a set of states from one representation to another. Returns null when no virtual state block can be produced with the given virtual_block_index and config_group.