/* calibfile.h Written by Volodymyr Kindratenko (kindr@ncsa.uiuc.edu) NCSA, March - April 1999 ver. 1.00 (5/5/99) - first public release libTrCalibr & dvCalibrator software copyright Copyright 1999 The Board of Trustees of the University of Illinois All rights reserved libTrCalibr & dvCalibrator software Volodymyr Kindratenko Visualization and Virtual Environments group National Center for Supercomputing Applications University of Illinois at Urbana-Champaign libTrCalibr & dvCalibrator software [both binary and source (if released)] (hereafter, Software) is copyrighted by The Board of Trustees of the University of Illinois (UI), and ownership remains with the UI. The UI grants you (hereafter, Licensee) a license to use the Software for academic, research and internal business purposes only, without a fee. Licensee may distribute the binary and source code (if released) to third parties provided that the copyright notice and this statement appears on all copies and that no charge is associated with such copies. Licensee may make derivative works. However, if Licensee distributes any derivative work based on or derived from the Software, then Licensee will (1) notify Volodymyr Kindratenko [kindr@ncsa.uiuc.edu], regarding its distribution of the derivative work, and (2) clearly notify users that such derivative work is a modified version and not the original Software distributed by the UI. Any Licensee wishing to make commercial use of the Software should contact the UI, c/o Research and Technology Management Office [rtmo@uiuc.edu], to negotiate an appropriate license for such commercial use. Commercial use includes (1) integration of all or part of the source code into a product for sale or license by or on behalf of Licensee to third parties, or (2) distribution of the binary code or source code to third parties that need it to utilize a commercial product sold or licensed by or on behalf of Licensee. UI MAKES NO REPRESENTATIONS ABOUT THE SUITABILITY OF THIS SOFTWARE FOR ANY PURPOSE. IT IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY. THE UI SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY THE USERS OF THIS SOFTWARE. By using or copying this Software, Licensee agrees to abide by the copyright i law and all other applicable laws of the U.S. including, but not limited to, export control laws, and the terms of this license. UI shall have the right to terminate this license immediately by written notice upon Licensee's breach of, or non-compliance with, any of its terms. Licensee may be held legally responsible for any copyright infringement that is caused or encouraged by Licensee's failure to abide by the terms of this license. Form approved by University Counsel, M.A.R., 05/10/93 */ #ifndef _CALIBFILE_H_ #define _CALIBFILE_H_ #ifdef __cplusplus extern "C" { #endif /* rotation in the calibration file can be in rads or degrees all other angular values are in radians only! */ #define DEGREES 1 #define RADIANS 2 /* structure used to hold the data from the calibration file */ struct calibdata { int M; /* number of records */ float *Xt; /* true X value */ float *Yt; /* true Y value */ float *Zt; /* true Z value */ float *Xm; /* measured X value */ float *Ym; /* measured X value */ float *Zm; /* measured X value */ float *AZk; /* true AZ value */ float *ELk; /* true EL value */ float *RLk; /* true RL value */ float *AZm; /* measured AZ value */ float *ELm; /* measured EL value */ float *RLm; /* measured RL value */ }; /* reads data from the file and put it into cdata struct measurements file contains: line 1: number of records line 2: record 1 line 3: record 2 ..... ......... each record contains true x,y,z, measured x,y,z, measured az,el,rl angles are measured in degrees it does not matter what units are used for x,y,x as long as they are the same everywhere returns number of records if data was read, otherwise returns 0 - fname is the name of the file to be loaded in - cdata is a pointer to a struct calibdata; the pointer must exist, but the memory needed to store the data from the file will be allocated by the function */ int readcalibfile(char* fname, struct calibdata* cdata, int rottype); /* frees memory allocated for the data from the calibration file once the fitting polynomials have been computed, the data from the calibration file is not needed anymore and it can be deleted */ void deletecalibdata(struct calibdata* cdata); #ifdef __cplusplus } #endif #endif