Hi Markus,Here is a text file with everything organized as I think it should be. I didn't add the this Iwave.cpp to submit a patch as I wasn't really sure how to modify GeomCond.cpp.
Cheers, Mike On 26-Jul-09, at 1:34 PM, Markus Neteler wrote:
Great - the header of Iwave.cpp contains instructions how to add a new sensor like this. thanks Markus
void IWave::aster(int iwa) { /* Spectral filter data found on the following page: http://www.science.aster.ersdac.or.jp/en/about_aster/sensor/ */ /* Band 1 of Aster; Central Wavelength = 556nm */ static const float sr1[67] = { .0000, .0054, .0073, .0078, .0076, .0074, .0093, .0217 .0580, .0947, .1566, .2694, .3712, .4813, .6204, .7414 .8392, .9077, .9552, .9878, .9973, .9992, .9781, .9373 .8900, .8784, .8786, .8941, .8993, .9049, .9231, .9238 .9184, .9301, .9423, .9493, .9522, .9548, .9598, .9593 .9528, .9256, .8967, .8748, .8265, .7625, .7065, .6282 .5206, .3775, .2535, .1629, .1168, .0859, .0593, .0451 .0355, .0174, .0078, .0049, .0040, .0038, .0053, .0052 .0037, .0023, .0000 }; /* Band 2 of Aster; Central Wavelength = 659nm */ static const float sr2[59] = { .0000, .0038, .0034, .0008, .0008, .0024, .0029, .0006 .0047, .0050, .0033, .0049, .0126, .0000, .1220, .2738 .4703, .6723, .8350, .9709, .9990, .9835, .9715, .9710 .9734, .9430, .9095, .9305, .9418, .9386, .9202, .9100 .8973, .8606, .8195, .7986, .7889, .7702, .7538, .6961 .6087, .5186, .4523, .4258, .3811, .3244, .2591, .1854 .1121, .0623, .0469, .0334, .0181, .0112, .0010, .0054 .0044, .0017, .0000 }; /* Band 3N (N=Nadir pointing) of Aster; Central Wavelength = 807nm */ static const float sr3[77] = { .0000, .0017, .0078, .0167, .0285, .0447, .0492, .0509 .0744, .1160, .1768, .2527, .3625, .5534, .8008,1.0000 .9903, .9613, .9012, .9032, .9197, .9655, .9868, .9942 .9857, .9745, .9648, .9465, .9368, .9634, .9760, .9820 .9938, .9968, .9908, .9810, .9756, .9855, .9832, .9694 .9587, .9527, .9499, .9357, .9263, .9552, .9579, .9489 .9447, .9399, .9322, .8945, .8220, .7353, .6193, .4813 .3584, .2614, .1890, .1269, .0841, .0618, .0442, .0318 .0277, .0245, .0213, .0130, .0075, .0074, .0068, .0049 .0030, .0024, .0024, .0017, .0000 }; /* Band 3B (B=Backward pointing) of Aster; Central Wavelength = 804nm */ static const float sr4[82] = { .0000, .0099, .0089, .0010, .0187, .0286, .0411, .0573 .0819, .1218, .1976, .2880, .3838, .5228, .6728, .8039 .8647, .8973, .9279, .9617, .9984, .9998, .9982, .9810 .9564, .9279, .9044, .8993, .9052, .9032, .9017, .9146 .9165, .9138, .9009, .8995, .9191, .9119, .9033, .9032 .8986, .8883, .8869, .8873, .8925, .8975, .9045, .9182 .9104, .8863, .8833, .8778, .8600, .8250, .7801, .7449 .6753, .5576, .4184, .3193, .2616, .1933, .1368, .1036 .0788, .0590, .0433, .0280, .0139, .0140, .0146, .0142 .0142, .0146, .0054, .0038, .0176, .0129, .0076, .0094 .0081, .0000 }; /* Band 4 of Aster; Central Wavelength = 1657nm */ static const float sr5[89] = { .0000, .0001, .0001, .0002, .0004, .0005, .0007, .0009 .0012, .0014, .0017, .0021, .0024, .0028, .0032, .0036 .0040, .0045, .0054, .0065, .0080, .0112, .0170, .0245 .0330, .0450, .0740, .0990, .1520, .2140, .3050, .4200 .5970, .6750, .7900, .8270, .8400, .8408, .9010, .9050 .9100, .9140, .9050, .9260, .9470, .9670, .9760, .9840 .9710, .9790, .9880,1.0000, .9902, .9840, .9780, .9710 .9470, .9510, .9450, .9380, .9340, .9300, .9360, .9420 .9140, .8970, .7980, .7000, .5970, .4610, .3700, .2630 .1730, .1259, .0888, .0619, .0450, .0346, .0267, .0207 .0160, .0120, .0086, .0060, .0040, .0025, .0013, .0003 .0000 }; /* Band 5 of Aster; Central Wavelength = 2169nm */ static const float sr6[74] = { .0000, .0001, .0007, .0017, .0030, .0045, .0062, .0080 .0100, .0124, .0157, .0200, .0290, .0410, .0780, .1310 .2050, .3030, .5410, .7050, .7790, .7910, .8030, .8220 .8400, .9180, .9590,1.0000, .9750, .9020, .7790, .6890 .5900, .4180, .3030, .2300, .1720, .1070, .0700, .0610 .0498, .0385, .0273, .0160, .0140, .0120, .0100, .0080 .0070, .0060, .0050, .0040, .0038, .0036, .0034, .0033 .0031, .0029, .0027, .0025, .0024, .0023, .0021, .0020 .0019, .0017, .0016, .0015, .0013, .0011, .0008, .0005 .0002, .0000 }; /* Band 6 of Aster; Central Wavelength = 2209nm */ static const float sr7[78] = { .0000, .0001, .0001, .0003, .0005, .0007, .0010, .0014 .0018, .0022, .0027, .0032, .0037, .0044, .0050, .0057 .0064, .0072, .0080, .0092, .0110, .0133, .0160, .0194 .0240, .0298, .0370, .0490, .0660, .1070, .1720, .2540 .3520, .5000, .6020, .7420, .7620, .7790, .8520, .8690 .8860, .9020, .9290, .9550, .9840,1.0000, .9340, .8200 .7540, .5160, .3280, .2380, .1640, .1070, .0570, .0468 .0365, .0263, .0160, .0140, .0120, .0100, .0080, .0070 .0060, .0050, .0040, .0036, .0032, .0029, .0025, .0022 .0018, .0015, .0011, .0006, .0002, .0000 }; /* Band 7 of Aster; Central Wavelength = 2263nm */ static const float sr8[78] = { .0000, .0012, .0031, .0054, .0080, .0111, .0149, .0195 .0250, .0330, .0490, .0700, .1150, .1760, .2500, .3850 .5080, .6560, .7950, .8690, .8480, .9100, .9100, .9260 .9260, .9430, .9590, .9750, .9750,1.0000, .9590, .8690 .7990, .7050, .6230, .5000, .3930, .3030, .2420, .1760 .1270, .1060, .0840, .0625, .0410, .0370, .0330, .0290 .0250, .0230, .0215, .0199, .0182, .0165, .0147, .0130 .0112, .0093, .0084, .0078, .0074, .0070, .0067, .0062 .0058, .0053, .0049, .0044, .0040, .0035, .0031, .0027 .0022, .0018, .0013, .0008, .0004, .0000 }; /* Band 8 of Aster; Central Wavelength = 2334nm */ static const float sr9[92] = { .0000, .0026, .0055, .0081, .0103, .0120, .0131, .0138 .0147, .0160, .0195, .0260, .0347, .0450, .0610, .0820 .1060, .1390, .2040, .2860, .4490, .6040, .7020, .8330 .9710, .9880, .9550, .9800, .9770, .9750, .9720, .9700 .9670, .9470, .9620, .9770, .9920,1.0000, .9800, .9960 .9920, .9960, .9550, .9630, .9060, .8370, .7840, .7020 .5800, .4410, .3430, .2780, .2200, .1670, .1307, .0996 .0747, .0570, .0440, .0332, .0250, .0200, .0171, .0150 .0134, .0120, .0108, .0098, .0089, .0080, .0070, .0059 .0049, .0040, .0031, .0022, .0015, .0012, .0010, .0009 .0008, .0007, .0006, .0005, .0004, .0004, .0003, .0002 .0002, .0001, .0001, .0000 }; /* Band 9 of Aster; Central Wavelength = 2400nm */ static const float sr10[98] = { .0000, .0004, .0012, .0020, .0028, .0036, .0044, .0053 .0062, .0071, .0080, .0089, .0098, .0108, .0120, .0133 .0148, .0169, .0200, .0290, .0450, .0650, .0780, .1100 .1550, .2290, .3270, .4240, .5390, .7270, .7840, .9060 .9270, .8980, .9000, .9010, .9030, .9040, .9060, .9310 .9270, .9220, .9610,1.0000, .9800, .9590, .9270, .8940 .8690, .8330, .8160, .7670, .7020, .6610, .5630, .4240 .3430, .2610, .1920, .1439, .1021, .0695, .0490, .0369 .0274, .0205, .0160, .0132, .0111, .0094, .0080, .0066 .0053, .0044, .0040, .0051, .0073, .0087, .0088, .0088 .0087, .0087, .0086, .0085, .0084, .0082, .0079, .0076 .0072, .0067, .0062, .0055, .0047, .0039, .0029, .0018 .0005, .0000 }; static const float wli[10] = { 0.4800, 0.5875, 0.7225, 0.7175, 1.5300, 2.1025, 2.1050, 2.2000, 2.2475, 2.2950 }; static const float wls[10] = { 0.6450, 0.7325, 0.9125, 0.9200, 1.7500, 2.2850, 2.2975, 2.3925, 2.4750, 2.5375 }; ffu.wlinf = wli[iwa-1]; ffu.wlsup = wls[iwa-1]; int i; for(i = 0; i < 1501; i++) ffu.s[i] = 0; switch(iwa) { case 1: for(i = 0; i < 67; i++) ffu.s[92+i] = sr1[i]; break; case 2: for(i = 0; i < 59; i++) ffu.s[135+i] = sr2[i]; break; case 3: for(i = 0; i < 77; i++) ffu.s[189+i] = sr3[i]; break; case 4: for(i = 0; i < 82; i++) ffu.s[187+i] = sr4[i]; break; case 5: for(i = 0; i < 89; i++) ffu.s[512+i] = sr5[i]; break; case 6: for(i = 0; i < 74; i++) ffu.s[741+i] = sr6[i]; break; case 7: for(i = 0; i < 78; i++) ffu.s[742+i] = sr7[i]; break; case 8: for(i = 0; i < 78; i++) ffu.s[780+i] = sr8[i]; break; case 9: for(i = 0; i < 92; i++) ffu.s[799+i] = sr9[i]; break; case 10: for(i = 0; i < 98; i++) ffu.s[818+i] = sr10[i]; } }
_______________________________________________ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user