Struct PntosStandardStateModelProvider
Defined in File state_modeling.h
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:
State Blocks - Define a set of states and a model for propagating those states
Virtual State Blocks - Relate two statespaces to each other
Measurement Processors - Relate measurements to a statespace
A PntosStandardStateModelProvider conceptually models a set of zero or more
PntosStandardStateBlocks and a set of zero or morePntosStandardMeasurementProcessors 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_indexparameter 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 bynum_blocks.block_identifiers[i]gives a description of theith kind of state block returned whenblock_index=i.Similarly, PntosStandardStateModelProvider.new_processor is a factory method for returning new measurement processors,
num_processorsis the number of different kinds of measurement processors available in this state model provider, andprocessor_identifiersis a set of identifiers for each available kind of measurement processor that can be returned by the factory.Public Members
-
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_indexparameter 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
\0terminated C strings. Theprocessor_indexparameter 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_indexparameter 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 inprocessor_identifiers[44]. An instance of this processor can be created by callingnew_processor(self, 44, ...). Note that0 <= 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
labelfield 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 fromprocessor_identifierswhich is the model’s mechanism for selecting the kind of processor to create.- Param state_block_labels
is a
num_state_block_labelssized array of pointers to\0terminated C strings which will be used to populate thestate_block_labelsfield 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_groupmay 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, andconfig_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_indexparameter 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
\0terminated C strings. Theblock_indexparameter 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_indexparameter 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 inblock_identifiers[44]. An instance of this state block can be created by callingnew_block(self, 44, ...). Note that0 <= 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
labelfield 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 fromblock_identifierswhich 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_groupmay 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, andconfig_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_indexparameter 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
\0terminated C strings. Thevirtual_block_indexparameter 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_indexparameter 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 invirtual_block_identifiers[44]. An instance of this virtual state block can be created by callingnew_virtual_block(self, 44, ...). Note that0 <= 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_groupmay 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_indexandconfig_group.