Permalink
Fetching contributors…
Cannot retrieve contributors at this time
127 lines (118 sloc) 8.79 KB
#!/usr/bin/env python
"""
@package ion_functions.data.prs_functions_ccmp_lily_compass_cals
@file ion_functions/data/prs_functions_ccmp_lily_compass_cals.py
@author Russell Desiderio
@brief Module containing BOTTILT-CCMP correction coefficients.
"""
# Returns the corrected compass direction based on the sensor compass direction
# and the sensor serial number. Dictionary is used in the
# ion_functions/data/prs_functions module. Values are from the DPS (DCN
# 1341-00060):
#
# Created March 18, 2014 by Russell Desiderio.
# sensor reading to be corrected (degrees)
x = range(361)
# calibration (correction) values by serial number
N9651 = [183,182,182,182,182,182,182,182,182,182,181,181,181,181,181,181,181,181,180,180,
180,180,180,180,180,180,179,179,179,179,179,179,179,179,178,178,178,178,178,178,
178,178,177,177,177,177,177,177,176,176,176,176,175,175,175,175,174,174,174,174,
173,173,173,173,172,172,172,172,171,171,171,171,170,170,170,170,169,169,169,169,
168,168,168,168,167,167,167,166,165,165,164,163,163,162,161,160,160,159,158,158,
157,156,155,154,153,152,151,150,149,148,147,146,144,143,141,140,139,137,136,134,
133,131,130,129,127,125,124,122,121,119,117,116,114,112,111,108,107,105,103,101,
99, 97, 96, 94, 92, 91, 89, 87, 85, 83, 81, 79, 77, 75, 73, 71, 69, 67, 66, 64,
62, 61, 59, 57, 55, 53, 51, 49, 47, 45, 43, 41, 39, 37, 35, 33, 31, 29, 27, 26,
24, 22, 21, 19, 17, 15, 13, 11, 9, 7, 5, 3, 1,359,357,356,354,352,351,349,
347,345,343,341,339,337,335,333,331,329,327,326,324,322,321,319,317,315,313,311,
309,307,306,304,302,301,299,297,295,293,291,289,287,286,284,282,281,279,277,276,
274,272,271,269,267,265,263,261,259,257,256,254,252,251,249,247,246,244,243,241,
240,239,237,236,234,232,231,229,227,226,224,223,221,220,219,217,216,215,214,213,
211,210,209,208,207,206,205,204,204,203,202,201,200,199,199,198,197,197,196,196,
196,195,195,195,194,194,194,193,193,192,192,192,191,191,191,190,190,190,189,189,
189,188,188,188,187,187,187,187,187,186,186,186,186,186,186,186,186,185,185,185,
185,185,185,185,185,184,184,184,184,184,184,184,184,183,183,183,183,183,183,183,
183]
N9655 = [173,173,172,172,172,171,171,171,171,170,170,170,169,169,169,168,168,168,168,167,
167,167,166,166,166,166,165,165,165,165,164,164,164,163,163,163,163,162,162,162,
162,161,161,161,161,160,160,160,160,159,159,159,158,158,158,158,157,157,157,157,
156,156,156,155,155,154,154,154,153,153,153,152,152,152,151,151,151,150,150,149,
149,149,148,148,148,147,147,146,146,145,145,144,144,143,143,142,141,141,140,140,
139,139,138,138,137,137,136,135,135,134,133,132,131,131,130,129,128,128,127,126,
125,124,123,122,121,120,119,118,117,116,115,114,113,111,110,109,108,107,106,105,
103,102,101,100, 98, 97, 96, 94, 93, 91, 90, 89, 87, 86, 84, 82, 81, 79, 77, 76,
74, 72, 71, 70, 69, 67, 66, 64, 62, 61, 59, 57, 56, 54, 52, 51, 49, 47, 45, 43,
41, 39, 37, 36, 34, 32, 31, 29, 27, 26, 24, 22, 21, 19, 17, 15, 13, 11, 9, 7,
6, 4, 2, 1,359,357,356,354,352,350,349,347,345,343,340,339,337,336,334,332,
331,329,327,326,324,322,321,319,317,315,313,311,309,307,306,304,302,301,299,297,
296,294,292,291,289,287,286,284,282,281,279,277,276,274,272,271,269,267,266,264,
263,261,260,259,257,256,254,252,251,249,247,246,244,243,241,240,239,237,236,234,
233,231,230,229,227,226,225,223,222,221,220,218,217,216,215,214,213,211,210,209,
208,207,206,205,204,203,202,201,201,200,199,198,197,196,195,195,194,193,193,192,
191,191,190,189,189,188,187,187,186,186,185,185,184,184,183,183,182,182,181,181,
180,180,179,179,178,178,177,177,177,176,176,176,175,175,175,175,174,174,174,173,
173]
N9676 = [200,199,198,197,196,195,194,193,192,191,191,190,189,188,187,186,185,184,183,182,
181,180,179,178,177,176,175,174,173,172,171,171,170,169,168,167,166,165,164,163,
162,161,161,160,159,158,157,156,155,154,153,152,151,151,150,149,148,147,146,145,
144,143,142,141,140,139,138,137,136,135,134,133,132,131,130,129,128,127,126,125,
124,123,122,121,120,119,118,117,116,115,114,113,111,110,109,108,107,106,105,104,
103,102,101,100, 99, 98, 97, 96, 95, 94, 93, 91, 90, 89, 88, 87, 86, 85, 84, 83,
81, 80, 79, 78, 77, 76, 75, 74, 73, 71, 70, 69, 68, 67, 66, 64, 63, 61, 60, 59,
57, 56, 55, 54, 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 41, 40, 39, 38, 37,
36, 35, 33, 32, 31, 30, 28, 27, 26, 25, 24, 23, 21, 20, 19, 18, 17, 16, 15, 14,
13, 11, 10, 9, 8, 7, 6, 5, 3, 2, 1, 0,358,357,356,355,354,353,351,350,
349,348,347,346,345,344,343,341,340,339,338,337,336,335,334,333,332,331,330,329,
328,327,326,325,324,323,321,320,319,318,317,316,315,314,313,312,311,311,310,309,
308,307,306,305,304,303,302,301,300,299,298,297,296,295,294,293,292,291,290,289,
288,287,286,285,284,283,282,281,281,280,279,278,277,276,275,274,273,272,271,271,
270,269,268,267,266,265,264,264,263,262,261,260,259,259,258,257,256,255,254,253,
252,251,251,250,249,248,247,246,245,244,243,242,241,241,240,239,238,237,236,235,
234,234,233,232,231,230,229,229,228,227,226,225,224,223,222,221,221,220,219,218,
217,216,215,214,214,213,212,211,210,209,209,208,207,206,205,204,203,202,201,201,
200]
N9652 = [173,172,171,170,170,169,168,168,167,166,166,165,164,164,163,163,162,161,161,160,
160,159,159,158,157,157,156,156,155,155,154,154,153,153,152,151,151,150,150,149,
149,148,148,147,147,146,146,145,145,144,144,143,143,142,142,141,141,140,140,139,
139,138,138,137,137,136,136,135,135,134,134,133,133,132,131,131,130,130,129,129,
128,128,127,127,126,126,125,124,124,123,123,122,121,121,120,120,119,119,118,117,
117,116,115,115,114,113,113,112,111,111,110,109,109,108,107,107,106,105,105,104,
103,102,101,101,100, 99, 98, 98, 97, 96, 95, 94, 93, 92, 91, 91, 90, 89, 88, 87,
86, 85, 84, 83, 82, 81, 80, 79, 78, 77, 76, 75, 74, 73, 71, 70, 69, 68, 67, 66,
65, 63, 62, 61, 60, 58, 57, 56, 55, 53, 52, 51, 50, 48, 47, 46, 44, 43, 41, 40,
39, 37, 36, 35, 33, 32, 31, 30, 28, 27, 26, 24, 23, 21, 20, 19, 17, 16, 14, 13,
11, 10, 9, 7, 6, 4, 2, 1,359,357,356,354,353,351,350,349,347,346,344,343,
341,340,339,337,336,334,332,331,329,327,326,324,323,321,320,319,317,316,314,313,
311,310,309,307,306,304,302,301,299,297,296,294,293,291,290,289,287,286,284,283,
281,280,279,277,276,274,273,271,270,269,267,266,264,263,261,260,259,257,256,255,
253,252,251,250,248,247,246,245,243,242,241,240,238,237,236,235,233,232,231,230,
228,227,226,225,224,223,221,220,219,218,217,216,215,214,213,211,210,209,208,207,
206,205,204,203,202,201,200,199,198,197,196,195,194,194,193,192,191,190,189,189,
188,187,186,185,185,184,183,182,181,181,180,179,178,178,177,176,175,175,174,173,
173]
N9656 = [166,165,164,164,163,162,162,161,161,160,159,159,158,157,157,156,156,155,155,154,
154,153,153,152,151,151,150,150,149,149,148,148,147,147,146,146,146,145,145,144,
144,143,143,142,142,142,141,141,140,140,139,139,139,138,138,137,137,136,136,136,
135,135,134,134,133,133,132,132,132,131,131,130,130,129,129,129,128,128,127,127,
126,126,125,125,124,124,123,123,122,122,122,121,121,120,120,119,119,118,118,117,
117,116,116,115,115,114,113,113,112,112,111,111,110,110,109,108,108,107,107,106,
105,105,104,103,103,102,101,100,100, 99, 98, 98, 97, 96, 95, 94, 94, 93, 92, 91,
90, 89, 89, 88, 87, 86, 85, 84, 83, 82, 81, 80, 79, 78, 77, 76, 75, 74, 73, 71,
70, 69, 68, 67, 66, 65, 63, 62, 61, 60, 58, 57, 56, 54, 53, 51, 50, 49, 47, 46,
45, 43, 42, 41, 40, 38, 37, 36, 34, 32, 31, 29, 27, 26, 24, 23, 21, 20, 19, 17,
16, 14, 13, 11, 10, 9, 7, 6, 4, 2, 1,359,357,356,354,352,351,349,347,346,
344,343,341,340,339,337,336,334,332,331,329,327,326,324,322,321,319,317,316,314,
312,311,309,307,306,304,303,301,300,299,297,296,294,292,291,289,287,286,284,283,
281,280,279,277,276,274,272,271,269,267,266,264,263,261,260,259,257,256,254,253,
251,250,249,247,246,244,243,241,240,239,237,236,235,233,232,231,230,228,227,226,
225,223,222,221,220,218,217,216,215,213,212,211,210,208,207,206,205,204,203,201,
200,199,198,197,196,195,194,193,192,191,190,189,188,187,186,185,184,183,182,181,
181,180,179,178,177,176,175,175,174,173,173,172,171,170,170,169,168,168,167,166,
166]
# initialize dictionary
cmp_cal = {}
cmp_cal['N9651'] = [x, N9651]
cmp_cal['N9655'] = [x, N9655]
cmp_cal['N9676'] = [x, N9676]
cmp_cal['N9652'] = [x, N9652]
cmp_cal['N9656'] = [x, N9656]