[GRASS-SVN] r73024 - grass/trunk/imagery/i.atcorr

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Aug 2 12:51:29 PDT 2018


Author: mmetz
Date: 2018-08-02 12:51:29 -0700 (Thu, 02 Aug 2018)
New Revision: 73024

Modified:
   grass/trunk/imagery/i.atcorr/geomcond.cpp
   grass/trunk/imagery/i.atcorr/geomcond.h
   grass/trunk/imagery/i.atcorr/i.atcorr.html
   grass/trunk/imagery/i.atcorr/iwave.cpp
   grass/trunk/imagery/i.atcorr/iwave.h
Log:
i.atcorr: +PlanetScope 0c-0d 0e 0f-10

Modified: grass/trunk/imagery/i.atcorr/geomcond.cpp
===================================================================
--- grass/trunk/imagery/i.atcorr/geomcond.cpp	2018-08-02 07:56:09 UTC (rev 73023)
+++ grass/trunk/imagery/i.atcorr/geomcond.cpp	2018-08-02 19:51:29 UTC (rev 73024)
@@ -380,6 +380,9 @@
     case 24: /* worldview3       * enter month,day,hh.ddd,long.,lat. */
     case 25: /* sentinel2a       * enter month,day,hh.ddd,long.,lat. */
     case 26: /* sentinel2b       * enter month,day,hh.ddd,long.,lat. */
+    case 27: /* planetscope0c0d  * enter month,day,hh.ddd,long.,lat. */
+    case 28: /* planetscope0e    * enter month,day,hh.ddd,long.,lat. */
+    case 29: /* planetscope0f10  * enter month,day,hh.ddd,long.,lat. */
    {
 	cin >> month;
 	cin >> jday;
@@ -452,7 +455,10 @@
 	string(" pleiades1b observation      "),
 	string(" worldview3 observation      "),
 	string(" sentinel2a observation      "),
-	string(" sentinel2b observation      ")
+	string(" sentinel2b observation      "),
+	string(" planetscope 0c 0d observation"),
+	string(" planetscope 0e observation  "),
+	string(" planetscope 0f 10 observation")
 	};
 
     static const string head(" geometrical conditions identity  ");

Modified: grass/trunk/imagery/i.atcorr/geomcond.h
===================================================================
--- grass/trunk/imagery/i.atcorr/geomcond.h	2018-08-02 07:56:09 UTC (rev 73023)
+++ grass/trunk/imagery/i.atcorr/geomcond.h	2018-08-02 19:51:29 UTC (rev 73024)
@@ -61,26 +61,32 @@
 /*                                                                        */
 /*         16      worldview2        * enter month,day,hh.ddd,long.,lat.  */
 /*                                                                        */
-/*         17      quickbird2       * enter month,day,hh.ddd,long.,lat.   */
+/*         17      quickbird2        * enter month,day,hh.ddd,long.,lat.  */
 /*                                                                        */
-/*         18      Landsat 8        * enter month,day,hh.ddd,long.,lat.   */
+/*         18      Landsat 8         * enter month,day,hh.ddd,long.,lat.  */
 /*                                                                        */
-/*         19      geoeye1          * enter month,day,hh.ddd,long.,lat.   */
+/*         19      geoeye1           * enter month,day,hh.ddd,long.,lat.  */
 /*                                                                        */
-/*         20      spot6            * enter month,day,hh.ddd,long.,lat.   */
+/*         20      spot6             * enter month,day,hh.ddd,long.,lat.  */
 /*                                                                        */
-/*         21      spot7            * enter month,day,hh.ddd,long.,lat.   */
+/*         21      spot7             * enter month,day,hh.ddd,long.,lat.  */
 /*                                                                        */
-/*         22      pleiades1a       * enter month,day,hh.ddd,long.,lat.   */
+/*         22      pleiades1a        * enter month,day,hh.ddd,long.,lat.  */
 /*                                                                        */
-/*         23      pleiades1b       * enter month,day,hh.ddd,long.,lat.   */
+/*         23      pleiades1b        * enter month,day,hh.ddd,long.,lat.  */
 /*                                                                        */
-/*         24      worldview3       * enter month,day,hh.ddd,long.,lat.   */
+/*         24      worldview3        * enter month,day,hh.ddd,long.,lat.  */
 /*                                                                        */
