this program is designed for the CHITISAT's OBC, and is a prototype for the flight plan vs altitude
Dependencies: ADS1015 BMP280 SDFileSystem SENSOR mbed
Diff: main.cpp
- Revision:
- 2:ba3323e788fc
- Parent:
- 1:a147ca4f8fa0
- Child:
- 3:fef99c7c92b5
diff -r a147ca4f8fa0 -r ba3323e788fc main.cpp --- a/main.cpp Thu Jun 14 13:17:54 2018 +0000 +++ b/main.cpp Thu Jun 14 13:57:08 2018 +0000 @@ -138,8 +138,8 @@ //int altura=10; //***************** //float x=0.5; - float hmin=0.5; - while(h<0.4){ + float hmin=1; + while(h<0.9){ obc.printf("subiendo en silencio radial altura=%f\n\r",h); h=get_altura(); led=!led; @@ -197,9 +197,9 @@ obc.printf("standby: %d",stby); } float hant; - hant=altura1; - h=get_altura(); - float hact=altura1; + hant=h;//altura1; + //h=get_altura(); + float hact=get_altura();//altura1; float dif; dif=hant-hact; obc.printf("altan=%f altac=%f dif=%f\n",hant,hact,dif); @@ -207,8 +207,8 @@ obc.printf("********************sleep mode**************************"); //while(hact!=0.0){ hant=hact; - h=get_altura(); - hact=altura1; + //h=get_altura(); + hact=get_altura();//altura1; take_tl(); take_mision(); save_tl(); @@ -289,8 +289,7 @@ sensor_adc[2]=voltaje.read_u16();sen_adc[2]=(sensor_adc[2]>>4); suv=uv.getUV(); //sensor_adc[3]=temp2.read();//uv.read();sen_adc[3]=sensor_adc[3]/0.0008789062; - obc.printf("tomando telemetria\n"); - + obc.printf("tomando telemetria\n"); } void take_mision(void){