Developer Application Interface (ARC API) v3.6.2
ARC, Inc. GenII/III Application Interface
TempCtrl.h
Go to the documentation of this file.
1// +------------------------------------------------------------------------------------------------------------------+
2// | FILE: TempCtrl.h |
3// +------------------------------------------------------------------------------------------------------------------+
4// | PURPOSE: This file defines the standard ARC temperature control constants and functions. |
5// | |
6// | AUTHOR: Scott Streit DATE: ? |
7// | |
8// | Copyright Astronomical Research Cameras, Inc. All rights reserved. |
9// +------------------------------------------------------------------------------------------------------------------+
12#pragma once
13
14
15namespace arc
16{
17 namespace gen3
18 {
19
20 // + ----------------------------------------------------------
21 // | Define temperature conversions
22 // + ----------------------------------------------------------
23 constexpr auto C2K( double c ) { return ( ( double )( c + 273.15 ) ); } // Celcius To Kelvin
24 constexpr auto K2C( double k ) { return ( ( double )( k - 273.15 ) ); } // Kelvin To Celcius
25 constexpr auto F2K( double f ) { return ( ( double )( f * ( 9.0 / 5.0 ) - 459.67 ) ); } // Fahrenheit To Kelvin
26 constexpr auto K2F( double k ) { return ( ( double )( ( k + 459.67 ) * ( 5.0 / 9.0 ) ) ); } // Kelvin To Fahrenheit
27
28 // + ----------------------------------------------------------
29 // | Define temperature constants
30 // + ----------------------------------------------------------
31 constexpr auto TMPCTRL_SD_NUM_OF_READS = 30;
32 constexpr auto TMPCTRL_SD_VOLT_TOLERANCE_TRIALS = 30;
33 constexpr auto TMPCTRL_SD_VOLT_TOLERANCE = 0.005;
34 constexpr auto TMPCTRL_SD_DEG_TOLERANCE = 3.0;
35
36 // +-----------------------------------------------------------
37 // | Define Temperature Coeffients for DT-670 Sensor
38 // +-----------------------------------------------------------
39 constexpr auto TMPCTRL_DT670_COEFF_1 = 0.03;
40 constexpr auto TMPCTRL_DT670_COEFF_2 = 0.0000251;
41
42
43 // +-----------------------------------------------------------
44 // | Define Temperature Coeffients for CY7 Sensor
45 // +-----------------------------------------------------------
46 constexpr auto TMPCTRL_SD_ADU_OFFSET = 2045.0;
47 constexpr auto TMPCTRL_SD_ADU_PER_VOLT = 1366.98;
48
49
50 // +-----------------------------------------------------------
51 // | Define Temperature Coeffients for High Gain Utility Board
52 // +-----------------------------------------------------------
53 constexpr auto TMPCTRL_HG_ADU_OFFSET = -3108.0;
54 constexpr auto TMPCTRL_HG_ADU_PER_VOLT = 7321.0;
55
56
57 // + ----------------------------------------------------------
58 // | Define temperature coefficient data structure
59 // + ----------------------------------------------------------
60 typedef struct TmpCtrlData
61 {
62 double vu;
63 double vl;
64 int count;
65 double coeff[ 12 ];
67
68
73 constexpr auto TMPCTRL_SD_2_12K_VU = 1.680000;
74 constexpr auto TMPCTRL_SD_2_12K_VL = 1.294390;
75 constexpr auto TMPCTRL_SD_2_12K_COUNT = 10;
76 extern double TMPCTRL_SD_2_12K_COEFF[ TMPCTRL_SD_2_12K_COUNT ];
77
78
79 constexpr auto TMPCTRL_SD_12_24K_VU = 1.38373;
80 constexpr auto TMPCTRL_SD_12_24K_VL = 1.11230;
81 constexpr auto TMPCTRL_SD_12_24K_COUNT = 11;
82 extern double TMPCTRL_SD_12_24K_COEFF[ TMPCTRL_SD_12_24K_COUNT ];
83
84
85 constexpr auto TMPCTRL_SD_24_100K_VU = 1.122751;
86 constexpr auto TMPCTRL_SD_24_100K_VL = 0.909416;
87 constexpr auto TMPCTRL_SD_24_100K_COUNT = 12;
88 extern double TMPCTRL_SD_24_100K_COEFF[ TMPCTRL_SD_24_100K_COUNT ];
89
90
91 constexpr auto TMPCTRL_SD_100_475K_VU = 0.999614;
92 constexpr auto TMPCTRL_SD_100_475K_VL = 0.079767;
93 constexpr auto TMPCTRL_SD_100_475K_COUNT = 11;
94 extern double TMPCTRL_SD_100_475K_COEFF[ TMPCTRL_SD_100_475K_COUNT ];
95
96
97 // +-----------------------------------------------------------
98 // | Define temperature control keys for input ini files
99 // +-----------------------------------------------------------
100 constexpr auto TMPCTRL_DT670_COEFF_1_KEY = "[TMPCTRL_DT670_COEFF_1]";
101 constexpr auto TMPCTRL_DT670_COEFF_2_KEY = "[TMPCTRL_DT670_COEFF_2]";
102 constexpr auto TMPCTRL_SDADU_OFFSET_KEY = "[TMPCTRL_SDADU_OFFSET]";
103 constexpr auto TMPCTRL_SDADU_PER_VOLT_KEY = "[TMPCTRL_SDADU_PER_VOLT]";
104 constexpr auto TMPCTRL_HGADU_OFFSET_KEY = "[TMPCTRL_HGADU_OFFSET]";
105 constexpr auto TMPCTRL_HGADU_PER_VOLT_KEY = "[TMPCTRL_HGADU_PER_VOLT]";
106 constexpr auto TMPCTRL_SDNUMBER_OF_READS_KEY = "[TMPCTRL_SDNUMBER_OF_READS]";
107 constexpr auto TMPCTRL_SDVOLT_TOLERANCE_TRIALS_KEY = "[TMPCTRL_SDVOLT_TOLERANCE_TRIALS]";
108 constexpr auto TMPCTRL_SDVOLT_TOLERANCE_KEY = "[TMPCTRL_SDVOLT_TOLERANCE]";
109 constexpr auto TMPCTRL_SDDEG_TOLERANCE_KEY = "[TMPCTRL_SDDEG_TOLERANCE]";
110 constexpr auto TMPCTRL_SD2_12K_COEFF_KEY = "[TMPCTRL_SD2_12K_COEFF]";
111 constexpr auto TMPCTRL_SD12_24K_COEFF_KEY = "[TMPCTRL_SD12_24K_COEFF]";
112 constexpr auto TMPCTRL_SD24_100K_COEFF_KEY = "[TMPCTRL_SD24_100K_COEFF]";
113 constexpr auto TMPCTRL_SD100_475K_COEFF_KEY = "[TMPCTRL_SD100_475K_COEFF]";
114
115 } // end gen3 namespace
116} // end arc namespace
Definition: TempCtrl.h:61