PlusLib  2.9.0
Software library for tracked ultrasound image acquisition, calibration, and processing.
ATC3DGm.h
Go to the documentation of this file.
1 //*****************************************************************************//
2 //*****************************************************************************//
3 //
4 // Source: api\atc3dgm
5 //
6 // Author: crobertson
7 //
8 // Revision for ATC3DGm 33.0.14.8
9 //
10 //
11 // Date: 02/10/2010
12 //
13 // COPYRIGHT: COPYRIGHT ASCENSION TECHNOLOGY CORPORATION - 2010
14 //
15 //*****************************************************************************//
16 //*****************************************************************************//
17 
18 
19 #ifndef ATC3DGm_H // JPB bumper to prevent multiple-inclusion
20 #define ATC3DGm_H
21 
22 
23 #define CPLUSPLUS
24 
25 #ifdef LINUX
26 #define ATC3DGm_API
27 #else
28 #ifdef DEF_FILE
29  #ifdef ATC3DGm_EXPORTS
30  #define ATC3DGm_API
31  #else
32  #define ATC3DGm_API
33  #endif
34 #else
35  #ifdef CPLUSPLUS
36  #ifdef ATC3DGm_EXPORTS
37  #define ATC3DGm_API __declspec(dllexport)
38  #else
39  #define ATC3DGm_API __declspec(dllimport)
40  #endif
41  #else
42  #ifdef ATC3DGm_EXPORTS
43  #define ATC3DGm_API extern "C" __declspec(dllexport)
44  #else
45  #define ATC3DGm_API extern "C" __declspec(dllimport)
46  #endif
47  #endif
48 #endif
49 #endif
50 
51 
52 
53 
54 /*****************************************************************************
55  ENUMERATED CONSTANTS
56  *****************************************************************************/
57 
58 //*****************************************************************************
59 //
60 // ERROR MESSAGE format is as follows:
61 // ===================================
62 //
63 // All commands return a 32-bit integer with the following bit definitions:
64 //
65 // 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0
66 // 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
67 // +-+-+-+-+-+-+-----------+-------+-------------------------------+
68 // |E|W|X|R|B|M| Reserved |Address| Code |
69 // +-+-+-+-+-+-+-----------+-------+-------------------------------+
70 //
71 // where
72 //
73 // E - indicates an ERROR
74 // (Operation either cannot or will not proceed as intended
75 // e.g. EEPROM error of some kind. Requires hardware reset
76 // of system and/or replacement of hardware)
77 // W - indicates a WARNING
78 // (Operation may proceed but remedial action needs to be taken
79 // e.g. Sensor has been removed. Fix by replacing Sensor)
80 // X - indicates Transmitter related message
81 // R - indicates Sensor related message
82 // (If neither X nor R is set then the message is a SYSTEM message)
83 // B - indicates message originated in the BIRD hardware
84 // M - indicates there are more messages pending (no longer used)
85 //
86 // Address gives the index number of the device generating the message
87 // (Driver and system messages always have address 0)
88 //
89 // Code - is the status code as enumerated in BIRD_ERROR_CODES
90 //
91 //*****************************************************************************
93 {
94  // ERROR CODE DISPOSITION
95  // | (Some error codes have been retired.
96  // | The column below describes which codes
97  // | have been retired and why. O = Obolete,
98  // V I = handled internally)
99  BIRD_ERROR_SUCCESS=0, //00 < > No error
100  BIRD_ERROR_PCB_HARDWARE_FAILURE, //01 < > indeterminate failure on PCB
101  BIRD_ERROR_TRANSMITTER_EEPROM_FAILURE, //02 <I> transmitter bad eeprom
102  BIRD_ERROR_SENSOR_SATURATION_START, //03 <I> sensor has gone into saturation
103  BIRD_ERROR_ATTACHED_DEVICE_FAILURE, //04 <O> either a sensor or transmitter reports bad
104  BIRD_ERROR_CONFIGURATION_DATA_FAILURE, //05 <O> device EEPROM detected but corrupt
105  BIRD_ERROR_ILLEGAL_COMMAND_PARAMETER, //06 < > illegal PARAMETER_TYPE passed to driver
106  BIRD_ERROR_PARAMETER_OUT_OF_RANGE, //07 < > PARAMETER_TYPE legal, but PARAMETER out of range
107  BIRD_ERROR_NO_RESPONSE, //08 <O> no response at all from target card firmware
108  BIRD_ERROR_COMMAND_TIME_OUT, //09 < > time out before response from target board
109  BIRD_ERROR_INCORRECT_PARAMETER_SIZE, //10 < > size of parameter passed is incorrect
110  BIRD_ERROR_INVALID_VENDOR_ID, //11 <O> driver started with invalid PCI vendor ID
111  BIRD_ERROR_OPENING_DRIVER, //12 < > couldn't start driver
112  BIRD_ERROR_INCORRECT_DRIVER_VERSION, //13 < > wrong driver version found
113  BIRD_ERROR_NO_DEVICES_FOUND, //14 < > no BIRDs were found anywhere
114  BIRD_ERROR_ACCESSING_PCI_CONFIG, //15 < > couldn't access BIRDs config space
115  BIRD_ERROR_INVALID_DEVICE_ID, //16 < > device ID out of range
116  BIRD_ERROR_FAILED_LOCKING_DEVICE, //17 < > couldn't lock driver
117  BIRD_ERROR_BOARD_MISSING_ITEMS, //18 < > config space items missing
118  BIRD_ERROR_NOTHING_ATTACHED, //19 <O> card found but no sensors or transmitters attached
119  BIRD_ERROR_SYSTEM_PROBLEM, //20 <O> non specific system problem
120  BIRD_ERROR_INVALID_SERIAL_NUMBER, //21 <O> serial number does not exist in system
121  BIRD_ERROR_DUPLICATE_SERIAL_NUMBER, //22 <O> 2 identical serial numbers passed in set command
122  BIRD_ERROR_FORMAT_NOT_SELECTED, //23 <O> data format not selected yet
123  BIRD_ERROR_COMMAND_NOT_IMPLEMENTED, //24 < > valid command, not implemented yet
124  BIRD_ERROR_INCORRECT_BOARD_DEFAULT, //25 < > incorrect response to reading parameter
125  BIRD_ERROR_INCORRECT_RESPONSE, //26 <O> response received, but data,values in error
126  BIRD_ERROR_NO_TRANSMITTER_RUNNING, //27 < > there is no transmitter running
127  BIRD_ERROR_INCORRECT_RECORD_SIZE, //28 < > data record size does not match data format size
128  BIRD_ERROR_TRANSMITTER_OVERCURRENT, //29 <I> transmitter over-current detected
129  BIRD_ERROR_TRANSMITTER_OPEN_CIRCUIT, //30 <I> transmitter open circuit or removed
130  BIRD_ERROR_SENSOR_EEPROM_FAILURE, //31 <I> sensor bad eeprom
131  BIRD_ERROR_SENSOR_DISCONNECTED, //32 <I> previously good sensor has been removed
132  BIRD_ERROR_SENSOR_REATTACHED, //33 <I> previously good sensor has been reattached
133  BIRD_ERROR_NEW_SENSOR_ATTACHED, //34 <O> new sensor attached
134  BIRD_ERROR_UNDOCUMENTED, //35 <I> undocumented error code received from bird
135  BIRD_ERROR_TRANSMITTER_REATTACHED, //36 <I> previously good transmitter has been reattached
136  BIRD_ERROR_WATCHDOG, //37 < > watchdog timeout
137  BIRD_ERROR_CPU_TIMEOUT_START, //38 <I> CPU ran out of time executing algorithm (start)
138  BIRD_ERROR_PCB_RAM_FAILURE, //39 <I> BIRD on-board RAM failure
139  BIRD_ERROR_INTERFACE, //40 <I> BIRD PCI interface error
140  BIRD_ERROR_PCB_EPROM_FAILURE, //41 <I> BIRD on-board EPROM failure
141  BIRD_ERROR_SYSTEM_STACK_OVERFLOW, //42 <I> BIRD program stack overrun
142  BIRD_ERROR_QUEUE_OVERRUN, //43 <I> BIRD error message queue overrun
143  BIRD_ERROR_PCB_EEPROM_FAILURE, //44 <I> PCB bad EEPROM
144  BIRD_ERROR_SENSOR_SATURATION_END, //45 <I> Sensor has gone out of saturation
145  BIRD_ERROR_NEW_TRANSMITTER_ATTACHED, //46 <O> new transmitter attached
146  BIRD_ERROR_SYSTEM_UNINITIALIZED, //47 < > InitializeBIRDSystem not called yet
147  BIRD_ERROR_12V_SUPPLY_FAILURE, //48 <I > 12V Power supply not within specification
148  BIRD_ERROR_CPU_TIMEOUT_END, //49 <I> CPU ran out of time executing algorithm (end)
149  BIRD_ERROR_INCORRECT_PLD, //50 < > PCB PLD not compatible with this API DLL
150  BIRD_ERROR_NO_TRANSMITTER_ATTACHED, //51 < > No transmitter attached to this ID
151  BIRD_ERROR_NO_SENSOR_ATTACHED, //52 < > No sensor attached to this ID
152 
153  // new error codes added 2/27/03
154  // (Version 1,31,5,01) multi-sensor, synchronized
155  BIRD_ERROR_SENSOR_BAD, //53 < > Non-specific hardware problem
156  BIRD_ERROR_SENSOR_SATURATED, //54 < > Sensor saturated error
157  BIRD_ERROR_CPU_TIMEOUT, //55 < > CPU unable to complete algorithm on current cycle
158  BIRD_ERROR_UNABLE_TO_CREATE_FILE, //56 < > Could not create and open file for saving setup
159  BIRD_ERROR_UNABLE_TO_OPEN_FILE, //57 < > Could not open file for restoring setup
160  BIRD_ERROR_MISSING_CONFIGURATION_ITEM, //58 < > Mandatory item missing from configuration file
161  BIRD_ERROR_MISMATCHED_DATA, //59 < > Data item in file does not match system value
162  BIRD_ERROR_CONFIG_INTERNAL, //60 < > Internal error in config file handler
163  BIRD_ERROR_UNRECOGNIZED_MODEL_STRING, //61 < > Board does not have a valid model string
164  BIRD_ERROR_INCORRECT_SENSOR, //62 < > Invalid sensor type attached to this board
165  BIRD_ERROR_INCORRECT_TRANSMITTER, //63 < > Invalid transmitter type attached to this board
166 
167  // new error code added 1/18/05
168  // (Version 1.31.5.22)
169  // multi-sensor,
170  // synchronized-fluxgate,
171  // integrating micro-sensor,
172  // flat panel transmitter
173  BIRD_ERROR_ALGORITHM_INITIALIZATION, //64 < > Flat panel algorithm initialization failed
174 
175  // new error code for multi-sync
176  BIRD_ERROR_LOST_CONNECTION, //65 < > USB connection has been lost
177  BIRD_ERROR_INVALID_CONFIGURATION, //66 < > Invalid configuration
178 
179  // VPD error code
180  BIRD_ERROR_TRANSMITTER_RUNNING, //67 < > TX running while reading/writing VPD
181 
182  BIRD_ERROR_MAXIMUM_VALUE = 0x7F // ## value = number of error codes ##
183 };
184 
185 // error message defines
186 #define ERROR_FLAG 0x80000000
187 #define WARNING_FLAG 0x40000000
188 
189 #define XMTR_ERROR_SOURCE 0x20000000
190 #define RCVR_ERROR_SOURCE 0x10000000
191 #define BIRD_ERROR_SOURCE 0x08000000
192 
193 #define DIAG_ERROR_SOURCE 0x04000000
194 
195 // SYSTEM error = none of the above
196 
197 // NOTE: The MULTIPLE_ERRORS flag is no longer generated
198 // It has been left in for backwards compatibility
199 #define MULTIPLE_ERRORS 0x04000000
200 
201 // DEVICE STATUS ERROR BIT DEFINITIONS
202 #define VALID_STATUS 0x00000000
203 #define GLOBAL_ERROR 0x00000001
204 #define NOT_ATTACHED 0x00000002
205 #define SATURATED 0x00000004
206 #define BAD_EEPROM 0x00000008
207 #define HARDWARE 0x00000010
208 #define NON_EXISTENT 0x00000020
209 #define UNINITIALIZED 0x00000040
210 //#define NO_TRANSMITTER 0x00000080
211 #define NO_TRANSMITTER_RUNNING 0x00000080
212 #define BAD_12V 0x00000100
213 #define CPU_TIMEOUT 0x00000200
214 #define INVALID_DEVICE 0x00000400
215 #define NO_TRANSMITTER_ATTACHED 0x00000800
216 #define OUT_OF_MOTIONBOX 0x00001000
217 #define ALGORITHM_INITIALIZING 0x00002000
218 
219 #define TRUE 1
220 #define FALSE 0
221 
222 
223 
224 
225 
226 
228 {
229  SIMPLE_MESSAGE, // short string describing error code
230  VERBOSE_MESSAGE, // long string describing error code
231 };
232 
234 {
235  SERIAL_NUMBER_TX, // attached transmitter's serial number
236  REFERENCE_FRAME, // structure of type DOUBLE_ANGLES_RECORD
237  XYZ_REFERENCE_FRAME, // boolean value to select/deselect mode
238  VITAL_PRODUCT_DATA_TX, // single byte parameter to be read/write from VPD section of xmtr EEPROM
239  MODEL_STRING_TX, // 11 byte null terminated character string
240  PART_NUMBER_TX, // 16 byte null terminated character string
242 };
243 
245 {
246  DATA_FORMAT, // enumerated constant of type DATA_FORMAT_TYPE
247  ANGLE_ALIGN, // structure of type DOUBLE_ANGLES_RECORD
248  HEMISPHERE, // enumerated constant of type HEMISPHERE_TYPE
249  FILTER_AC_WIDE_NOTCH, // boolean value to select/deselect filter
250  FILTER_AC_NARROW_NOTCH, // boolean value to select/deselect filter
251  FILTER_DC_ADAPTIVE, // double value in range 0.0 (no filtering) to 1.0 (max)
252  FILTER_ALPHA_PARAMETERS,// structure of type ADAPTIVE_PARAMETERS
253  FILTER_LARGE_CHANGE, // boolean value to select/deselect filter
254  QUALITY, // structure of type QUALITY_PARAMETERS
255  SERIAL_NUMBER_RX, // attached sensor's serial number
256  SENSOR_OFFSET, // structure of type DOUBLE_POSITION_RECORD
257  VITAL_PRODUCT_DATA_RX, // single byte parameter to be read/write from VPD section of sensor EEPROM
258  VITAL_PRODUCT_DATA_PREAMP, // single byte parameter to be read/write from VPD section of preamp EEPROM
259  MODEL_STRING_RX, // 11 byte null terminated character string
260  PART_NUMBER_RX, // 16 byte null terminated character string
261  MODEL_STRING_PREAMP, // 11 byte null terminated character string
262  PART_NUMBER_PREAMP, // 16 byte null terminated character string
264 };
265 
267 {
268  SERIAL_NUMBER_PCB, // installed board's serial number
269  BOARD_SOFTWARE_REVISIONS, // Extra SW_REV's added 10-5-06 JBD
272 
273 
274  VITAL_PRODUCT_DATA_PCB, // single byte parameter to be read/write from VPD section of xmtr EEPROM
275  MODEL_STRING_PCB, // 11 byte null terminated character string
276  PART_NUMBER_PCB, // 16 byte null terminated character string
278 };
279 
281 {
282  SELECT_TRANSMITTER, // short int equal to transmitterID of selected transmitter
283  POWER_LINE_FREQUENCY, // double value (range is hardware dependent)
284  AGC_MODE, // enumerated constant of type AGC_MODE_TYPE
285  MEASUREMENT_RATE, // double value (range is hardware dependent)
286  MAXIMUM_RANGE, // double value (range is hardware dependent)
287  METRIC, // boolean value to select metric units for position
291  REPORT_RATE, // single byte 1-127
292  COMMUNICATIONS_MEDIA, // Media structure
293  LOGGING, // Boolean
294  RESET, // Boolean
295  AUTOCONFIG, // BYTE 1-127
296  END_OF_LIST // end of list place holder
297 };
298 
300 {
302  USB, // Auto select USB driver
303  RS232, // Force to RS232
304  TCPIP // Force to TCP/IP
305 };
306 
308 {
311 };
312 
314 {
321 };
322 
324 {
325  TRANSMITTER_AND_SENSOR_AGC, // Old style normal addressing mode
326  SENSOR_AGC_ONLY // Old style extended addressing mode
327 };
328 
330 {
332 
333  // SHORT (integer) formats
341 
342  // DOUBLE (floating point) formats
347  DOUBLE_POSITION_ANGLES, // system default
350 
351  // DOUBLE (floating point) formats with time stamp appended
359 
360  // DOUBLE (floating point) formats with time stamp appended and quality #
368 
369  // These DATA_FORMAT_TYPE codes contain every format in a single structure
374  DOUBLE_ALL_TIME_STAMP_Q_RAW, // this format contains a raw data matrix and
375  // is for factory use only...
376 
377  // DOUBLE (floating point) formats with time stamp appended, quality # and button
381 
382  // New types for button and wrapper
384 
386 };
387 
389 {
390  ATC3DG_MEDSAFE, // Standalone, DSP, 4 sensor
391  PCIBIRD_STD1, // single standard sensor
392  PCIBIRD_STD2, // dual standard sensor
393  PCIBIRD_8mm1, // single 8mm sensor
394  PCIBIRD_8mm2, // dual 8mm sensor
395  PCIBIRD_2mm1, // single 2mm sensor (microsensor)
396  PCIBIRD_2mm2, // dual 2mm sensor (microsensor)
397  PCIBIRD_FLAT, // flat transmitter, 8mm
398  PCIBIRD_FLAT_MICRO1, // flat transmitter, single TEM sensor (all types)
399  PCIBIRD_FLAT_MICRO2, // flat transmitter, dual TEM sensor (all types)
400  PCIBIRD_DSP4, // Standalone, DSP, 4 sensor
401  PCIBIRD_UNKNOWN, // default
402  ATC3DG_BB // BayBird
403 };
404 
406 {
407  STANDARD_SENSOR, // 25mm standard sensor
408  TYPE_800_SENSOR, // 8mm sensor
409  STANDARD_TRANSMITTER, // TX for 25mm sensor
410  MINIBIRD_TRANSMITTER, // TX for 8mm sensor
411  SMALL_TRANSMITTER, // "compact" transmitter
412  TYPE_500_SENSOR, // 5mm sensor
413  TYPE_180_SENSOR, // 1.8mm microsensor
414  TYPE_130_SENSOR, // 1.3mm microsensor
415  TYPE_TEM_SENSOR, // 1.8mm, 1.3mm, 0.Xmm microsensors
416  UNKNOWN_SENSOR, // default
418  TYPE_800_BB_SENSOR, // BayBird sensor
419  TYPE_800_BB_STD_TRANSMITTER, // BayBird standard TX
420  TYPE_800_BB_SMALL_TRANSMITTER, // BayBird small TX
421  TYPE_090_BB_SENSOR // Baybird 0.9 mm sensor
422 };
423 
424 // Async and Sync sensor id parameter
425 #define ALL_SENSORS 0xffff
426 /*****************************************************************************
427  TYPEDEF DEFINITIONS
428  *****************************************************************************/
429 
430 #ifndef BASETYPES
431 #define BASETYPES
432 typedef unsigned long ULONG;
433 typedef ULONG *PULONG;
434 typedef unsigned short USHORT;
435 typedef USHORT *PUSHORT;
436 typedef short SHORT;
437 typedef SHORT *PSHORT;
438 typedef unsigned char UCHAR;
439 typedef UCHAR *PUCHAR;
440 typedef char *PSZ;
441 #endif /* !BASETYPES */
442 
443 typedef char CHAR;
444 typedef const CHAR *LPCSTR, *PCSTR;
445 //typedef LPCSTR LPCTSTR;
446 typedef int BOOL;
448 
449 typedef unsigned char BYTE;
450 typedef unsigned short WORD;
451 typedef unsigned long DWORD;
452 
453 /*****************************************************************************
454  STRUCTURE DEFINITIONS
455  *****************************************************************************/
456 
458 {
465 
467 {
474 
476 {
484  char modelString[10];
485 
487 
489 {
492  double maximumRange;
500 
502 {
504  union
505  {
506  struct
507  {
509  } rs232;
510  struct
511  {
514  } tcpip;
515  };
517 
519 {
522  USHORT vm[7];
525 
526 typedef struct tagQUALITY_PARAMETERS
527 {
533 
534 // New Drivebay system parameter structure(s)
536 {
540 
542 {
548 
550 {
551  UCHAR suite; // User sets this, 0 - All Suites
552  UCHAR test; // User sets this, 0 - All Tests
553 
554  UCHAR suites; // set, returns suites run
555  // get, returns num of suites, not used for # test query
556  UCHAR tests; // set, returns tests run in the given suite
557  // get, returns num of tests for given suite, not used for suite query
558  PUCHAR pTestName; // User supplied ptr to 64 bytes, we fill it in
560 
561  USHORT diagError; // set only, result of diagnostic execution
563 
564 typedef struct tagBOARD_REVISIONS
565 {
566  USHORT boot_loader_sw_number; // example 3.1 -> revision is 3, number is 1
579 
580 //
581 // Data formatting structures
582 //
583 typedef struct tagSHORT_POSITION
584 {
585  short x;
586  short y;
587  short z;
589 
590 typedef struct tagSHORT_ANGLES
591 {
592  short a; // azimuth
593  short e; // elevation
594  short r; // roll
596 
597 typedef struct tagSHORT_MATRIX
598 {
599  short s[3][3];
601 
602 typedef struct tagSHORT_QUATERNIONS
603 {
604  short q[4];
606 
608 {
609  short x;
610  short y;
611  short z;
612  short a;
613  short e;
614  short r;
616 
618 {
619  short x;
620  short y;
621  short z;
622  short s[3][3];
624 
626 {
627  short x;
628  short y;
629  short z;
630  short q[4];
632 
633 typedef struct tagDOUBLE_POSITION
634 {
635  double x;
636  double y;
637  double z;
639 
640 typedef struct tagDOUBLE_ANGLES
641 {
642  double a; // azimuth
643  double e; // elevation
644  double r; // roll
646 
647 typedef struct tagDOUBLE_MATRIX
648 {
649  double s[3][3];
651 
652 typedef struct tagDOUBLE_QUATERNIONS
653 {
654  double q[4];
656 
658 {
659  double x;
660  double y;
661  double z;
662  double a;
663  double e;
664  double r;
666 
668 {
669  double x;
670  double y;
671  double z;
672  double s[3][3];
674 
676 {
677  double x;
678  double y;
679  double z;
680  double q[4];
682 
684 {
685  double x;
686  double y;
687  double z;
688  double time;
690 
692 {
693  double a; // azimuth
694  double e; // elevation
695  double r; // roll
696  double time;
698 
700 {
701  double s[3][3];
702  double time;
704 
706 {
707  double q[4];
708  double time;
710 
712 {
713  double x;
714  double y;
715  double z;
716  double a;
717  double e;
718  double r;
719  double time;
721 
723 {
724  double x;
725  double y;
726  double z;
727  double s[3][3];
728  double time;
730 
732 {
733  double x;
734  double y;
735  double z;
736  double q[4];
737  double time;
739 
741 {
742  double x;
743  double y;
744  double z;
745  double time;
748 
750 {
751  double a; // azimuth
752  double e; // elevation
753  double r; // roll
754  double time;
757 
759 {
760  double s[3][3];
761  double time;
764 
766 {
767  double q[4];
768  double time;
771 
773 {
774  double x;
775  double y;
776  double z;
777  double a;
778  double e;
779  double r;
780  double time;
783 
785 {
786  double x;
787  double y;
788  double z;
789  double s[3][3];
790  double time;
793 
795 {
796  double x;
797  double y;
798  double z;
799  double q[4];
800  double time;
803 
805 {
806  double x;
807  double y;
808  double z;
809  double a;
810  double e;
811  double r;
812  double time;
816 
818 {
819  double x;
820  double y;
821  double z;
822  double s[3][3];
823  double time;
827 
829 {
830  double x;
831  double y;
832  double z;
833  double q[4];
834  double time;
838 
840 {
841  double x;
842  double y;
843  double z;
844  double a;
845  double e;
846  double r;
847  double s[3][3];
848  double q[4];
849  double time;
853 
854 typedef struct tagSHORT_ALL_RECORD
855 {
856  short x;
857  short y;
858  short z;
859  short a; // azimuth
860  short e; // elevation
861  short r; // roll
862  short s[3][3];
863  short q[4];
865 
866 typedef struct tagDOUBLE_ALL_RECORD
867 {
868  double x;
869  double y;
870  double z;
871  double a; // azimuth
872  double e; // elevation
873  double r; // roll
874  double s[3][3];
875  double q[4];
877 
879 {
880  double x;
881  double y;
882  double z;
883  double a; // azimuth
884  double e; // elevation
885  double r; // roll
886  double s[3][3];
887  double q[4];
888  double time;
890 
892 {
893  double x;
894  double y;
895  double z;
896  double a; // azimuth
897  double e; // elevation
898  double r; // roll
899  double s[3][3];
900  double q[4];
901  double time;
904 
906 {
907  double x;
908  double y;
909  double z;
910  double a; // azimuth
911  double e; // elevation
912  double r; // roll
913  double s[3][3];
914  double q[4];
915  double time;
917  double raw[3][3];
919 
920 
921 
922 
923 /*****************************************************************************
924  FUNCTION PROTOTYPES
925  *****************************************************************************/
926 
927 /*
928  InitializeBIRDSystem Starts and initializes driver, resets
929  hardware and interrogates hardware. Builds
930  local database of system resources.
931 
932  Parameters Passed: none
933 
934  Return Value: error status
935 
936  Remarks: Can be used anytime a catastrophic failure
937  has occurred and the system needs to be
938  restarted.
939 
940 */
942 
943 /*
944  GetBIRDSystemConfiguration
945 
946  Parameters Passed: SYSTEM_CONFIGURATION*
947 
948  Return Value: error status
949 
950  Remarks: Returns SYSTEM_CONFIGURATION structure
951  It contains values equal to the number of
952  transmitters, sensors and boards detected
953  in the system. (The board information is for
954  test/diagnostic purposes, all commands
955  reference sensors and transmitters only) Once
956  the number of devices is known, (e.g. n) the
957  range of IDs for those devices becomes 0..(n-1)
958 */
960  SYSTEM_CONFIGURATION* systemConfiguration
961  );
962 
963 /*
964  GetTransmitterConfiguration
965 
966  Parameters Passed: USHORT transmitterID
967  TRANSMITTER_CONFIGURATION *transmitterConfiguration
968 
969  Return Value: error status
970 
971  Remarks: After getting system config the user can then pass
972  the index of a transmitter of interest to this function
973  which will then return the config for that transmitter.
974  Items of interest are the serial number and status.
975 
976 */
978  USHORT transmitterID,
979  TRANSMITTER_CONFIGURATION* transmitterConfiguration
980  );
981 
982 /*
983  GetSensorConfiguration
984 
985  Parameters Passed: USHORT sensorID,
986  SENSOR_CONFIGURATION* sensorConfiguration
987 
988  Return Value: error status
989 
990  Remarks: Similar to the transmitter function.
991 
992 */
994  USHORT sensorID,
995  SENSOR_CONFIGURATION* sensorConfiguration
996  );
997 
998 /*
999  GetBoardConfiguration
1000 
1001  Parameters Passed: USHORT boardID,
1002  BOARD_CONFIGURATION* boardConfiguration
1003 
1004  Return Value: error status
1005 
1006  Remarks: Similar to the Sensor and Transmitter
1007  functions. Also returns information on
1008  how many sensors and transmitters are
1009  attached. NOTE: Board information is not
1010  needed during normal operation this is
1011  only provided for "accounting" purposes.
1012 
1013 */
1015  USHORT boardID,
1016  BOARD_CONFIGURATION* boardConfiguration
1017  );
1018 
1019 /*
1020  GetAsynchronousRecord
1021 
1022  Parameters Passed: USHORT sensorID,
1023  void *pRecord,
1024  int recordSize
1025 
1026  Return Value: error status
1027 
1028  Remarks: Returns data immediately in the currently
1029  selected format from the last measurement
1030  cycle. Requires user providing a buffer large
1031  enough for the result otherwise an error is
1032  generated and data lost.
1033  (Old style BIRD POINT mode)
1034 
1035 */
1037  USHORT sensorID,
1038  void *pRecord,
1039  int recordSize
1040  );
1041 
1042 /*
1043  GetSynchronousRecord
1044 
1045  Parameters Passed: USHORT sensorID,
1046  void *pRecord,
1047  int recordSize
1048 
1049  Return Value: error status
1050 
1051  Remarks: Returns a record after next measurement cycle. Puts
1052  system into mode where records are generated 1/cycle.
1053  Will return one and only one record per measurement
1054  cycle. Will queue the records for each measurement
1055  cycle if command not issued sufficiently often. If
1056  command issued too often will time-out with no data.
1057  (old style BIRD STREAM mode)
1058 
1059 */
1061  USHORT sensorID,
1062  void *pRecord,
1063  int recordSize
1064  );
1065 
1066 
1067 
1068 /*
1069  GetSystemParameter
1070 
1071  Parameters Passed: PARAMETER_TYPE parameterType,
1072  void *pBuffer,
1073  int bufferSize
1074 
1075  Return Value: error status
1076 
1077  Remarks: When a properly enumerated parameter type constant
1078  is used, the command will return the parameter value
1079  to the buffer provided by the user. An error is
1080  generated if the buffer is incorrectly sized
1081 
1082 */
1084  enum SYSTEM_PARAMETER_TYPE parameterType,
1085  void *pBuffer,
1086  int bufferSize
1087  );
1088 
1089 
1090 /*
1091  SetSystemParameter
1092 
1093  Parameters Passed: PARAMETER_TYPE parameterType,
1094  void *pBuffer,
1095  int bufferSize
1096 
1097  Return Value: error status
1098 
1099  Remarks: Similar to GetSystemParameter but allows user
1100  to set (write) the parameter.
1101 
1102 */
1104  enum SYSTEM_PARAMETER_TYPE parameterType,
1105  void *pBuffer,
1106  int bufferSize
1107  );
1108 
1109 
1110 /*
1111  GetSensorParameter
1112 
1113  Parameters Passed: USHORT sensorID,
1114  PARAMETER_TYPE parameterType,
1115  void *pBuffer,
1116  int bufferSize
1117 
1118  Return Value: error status
1119 
1120  Remarks: When a sensor is selected with a valid index (ID)
1121  and a properly enumerated parameter type constant
1122  is used, the command will return the parameter value
1123  to the buffer provided by the user. An error is
1124  generated if the buffer is incorrectly sized
1125 
1126 */
1128  USHORT sensorID,
1129  enum SENSOR_PARAMETER_TYPE parameterType,
1130  void *pBuffer,
1131  int bufferSize
1132  );
1133 
1134 
1135 /*
1136  SetSensorParameter
1137 
1138  Parameters Passed: USHORT sensorID,
1139  PARAMETER_TYPE parameterType,
1140  void *pBuffer,
1141  int bufferSize
1142 
1143  Return Value: error status
1144 
1145  Remarks: Similar to GetSensorParameter but allows user
1146  to set (write) the parameter.
1147 
1148 */
1150  USHORT sensorID,
1151  enum SENSOR_PARAMETER_TYPE parameterType,
1152  void *pBuffer,
1153  int bufferSize
1154  );
1155 
1156 
1157 /*
1158  GetTransmitterParameter
1159 
1160  Parameters Passed: USHORT transmitterID,
1161  PARAMETER_TYPE parameterType,
1162  void *pBuffer,
1163  int bufferSize
1164 
1165  Return Value: error status
1166 
1167  Remarks: Same as Sensor command
1168 
1169 */
1171  USHORT transmitterID,
1172  enum TRANSMITTER_PARAMETER_TYPE parameterType,
1173  void *pBuffer,
1174  int bufferSize
1175  );
1176 
1177 
1178 
1179 
1180 /*
1181  SetTransmitterParameter
1182 
1183  Parameters Passed: USHORT transmitterID,
1184  PARAMETER_TYPE parameterType,
1185  void *pBuffer,
1186  int bufferSize
1187 
1188  Return Value: error status
1189 
1190  Remarks: Same as sensor command
1191 
1192 */
1194  USHORT transmitterID,
1195  enum TRANSMITTER_PARAMETER_TYPE parameterType,
1196  void *pBuffer,
1197  int bufferSize
1198  );
1199 
1200 /*
1201  GetBIRDError
1202 
1203  Parameters Passed: none
1204 
1205  Return Value: error status
1206 
1207  Remarks: Returns next error in queue
1208  if available
1209 
1210 */
1212  void
1213  );
1214 
1215 #define GetPOSTError GetBIRDError
1216 #define GetDIAGError GetBIRDError
1217 
1218 /*
1219  GetErrorText
1220 
1221  Parameters Passed: int errorCode
1222  char *pBuffer
1223  int bufferSize
1224  int type
1225 
1226  Return Value: error status as a text string
1227 
1228  Remarks: ErrorCode contains the error code returned from
1229  either a command or in response to GetBIRDError
1230  and which is to be described by a text string.
1231  Pass a pointer pBuffer to a buffer to contain
1232  the result of the command. The size of the
1233  buffer is contained in bufferSize. The type
1234  parameter is an enumerated constant of
1235  the type MESSAGE_TYPE.
1236 
1237 */
1239  int errorCode,
1240  char *pBuffer,
1241  int bufferSize,
1242  enum MESSAGE_TYPE type
1243  );
1244 
1245 /*
1246 
1247 */
1249  USHORT sensorID
1250  );
1251 
1252 /*
1253 
1254 */
1256  USHORT transmitterID
1257  );
1258 
1259 /*
1260 
1261 */
1263  USHORT boardID
1264  );
1265 
1266 /*
1267 
1268 */
1270  // no id required
1271  );
1272 
1273 /*
1274 
1275 */
1277  LPCSTR lpFileName
1278  );
1279 
1280 /*
1281 
1282 */
1284  LPCSTR lpFileName
1285  );
1286 
1287 /*
1288 
1289 */
1291  USHORT boardID,
1292  enum BOARD_PARAMETER_TYPE parameterType,
1293  void *pBuffer,
1294  int bufferSize
1295  );
1296 
1297 /*
1298 
1299 */
1301  USHORT boardID,
1302  enum BOARD_PARAMETER_TYPE parameterType,
1303  void *pBuffer,
1304  int bufferSize
1305  );
1306 
1307 /*
1308 
1309 */
1310 ATC3DGm_API int CloseBIRDSystem(void);
1311 
1312 #endif // ATC3DGm_H
1313 
USHORT boot_loader_sw_revision
Definition: ATC3DGm.h:567
struct tagDOUBLE_ALL_TIME_STAMP_Q_RAW_RECORD DOUBLE_ALL_TIME_STAMP_Q_RAW_RECORD
ATC3DGm_API int GetErrorText(int errorCode, char *pBuffer, int bufferSize, enum MESSAGE_TYPE type)
#define ATC3DGm_API
Definition: ATC3DGm.h:39
struct tagDOUBLE_POSITION_TIME_Q DOUBLE_POSITION_TIME_Q_RECORD
USHORT numberTransmitters
Definition: ATC3DGm.h:480
struct tagDOUBLE_QUATERNIONS_TIME_Q DOUBLE_QUATERNIONS_TIME_Q_RECORD
enum DEVICE_TYPES type
Definition: ATC3DGm.h:471
Definition: ATC3DGm.h:303
USHORT mdsp_sw_revision
Definition: ATC3DGm.h:569
ULONG * PULONG
Definition: ATC3DGm.h:433
const CHAR * PCSTR
Definition: ATC3DGm.h:444
ATC3DGm_API int GetSensorParameter(USHORT sensorID, enum SENSOR_PARAMETER_TYPE parameterType, void *pBuffer, int bufferSize)
struct tagSHORT_POSITION_MATRIX SHORT_POSITION_MATRIX_RECORD
ATC3DGm_API int SetSensorParameter(USHORT sensorID, enum SENSOR_PARAMETER_TYPE parameterType, void *pBuffer, int bufferSize)
unsigned char UCHAR
Definition: ATC3DGm.h:438
struct tagDOUBLE_POSITION_MATRIX_TIME_Q_RECORD DOUBLE_POSITION_MATRIX_TIME_Q_RECORD
Definition: ATC3DGm.h:316
struct tagSHORT_QUATERNIONS SHORT_QUATERNIONS_RECORD
struct tagDOUBLE_QUATERNIONS_TIME_STAMP DOUBLE_QUATERNIONS_TIME_STAMP_RECORD
struct tagDOUBLE_POSITION_ANGLES DOUBLE_POSITION_ANGLES_RECORD
ATC3DGm_API int GetBIRDSystemConfiguration(SYSTEM_CONFIGURATION *systemConfiguration)
USHORT dipole_sw_revision
Definition: ATC3DGm.h:577
struct tagCOMMUNICATIONS_MEDIA_PARAMETERS::@2::@4 rs232
USHORT alphaMin[7]
Definition: ATC3DGm.h:520
struct tagCOMMUNICATIONS_MEDIA_PARAMETERS::@2::@5 tcpip
ATC3DGm_API DEVICE_STATUS GetSystemStatus()
struct tagSHORT_MATRIX SHORT_MATRIX_RECORD
unsigned short WORD
Definition: ATC3DGm.h:450
const CHAR * LPCSTR
Definition: ATC3DGm.h:444
double s[3][3]
Definition: ATC3DGm.h:649
USHORT sixdof_sw_number
Definition: ATC3DGm.h:574
ATC3DGm_API int SetTransmitterParameter(USHORT transmitterID, enum TRANSMITTER_PARAMETER_TYPE parameterType, void *pBuffer, int bufferSize)
struct tagDOUBLE_POSITION_ANGLES_TIME_STAMP DOUBLE_POSITION_ANGLES_TIME_STAMP_RECORD
double s[3][3]
Definition: ATC3DGm.h:874
struct tagSYSTEM_CONFIGURATION SYSTEM_CONFIGURATION
struct tagDOUBLE_POSITION_ANGLES_MATRIX_QUATERNION_TIME_Q_BUTTON_RECORD DOUBLE_POSITION_ANGLES_MATRIX_QUATERNION_TIME_Q_BUTTON_RECORD
struct tagDOUBLE_MATRIX_TIME_Q DOUBLE_MATRIX_TIME_Q_RECORD
struct tagSHORT_POSITION_ANGLES SHORT_POSITION_ANGLES_RECORD
ATC3DGm_API int RestoreSystemConfiguration(LPCSTR lpFileName)
struct tagDOUBLE_POSITION_MATRIX_STAMP_RECORD DOUBLE_POSITION_MATRIX_TIME_STAMP_RECORD
struct tagBOARD_CONFIGURATION BOARD_CONFIGURATION
ATC3DGm_API DEVICE_STATUS GetTransmitterStatus(USHORT transmitterID)
ATC3DGm_API int GetBoardParameter(USHORT boardID, enum BOARD_PARAMETER_TYPE parameterType, void *pBuffer, int bufferSize)
USHORT mdsp_sw_number
Definition: ATC3DGm.h:568
struct tagCOMMUNICATIONS_MEDIA_PARAMETERS COMMUNICATIONS_MEDIA_PARAMETERS
USHORT * PUSHORT
Definition: ATC3DGm.h:435
ATC3DGm_API int InitializeBIRDSystem(void)
ATC3DGm_API int SetSystemParameter(enum SYSTEM_PARAMETER_TYPE parameterType, void *pBuffer, int bufferSize)
ATC3DGm_API int GetTransmitterConfiguration(USHORT transmitterID, TRANSMITTER_CONFIGURATION *transmitterConfiguration)
USHORT dipole_sw_number
Definition: ATC3DGm.h:576
struct tagSHORT_ANGLES SHORT_ANGLES_RECORD
struct tagBOARD_REVISIONS BOARD_REVISIONS
char CHAR
Definition: ATC3DGm.h:443
BOARD_PARAMETER_TYPE
Definition: ATC3DGm.h:266
UCHAR * PUCHAR
Definition: ATC3DGm.h:439
Definition: ATC3DGm.h:317
TRANSMITTER_PARAMETER_TYPE
Definition: ATC3DGm.h:233
struct tagDOUBLE_ANGLES_TIME_STAMP DOUBLE_ANGLES_TIME_STAMP_RECORD
struct tagDOUBLE_QUATERNIONS DOUBLE_QUATERNIONS_RECORD
BOARD_TYPES
Definition: ATC3DGm.h:388
struct tagDOUBLE_POSITION_TIME_STAMP DOUBLE_POSITION_TIME_STAMP_RECORD
short s[3][3]
Definition: ATC3DGm.h:862
unsigned long DWORD
Definition: ATC3DGm.h:451
struct tagDOUBLE_MATRIX DOUBLE_MATRIX_RECORD
struct tagDOUBLE_ALL_RECORD DOUBLE_ALL_RECORD
USHORT sixdof_sw_revision
Definition: ATC3DGm.h:575
struct tagDOUBLE_POSITION_ANGLES_TIME_Q_RECORD DOUBLE_POSITION_ANGLES_TIME_Q_RECORD
MESSAGE_TYPE
Definition: ATC3DGm.h:227
ATC3DGm_API DEVICE_STATUS GetSensorStatus(USHORT sensorID)
USHORT fivedof_sw_number
Definition: ATC3DGm.h:572
SYSTEM_PARAMETER_TYPE
Definition: ATC3DGm.h:280
FILTER_OPTION
Definition: ATC3DGm.h:307
struct tagDOUBLE_POSITION DOUBLE_POSITION_RECORD
Definition: ATC3DGm.h:315
ATC3DGm_API int SaveSystemConfiguration(LPCSTR lpFileName)
struct tagDOUBLE_ANGLES_TIME_Q DOUBLE_ANGLES_TIME_Q_RECORD
struct tagSHORT_POSITION_QUATERNION SHORT_POSITION_QUATERNION_RECORD
ULONG DEVICE_STATUS
Definition: ATC3DGm.h:447
double s[3][3]
Definition: ATC3DGm.h:760
AGC_MODE_TYPE
Definition: ATC3DGm.h:323
struct tagADAPTIVE_PARAMETERS ADAPTIVE_PARAMETERS
COMMUNICATIONS_MEDIA_TYPE mediaType
Definition: ATC3DGm.h:503
Definition: ATC3DGm.h:302
ATC3DGm_API int GetTransmitterParameter(USHORT transmitterID, enum TRANSMITTER_PARAMETER_TYPE parameterType, void *pBuffer, int bufferSize)
SHORT * PSHORT
Definition: ATC3DGm.h:437
short s[3][3]
Definition: ATC3DGm.h:599
unsigned short USHORT
Definition: ATC3DGm.h:434
Definition: ATC3DGm.h:320
struct tagDIAGNOSTIC_TEST_PARAMETER DIAGNOSTIC_TEST_PARAMETER
USHORT alphaMax[7]
Definition: ATC3DGm.h:521
struct tagQUALITY_PARAMETERS QUALITY_PARAMETERS
USHORT fivedof_sw_revision
Definition: ATC3DGm.h:573
struct tagDOUBLE_POSITION_MATRIX DOUBLE_POSITION_MATRIX_RECORD
ATC3DGm_API int GetSensorConfiguration(USHORT sensorID, SENSOR_CONFIGURATION *sensorConfiguration)
unsigned long ULONG
Definition: ATC3DGm.h:432
ATC3DGm_API int GetAsynchronousRecord(USHORT sensorID, void *pRecord, int recordSize)
USHORT nondipole_sw_revision
Definition: ATC3DGm.h:571
USHORT nondipole_sw_number
Definition: ATC3DGm.h:570
ATC3DGm_API int GetSynchronousRecord(USHORT sensorID, void *pRecord, int recordSize)
COMMUNICATIONS_MEDIA_TYPE
Definition: ATC3DGm.h:299
enum DEVICE_TYPES type
Definition: ATC3DGm.h:462
enum BOARD_TYPES type
Definition: ATC3DGm.h:478
struct tagDOUBLE_MATRIX_TIME_STAMP DOUBLE_MATRIX_TIME_STAMP_RECORD
Definition: ATC3DGm.h:319
char * PSZ
Definition: ATC3DGm.h:440
short SHORT
Definition: ATC3DGm.h:436
enum AGC_MODE_TYPE agcMode
Definition: ATC3DGm.h:493
HEMISPHERE_TYPE
Definition: ATC3DGm.h:313
Definition: ATC3DGm.h:304
ATC3DGm_API int GetSystemParameter(enum SYSTEM_PARAMETER_TYPE parameterType, void *pBuffer, int bufferSize)
struct tagDOUBLE_POSITION_QUATERNION_STAMP_RECORD DOUBLE_POSITION_QUATERNION_TIME_STAMP_RECORD
struct tagDOUBLE_POSITION_ANGLES_TIME_Q_BUTTON_RECORD DOUBLE_POSITION_ANGLES_TIME_Q_BUTTON_RECORD
struct tagDOUBLE_POSITION_QUATERNION_TIME_Q_BUTTON_RECORD DOUBLE_POSITION_QUATERNION_TIME_Q_BUTTON_RECORD
struct tagDOUBLE_POSITION_QUATERNION_TIME_Q_RECORD DOUBLE_POSITION_QUATERNION_TIME_Q_RECORD
ATC3DGm_API int SetBoardParameter(USHORT boardID, enum BOARD_PARAMETER_TYPE parameterType, void *pBuffer, int bufferSize)
Definition: ATC3DGm.h:294
USHORT boot_loader_sw_number
Definition: ATC3DGm.h:566
unsigned char BYTE
Definition: ATC3DGm.h:449
struct tagPOST_ERROR_PARAMETER POST_ERROR_PARAMETER
DATA_FORMAT_TYPE
Definition: ATC3DGm.h:329
struct tagDOUBLE_ANGLES DOUBLE_ANGLES_RECORD
DEVICE_TYPES
Definition: ATC3DGm.h:405
SENSOR_PARAMETER_TYPE
Definition: ATC3DGm.h:244
struct tagDOUBLE_ALL_TIME_STAMP_RECORD DOUBLE_ALL_TIME_STAMP_RECORD
struct tagTRANSMITTER_CONFIGURATION TRANSMITTER_CONFIGURATION
USHORT error_sensitivity
Definition: ATC3DGm.h:530
int BOOL
Definition: ATC3DGm.h:446
struct tagSHORT_POSITION SHORT_POSITION_RECORD
struct tagDOUBLE_POSITION_QUATERNION DOUBLE_POSITION_QUATERNION_RECORD
char modelString[10]
Definition: ATC3DGm.h:484
BIRD_ERROR_CODES
Definition: ATC3DGm.h:92
ATC3DGm_API int GetBIRDError(void)
ATC3DGm_API DEVICE_STATUS GetBoardStatus(USHORT boardID)
struct tagSENSOR_CONFIGURATION SENSOR_CONFIGURATION
struct tagDOUBLE_POSITION_MATRIX_TIME_Q_BUTTON_RECORD DOUBLE_POSITION_MATRIX_TIME_Q_BUTTON_RECORD
struct tagVPD_COMMAND_PARAMETER VPD_COMMAND_PARAMETER
ATC3DGm_API int GetBoardConfiguration(USHORT boardID, BOARD_CONFIGURATION *boardConfiguration)
struct tagDOUBLE_ALL_TIME_STAMP_Q_RECORD DOUBLE_ALL_TIME_STAMP_Q_RECORD
ATC3DGm_API int CloseBIRDSystem(void)
struct tagSHORT_ALL_RECORD SHORT_ALL_RECORD