Ignore:
Timestamp:
Sep 28, 2012, 2:14:03 PM (12 years ago)
Author:
frichard
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • BAORadio/libindi/libindi/BAOcontrol/baocontrol.cpp

    r693 r695  
    2020{
    2121    float a1, a2, a3;
    22    
     22
    2323    char *Version;
    2424
     
    2929
    3030    // Affichage de la version du programme
    31    
     31
    3232    Version = new char[1000];
    3333
     
    4040 *        franckrichard033@gmail.com      *\n \
    4141 ******************************************\n\n\n", VERSION, VERSION_DATE);
    42    
     42
    4343    AfficherLog(Version, true);
    44    
     44
    4545    delete [] Version;
    4646
     
    145145
    146146
    147 
    148147    // Transfert de la latitude, longitude, pression, température à la classe Astro
    149148
     
    154153
    155154
    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);
    159160
    160161
     
    164165    CalculTSL();
    165166
    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   
    225262
    226263
     
    244281
    245282    Connect(true);
    246    
     283
    247284}
    248285
     
    535572    struct tm date;
    536573    struct timeval tv;
    537  
     574
    538575    // On récupÚre la date et l'heure depuis l'horloge du systÚme
    539576
     
    556593    // On lance les calculs (Temps sidéral local etc...)
    557594
    558     CalculTSL(); 
     595    CalculTSL();
    559596}
    560597
     
    10121049            return true;
    10131050        }
     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        }
    10141063
    10151064        if (!VerifReponse("name=\"COMMAND_SET\" state=\"Ok\"", NULL))
     
    16551704            // et donc la magnitude < MAGNITUDEMAXETOILESCALIBRATION
    16561705
    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)) )
    16581707            {
    16591708                os.width(20);
     
    21142163            case 'o' :
    21152164                commande[0]='O';
     2165                break;
     2166            case 'r' :
     2167                commande[0]='R';
    21162168                break;
    21172169            }
Note: See TracChangeset for help on using the changeset viewer.