Test code to interface AOD UPAS with IoT provider.

Dependencies:   ESP8266_AT NCP5623BMUTBG mbed ADS1115 AOD_Calculation BME280 PMS5003 SunPosition CAM_M8

Committer:
eawendtjr
Date:
Wed Dec 06 02:23:22 2017 +0000
Revision:
5:513617961138
Parent:
4:8a667120ee2b
Child:
6:aeb0015d6632
Changed the gain on the A/D converter to two

Who changed what in which revision?

UserRevisionLine numberNew contents of line
eawendtjr 0:62df2a5864d5 1 #include "mbed.h"
eawendtjr 0:62df2a5864d5 2 #include "NCP5623BMUTBG.h"
eawendtjr 0:62df2a5864d5 3 #include "ESP8266_AT.h"
eawendtjr 3:f878eab2ebe0 4 #include "SunPosition.h"
eawendtjr 3:f878eab2ebe0 5 #include "AOD_Calculation.h"
eawendtjr 3:f878eab2ebe0 6 #include "Adafruit_ADS1015.h"
eawendtjr 3:f878eab2ebe0 7 #include "BME280.h"
eawendtjr 0:62df2a5864d5 8
eawendtjr 0:62df2a5864d5 9 /////////////////////////////////////////////
eawendtjr 0:62df2a5864d5 10 //Define core buses and pin states.
eawendtjr 0:62df2a5864d5 11 /////////////////////////////////////////////
eawendtjr 2:3df874f33c42 12 I2C i2c(PB_9, PB_8);//(D14, D15); SDA,SCL
eawendtjr 2:3df874f33c42 13 Serial pc(USBTX, USBRX);
eawendtjr 2:3df874f33c42 14 DigitalOut pumps(PA_9, 0);//(D8, 0);
eawendtjr 2:3df874f33c42 15 DigitalOut pbKill(PC_12, 1); // Digital input pin that conncect to the LTC2950 battery charger used to shutdown the UPAS
eawendtjr 2:3df874f33c42 16 DigitalIn nINT(PA_15); //Connected but currently unused is a digital ouput pin from LTC2950 battery charger. http://cds.linear.com/docs/en/datasheet/295012fd.pdf
eawendtjr 2:3df874f33c42 17 NCP5623BMUTBG RGB_LED(PB_9, PB_8); //(D14, D15);
eawendtjr 0:62df2a5864d5 18
eawendtjr 0:62df2a5864d5 19 /////////////////////////////////////////////
eawendtjr 0:62df2a5864d5 20 //RN4677 BT/BLE Module
eawendtjr 0:62df2a5864d5 21 /////////////////////////////////////////////
eawendtjr 2:3df874f33c42 22 Serial ble(PB_10, PB_11);
eawendtjr 2:3df874f33c42 23 DigitalOut bleRTS(PB_14, 0);
eawendtjr 2:3df874f33c42 24 DigitalOut bleCTS(PB_13, 0);
eawendtjr 2:3df874f33c42 25 DigitalOut BT_IRST(PC_8, 0);
eawendtjr 2:3df874f33c42 26 DigitalOut BT_SW(PA_12, 0);
eawendtjr 0:62df2a5864d5 27
eawendtjr 0:62df2a5864d5 28
eawendtjr 0:62df2a5864d5 29 /////////////////////////////////////////////
eawendtjr 0:62df2a5864d5 30 //Analog to Digital Converter
eawendtjr 0:62df2a5864d5 31 /////////////////////////////////////////////
eawendtjr 2:3df874f33c42 32 DigitalIn ADS_ALRT(PA_10); //Connected but currently unused. (ADS1115) http://www.ti.com/lit/ds/symlink/ads1115.pdf
eawendtjr 0:62df2a5864d5 33
eawendtjr 0:62df2a5864d5 34 /////////////////////////////////////////////
eawendtjr 0:62df2a5864d5 35 //Battery, Charger, & Supply Monitoring
eawendtjr 0:62df2a5864d5 36 /////////////////////////////////////////////
eawendtjr 2:3df874f33c42 37 DigitalIn LTCALT(PB_2); //High for normal operation. Low when a threshold is exceeded for Voltage, gas gauge, or temp
eawendtjr 2:3df874f33c42 38 DigitalIn bcs1(PC_9); //Batt charging if High. (BQ24100)[U23]
eawendtjr 2:3df874f33c42 39 DigitalIn bcs2(PA_8); //Charge complete if High. (BQ24100)[U23]
eawendtjr 2:3df874f33c42 40 DigitalIn bc_npg(PB_1); //Power to the charge controller. (BQ24100)[U23]
eawendtjr 2:3df874f33c42 41 DigitalIn SW3flt(PC_4); //When EN = 0 pin is HIGH, When EN = 1, LOW can be current limit, thermal limit, or UVLO.
eawendtjr 0:62df2a5864d5 42
eawendtjr 0:62df2a5864d5 43 /////////////////////////////////////////////
eawendtjr 0:62df2a5864d5 44 //Sensirion SDP3X(s)
eawendtjr 0:62df2a5864d5 45 /////////////////////////////////////////////
eawendtjr 0:62df2a5864d5 46 DigitalIn SDP3Xflt(PC_0);
eawendtjr 0:62df2a5864d5 47 DigitalIn SDP3XAltflt(PB_7);
eawendtjr 0:62df2a5864d5 48
eawendtjr 0:62df2a5864d5 49 /////////////////////////////////////////////
eawendtjr 0:62df2a5864d5 50 //Accelerometer and Magnometer
eawendtjr 0:62df2a5864d5 51 /////////////////////////////////////////////
eawendtjr 0:62df2a5864d5 52 DigitalOut iNemoEnable(PA_1, 0);
eawendtjr 0:62df2a5864d5 53 DigitalIn iNemoReady(PB_0);
eawendtjr 0:62df2a5864d5 54 DigitalIn iNemoInt1(PC_5);
eawendtjr 0:62df2a5864d5 55 DigitalIn iNemoInt2(PC_6);
eawendtjr 0:62df2a5864d5 56 DigitalIn iNemoInt3(PC_7);
eawendtjr 0:62df2a5864d5 57
eawendtjr 0:62df2a5864d5 58 /////////////////////////////////////////////
eawendtjr 0:62df2a5864d5 59 //UV and Visible Light Sensor
eawendtjr 0:62df2a5864d5 60 /////////////////////////////////////////////
eawendtjr 0:62df2a5864d5 61
eawendtjr 0:62df2a5864d5 62 /////////////////////////////////////////////
eawendtjr 0:62df2a5864d5 63 //GPS
eawendtjr 0:62df2a5864d5 64 /////////////////////////////////////////////
eawendtjr 0:62df2a5864d5 65 DigitalOut gpsEN(PB_15, 0);
eawendtjr 0:62df2a5864d5 66 DigitalIn gpsENFault(PB_12);
eawendtjr 0:62df2a5864d5 67
eawendtjr 0:62df2a5864d5 68
eawendtjr 0:62df2a5864d5 69 /////////////////////////////////////////////
eawendtjr 0:62df2a5864d5 70 //SD Card
eawendtjr 0:62df2a5864d5 71 /////////////////////////////////////////////
eawendtjr 0:62df2a5864d5 72 DigitalIn sdCD(PA_11);
eawendtjr 0:62df2a5864d5 73 DigitalOut sdClk(PB_3,0 );
eawendtjr 0:62df2a5864d5 74 DigitalIn sdMISO(PB_4);
eawendtjr 0:62df2a5864d5 75 DigitalOut sdMOSI(PB_5, 0);
eawendtjr 0:62df2a5864d5 76 DigitalOut sdCS(PB_6, 1);
eawendtjr 0:62df2a5864d5 77
eawendtjr 0:62df2a5864d5 78 DigitalIn pbIso(PA_0);
eawendtjr 0:62df2a5864d5 79 DigitalOut hFault1(PA_7, 0);
eawendtjr 0:62df2a5864d5 80 DigitalOut hFault2(PA_6, 0);
eawendtjr 0:62df2a5864d5 81 DigitalOut hFault3(PA_5, 0);
eawendtjr 0:62df2a5864d5 82 DigitalOut hFault4(PA_4, 0);
eawendtjr 0:62df2a5864d5 83
eawendtjr 0:62df2a5864d5 84 DigitalOut wifiNReset(PC_1, 0);
eawendtjr 0:62df2a5864d5 85 DigitalOut wifiEnable(PC_2, 0);
eawendtjr 0:62df2a5864d5 86 DigitalOut qdEnable(PC_3, 0);
eawendtjr 0:62df2a5864d5 87 DigitalIn qdFault(PC_13);
eawendtjr 0:62df2a5864d5 88
eawendtjr 3:f878eab2ebe0 89 /////////////////////////////////////////////
eawendtjr 3:f878eab2ebe0 90 //AOD Objects
eawendtjr 3:f878eab2ebe0 91 /////////////////////////////////////////////
eawendtjr 3:f878eab2ebe0 92 SunPosition sun;
eawendtjr 3:f878eab2ebe0 93 AOD_Calculation aod_440;
eawendtjr 3:f878eab2ebe0 94 AOD_Calculation aod_870;
eawendtjr 3:f878eab2ebe0 95 AOD_Calculation aod_680;
eawendtjr 3:f878eab2ebe0 96 AOD_Calculation aod_520;
eawendtjr 3:f878eab2ebe0 97 Adafruit_ADS1115 ads_sun(&i2c, ADS1015_ADDRESS_VDD); //Adress pin connected to 3.3V
eawendtjr 3:f878eab2ebe0 98 BME280 bme(PB_9, PB_8, 0xEC); //(D14, D15);
eawendtjr 3:f878eab2ebe0 99
eawendtjr 0:62df2a5864d5 100 ESP8266_AT esp(PC_10, PC_11);
eawendtjr 0:62df2a5864d5 101
eawendtjr 1:702f144a88b2 102 Timer t;
eawendtjr 1:702f144a88b2 103
eawendtjr 5:513617961138 104 //char ssid[] = "w212lab";
eawendtjr 5:513617961138 105 //char password[] = "testarduino";
eawendtjr 1:702f144a88b2 106 char ssid[] = "VOLTAR";
eawendtjr 1:702f144a88b2 107 char password[] = "CedhCedh";
eawendtjr 5:513617961138 108
eawendtjr 1:702f144a88b2 109 char server[] = "api.thingspeak.com";
eawendtjr 3:f878eab2ebe0 110 char apiKey[] = "32QVSK5INPPAVIV0";
eawendtjr 1:702f144a88b2 111 char conn_type[] = "TCP";
eawendtjr 1:702f144a88b2 112
eawendtjr 0:62df2a5864d5 113 // For selecting the WiFi UART
eawendtjr 0:62df2a5864d5 114 const int addr = 0x3F << 1;
eawendtjr 0:62df2a5864d5 115 char aod_sel_5on[1];
eawendtjr 0:62df2a5864d5 116 char aod_sel_5off[1];
eawendtjr 0:62df2a5864d5 117 char plant_sel[1];
eawendtjr 0:62df2a5864d5 118
eawendtjr 3:f878eab2ebe0 119 //AOD Variables
eawendtjr 3:f878eab2ebe0 120 //Globals for sun calulation input
eawendtjr 3:f878eab2ebe0 121 int year = 2017;
eawendtjr 3:f878eab2ebe0 122 int month = 11;
eawendtjr 3:f878eab2ebe0 123 int day = 21;
eawendtjr 3:f878eab2ebe0 124 int hour = 12;
eawendtjr 3:f878eab2ebe0 125 int minute = 0;
eawendtjr 3:f878eab2ebe0 126 double second = 0;
eawendtjr 3:f878eab2ebe0 127 double latitude = 40.5853;
eawendtjr 3:f878eab2ebe0 128 double longitude = -105.0844;
eawendtjr 3:f878eab2ebe0 129 double altitude = 1525;
eawendtjr 3:f878eab2ebe0 130 double temperature;
eawendtjr 3:f878eab2ebe0 131 double pressure;
eawendtjr 3:f878eab2ebe0 132
eawendtjr 3:f878eab2ebe0 133 //Globals for sun calculation output
eawendtjr 3:f878eab2ebe0 134 double zenith;
eawendtjr 3:f878eab2ebe0 135 double azimuth;
eawendtjr 3:f878eab2ebe0 136 double radius;
eawendtjr 3:f878eab2ebe0 137
eawendtjr 3:f878eab2ebe0 138 //Constants
eawendtjr 3:f878eab2ebe0 139 const double time_zone = 0; //GPS gets Greenwich time
eawendtjr 3:f878eab2ebe0 140 const double delta_t = 68; //This parameter will be roughly constant this year
eawendtjr 3:f878eab2ebe0 141 const double slope = 30;
eawendtjr 3:f878eab2ebe0 142 const double azm_rotation = 10;
eawendtjr 3:f878eab2ebe0 143
eawendtjr 3:f878eab2ebe0 144 //AOD CALCULATION
eawendtjr 3:f878eab2ebe0 145 //AOD Calculation Constants
eawendtjr 3:f878eab2ebe0 146 const double lambda_440 = 0.440;
eawendtjr 3:f878eab2ebe0 147 const double lambda_520 = 0.520;
eawendtjr 3:f878eab2ebe0 148 const double lambda_680 = 0.680;
eawendtjr 3:f878eab2ebe0 149 const double lambda_870 = 0.870;
eawendtjr 3:f878eab2ebe0 150 const double CO2_ppv = 0.00036;
eawendtjr 3:f878eab2ebe0 151 const double v0_440 = 1.25;
eawendtjr 3:f878eab2ebe0 152 const double v0_520 = 1.45;
eawendtjr 3:f878eab2ebe0 153 const double v0_680 = 1.40;
eawendtjr 3:f878eab2ebe0 154 const double v0_870 = 1.35;
eawendtjr 3:f878eab2ebe0 155 const double vd = 0.001225;
eawendtjr 3:f878eab2ebe0 156 const double oz_coeff_440 = 0.0029;
eawendtjr 3:f878eab2ebe0 157 const double oz_coeff_520 = 0.0481;
eawendtjr 3:f878eab2ebe0 158 const double oz_coeff_680 = 0.0361;
eawendtjr 3:f878eab2ebe0 159 const double oz_coeff_870 = 0.0013;
eawendtjr 3:f878eab2ebe0 160
eawendtjr 3:f878eab2ebe0 161 //Voltage from light detector
eawendtjr 3:f878eab2ebe0 162 double v870; //Voltage read from 870nm photodiode
eawendtjr 3:f878eab2ebe0 163 double v_raw870; //Raw analog output from 870nm photodiode
eawendtjr 3:f878eab2ebe0 164 double v680; //Voltage read from 680nm photodiode
eawendtjr 3:f878eab2ebe0 165 double v_raw680; //Raw analog output from 680nm photodiode
eawendtjr 3:f878eab2ebe0 166 double v520; //Voltage read from 520nm photodiode
eawendtjr 3:f878eab2ebe0 167 double v_raw520; //Raw analog output from 520nm photodiode
eawendtjr 3:f878eab2ebe0 168 double v440; //Voltage read from 440nm photodiode
eawendtjr 3:f878eab2ebe0 169 double v_raw440; //Raw analog output from 440nm photodiode
eawendtjr 3:f878eab2ebe0 170 double AOD_870;
eawendtjr 3:f878eab2ebe0 171 double AOD_680;
eawendtjr 3:f878eab2ebe0 172 double AOD_520;
eawendtjr 3:f878eab2ebe0 173 double AOD_440;
eawendtjr 3:f878eab2ebe0 174
eawendtjr 3:f878eab2ebe0 175 //AOD functions
eawendtjr 3:f878eab2ebe0 176 void getAODs();
eawendtjr 3:f878eab2ebe0 177
eawendtjr 0:62df2a5864d5 178 //////////////////////////////////////////////////////////////
eawendtjr 0:62df2a5864d5 179 //Main Function
eawendtjr 0:62df2a5864d5 180 //////////////////////////////////////////////////////////////
eawendtjr 0:62df2a5864d5 181 int main()
eawendtjr 0:62df2a5864d5 182 {
eawendtjr 0:62df2a5864d5 183 pc.baud(115200);
eawendtjr 1:702f144a88b2 184 RGB_LED.set_led(1, 0, 1);
eawendtjr 1:702f144a88b2 185 wait(1);
eawendtjr 0:62df2a5864d5 186
eawendtjr 0:62df2a5864d5 187 aod_sel_5on[0] = 0xCB;
eawendtjr 0:62df2a5864d5 188 aod_sel_5off[0] = 0xC9;
eawendtjr 0:62df2a5864d5 189 plant_sel[0] = 0xCF;
eawendtjr 0:62df2a5864d5 190
eawendtjr 1:702f144a88b2 191 RGB_LED.set_led(1, 1, 1);
eawendtjr 3:f878eab2ebe0 192 i2c.write(addr, aod_sel_5on, 1);
eawendtjr 0:62df2a5864d5 193 pc.printf("Plantower off\r\n");
eawendtjr 1:702f144a88b2 194 wait(1);
eawendtjr 0:62df2a5864d5 195
eawendtjr 1:702f144a88b2 196 //Enable the WiFi chip
eawendtjr 0:62df2a5864d5 197 RGB_LED.set_led(0, 1, 1); // Light LED so we know something is happening
eawendtjr 0:62df2a5864d5 198 wifiEnable = 1; // Enable power to the WiFi while in reset, and wait a short while
eawendtjr 0:62df2a5864d5 199 wait_ms(100);
eawendtjr 0:62df2a5864d5 200 wifiNReset = 1; // Now de-assert the reset signal
eawendtjr 0:62df2a5864d5 201 RGB_LED.set_led(1, 1, 0); // Color change of LED to indicate something is happening.
eawendtjr 1:702f144a88b2 202 wait(10);
eawendtjr 1:702f144a88b2 203
eawendtjr 1:702f144a88b2 204 RGB_LED.set_led(0, 1, 0);
eawendtjr 1:702f144a88b2 205 esp.check_esp();
eawendtjr 1:702f144a88b2 206 esp.version_info();
eawendtjr 1:702f144a88b2 207 esp.software_reset();
eawendtjr 1:702f144a88b2 208
eawendtjr 1:702f144a88b2 209 esp.command_echo_mode(ESP_ECHO_ON);
eawendtjr 1:702f144a88b2 210 esp.set_wifi_mode(ESP_DUAL_CONFIG);
eawendtjr 1:702f144a88b2 211 esp.enable_multiple_connections();
eawendtjr 0:62df2a5864d5 212
eawendtjr 1:702f144a88b2 213 esp.create_tcp_server(80);
eawendtjr 1:702f144a88b2 214
eawendtjr 1:702f144a88b2 215 //esp.set_server_timeout(5);
eawendtjr 1:702f144a88b2 216
eawendtjr 1:702f144a88b2 217 esp.list_access_points();
eawendtjr 1:702f144a88b2 218 esp.wifi_connect(ssid, password);
eawendtjr 1:702f144a88b2 219 esp.check_ap();
eawendtjr 1:702f144a88b2 220 esp.get_ip();
eawendtjr 1:702f144a88b2 221
eawendtjr 1:702f144a88b2 222 char someArray[150];
eawendtjr 1:702f144a88b2 223
eawendtjr 1:702f144a88b2 224 t.start();
eawendtjr 0:62df2a5864d5 225 while(1)
eawendtjr 0:62df2a5864d5 226 {
eawendtjr 1:702f144a88b2 227 RGB_LED.set_led(0, 0, 1);
eawendtjr 1:702f144a88b2 228 if(t.read()>30)//if 30 seconds passed
eawendtjr 1:702f144a88b2 229 {
eawendtjr 1:702f144a88b2 230 t.reset();//reset timer
eawendtjr 3:f878eab2ebe0 231
eawendtjr 3:f878eab2ebe0 232 RGB_LED.set_led(1, 1, 1);
eawendtjr 3:f878eab2ebe0 233
eawendtjr 3:f878eab2ebe0 234 //get the AOD
eawendtjr 3:f878eab2ebe0 235 getAODs();
eawendtjr 3:f878eab2ebe0 236
eawendtjr 3:f878eab2ebe0 237 //send data to thingspeaks
eawendtjr 4:8a667120ee2b 238 sprintf(someArray,"GET https://api.thingspeak.com/update?api_key=32QVSK5INPPAVIV0&field1=%.2f&field2=%.2f&field3=%.2f&field4=%.2f&field5=%.2f&field6=%.2f\r\n\r\n",AOD_440,AOD_520,AOD_680,AOD_870,temperature,pressure);
eawendtjr 1:702f144a88b2 239
eawendtjr 1:702f144a88b2 240 esp.delete_tcp_server();
eawendtjr 1:702f144a88b2 241 esp.establish_connection(0, conn_type, server, 80);
eawendtjr 2:3df874f33c42 242 esp.send_data_tcp(0, someArray);
eawendtjr 2:3df874f33c42 243 esp.close_connection(0);
eawendtjr 1:702f144a88b2 244 esp.create_tcp_server(80);
eawendtjr 1:702f144a88b2 245 pc.printf("%s\r\n", someArray);
eawendtjr 1:702f144a88b2 246 }
eawendtjr 0:62df2a5864d5 247 }
eawendtjr 0:62df2a5864d5 248 }
eawendtjr 3:f878eab2ebe0 249
eawendtjr 3:f878eab2ebe0 250 void getAODs()
eawendtjr 3:f878eab2ebe0 251 {
eawendtjr 3:f878eab2ebe0 252 temperature = bme.getTemperature();
eawendtjr 3:f878eab2ebe0 253 pressure = bme.getPressure(temperature);
eawendtjr 3:f878eab2ebe0 254
eawendtjr 3:f878eab2ebe0 255 sun.setValues(year, month, day, hour, minute, second, time_zone, delta_t, latitude, longitude, altitude, temperature, pressure, slope, azm_rotation);
eawendtjr 3:f878eab2ebe0 256 sun.findSun();
eawendtjr 3:f878eab2ebe0 257 zenith = sun.getZenith();
eawendtjr 3:f878eab2ebe0 258 radius = sun.getRadius();
eawendtjr 3:f878eab2ebe0 259
eawendtjr 3:f878eab2ebe0 260 //Read the light detectors
eawendtjr 5:513617961138 261 v_raw870 = (double)ads_sun.readADC_SingleEnded(A3_GAIN_TWO); //Channel A3 | 1x gain | +/-4.096V | 1 bit = 2mV | 0.125mV
eawendtjr 3:f878eab2ebe0 262 v870 = (v_raw870*0.125)/(1000); //Converts to a voltage
eawendtjr 3:f878eab2ebe0 263
eawendtjr 5:513617961138 264 v_raw680 = (double)ads_sun.readADC_SingleEnded(A2_GAIN_TWO); //Channel A2 | 1x gain | +/-4.096V | 1 bit = 2mV | 0.125mV
eawendtjr 3:f878eab2ebe0 265 v680 = (v_raw680*0.125)/(1000); //Converts to a voltage
eawendtjr 3:f878eab2ebe0 266
eawendtjr 5:513617961138 267 v_raw520 = (double)ads_sun.readADC_SingleEnded(A1_GAIN_TWO); //Channel A1 | 1x gain | +/-4.096V | 1 bit = 2mV | 0.125mV
eawendtjr 3:f878eab2ebe0 268 v520 = (v_raw520*0.125)/(1000); //Converts to a voltage
eawendtjr 3:f878eab2ebe0 269
eawendtjr 5:513617961138 270 v_raw440 = (double)ads_sun.readADC_SingleEnded(A0_GAIN_TWO); //Channel A1 | 1x gain | +/-4.096V | 1 bit = 2mV | 0.125mV
eawendtjr 3:f878eab2ebe0 271 v440 = (v_raw520*0.125)/(1000); //Converts to a voltage
eawendtjr 3:f878eab2ebe0 272
eawendtjr 3:f878eab2ebe0 273 //Calculate the AOD for all channels
eawendtjr 3:f878eab2ebe0 274 aod_870.setAODInputs(longitude, latitude, altitude, lambda_870, CO2_ppv, pressure, month, day, oz_coeff_870, v0_870, vd, v870, radius, zenith);
eawendtjr 3:f878eab2ebe0 275 aod_870.opticalDepth();
eawendtjr 3:f878eab2ebe0 276 AOD_870 = aod_870.getAOD();
eawendtjr 3:f878eab2ebe0 277
eawendtjr 3:f878eab2ebe0 278 aod_680.setAODInputs(longitude, latitude, altitude, lambda_680, CO2_ppv, pressure, month, day, oz_coeff_680, v0_680, vd, v680, radius, zenith);
eawendtjr 3:f878eab2ebe0 279 aod_680.opticalDepth();
eawendtjr 3:f878eab2ebe0 280 AOD_680 = aod_680.getAOD();
eawendtjr 3:f878eab2ebe0 281
eawendtjr 3:f878eab2ebe0 282 aod_520.setAODInputs(longitude, latitude, altitude, lambda_520, CO2_ppv, pressure, month, day, oz_coeff_520, v0_520, vd, v520, radius, zenith);
eawendtjr 3:f878eab2ebe0 283 aod_520.opticalDepth();
eawendtjr 3:f878eab2ebe0 284 AOD_520 = aod_520.getAOD();
eawendtjr 3:f878eab2ebe0 285
eawendtjr 3:f878eab2ebe0 286 aod_440.setAODInputs(longitude, latitude, altitude, lambda_440, CO2_ppv, pressure, month, day, oz_coeff_440, v0_440, vd, v440, radius, zenith);
eawendtjr 3:f878eab2ebe0 287 aod_440.opticalDepth();
eawendtjr 3:f878eab2ebe0 288 AOD_440 = aod_440.getAOD();
eawendtjr 3:f878eab2ebe0 289 }