-/*         25      sentinel2a       * enter month,day,hh.ddd,long.,lat.   */
+/*         25      sentinel2a        * enter month,day,hh.ddd,long.,lat.  */
 /*                                                                        */
-/*         26      sentinel2b       * enter month,day,hh.ddd,long.,lat.   */
+/*         26      sentinel2b        * enter month,day,hh.ddd,long.,lat.  */
 /*                                                                        */
+/*         27      planetscope0c0d   * enter month,day,hh.ddd,long.,lat.  */
+/*                                                                        */
+/*         28      planetscope0e     * enter month,day,hh.ddd,long.,lat.  */
+/*                                                                        */
+/*         29      planetscope0f10   * enter month,day,hh.ddd,long.,lat.  */
+/*                                                                        */
 /*     note:       for hrv and tm experiments long. and lat. are the      */
 /*                 coordinates of the scene center.                       */
 /*                 lat. must be > 0 for north lat., < 0 for south lat.    */

Modified: grass/trunk/imagery/i.atcorr/i.atcorr.html
===================================================================
--- grass/trunk/imagery/i.atcorr/i.atcorr.html	2018-08-02 07:56:09 UTC (rev 73023)
+++ grass/trunk/imagery/i.atcorr/i.atcorr.html	2018-08-02 19:51:29 UTC (rev 73024)
@@ -228,6 +228,24 @@
 <td>enter month,day,hh.ddd,long.,lat. *</td>
 </tr>
 
+<tr>
+<td>27</td>
+<td><b>PlanetScope 0c 0d</b></td>
+<td>enter month,day,hh.ddd,long.,lat. *</td>
+</tr>
+
+<tr>
+<td>28</td>
+<td><b>PlanetScope 0e</b></td>
+<td>enter month,day,hh.ddd,long.,lat. *</td>
+</tr>
+
+<tr>
+<td>28</td>
+<td><b>PlanetScope 10</b></td>
+<td>enter month,day,hh.ddd,long.,lat. *</td>
+</tr>
+
 </table>
 
 <p>
@@ -722,6 +740,21 @@
 <tr><td>190</td><td>Sentinel2B SWIR band B11 (1555nm - 1667nm)</td></tr>
 <tr><td>191</td><td>Sentinel2B SWIR band B12 (2075nm - 2300nm)</td></tr>
 
+<tr><td>192</td><td><b>PlanetScope 0c 0d</b> Blue band B1 (440nm - 570nm)</td></tr>
+<tr><td>193</td><td>PlanetScope 0c 0d Green band B2 (450nm - 690nm)</td></tr>
+<tr><td>194</td><td>PlanetScope 0c 0d Red band B3 (460nm - 700nm)</td></tr>
+<tr><td>195</td><td>PlanetScope 0c 0d NIR band B4 (770nm - 880nm)</td></tr>
+
+<tr><td>196</td><td><b>PlanetScope 0e</b> Blue band B1 (430nm - 700nm)</td></tr>
+<tr><td>197</td><td>PlanetScope 0e Green band B2 (450nm - 700nm)</td></tr>
+<tr><td>198</td><td>PlanetScope 0e Red band B3 (460nm - 700nm)</td></tr>
+<tr><td>199</td><td>PlanetScope 0e NIR band B4 (760nm - 880nm)</td></tr>
+
+<tr><td>200</td><td><b>PlanetScope 0f 10</b> Blue band B1 (450nm - 680nm)</td></tr>
+<tr><td>201</td><td>PlanetScope 0f 10 Green band B2 (450nm - 680nm)</td></tr>
+<tr><td>202</td><td>PlanetScope 0f 10 Red band B3 (450nm - 680nm)</td></tr>
+<tr><td>203</td><td>PlanetScope 0f 10 NIR band B4 (760nm - 870nm)</td></tr>
+
 </table>
 
 <h2>EXAMPLES</h2>

Modified: grass/trunk/imagery/i.atcorr/iwave.cpp
===================================================================
--- grass/trunk/imagery/i.atcorr/iwave.cpp	2018-08-02 07:56:09 UTC (rev 73023)
+++ grass/trunk/imagery/i.atcorr/iwave.cpp	2018-08-02 19:51:29 UTC (rev 73024)
@@ -4501,6 +4501,365 @@
     }
 }
 
