Changeset 695 for BAORadio/libindi/libindi/BAOcontrol/baocontrol.cpp
- Timestamp:
- Sep 28, 2012, 2:14:03 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
BAORadio/libindi/libindi/BAOcontrol/baocontrol.cpp
r693 r695 20 20 { 21 21 float a1, a2, a3; 22 22 23 23 char *Version; 24 24 … … 29 29 30 30 // Affichage de la version du programme 31 31 32 32 Version = new char[1000]; 33 33 … … 40 40 * franckrichard033@gmail.com *\n \ 41 41 ******************************************\n\n\n", VERSION, VERSION_DATE); 42 42 43 43 AfficherLog(Version, true); 44 44 45 45 delete [] Version; 46 46 … … 145 145 146 146 147 148 147 // Transfert de la latitude, longitude, pression, température à la classe Astro 149 148 … … 154 153 155 154 156 157 //DefinirDateHeure(2012.0, 6.0, 29.0, 21.0, 56.0, 48.0); 158 155 //DefinirDateHeure(2012.0, 6.0, 29.0, 22.0, 39.0, 40.0); 156 //DefinirDateHeure(2012.0, 6.0, 29.0, 22.0, 49.0, 18.0); 157 //DefinirDateHeure(2012.0, 6.0, 29.0, 22.0, 57.0, 52.0); 158 //DefinirDateHeure(2012.0, 6.0, 29.0, 20.0, 59.0, 8.0); 159 //DefinirDateHeure(2012.0, 6.0, 29.0, 21.0, 55.0, 57.0); 159 160 160 161 … … 164 165 CalculTSL(); 165 166 166 167 /*double c,d; 168 double e,f; 169 stringstream os; 170 171 os << "tsl=" << DHMS(GetTSL()*N180divPi, true)<< " " << GetTSL() << "\n"; 172 173 AfficherLog(os.str(), true); 174 os.str(""); 175 176 // double a=15.0*(5.0+55.0/60.0+10.3/3600.0)*Pidiv180; 177 // double b=(7.0+24.0/60.0+25.0/3600.0)*Pidiv180; 178 179 // double a=15.0*(6.0+45.0/60.0+8.7/3600.0)*Pidiv180; 180 //double b=-(16.0+43.0/60.0+0.3/3600.0)*Pidiv180; 181 182 //double a=15.0*(5.0+55.0/60.0+50.0/3600.0)*Pidiv180; 183 //double b=(7.0+24.0/60.0+30.0/3600.0)*Pidiv180; 184 185 // double a=15.0*(23.0+7.0/60.0+8.0/3600.0)*Pidiv180; 186 // double b=(59.0+29.0/60.0+12.0/3600.0)*Pidiv180; 187 188 double a=15.0*(14.0+15.0/60.0+39.5/3600.0)*Pidiv180; 189 double b=(19.0+10.0/60.0+46.7/3600.0)*Pidiv180; 190 191 //CoordonneesHorairesDouble Soleil; 192 193 //CalculARDecSoleil(&Soleil); 194 195 //a=Soleil.ar; 196 //b=Soleil.dec; 197 // Precession(&a, &b); 198 // NutationEtoile(&a, &b); 199 200 // AberrationAnnuelle(&a, &b); 201 202 os << "ad=" << a << " de=" << b << "\n"; 203 204 Azimut(a,b,&c,&d); 205 206 c += 2.91488 * Pidiv180; 207 d -= 8.08241 * Pidiv180; 208 209 AzHa2ADDe(c, d, &a, &b); 210 211 os << "ad=" << DHMS(a*N180divPi, true) << " de=" << DHMS(b*N180divPi, false) << "\n"; 212 os << "ad=" << a << " de=" << b << "\n"; 213 214 AfficherLog(os.str(), true); 215 216 Azimut(a,b,&c,&d); 217 218 os.str(""); 219 220 os << "az=" << DHMS(c*N180divPi, false)<< " ha=" << DHMS(d*N180divPi, false) << "\n"; 221 222 AfficherLog(os.str(), true);*/ 223 224 167 /* 168 double a, b, c,d, a22, b22, c22, d22; 169 double e,f; 170 stringstream os; 171 172 os << "tsl=" << DHMS(GetTSL()*N180divPi, true)<< " " << GetTSL() << "\n"; 173 174 AfficherLog(os.str(), true); 175 os.str(""); 176 177 a=15.0*(18.0+36.0/60.0+56.3/3600.0)*Pidiv180; 178 b=(38.0+47.0/60.0+3.1/3600.0)*Pidiv180; 179 180 a= 3.61082; 181 b=0.860677; 182 a22=3.39278; 183 b22=0.844504; 184 185 a= 4.87356; 186 b=0.676912; 187 a22=4.94645; 188 b22=0.577727; 189 190 a= 5.41677; 191 b=0.790291; 192 a22=5.55106; 193 b22=0.699053; 194 195 a=4.87356; 196 b=0.676912; 197 a22=4.97375; 198 b22=0.579795; 199 200 201 a=3.73351; 202 b=0.334748; 203 a22=3.61661; 204 b22=0.241758; 205 206 207 //a=15.0*(18.0+37.0/60.0+22.0/3600.0)*Pidiv180; 208 //b=(38.0+47.0/60.0+43.0/3600.0)*Pidiv180; 209 210 //CoordonneesHorairesDouble Soleil; 211 212 //CalculARDecSoleil(&Soleil); 213 214 //a=Soleil.ar; 215 //b=Soleil.dec; 216 //Precession(&a, &b); 217 //NutationEtoile(&a, &b); 218 219 //AberrationAnnuelle(&a, &b); 220 221 os << "ad=" << DHMS(a*N180divPi, true) << " de=" << DHMS(b*N180divPi, false) << "\n"; 222 os << "ad=" << a << " de=" << b << "\n"; 223 224 Alignement *al; 225 226 al=new Alignement(); 227 228 Azimut(a, b, &c, &d); 229 Azimut(a22, b22, &c22, &d22); 230 231 double ec1 = (c-c22)/PasDeltaAz; 232 double ec2= (d-d22)/PasDeltaHa; 233 234 os << "nb de pas az=" << ec1 << " ha=" << ec2 << "\n"; 235 236 double c3= VerifAngle((c * N180divPi * 4000.0/360.0 + ec1) * (360.0 / 4000.0) * Pidiv180 ); 237 238 double d3 = al->Motor2Alt(al->Alt2Motor(d * N180divPi) + ec2) * Pidiv180; 239 240 double sp=DistanceAngulaireEntre2Points(c, d, c3, d3) *N180divPi; 241 242 os << "sep=" << sp << "° dist haut=" << (d-d3)*N180divPi <<"\n"; 243 244 AzHa2ADDe(c3, d3, &a, &b); 245 246 os << "ad=" << DHMS(a*N180divPi, true) << " de=" << DHMS(b*N180divPi, false) << "\n"; 247 os << "ad=" << a << " de=" << b << "\n"; 248 249 AfficherLog(os.str(), true); 250 251 Azimut(a,b,&c,&d); 252 253 os.str(""); 254 255 os << "az=" << DHMS(c*N180divPi, false)<< " ha=" << DHMS(d*N180divPi, false) << "\n"; 256 257 delete al; 258 259 AfficherLog(os.str(), true); 260 */ 261 225 262 226 263 … … 244 281 245 282 Connect(true); 246 283 247 284 } 248 285 … … 535 572 struct tm date; 536 573 struct timeval tv; 537 574 538 575 // On récupÚre la date et l'heure depuis l'horloge du systÚme 539 576 … … 556 593 // On lance les calculs (Temps sidéral local etc...) 557 594 558 CalculTSL(); 595 CalculTSL(); 559 596 } 560 597 … … 1012 1049 return true; 1013 1050 } 1051 1052 if (commande == "R") 1053 { 1054 if (!VerifReponse("Reinitialisation de la matrice de correction", Message)) 1055 { 1056 ErreurLog("Pas de réponse de l'antenne à la requête R.\n\n"); 1057 1058 return false; 1059 } 1060 1061 return true; 1062 } 1014 1063 1015 1064 if (!VerifReponse("name=\"COMMAND_SET\" state=\"Ok\"", NULL)) … … 1655 1704 // et donc la magnitude < MAGNITUDEMAXETOILESCALIBRATION 1656 1705 1657 if ( Etoiles[i].selectionnee = ((Etoiles[i].ha > (HAUTMIN + 5.0 ) * Pidiv180) && (Etoiles[i].mag < MAGNITUDEMAXETOILESCALIBRATION)) )1706 if ( Etoiles[i].selectionnee = ((Etoiles[i].ha > (HAUTMIN + 5.0 ) * Pidiv180) && (Etoiles[i].mag < MAGNITUDEMAXETOILESCALIBRATION)) ) 1658 1707 { 1659 1708 os.width(20); … … 2114 2163 case 'o' : 2115 2164 commande[0]='O'; 2165 break; 2166 case 'r' : 2167 commande[0]='R'; 2116 2168 break; 2117 2169 }
Note: See TracChangeset
for help on using the changeset viewer.