Skip to content

What's in the config file?

Zoltan Derzsi edited this page Nov 1, 2017 · 20 revisions

In this toolbox, the preferred way of configuring data acquisition is via the use of configuration files.

While most settings can be same, a few parameters are to be changed frequently by the experimenter. These are:
NumberOfMarkers, FrameFrequency, MarkerFrequency, CollectionTime, StreamData.

A few versions of these config files are provided in the examples. While they are written in the windows standard .ini style, there are no comments included. These files were created with C-programs after initialising the system as documented, and writing out the config file using OptotrakSaveCollectionToFile(). These C are included, but not currently used in the toolbox.

Parameter defitions, line-by-line.

[OPTOTRAK System]
Header.

NumberOfMarkers = 16
This where it's set how many markers are in the system. The Optotrak Certus system supports up to 512 markers, the 3020 system only supports up to 256 markers. Hybrid systems (Certus SCU, Certus camera(s) + 3020 camera(s)) also support up to 256 markers.

FrameFrequency = 50
This is the frequency by the Optotrak system is sampling data with. In this case, 50 Hz.

MarkerFrequency = 1000
Within one sampled frame, all the markers are sequentially flashed. The flashing frequency can't be more than 4600Hz. The minimum flashing frequency depends on the frame frequency and the number of markers used. If this frequency is set lower than what is required by the formula, the system initialisation will fail.

DutyCycle = 0.5
StroberVoltage = 7
These two parameters walk hand in hand. While the markers are being flashed sequentially, it is possible to control their brightness here. The duty cycle tells how long the marker should be proportionally on within its own time slot, and the voltage tells how bright should the marker be while it's on. Keep these two settings on 0.5 and 7 when you start testing.
If the duty cycle is too low, the markers will be too dim to be seen. Conversely when duty cycle is too high, there is a probability of marker crosstalk, especially when long wires are used for the markers.
If the strober voltage is too low, the markers will be too dim to be seen. If the marker voltage is too high, you can damage the markers!

InterpolationFlag = TRUE
This controls the interpolation of raw sensor data within a frame.

NoFireMarkers = FALSE
If this is true, it is possible to do a 'dry run' of the experiment, where the markers are not actually turned on. This can be useful while developing code that uses the system. However, if you use OptotrakActivateMarkers(), the markers will come on regardless.

StaticThresholdFlag = FALSE
For the sensor data, a noise threshold can be specified here. Normally, this is dynamically adjusted within the Optotrak system, and no manual interaction is necessary.

StaticThresholdValue = 0
If StaticThresholdFlag is TRUE, a static threshold value can be given here. Can be anything between 0 and 255. 30 is the default.

DynamicThresholdPercent = 30
If StaticThresholdFlag is FALSE, the noise threshold will be set to the percentage of the peak of the measured signal. In this case, it's set to 30.

MinimumGain = 160
This is the gain value on the sensors. When too low, the markers will not be detected. When too high, the sensors can be overdriven.

CollectionTime = 30
When using data buffering, this tells the system how much data should the buffer hold.

PreTriggerTime = 0
This is not currently implemented, and should be 0.

StreamData = 0
This controls whether the data buffer should be initialised. If it's 0, then the buffer is in use, if it's 1, then system expects only real-time data to be used.

DynamicDutyFlag = FALSE
Undocumented. Presumably it is meant for the automated adjustment of the marker duty cycle. Untested.

BufferWaveformsFlag = FALSE
Undocumented. Presumably it is meant to tell the Optotrak system to expect ODAU waveform data. Untested.

Buffer3dFlag = FALSE
When set to TRUE, this flag tells the system to store 3D marker position data in the buffer.

BufferFullRawFlag = FALSE
When set to TRUE, this flag tells the system to store full raw (as in, the extracted sensor data with their statuses) in the buffer.

GetNextFrameFlag = FALSE
When set to TRUE, it supposed to prevent sending duplicate frames when quickly requesting DataGetLatest3D()_as_array. However, it doesn't seem to work, duplicates are being sent at low frame rates. A remedy to this can be to use DataGetNext3D_as_array(), when streaming data.

ExternalSyncFlag = FALSE
This flag, when set to TRUE, the sampling can be manually controlled via a TTL signal on the DB9 connector of the Optotrak SCU.

ExternalTriggerFlag = FALSE
The start of data collection can be controlled via a TTL signal on the DB9 connector of the Optotrak SCU. If this flag is TRUE, the system will wait with the data collection until the external signal is present.

PollRealDataFlag = FALSE
If this flag is set to TRUE, the system will allow the user software to be querying the system for newly acquired data.

bConvertOnHost = TRUE
If this is set to TRUE, the raw 3D data is converted using the processing power of the host computer. If set to FALSE, the conversion will take place within the Optotrak system. It doesn't seem to produce any difference in performance.

bRigidOnHost = TRUE
If set to TRUE, the rigid body conversion will take place on the host computer. Otherwise, it will be done within the Optotrak system.

MarkerType = 3
The Certus User Guide suggests that the camera parameter files are optimised for a marker type. It doesn't go into particulars about this, apart from the Certus HD system should use 3, and the Certus should use 1, if used with metal base markers.

WavelengthType = 0
The Optotrak system can be used with two different 'colour' infrared LEDs: 0 is for 950 nm, and 1 is 880 nm.

ModelType = 1
Apparently, '0' is for Optotrak Certus, and '1' is for Optotrak Certus HD. Changing this value doesn't seem to make any difference.

TimeOut = 5
This doesn't appear to be documented, but it seems that it either refers to 'ResetTimeout' or 'DataTimeout' in the manual. Either it should be 1, or 3000. Changing this doesn't seem to make a difference.

bIgnoreVersionCheck = FALSE
Undocumented. Doesn't seem to do anything.

bPerformExpectedSystemCheck = FALSE
Undocumented. Doesn't seem to do anything.

bmode = 0
Undocumented. Doesn't seem to do anything.

RCParam1 = 0
Undocumented. Doesn't seem to do anything.

RCParam2 = 0
Undocumented. Doesn't seem to do anything.

3dErrorMode = 1
Undocumented. Doesn't seem to do anything.