+void IWave::planetscope0c0d(int iwa)
+{
+
+    /* Blue of planetscope_0c_0d */
+    static const float sr1[114] = {
+        .0203, .0270, .0202, .0135, .0067, .0000, .0000, .0000,
+        .0000, .0000, .0135, .0270, .0405, .0540, .0607, .0675,
+        .0742, .0810, .2973, .5135, .7297, .9460, .9595, .9730,
+        .9865, 1.0000, .9865, .9730, .9595, .9460, .9257, .9055,
+        .8852, .8650, .8380, .8110, .7840, .7570, .7232, .6895,
+        .6558, .6220, .5745, .5270, .4795, .4320, .3915, .3510,
+        .3105, .2700, .2498, .2295, .2092, .1890, .1620, .1350,
+        .1080, .0810, .0675, .0540, .0405, .0270, .0270, .0270,
+        .0270, .0270, .0202, .0135, .0067, .0000, .0000, .0000,
+        .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
+        .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
+        .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
+        .0000, .0000, .0068, .0135, .0203, .0270, .0270, .0270,
+        .0270, .0270, .0270, .0270, .0270, .0270, .0270, .0270,
+        .0270, .0270
+    };
+	
+    /* Green of planetscope_0c_0d */
+    static const float sr2[98] = {
+        .0218, .0290, .0732, .1175, .1618, .2060, .2427, .2795,
+        .3162, .3530, .3750, .3970, .4190, .4410, .4485, .4560,
+        .4635, .4710, .5002, .5295, .5587, .5880, .6322, .6765,
+        .7208, .7650, .8017, .8385, .8753, .9120, .9267, .9415,
+        .9563, .9710, .9782, .9855, .9928, 1.0000, .9852, .9705,
+        .9557, .9410, .9190, .8970, .8750, .8530, .8310, .8090,
+        .7870, .7650, .7355, .7060, .6765, .6470, .6102, .5735,
+        .5368, .5000, .4632, .4265, .3897, .3530, .3087, .2645,
+        .2202, .1760, .1615, .1470, .1325, .1180, .1032, .0885,
+        .0737, .0590, .0590, .0590, .0590, .0590, .0515, .0440,
+        .0365, .0290, .0290, .0290, .0290, .0290, .0365, .0440,
+        .0515, .0590, .0590, .0590, .0590, .0590, .0663, .0735,
+        .0807, .0880
+    };
+	
+    /* Red of planetscope_0c_0d */
+    static const float sr3[98] = {
+        .0555, .0740, .0832, .0925, .1018, .1110, .1202, .1295,
+        .1387, .1480, .1387, .1295, .1202, .1110, .1202, .1295,
+        .1387, .1480, .1480, .1480, .1480, .1480, .1387, .1295,
+        .1202, .1110, .1110, .1110, .1110, .1110, .1110, .1110,
+        .1110, .1110, .1110, .1110, .1110, .1110, .1110, .1110,
+        .1110, .1110, .1110, .1110, .1110, .1110, .1295, .1480,
+        .1665, .1850, .2590, .3330, .4070, .4810, .5737, .6665,
+        .7592, .8520, .8890, .9260, .9630, 1.0000, 1.0000, 1.0000,
+        1.0000, 1.0000, 1.0000, 1.0000, 1.0000, 1.0000, .9815, .9630,
+        .9445, .9260, .9168, .9075, .8982, .8890, .8798, .8705,
+        .8612, .8520, .8427, .8335, .8242, .8150, .7873, .7595,
+        .7317, .7040, .6577, .6115, .5653, .5190, .3985, .2780,
+        .1575, .0370
+    };
+	
+    /* NIR of planetscope_0c_0d */
+    static const float sr4[102] = {
+        .0750, .1000, .0750, .0500, .0250, .0000, .0000, .0000,
+        .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
+        .0000, .0000, .0000, .0000, .0000, .0000, .0250, .0500,
+        .0750, .1000, .0750, .0500, .0250, .0000, .0000, .0000,
+        .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
+        .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
+        .0000, .0000, .0000, .0000, .0000, .0000, .1000, .2000,
+        .3000, .4000, .5250, .6500, .7750, .9000, .9250, .9500,
+        .9750, 1.0000, .9750, .9500, .9250, .9000, .8750, .8500,
+        .8250, .8000, .8000, .8000, .8000, .8000, .7750, .7500,
+        .7250, .7000, .7000, .7000, .7000, .7000, .6750, .6500,
+        .6250, .6000, .5750, .5500, .5250, .5000, .4500, .4000,
+        .3500, .3000, .2500, .2000, .1500, .1000
+    };
+	
+    static const float wli[4] = {0.4075, 0.4475, 0.4575, 0.6275};
+    static const float wls[4] = {0.6925, 0.6925, 0.7025, 0.8825};
+
+    ffu.wlinf = (float)wli[iwa-1];
+    ffu.wlsup = (float)wls[iwa-1];
+
+    int i;
+    for(i = 0; i < 1501; i++) ffu.s[i] = 0;
+
+    switch(iwa)
+    {
+    case 1: for(i = 0; i < 114; i++)  ffu.s[63+i] = sr1[i];
+        break;
+    case 2: for(i = 0; i < 98; i++)  ffu.s[79+i] = sr2[i];
+        break;
+    case 3: for(i = 0; i < 98; i++)  ffu.s[83+i] = sr3[i];
+        break;
+    case 4: for(i = 0; i < 102; i++)  ffu.s[151+i] = sr4[i];
+        break;
+    }
+}
+
+void IWave::planetscope0e(int iwa)
+{
+
+    /* Blue of planetscope_0e */
+    static const float sr1[236] = {
+        .0130, .0147, .0165, .0183, .0200, .0168, .0135, .0102,
+        .0070, .0083, .0095, .0107, .0120, .0188, .0255, .0323,
+        .0390, .0730, .1070, .1410, .1750, .3500, .5250, .7000,
+        .8750, .9062, .9375, .9688, 1.0000, .9992, .9985, .9978,
+        .9970, .9840, .9710, .9580, .9450, .9177, .8905, .8632,
+        .8360, .8033, .7705, .7377, .7050, .6600, .6150, .5700,
+        .5250, .4853, .4455, .4057, .3660, .3458, .3255, .3052,
+        .2850, .2657, .2465, .2272, .2080, .1898, .1715, .1532,
+        .1350, .1237, .1125, .1013, .0900, .0860, .0820, .0780,
+        .0740, .0717, .0695, .0673, .0650, .0628, .0605, .0583,
+        .0560, .0545, .0530, .0515, .0500, .0503, .0505, .0507,
+        .0510, .0522, .0535, .0548, .0560, .0600, .0640, .0680,
+        .0720, .0770, .0820, .0870, .0920, .0983, .1045, .1108,
+        .1170, .1203, .1235, .1268, .1300, .1265, .1230, .1195,
+        .1160, .1118, .1075, .1033, .0990, .0775, .0560, .0345,
+        .0130, .0097, .0065, .0032, .0000, .0000, .0000, .0000,
+        .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
+        .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
+        .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
+        .0000, .0000, .0000, .0000, .0000, .0003, .0005, .0008,
+        .0010, .0023, .0035, .0047, .0060, .0060, .0060, .0060,
+        .0060, .0055, .0050, .0045, .0040, .0040, .0040, .0040,
+        .0040, .0047, .0055, .0063, .0070, .0085, .0100, .0115,
+        .0130, .0135, .0140, .0145, .0150, .0145, .0140, .0135,
+        .0130, .0120, .0110, .0100, .0090, .0083, .0075, .0067,
+        .0060, .0057, .0055, .0053, .0050, .0050, .0050, .0050,
+        .0050, .0050, .0050, .0050, .0050, .0050, .0050, .0050,
+        .0050, .0050, .0050, .0050, .0050, .0050, .0050, .0050,
+        .0050, .0047, .0045, .0043, .0040, .0037, .0035, .0033,
+        .0030, .0027, .0025, .0023
+    };
+	
+    /* Green of planetscope_0e */
+    static const float sr2[236] = {
+        .0050, .0053, .0055, .0057, .0060, .0055, .0050, .0045,
+        .0040, .0043, .0045, .0047, .0050, .0060, .0070, .0080,
+        .0090, .0163, .0235, .0307, .0380, .0752, .1125, .1497,
+        .1870, .2047, .2225, .2403, .2580, .2880, .3180, .3480,
+        .3780, .4163, .4545, .4928, .5310, .5670, .6030, .6390,
+        .6750, .7127, .7505, .7883, .8260, .8530, .8800, .9070,
+        .9340, .9475, .9610, .9745, .9880, .9910, .9940, .9970,
+        1.0000, .9890, .9780, .9670, .9560, .9400, .9240, .9080,
+        .8920, .8700, .8480, .8260, .8040, .7748, .7455, .7163,
+        .6870, .6498, .6125, .5753, .5380, .4975, .4570, .4165,
+        .3760, .3422, .3085, .2747, .2410, .2215, .2020, .1825,
+        .1630, .1570, .1510, .1450, .1390, .1345, .1300, .1255,
+        .1210, .1175, .1140, .1105, .1070, .1067, .1065, .1062,
+        .1060, .1100, .1140, .1180, .1220, .1290, .1360, .1430,
+        .1500, .1457, .1415, .1373, .1330, .1063, .0795, .0527,
+        .0260, .0200, .0140, .0080, .0020, .0015, .0010, .0005,
+        .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
+        .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
+        .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
+        .0000, .0000, .0000, .0000, .0000, .0003, .0005, .0008,
+        .0010, .0023, .0035, .0047, .0060, .0057, .0055, .0053,
+        .0050, .0045, .0040, .0035, .0030, .0033, .0035, .0037,
+        .0040, .0047, .0055, .0063, .0070, .0080, .0090, .0100,
+        .0110, .0115, .0120, .0125, .0130, .0125, .0120, .0115,
+        .0110, .0102, .0095, .0088, .0080, .0075, .0070, .0065,
+        .0060, .0057, .0055, .0053, .0050, .0047, .0045, .0043,
+        .0040, .0040, .0040, .0040, .0040, .0043, .0045, .0047,
+        .0050, .0050, .0050, .0050, .0050, .0047, .0045, .0043,
+        .0040, .0037, .0035, .0033, .0030, .0030, .0030, .0030,
+        .0030, .0027, .0025, .0023
+    };
+	
+    /* Red of planetscope_0e */
+    static const float sr3[236] = {
+        .0040, .0040, .0040, .0040, .0040, .0033, .0025, .0017,
+        .0010, .0013, .0015, .0018, .0020, .0020, .0020, .0020,
+        .0020, .0035, .0050, .0065, .0080, .0128, .0175, .0222,
+        .0270, .0275, .0280, .0285, .0290, .0295, .0300, .0305,
+        .0310, .0307, .0305, .0302, .0300, .0292, .0285, .0278,
+        .0270, .0283, .0295, .0307, .0320, .0360, .0400, .0440,
+        .0480, .0515, .0550, .0585, .0620, .0570, .0520, .0470,
+        .0420, .0370, .0320, .0270, .0220, .0222, .0225, .0227,
+        .0230, .0338, .0445, .0553, .0660, .1455, .2250, .3045,
+        .3840, .5040, .6240, .7440, .8640, .8930, .9220, .9510,
+        .9800, .9850, .9900, .9950, 1.0000, .9965, .9930, .9895,
+        .9860, .9840, .9820, .9800, .9780, .9695, .9610, .9525,
+        .9440, .9355, .9270, .9185, .9100, .9025, .8950, .8875,
+        .8800, .8682, .8565, .8448, .8330, .8237, .8145, .8053,
+        .7960, .7348, .6735, .6123, .5510, .4353, .3195, .2037,
+        .0880, .0678, .0475, .0272, .0070, .0055, .0040, .0025,
+        .0010, .0008, .0005, .0003, .0000, .0000, .0000, .0000,
+        .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
+        .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
+        .0000, .0000, .0000, .0000, .0000, .0005, .0010, .0015,
+        .0020, .0037, .0055, .0072, .0090, .0083, .0075, .0067,
+        .0060, .0055, .0050, .0045, .0040, .0043, .0045, .0047,
+        .0050, .0055, .0060, .0065, .0070, .0083, .0095, .0107,
+        .0120, .0128, .0135, .0142, .0150, .0142, .0135, .0128,
+        .0120, .0112, .0105, .0097, .0090, .0083, .0075, .0067,
+        .0060, .0057, .0055, .0053, .0050, .0050, .0050, .0050,
+        .0050, .0050, .0050, .0050, .0050, .0050, .0050, .0050,
+        .0050, .0050, .0050, .0050, .0050, .0050, .0050, .0050,
+        .0050, .0047, .0045, .0043, .0040, .0037, .0035, .0033,
+        .0030, .0027, .0025, .0023
+    };
+	
+    /* NIR of planetscope_0e */
+    static const float sr4[186] = {
+        .0015, .0020, .0015, .0010, .0005, .0000, .0003, .0005,
+        .0008, .0010, .0010, .0010, .0010, .0010, .0013, .0015,
+        .0018, .0020, .0027, .0035, .0043, .0050, .0040, .0030,
+        .0020, .0010, .0010, .0010, .0010, .0010, .0013, .0015,
+        .0018, .0020, .0020, .0020, .0020, .0020, .0018, .0015,
+        .0013, .0010, .0013, .0015, .0018, .0020, .0020, .0020,
+        .0020, .0020, .0020, .0020, .0020, .0020, .0023, .0025,
+        .0027, .0030, .0033, .0035, .0037, .0040, .0045, .0050,
+        .0055, .0060, .0050, .0040, .0030, .0020, .0020, .0020,
+        .0020, .0020, .0027, .0035, .0043, .0050, .0047, .0045,
+        .0043, .0040, .0035, .0030, .0025, .0020, .0023, .0025,
+        .0027, .0030, .0030, .0030, .0030, .0030, .0057, .0085,
+        .0112, .0140, .0123, .0105, .0088, .0070, .0200, .0330,
+        .0460, .0590, .0478, .0365, .0253, .0140, .0110, .0080,
+        .0050, .0020, .0033, .0045, .0057, .0070, .0055, .0040,
+        .0025, .0010, .0010, .0010, .0010, .0010, .0018, .0025,
+        .0033, .0040, .0378, .0715, .1053, .1390, .3098, .4805,
+        .6512, .8220, .8665, .9110, .9555, 1.0000, .9900, .9800,
+        .9700, .9600, .9495, .9390, .9285, .9180, .9008, .8835,
+        .8662, .8490, .8367, .8245, .8123, .8000, .7903, .7805,
+        .7708, .7610, .7462, .7315, .7167, .7020, .6895, .6770,
+        .6645, .6520, .6412, .6305, .6198, .6090, .5873, .5655,
+        .5437, .5220, .4248, .3275, .2303, .1330, .1018, .0705,
+        .0393, .0080
+    };
+	
+    static const float wli[4] = {0.4000, 0.4000, 0.4000, 0.4275};
+    static const float wls[4] = {0.9900, 0.9900, 0.9900, 0.8925};
+
+    ffu.wlinf = (float)wli[iwa-1];
+    ffu.wlsup = (float)wls[iwa-1];
+
+    int i;
+    for(i = 0; i < 1501; i++) ffu.s[i] = 0;
+
+    switch(iwa)
+    {
+    case 1: for(i = 0; i < 236; i++)  ffu.s[60+i] = sr1[i];
+        break;
+    case 2: for(i = 0; i < 236; i++)  ffu.s[60+i] = sr2[i];
+        break;
+    case 3: for(i = 0; i < 236; i++)  ffu.s[60+i] = sr3[i];
+        break;
+    case 4: for(i = 0; i < 186; i++)  ffu.s[71+i] = sr4[i];
+        break;
+    }
+}
+
+void IWave::planetscope0f10(int iwa)
+{
+
+    /* Blue of planetscope_0f_10 */
+    static const float sr1[113] = {
+        .0040, .0040, .0040, .0040, .0040, .0040, .0040, .0040,
+        .0040, .0043, .0045, .0047, .0050, .0063, .0075, .0088,
+        .0100, .1258, .2415, .3572, .4730, .5952, .7175, .8397,
+        .9620, .9702, .9785, .9868, .9950, .9962, .9975, .9988,
+        1.0000, .9855, .9710, .9565, .9420, .9137, .8855, .8572,
+        .8290, .7997, .7705, .7412, .7120, .6713, .6305, .5897,
+        .5490, .5060, .4630, .4200, .3770, .3540, .3310, .3080,
+        .2850, .2675, .2500, .2325, .2150, .1975, .1800, .1625,
+        .1450, .1327, .1205, .1082, .0960, .0912, .0865, .0818,
+        .0770, .0740, .0710, .0680, .0650, .0628, .0605, .0583,
+        .0560, .0545, .0530, .0515, .0500, .0498, .0495, .0493,
+        .0490, .0500, .0510, .0520, .0530, .0560, .0590, .0620,
+        .0650, .0698, .0745, .0793, .0840, .0897, .0955, .1013,
+        .1070, .1110, .1150, .1190, .1230, .1080, .0930, .0780,
+        .0630
+    };
+	
+    /* Green of planetscope_0f_10 */
+    static const float sr2[113] = {
+        .0040, .0040, .0040, .0040, .0040, .0040, .0040, .0040,
+        .0040, .0040, .0040, .0040, .0040, .0043, .0045, .0047,
+        .0050, .0288, .0525, .0762, .1000, .1260, .1520, .1780,
+        .2040, .2145, .2250, .2355, .2460, .2765, .3070, .3375,
+        .3680, .4045, .4410, .4775, .5140, .5495, .5850, .6205,
+        .6560, .6955, .7350, .7745, .8140, .8450, .8760, .9070,
+        .9380, .9517, .9655, .9792, .9930, .9948, .9965, .9982,
+        1.0000, .9935, .9870, .9805, .9740, .9592, .9445, .9298,
+        .9150, .8912, .8675, .8438, .8200, .7927, .7655, .7382,
+        .7110, .6750, .6390, .6030, .5670, .5250, .4830, .4410,
+        .3990, .3635, .3280, .2925, .2570, .2355, .2140, .1925,
+        .1710, .1645, .1580, .1515, .1450, .1397, .1345, .1293,
+        .1240, .1205, .1170, .1135, .1100, .1085, .1070, .1055,
+        .1040, .1065, .1090, .1115, .1140, .1023, .0905, .0788,
+        .0670
+    };
+	
+    /* Red of planetscope_0f_10 */
+    static const float sr3[117] = {
+        .0010, .0010, .0010, .0010, .0010, .0010, .0010, .0010,
+        .0010, .0010, .0010, .0010, .0010, .0010, .0010, .0010,
+        .0010, .0055, .0100, .0145, .0190, .0217, .0245, .0272,
+        .0300, .0297, .0295, .0293, .0290, .0298, .0305, .0312,
+        .0320, .0318, .0315, .0312, .0310, .0302, .0295, .0288,
+        .0280, .0288, .0295, .0302, .0310, .0353, .0395, .0437,
+        .0480, .0528, .0575, .0622, .0670, .0625, .0580, .0535,
+        .0490, .0428, .0365, .0303, .0240, .0232, .0225, .0218,
+        .0210, .0278, .0345, .0413, .0480, .1067, .1655, .2243,
+        .2830, .4165, .5500, .6835, .8170, .8582, .8995, .9407,
+        .9820, .9865, .9910, .9955, 1.0000, .9950, .9900, .9850,
+        .9800, .9798, .9795, .9792, .9790, .9705, .9620, .9535,
+        .9450, .9385, .9320, .9255, .9190, .9085, .8980, .8875,
+        .8770, .8660, .8550, .8440, .8330, .7240, .6150, .5060,
+        .3970, .2980, .1990, .1000, .0010
+    };
+	
+    /* NIR of planetscope_0f_10 */
+    static const float sr4[174] = {
+        .0015, .0020, .0020, .0020, .0020, .0020, .0018, .0015,
+        .0013, .0010, .0008, .0005, .0003, .0000, .0000, .0000,
+        .0000, .0000, .0000, .0000, .0000, .0000, .0003, .0005,
+        .0008, .0010, .0013, .0015, .0018, .0020, .0018, .0015,
+        .0013, .0010, .0010, .0010, .0010, .0010, .0013, .0015,
+        .0018, .0020, .0020, .0020, .0020, .0020, .0020, .0020,
+        .0020, .0020, .0018, .0015, .0013, .0010, .0008, .0005,
+        .0003, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
+        .0000, .0000, .0000, .0000, .0000, .0000, .0003, .0005,
+        .0008, .0010, .0013, .0015, .0018, .0020, .0023, .0025,
+        .0027, .0030, .0030, .0030, .0030, .0030, .0030, .0030,
+        .0030, .0030, .0027, .0025, .0023, .0020, .0015, .0010,
+        .0005, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
+        .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
+        .0000, .0000, .0003, .0005, .0008, .0010, .0025, .0040,
+        .0055, .0070, .0457, .0845, .1232, .1620, .3700, .5780,
+        .7860, .9940, .9955, .9970, .9985, 1.0000, .9810, .9620,
+        .9430, .9240, .9103, .8965, .8828, .8690, .8552, .8415,
+        .8277, .8140, .8002, .7865, .7728, .7590, .7470, .7350,
+        .7230, .7110, .6972, .6835, .6698, .6560, .6430, .6300,
+        .6170, .6040, .5922, .5805, .5688, .5570, .4775, .3980,
+        .3185, .2390, .1802, .1215, .0628, .0040
+    };
+	
+    static const float wli[4] = {0.4000, 0.4000, 0.4000, 0.4475};
+    static const float wls[4] = {0.6825, 0.6825, 0.6925, 0.8825};
+
+    ffu.wlinf = (float)wli[iwa-1];
+    ffu.wlsup = (float)wls[iwa-1];
+
+    int i;
+    for(i = 0; i < 1501; i++) ffu.s[i] = 0;
+
+    switch(iwa)
+    {
+    case 1: for(i = 0; i < 113; i++)  ffu.s[60+i] = sr1[i];
+        break;
+    case 2: for(i = 0; i < 113; i++)  ffu.s[60+i] = sr2[i];
+        break;
+    case 3: for(i = 0; i < 117; i++)  ffu.s[60+i] = sr3[i];
+        break;
+    case 4: for(i = 0; i < 174; i++)  ffu.s[79+i] = sr4[i];
+        break;
+    }
+}
+
+
 /* filter functions must be defined above */
 
 float IWave::equivwl() const
