Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
OPT3101Coefficients.cpp
00001 /*! 00002 * \file OPT3101Coefficients.cpp 00003 * \author Karthik Rajagopal <krthik@ti.com> 00004 * \version 0.9.1 00005 * 00006 * \section COPYRIGHT 00007 * TEXAS INSTRUMENTS TEXT FILE LICENSE 00008 * Copyright (c) 2018 Texas Instruments Incorporated 00009 * All rights reserved not granted herein. 00010 * Limited License. 00011 * Texas Instruments Incorporated grants a world-wide, royalty-free, non-exclusive license under copyrights and patents it now or hereafter owns or controls to make, have made, use, import, offer to sell and sell ("Utilize") this software subject to the terms herein. With respect to the foregoing patent license, such license is granted solely to the extent that any such patent is necessary to Utilize the software alone. The patent license shall not apply to any combinations which include this software, other than combinations with devices manufactured by or for TI ("TI Devices"). No hardware patent is licensed hereunder. 00012 * Redistributions must preserve existing copyright notices and reproduce this license (including the above copyright notice and the disclaimer and (if applicable) source code license limitations below) in the documentation and/or other materials provided with the distribution 00013 * Redistribution and use in binary form, without modification, are permitted provided that the following conditions are met: 00014 * * No reverse engineering, decompilation, or disassembly of this software is permitted with respect to any software provided in binary form. 00015 * * any redistribution and use are licensed by TI for use only with TI Devices. 00016 * * Nothing shall obligate TI to provide you with source code for the software licensed and provided to you in object code. 00017 * If software source code is provided to you, modification and redistribution of the source code are permitted provided that the following conditions are met: 00018 * * any redistribution and use of the source code, including any resulting derivative works, are licensed by TI for use only with TI Devices. 00019 * * any redistribution and use of any object code compiled from the source code and any resulting derivative works, are licensed by TI for use only with TI Devices. 00020 * Neither the name of Texas Instruments Incorporated nor the names of its suppliers may be used to endorse or promote products derived from this software without specific prior written permission. 00021 * DISCLAIMER. 00022 * THIS SOFTWARE IS PROVIDED BY TI AND TI'S LICENSORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL TI AND TI'S LICENSORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00023 * 00024 * \section DESCRIPTION 00025 * This file contains the coefficients to be set for the boards 00026 */ 00027 00028 #include"OPT3101device.h " 00029 00030 void OPT3101::device::manuallySetIllumCrosstalkTempCoffs(){ 00031 00032 ///* Units for coefficient: ScaledIorQ/tempRegister/MagnitudeCalc 00033 this->calibration[0].illumCrosstalkTempCoff[0][0].coffI=0.124734811687; 00034 this->calibration[0].illumCrosstalkTempCoff[0][0].coffQ=0.13592223628; 00035 this->calibration[0].illumCrosstalkTempCoff[0][1].coffI=0.121257044071; 00036 this->calibration[0].illumCrosstalkTempCoff[0][1].coffQ=0.0290795903941; 00037 this->calibration[0].illumCrosstalkTempCoff[1][0].coffI=-0.000172933230344; 00038 this->calibration[0].illumCrosstalkTempCoff[1][0].coffQ=-0.0163536237361; 00039 this->calibration[0].illumCrosstalkTempCoff[1][1].coffI=-0.010450043412; 00040 this->calibration[0].illumCrosstalkTempCoff[1][1].coffQ=-0.0910940906909; 00041 this->calibration[0].illumCrosstalkTempCoff[2][0].coffI=0.0; 00042 this->calibration[0].illumCrosstalkTempCoff[2][0].coffQ=0.0; 00043 this->calibration[0].illumCrosstalkTempCoff[2][1].coffI=0.0; 00044 this->calibration[0].illumCrosstalkTempCoff[2][1].coffQ=0.0; 00045 } 00046 00047 void environmentalController::manuallySetReferenceDistances(){ 00048 this->refDistancesInMM[0][0]=10; 00049 this->refDistancesInMM[0][1]=20; 00050 this->refDistancesInMM[1][0]=80; 00051 this->refDistancesInMM[1][1]=120; 00052 this->refDistancesInMM[2][0]=0; 00053 this->refDistancesInMM[2][1]=0; 00054 } 00055 00056 void OPT3101::device::manuallySetPhaseTempCoffs(){ 00057 ///* Units for coefficient: Phase/tempRegister 00058 this->calibration[0].phaseTempCoff[0][0].coff=3.1183945334; 00059 this->calibration[0].phaseTempCoff[0][1].coff=3.91217820975; 00060 this->calibration[0].phaseTempCoff[1][0].coff=3.25081198763; 00061 this->calibration[0].phaseTempCoff[1][1].coff=2.73744376613; 00062 this->calibration[0].phaseTempCoff[2][0].coff=0.0; 00063 this->calibration[0].phaseTempCoff[2][1].coff=0.0; 00064 this->calibration[0].phaseTempCoff[0][0].istMainCoff=true; 00065 this->calibration[0].phaseTempCoff[0][1].istMainCoff=true; 00066 this->calibration[0].phaseTempCoff[1][0].istMainCoff=true; 00067 this->calibration[0].phaseTempCoff[1][1].istMainCoff=true; 00068 this->calibration[0].phaseTempCoff[2][0].istMainCoff=true; 00069 this->calibration[0].phaseTempCoff[2][1].istMainCoff=true; 00070 } 00071 00072 void OPT3101::device::manuallySetPhaseAmbientCoffs() { 00073 ///* <b>Warning:</b> User is expected to curve fit the phase ambient data with PWL curve fit and provide the floating point precision coefficients and split points 00074 this->calibration[0].phaseAmbientCoff[0].coff[0] = 0.0; ///* Users is expected to enter all the OPT3101::calibration::phaseAmbientCoff::coff values manually after computation outside based on data generated by OPT3101::device::calibrationSession_perDesignCalibrationPhaseAmbient 00075 this->calibration[0].phaseAmbientCoff[0].coff[1] = 0.0; // Set this based on PWL curveFit data 00076 this->calibration[0].phaseAmbientCoff[0].coff[2] = 0.0; // Set this based on PWL curveFit data 00077 this->calibration[0].phaseAmbientCoff[0].coff[3] = 0.0; // Set this based on PWL curveFit data 00078 this->calibration[0].phaseAmbientCoff[0].splitsReg[0] = 0; // Set this based on PWL curveFit data 00079 this->calibration[0].phaseAmbientCoff[0].splitsReg[1] = 0; // Set this based on PWL curveFit data 00080 this->calibration[0].phaseAmbientCoff[0].splitsReg[2] = 0; ///* Users is expected to enter all the OPT3101::calibration::phaseAmbientCoff::splitsReg values manually after computation outside based on data generated by OPT3101::device::calibrationSession_perDesignCalibrationPhaseAmbient 00081 } 00082
Generated on Sun Jul 17 2022 05:22:03 by
