您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. /*
  2. * This file is part of Aptdec.
  3. * Copyright (c) 2004-2009 Thierry Leconte (F4DWV), Xerbo (xerbo@protonmail.com) 2019-2022
  4. *
  5. * Aptdec is free software: you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License as published by
  7. * the Free Software Foundation, either version 2 of the License, or
  8. * (at your option) any later version.
  9. *
  10. * This program is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. * GNU General Public License for more details.
  14. *
  15. * You should have received a copy of the GNU General Public License
  16. * along with this program. If not, see <https://www.gnu.org/licenses/>.
  17. *
  18. */
  19. const struct {
  20. float d[4][3];
  21. struct {
  22. float vc, A, B;
  23. } rad[3];
  24. struct {
  25. float Ns;
  26. float b[3];
  27. } cor[3];
  28. /* Calibration corficcients taken from the NOAA KLM satellite user guide
  29. * https://web.archive.org/web/20141220021557/https://www.ncdc.noaa.gov/oa/pod-guide/ncdc/docs/klm/tables.htm
  30. */
  31. } satcal[] = {
  32. { // NOAA 15
  33. { // PRT coefficient d0, d1, d2
  34. {276.60157f, 0.051045f, 1.36328E-06f},
  35. {276.62531f, 0.050909f, 1.47266E-06f},
  36. {276.67413f, 0.050907f, 1.47656E-06f},
  37. {276.59258f, 0.050966f, 1.47656E-06f}
  38. },
  39. { // Channel radiance coefficient vc, A, B
  40. {925.4075f, 0.337810f, 0.998719f}, // Channel 4
  41. {839.8979f, 0.304558f, 0.999024f}, // Channel 5
  42. {2695.9743f, 1.621256f, 0.998015f} // Channel 3B
  43. },
  44. { // Nonlinear radiance correction Ns, b0, b1, b2
  45. {-4.50f, {4.76f, -0.0932f, 0.0004524f}}, // Channel 4
  46. {-3.61f, {3.83f, -0.0659f, 0.0002811f}}, // Channel 5
  47. {0.0f, {0.0f, 0.0f, 0.0f}} // Channel 3B
  48. }
  49. },
  50. { // NOAA 16
  51. { // PRT coeff d0, d1, d2
  52. {276.355f, 5.562E-02f, -1.590E-05f},
  53. {276.142f, 5.605E-02f, -1.707E-05f},
  54. {275.996f, 5.486E-02f, -1.223E-05f},
  55. {276.132f, 5.494E-02f, -1.344E-05f}
  56. },
  57. { // Channel radiance coefficient vc, A, B
  58. {917.2289f, 0.332380f, 0.998522f}, // Channel 4
  59. {838.1255f, 0.674623f, 0.998363f}, // Channel 5
  60. {2700.1148f, 1.592459f, 0.998147f} // Channel 3B
  61. },
  62. { // Nonlinear radiance correction Ns, b0, b1, b2
  63. {-2.467f, {2.96f, -0.05411f, 0.00024532f}}, // Channel 4
  64. {-2.009f, {2.25f, -0.03665f, 0.00014854f}}, // Channel 5
  65. {0.0f, {0.0f, 0.0f, 0.0f}} // Channel 3B
  66. }
  67. },
  68. { // NOAA 17
  69. { // PRT coefficient d0, d1, d2
  70. {276.628f, 0.05098f, 1.371e-06f},
  71. {276.538f, 0.05098f, 1.371e-06f},
  72. {276.761f, 0.05097f, 1.369e-06f},
  73. {276.660f, 0.05100f, 1.348e-06f}
  74. },
  75. { // Channel radiance coefficient vc, A, B
  76. {926.2947f, 0.271683f, 0.998794f}, // Channel 4
  77. {839.8246f, 0.309180f, 0.999012f}, // Channel 5
  78. {2669.3554f, 1.702380f, 0.997378f} // Channel 3B
  79. },
  80. { // Nonlinear radiance correction Ns, b0, b1, b2
  81. {-8.55f, {8.22f, -0.15795f, 0.00075579f}}, // Channel 4
  82. {-3.97f, {4.31f, -0.07318f, 0.00030976f}}, // Channel 5
  83. {0.0f, {0.0f, 0.0f, 0.0f}} // Channel 3B
  84. }
  85. },
  86. { // NOAA 18
  87. { // PRT coefficient d0, d1, d2
  88. {276.601f, 0.05090f, 1.657e-06f},
  89. {276.683f, 0.05101f, 1.482e-06f},
  90. {276.565f, 0.05117f, 1.313e-06f},
  91. {276.615f, 0.05103f, 1.484e-06f}
  92. },
  93. { // Channel radiance coefficient vc, A, B
  94. {928.1460f, 0.436645f, 0.998607f}, // Channel 4
  95. {833.2532f, 0.253179f, 0.999057f}, // Channel 5
  96. {2659.7952f, 1.698704f, 0.996960f} // Channel 3B
  97. },
  98. { // Nonlinear radiance correction Ns, b0, b1, b2
  99. {-5.53f, {5.82f, -0.11069f, 0.00052337f}}, // Channel 4
  100. {-2.22f, {2.67f, -0.04360f, 0.00017715f}}, // Channel 5
  101. {0.0f, {0.0f, 0.0f, 0.0f}} // Channel 3B
  102. }
  103. },
  104. { // NOAA 19
  105. { // PRT coefficient d0, d1, d2
  106. {276.6067f, 0.051111f, 1.405783E-06f},
  107. {276.6119f, 0.051090f, 1.496037E-06f},
  108. {276.6311f, 0.051033f, 1.496990E-06f},
  109. {276.6268f, 0.051058f, 1.493110E-06f}
  110. },
  111. { // Channel radiance coefficient vc, A, B
  112. {928.9f, 0.53959f, 0.998534f}, // Channel 4
  113. {831.9f, 0.36064f, 0.998913f}, // Channel 5
  114. {2670.0f, 1.67396f, 0.997364f} // Channel 3B
  115. },
  116. { // Nonlinear radiance correction Ns, b0, b1, b2
  117. {-5.49f, {5.70f, -0.11187f, 0.00054668f}}, // Channel 4
  118. {-3.39f, {3.58f, -0.05991f, 0.00024985f}}, // Channel 5
  119. {0.0f, {0.0f, 0.0f, 0.0f}} // Channel 3B
  120. }
  121. }};
  122. const float c1 = 1.1910427e-5f;
  123. const float c2 = 1.4387752f;