@@ -4586,6 +4945,9 @@
 	else if(iwave <= 165)   worldview3(iwave - 148);
 	else if(iwave <= 178)   sentinel2a(iwave - 165);
 	else if(iwave <= 191)   sentinel2b(iwave - 178);
+	else if(iwave <= 195)   planetscope0c0d(iwave - 191);
+	else if(iwave <= 199)   planetscope0e(iwave - 195);
+	else if(iwave <= 203)   planetscope0f10(iwave - 199);
 	else G_warning(_("Unsupported iwave value: %d"), iwave);
 
 	if (iwave > 1) {
@@ -4717,7 +5079,10 @@
 	string(" sentinel2b red edge b6"), string(" sentinel2b red edge b7"),
 	string(" sentinel2b nir b8"), string(" sentinel2b red edge b8A"),
 	string(" sentinel2b water vapor b9"), string(" sentinel2b swir b10"),
-	string(" sentinel2b swir b11"), string(" sentinel2b swir b12")
+	string(" sentinel2b swir b11"), string(" sentinel2b swir b12"),
+	string(" planetscope 0c 0d blue"), string(" planetscope 0c 0d green"), string(" planetscope 0c 0d red"), string(" planetscope 0c 0d nir"),
+	string(" planetscope 0e blue"), string(" planetscope 0e green"), string(" planetscope 0e red"), string(" planetscope 0e nir"),
+	string(" planetscope 0f 10 blue"), string(" planetscope 0f 10 green"), string(" planetscope 0f 10 red"), string(" planetscope 0f 10 nir")
     };
 
 

Modified: grass/trunk/imagery/i.atcorr/iwave.h
===================================================================
--- grass/trunk/imagery/i.atcorr/iwave.h	2018-08-02 07:56:09 UTC (rev 73023)
+++ grass/trunk/imagery/i.atcorr/iwave.h	2018-08-02 19:51:29 UTC (rev 73024)
@@ -85,6 +85,9 @@
 	void worldview3(int iwa);
 	void sentinel2a(int iwa);
 	void sentinel2b(int iwa);
+	void planetscope0c0d(int iwa);
+	void planetscope0e(int iwa);
+	void planetscope0f10(int iwa);
 
 public:
 	/* To compute the equivalent wavelength needed for the calculation of the



More information about the grass-commit mailing list