Changeset 691 for BAORadio


Ignore:
Timestamp:
Jul 19, 2012, 11:17:53 PM (12 years ago)
Author:
frichard
Message:

-dernière version avant déménagement

Location:
BAORadio/libindi/libindi
Files:
18 edited

Legend:

Unmodified
Added
Removed
  • BAORadio/libindi/libindi/BAOTest/BAOtest_main.cpp

    r688 r691  
    1212#include <stdio.h>
    1313#include <stdlib.h>
    14 #include <net/if.h> 
     14#include <net/if.h>
    1515#include <sys/types.h>
    1616#include <sys/socket.h>
     
    114114        return atoi(str2.c_str());
    115115    }
    116  
     116
    117117    return -1;
    118118}
     
    129129int main ( int argc, char *argv[] )
    130130{
    131     Position Pos, Pos2;
     131    Position Pos, NouvPos;
    132132    char cIP;
    133133    char IP[20];
     
    142142    Pos.y=0;
    143143
     144    NouvPos.x=100;
     145    NouvPos.y=100;
     146
    144147    //init nbs aléatoires
    145148    if (ErreursAleatoires) srand(time(NULL));
    146149
    147    
     150
    148151
    149152    std::cout <<  "******************\n";
     
    158161    else strcpy(IP, "127.0.0.1");
    159162
    160 
    161163    try
    162164    {
    163        ClientSocket client_socket ( IP, 8000 );
    164        
    165        // ServerSocket socket ( 8000 );       
    166        // ServerSocket client_socket;
    167        // socket.accept ( client_socket );
     165        ClientSocket client_socket ( IP, 8000 );
     166
     167        // ServerSocket socket ( 8000 );
     168        // ServerSocket client_socket;
     169        // socket.accept ( client_socket );
    168170
    169171        std::string reply;
     
    173175        while (true)
    174176        {
    175            
    176                 client_socket.recv(asks);
    177 
    178                 int pos=asks.find("\n");
    179                 memasks=asks;
    180                
    181                 while ((pos!=string::npos) && (asks.length()>1))
    182                 {
    183                     memasks=asks.substr(pos+1);
    184                     asks=asks.substr(0,pos);
    185 
    186                     strcpy(chaine, "");
    187 
     177
     178            client_socket.recv(asks);
     179
     180            int pos=asks.find("\n");
     181            memasks=asks;
     182
     183            while ((pos!=string::npos) && (asks.length()>1))
     184            {
     185                memasks=asks.substr(pos+1);
     186                asks=asks.substr(0,pos);
     187
     188                strcpy(chaine, "");
     189
     190
     191                if (abs(Pos.x - NouvPos.x) < 5 )
     192                {
     193                    if (Pos.x - NouvPos.x < 0) Pos.x--;
     194                    if (Pos.x - NouvPos.x > 0) Pos.x++;
     195                }
     196                else
     197                {
     198                    Pos.x -= (NouvPos.x - Pos.x) / 6.0;
     199                }
     200
     201                if (abs(Pos.y - NouvPos.y) < 5 )
     202                {
     203                    if (Pos.y - NouvPos.y < 0) Pos.y--;
     204                    if (Pos.y - NouvPos.y > 0) Pos.y++;
     205                }
     206                else
     207                {
     208                    Pos.y -= (NouvPos.y - Pos.y) / 6.0;
     209                }
     210
     211                if (ErreursAleatoires) Aleat=rand()%ERREURS != 1;
     212                else Aleat=1;
     213
     214                if (Affichage) std::cout <<  "Pilote BAO : " << asks << "\n" ;
     215
     216
     217                if (asks.find("P")!=string::npos)
     218                {
     219
     220                    strcpy(chaine,"ACK/POSITION\n");
     221                    client_socket << chaine;
     222
     223                    if (Affichage) std::cout <<  "Microcontrôleur : " << chaine;
     224
     225                    if (Aleat)
     226                    {
     227                        sprintf(chaine, "POSITION/%05i/%05i/\n", Pos.x, Pos.y);
     228                    }
     229                    else
     230                    {
     231                        strcpy(chaine, "NACK/HALT/POSITION/\n");   //erreur moteur !
     232                    }
     233                }
     234
     235                if (asks.find("G")!=string::npos)
     236                {
     237
     238                    NouvPos = ExtractPosition2(asks);
     239
     240                        NouvPos.x += Pos.x;
     241                        NouvPos.y += Pos.y;
    188242                   
    189                         if (ErreursAleatoires) Aleat=rand()%ERREURS != 1; else Aleat=1;
    190 
    191                         if (Affichage) std::cout <<  "Pilote BAO : " << asks << "\n" ;
    192          
    193 
    194                         if (asks.find("P")!=string::npos)
    195                         {
    196 
    197                            strcpy(chaine,"ACK/POSITION\n");
    198                            client_socket << chaine;
    199 //usleep(10000);
    200                             if (Affichage) std::cout <<  "Microcontrôleur : " << chaine;
    201 
    202                             if (Aleat)
    203                             {
    204                                 sprintf(chaine, "POSITION/%05i/%05i/\n", Pos.x, Pos.y);
    205                             }
    206                             else
    207                             {
    208                                 strcpy(chaine, "NACK/HALT/POSITION/\n");   //erreur moteur !
    209                             }
    210                         }
    211 
    212                         if (asks.find("G")!=string::npos)
    213                         {
    214                        
    215                             Pos2=ExtractPosition2(asks);
    216                            
    217                             Pos.x-=Pos2.x;
    218                             Pos.y-=Pos2.y;
    219 
    220                             strcpy(chaine,"ACK/GOTO/\n");
    221                             client_socket << chaine;
    222 
    223                             if (Affichage)
    224                             {
    225                                std::cout <<  "Microcontrôleur : " << chaine;
    226 
    227                                std::cout <<  "Positionnement de l antenne...\n";                               
    228                             }
    229                            
    230                             // sleep(20);
    231 
    232                             // sleep(rand()%10);
    233 
    234                             if (Aleat)
    235                             {
    236                                 strcpy(chaine, "OK/GOTO/\n");
    237                             }
    238                             else
    239                             {
    240                                 strcpy(chaine, "NACK/HALT/GOTO/\n");   //erreur moteur !
    241                             }
    242                         }
    243 
    244                         if (asks.find("Z")!=string::npos)
    245                         {
    246 
    247                             strcpy(chaine, "ACK/PARK\n");
    248                             client_socket << chaine;
    249 
    250                             if (Affichage) std::cout <<  "Microcontrôleur : " << chaine;
    251 
    252                             if (Aleat)
    253                             {
    254                                 strcpy(chaine, "OK/PARK/\n");
    255                             }
    256                             else
    257                             {
    258                                 strcpy(chaine, "NACK/HALT/PARK/\n");   //erreur
    259                             }
    260                         }
    261 
    262                         if (asks.find("A")!=string::npos)
    263                         {
    264 
    265                             strcpy(chaine,"ACK/ABORT\n");
    266                             client_socket << chaine;
    267 
    268                             if (Affichage) std::cout <<  "Microcontrôleur : " << chaine;
    269 
    270                             if (Aleat)
    271                             {
    272                                 strcpy(chaine, "OK/ABORT/\n");
    273                             }
    274                             else
    275                             {
    276                                 strcpy(chaine, "NACK/HALT/ABORT/\n");   //erreur
    277                             }
    278                         }
    279 
    280                         if (strlen(chaine)>1)
    281                         {
    282                             //   usleep(200);
    283 
    284                             client_socket << chaine;
    285 
    286 
    287                             if (Affichage)
    288                             {
    289                                 std::cout <<  "Microcontrôleur : " << chaine;
    290 
    291                                 std::cout <<  "---------\n";
    292                             }
    293                         }
    294                    
    295 
    296                     asks=memasks;
    297                     pos=asks.find("\n");
    298                 }           
    299            
     243
     244                    strcpy(chaine,"ACK/GOTO/\n");
     245                    client_socket << chaine;
     246
     247                    if (Affichage)
     248                    {
     249                        std::cout <<  "Microcontrôleur : " << chaine;
     250
     251                        std::cout <<  "Positionnement de l antenne...\n";
     252                    }
     253
     254                    if (Aleat)
     255                    {
     256                        strcpy(chaine, "OK/GOTO/\n");
     257                    }
     258                    else
     259                    {
     260                        strcpy(chaine, "NACK/HALT/GOTO/\n");   //erreur moteur !
     261                    }
     262                }
     263
     264                if (asks.find("Z")!=string::npos)
     265                {
     266
     267                    strcpy(chaine, "ACK/PARK\n");
     268                    client_socket << chaine;
     269
     270                    if (Affichage) std::cout <<  "Microcontrôleur : " << chaine;
     271
     272                    if (Aleat)
     273                    {
     274                        strcpy(chaine, "OK/PARK/\n");
     275                    }
     276                    else
     277                    {
     278                        strcpy(chaine, "NACK/HALT/PARK/\n");   //erreur
     279                    }
     280                }
     281
     282                if (asks.find("A")!=string::npos)
     283                {
     284
     285                    strcpy(chaine,"ACK/ABORT\n");
     286                    client_socket << chaine;
     287
     288                    if (Affichage) std::cout <<  "Microcontrôleur : " << chaine;
     289
     290                    if (Aleat)
     291                    {
     292                        strcpy(chaine, "OK/ABORT/\n");
     293                    }
     294                    else
     295                    {
     296                        strcpy(chaine, "NACK/HALT/ABORT/\n");   //erreur
     297                    }
     298                }
     299
     300                if (strlen(chaine)>1)
     301                {
     302                    client_socket << chaine;
     303
     304                    if (Affichage)
     305                    {
     306                        std::cout <<  "Microcontrôleur : " << chaine;
     307
     308                        std::cout <<  "---------\n";
     309                    }
     310                }
     311
     312                asks=memasks;
     313                pos=asks.find("\n");
     314            }
     315
    300316        }
    301317    }
  • BAORadio/libindi/libindi/BAOcontrol/BAOcontrol.pro

    r688 r691  
    11######################################################################
    2 # Automatically generated by qmake (2.01a) ven. juin 8 16:03:28 2012
     2# Automatically generated by qmake (2.01a) mer. juil. 11 05:34:37 2012
    33######################################################################
    44
  • BAORadio/libindi/libindi/BAOcontrol/Makefile

    r688 r691  
    11#############################################################################
    22# Makefile for building: BAOcontrol
    3 # Generated by qmake (2.01a) (Qt 4.7.4) on: ven. juin 8 16:03:29 2012
     3# Generated by qmake (2.01a) (Qt 4.7.4) on: mer. juil. 11 05:34:37 2012
    44# Project:  BAOcontrol.pro
    55# Template: app
  • BAORadio/libindi/libindi/BAOcontrol/baocontrol.cpp

    r688 r691  
    2020{
    2121    float a1, a2, a3;
     22   
     23    char Version[200];
    2224
    2325    // Le choix de la couleur des caractÚres est adapté pour une fenêtre de terminal
     
    2830    // Affichage de la version du programme
    2931
    30     AfficherLog("\n\n\n\n\n \
     32    sprintf(Version,"\n\n\n\n\n \
    3133 ******************************************\n \
    3234 *             BAORadio Control           *\n \
    3335 * Laboratoire de l'Accélérateur Linéaire *\n \
    3436 *                                        *\n \
    35  *             v0.6  19/05/2012           *\n \
     37 *             v%s   %s           *\n \
    3638 *        franckrichard033@gmail.com      *\n \
    37  ******************************************\n\n\n", true);
     39 ******************************************\n\n\n", VERSION, VERSION_DATE);
     40   
     41    AfficherLog(Version, true);
    3842
    3943
     
    147151
    148152
    149     //  DefinirDateHeure(2012.0, 5.0, 14.0, 14.0, 0.0, 0.0);
     153      //DefinirDateHeure(2012.0, 6.0, 29.0, 21.0, 56.0, 48.0);
    150154
    151155
     
    157161
    158162
    159     /*  double c,d;
     163      /*double c,d;
    160164      double e,f;
    161165      stringstream os;
    162166
    163       os << "tsl=" << DHMS(GetTSL()*N180divPi, true)<< "  log sun=" << Astro::CalculLongitudeSoleil()*N180divPi  << "\n";
    164 
     167      os << "tsl=" << DHMS(GetTSL()*N180divPi, true)<< "  " << GetTSL() << "\n";
    165168
    166169      AfficherLog(os.str(), true);
    167170      os.str("");
    168171
    169 
    170 
    171172      // double a=15.0*(5.0+55.0/60.0+10.3/3600.0)*Pidiv180;
    172173      // double b=(7.0+24.0/60.0+25.0/3600.0)*Pidiv180;
     
    181182      // double b=(59.0+29.0/60.0+12.0/3600.0)*Pidiv180;
    182183
    183       double a=15.0*(18.0+37.0/60.0+27.0/3600.0)*Pidiv180;
    184       double b=(38.0+47.0/60.0+54.0/3600.0)*Pidiv180;
    185 
    186       CoordonneesHorairesDouble Soleil;
    187 
    188       CalculARDecSoleil(&Soleil);
    189 
    190       a=Soleil.ar;
    191       b=Soleil.dec;
     184      double a=15.0*(14.0+15.0/60.0+39.5/3600.0)*Pidiv180;
     185      double b=(19.0+10.0/60.0+46.7/3600.0)*Pidiv180;
     186
     187      //CoordonneesHorairesDouble Soleil;
     188
     189      //CalculARDecSoleil(&Soleil);
     190
     191      //a=Soleil.ar;
     192      //b=Soleil.dec;
    192193      // Precession(&a, &b);
    193194      // NutationEtoile(&a, &b);
    194195
    195196      //  AberrationAnnuelle(&a, &b);
    196 
    197       os << "ad=" << DHMS(a*N180divPi, true)<< "   de=" << DHMS(b*N180divPi, false) << "\n";
     197     
     198      os << "ad=" << a << "   de=" << b  << "\n";
     199
     200      Azimut(a,b,&c,&d);
     201     
     202      c += 2.91488 * Pidiv180;
     203      d -= 8.08241 * Pidiv180;
     204     
     205      AzHa2ADDe(c, d, &a, &b);
     206     
     207      os << "ad=" << DHMS(a*N180divPi, true) << "   de=" << DHMS(b*N180divPi, false) << "\n";
     208      os << "ad=" << a << "   de=" << b  << "\n";
    198209
    199210      AfficherLog(os.str(), true);
    200211
    201 
    202212      Azimut(a,b,&c,&d);
     213     
    203214      os.str("");
    204215
    205216      os << "az=" << DHMS(c*N180divPi, false)<< "   ha=" << DHMS(d*N180divPi, false) << "\n";
    206217
    207       AfficherLog(os.str(), true);
    208 
    209     */
     218      AfficherLog(os.str(), true);*/
     219
     220   
    210221
    211222
  • BAORadio/libindi/libindi/BAOcontrol/baoqt.cpp

    r688 r691  
    9696
    9797#ifdef JOYSTICK
     98   
    9899    joystick = new Joystick();
    99100
    100     if (joystick) joystick->init();
     101    if (joystick)
     102    {
     103      if (!joystick->init())
     104      {
     105        delete joystick;
     106       
     107        joystick = NULL;
     108       
     109        QMessageBox::information(this, tr("Jostick"), tr("Joystick inaccessible. Verifiez que le recepteur est bien branche sur un port USB."));
     110      }
     111    }
     112   
    101113#endif
    102114
    103115    ui->lineEditIP->setText("127.0.0.1");
     116    //ui->lineEditIP->setText("134.158.88.199");
     117   
     118    ui->lineEdit_2->setText((QString("BAORadio, LAL, version ").append(VERSION)).toStdString().c_str());
    104119
    105120    // On laisse le temps au serveur de Stellarium de démarrer dans de bonnes conditions
     
    112127
    113128    ui->pushButton1x->setDown(false);
     129   
    114130    ui->pushButton10x->setDown(true);
    115131
     
    168184        last_pos[1] = current_pos[1];
    169185        last_pos[2] = current_pos[2];
    170 
    171186    }
    172187
  • BAORadio/libindi/libindi/BAOcontrol/baoqt.h

    r688 r691  
    2020
    2121#include "Server.hpp"
     22
     23#include "../communs/const.h"
    2224
    2325#include "../communs/astro.h"
  • BAORadio/libindi/libindi/BAOcontrol/baoqt.ui

    r688 r691  
    438438     <x>30</x>
    439439     <y>380</y>
    440      <width>161</width>
     440     <width>251</width>
    441441     <height>24</height>
    442442    </rect>
  • BAORadio/libindi/libindi/BAOcontrol/map.cpp

    r688 r691  
    153153
    154154    painter.drawLine(SIZE / 2.0 + MARGE, MARGE, SIZE / 2.0 + MARGE, SIZE + MARGE);
    155 
    156155
    157156    painter.setPen(Qt::darkBlue);
  • BAORadio/libindi/libindi/Makefile

    r688 r691  
    11#############################################################################
    22# Makefile for building: libindi
    3 # Generated by qmake (2.01a) (Qt 4.7.4) on: sam. mai 26 03:17:23 2012
     3# Generated by qmake (2.01a) (Qt 4.7.4) on: mar. juil. 10 03:01:50 2012
    44# Project:  libindi.pro
    55# Template: app
     
    411411                communs/filetools.h \
    412412                communs/exception.h \
    413                 BAOcontrol/Server.hpp \
    414413                BAOcontrol/qledindicator.h \
    415414                BAOcontrol/Joystick.h \
     415                BAOcontrol/Server.hpp \
    416416                BAOcontrol/baoqt.h
    417417        /usr/bin/moc $(DEFINES) $(INCPATH) BAOcontrol/baoqt.h -o moc_baoqt.cpp
     
    504504                communs/alignement.h \
    505505                communs/filetools.h \
    506                 communs/exception.h \
    507                 BAOcontrol/Server.hpp
     506                communs/exception.h
    508507        $(CXX) -c $(CXXFLAGS) $(INCPATH) -o baocontrol.o BAOcontrol/baocontrol.cpp
    509508
     
    523522                communs/filetools.h \
    524523                communs/exception.h \
    525                 BAOcontrol/Server.hpp \
    526524                BAOcontrol/qledindicator.h \
    527525                BAOcontrol/Joystick.h \
     526                BAOcontrol/Server.hpp \
    528527                BAOcontrol/ui_baoqt.h
    529528        $(CXX) -c $(CXXFLAGS) $(INCPATH) -o baoqt.o BAOcontrol/baoqt.cpp
     
    535534        $(CXX) -c $(CXXFLAGS) $(INCPATH) -o Connection.o BAOcontrol/Connection.cpp
    536535
    537 Joystick.o: BAOcontrol/Joystick.cpp
     536Joystick.o: BAOcontrol/Joystick.cpp communs/const.h \
     537                BAOcontrol/Joystick.h
    538538        $(CXX) -c $(CXXFLAGS) $(INCPATH) -o Joystick.o BAOcontrol/Joystick.cpp
    539539
     
    567567                communs/filetools.h \
    568568                communs/exception.h \
    569                 BAOcontrol/Server.hpp \
    570569                BAOcontrol/qledindicator.h \
    571570                BAOcontrol/Joystick.h \
     571                BAOcontrol/Server.hpp \
    572572                BAOcontrol/ui_baoqt.h
    573573        $(CXX) -c $(CXXFLAGS) $(INCPATH) -o main.o BAOcontrol/main.cpp
  • BAORadio/libindi/libindi/bao.sh

    r677 r691  
    1919cd libindi_build
    2020make clean
     21rm -f *.cmake *.h *.txt Makefile *.pc
     22rm -rf CMakeFiles/*
    2123cd ../BAOcontrol
    2224make clean
  • BAORadio/libindi/libindi/communs/alignement.cpp

    r688 r691  
    99
    1010#include "alignement.h"
     11#include <QtCore/qcoreevent.h>
    1112
    1213
     
    141142    os << MATRICE[2][1];
    142143    os.width(15);
    143     os << MATRICE[3][1]; 
     144    os << MATRICE[3][1];
    144145    os << "\n";
    145146    os.width(15);
     
    715716
    716717
     718double Alignement::Alt2Motor(double targetAlt)
     719{
     720    double I2 = 128279.4 - 129723.4 * sin( (targetAlt - Theta0) * Pidiv180 );
     721
     722    double Codalt = (sqrt(I2) - I00) / CoeffMoteur0;
     723
     724    return Codalt;
     725}
     726
     727
     728
    717729/**************************************************************************************
    718730** Convertit une hauteur (exprimée en degrés) en nombre de pas codeur
     
    720732***************************************************************************************/
    721733
    722 double Alignement::Alt2Motor(double targetAlt)
    723 {
    724     /* double I0 = 81.0;
    725 
    726      double I2 = 128279.4 - 129723.4 * sin( (targetAlt - 20.2345) * Pidiv180 );
    727 
    728      double Codalt = (sqrt(I2) - I0) / 0.078947;
    729 
    730      AfficherLog("calcul 1 =%5.0f\n", Codalt);*/
    731 
    732 
    733 
     734double Alignement::Alt2Motor2(double targetAlt)
     735{
    734736    double CD2pBC2 = CD * CD + BC * BC;
    735737
     
    740742    double Codalt = ( sqrt(I2) - I0 ) / CoeffMoteur;
    741743
    742 //   AfficherLog("calcul 2=%5.0f\n", Codalt);
    743 
    744744    return Codalt;
    745745}
    746746
     747double Alignement::Motor2Alt2(double pas)
     748{
     749    double CD2pBC2 = CD * CD + BC * BC;
     750
     751    double I2=pow((CoeffMoteur * pas + I0) ,2.0);
     752
     753    I2 -= ED *ED + CD2pBC2 -AE*AE;
     754
     755    double angle = asin(I2/( -2.0*ED*sqrt(CD2pBC2)))*N180divPi+Theta;
     756
     757    return angle;
     758}
     759
    747760void Alignement::OptimisationGeometrieAntenne()
    748761{
    749     Coord c1, c2, c3, m1, m2, m3, mm1, mm2, mm3, mm;
     762    Coord c1, c2, c3, c4, m1, m2, m3, mm1, mm2, mm3, mm,mmm, result;
    750763
    751764    double i, j, k, l, m;
     
    755768    double memED = ED0;
    756769    double memAE = AE0;
    757     // double memI0 = I00;
     770    double memI0 = I00;
    758771    double memCoeffMoteur = CoeffMoteur0;
    759772    double memTheta = Theta0;
     
    763776    double det;
    764777
    765     double maxdet= 1e50;
    766 
    767     double pas = 0.1;
    768 
    769     double interv = 0.5;
     778    double maxdet= 0.1;
     779
     780    double distmax2=1e50;
     781
     782    double pas = 1.0; //0.1
     783
     784    double interv = 20.0; //0.5
    770785
    771786    InitParametresInstrument();
    772787
     788   /* for (int i=0; i<nbrcorrections; i++)
     789    {
     790        Precession(&ad[i], &de[i]);
     791       NutationEtoile(&ad[i], &de[i]);
     792
     793        AberrationAnnuelle(&ad[i], &de[i]);
     794       
     795         Precession(&delta_ad[i], &delta_de[i]);
     796       NutationEtoile(&delta_ad[i], &delta_de[i]);
     797
     798        AberrationAnnuelle(&delta_ad[i], &delta_de[i]);
     799    }*/
    773800
    774801    c1.x = VerifAngle(ad[0] - tsl[0] + GetTSL());
     
    797824
    798825    m1.x = VerifAngle(delta_ad[0] - tsl[0] + GetTSL());
    799     m1.z = 1.0;
     826    m1.y = delta_de[0];
    800827
    801828    m2.x = VerifAngle(delta_ad[1] - tsl[1] + GetTSL());
    802     m2.z = 1.0;
     829    m2.y = delta_de[1];
    803830
    804831    m3.x = VerifAngle(delta_ad[2] - tsl[2] + GetTSL());
    805     m3.z = 1.0;
    806 
    807 
    808     /*  os << "m1=" << delta_de[0] << "   m11=" <<  Motor2Alt(Alt2Motor(delta_de[0])) << "\n";
    809 
    810       AfficherLog(os.str(), true);
    811       os.str("");
    812     */
    813     for (i=-interv; i< interv; i += pas)
    814     {
    815         CoeffMoteur = CoeffMoteur0 + i / 100.0;
     832    m3.y = delta_de[2];
     833   
     834    CoeffMoteur = CoeffMoteur0;
     835
     836   //  for (i=-interv; i< interv; i += pas)
     837    {
     838        I0 = I00 ;//+ i ;
    816839
    817840        for (j=-interv; j<interv; j += pas)
     
    827850                    BC = BC0 + l;
    828851
    829                     Theta = (atan(CD / BC) - atan(18.5 / ED))* N180divPi;
     852                    Theta = (atan(CD / BC) - atan(18.5 / ED)) * N180divPi;
    830853
    831854                    for (m=-interv; m< interv; m += pas)
     
    833856                        AE = AE0 + m;
    834857
    835                         m1.y = Motor2Alt(Alt2Motor(delta_de[0]));
    836 
    837858                        Azimut(m1.x, m1.y, &mm.x, &mm.y);
     859
     860                        mm.y = Motor2Alt2(Alt2Motor(mm.y * N180divPi)) * Pidiv180;
     861
    838862                        mm1.x = cos(mm.x) * cos(mm.y);
    839863                        mm1.y = sin(mm.x) * cos(mm.y);
    840864                        mm1.z = sin(mm.y);
    841865
    842                         m2.y = Motor2Alt(Alt2Motor(delta_de[1]));
    843 
    844866                        Azimut(m2.x, m2.y, &mm.x, &mm.y);
     867
     868                        mm.y = Motor2Alt2(Alt2Motor(mm.y * N180divPi)) * Pidiv180;
     869
    845870                        mm2.x = cos(mm.x) * cos(mm.y);
    846871                        mm2.y = sin(mm.x) * cos(mm.y);
    847872                        mm2.z = sin(mm.y);
    848873
    849                         m3.y = Motor2Alt(Alt2Motor(delta_de[2]));
    850 
    851874                        Azimut(m3.x, m3.y, &mm.x, &mm.y);
     875
     876                        mm.y = Motor2Alt2(Alt2Motor(mm.y * N180divPi)) * Pidiv180;
     877
    852878                        mm3.x = cos(mm.x) * cos(mm.y);
    853879                        mm3.y = sin(mm.x) * cos(mm.y);
     
    860886                        det = Determinant();
    861887
    862                         if (fabs(det - 1.0) < maxdet)
     888
     889
     890                        if ( fabs(det - 1.0) <= 0.08/*maxdet*/ )
    863891                        {
    864                             os << "Determinant=" << det << "\n";
    865 
    866                             os << "CD=" << CD << " ED=" << ED << " BC=" << BC << " AE=" << AE << " Theta=" << Theta << " CoeffMoteur=" << CoeffMoteur << "\n\n";
    867 
    868                             AfficherLog(os.str(), true);
    869                             os.str("");
     892
     893                            double targetAz, targetAlt;
     894                            double distmax=0.0;
     895                            double dist;
     896
     897                            for (int n=0; n<nbrcorrections; n++)
     898                            {
     899                                Azimut(VerifAngle(ad[n] - tsl[n] + GetTSL()),  de[n], &mmm.x, &mmm.y);
     900
     901                                mmm.y = Motor2Alt(Alt2Motor2(mmm.y * N180divPi)) * Pidiv180;
     902
     903                                c4.x = cos(mmm.x) * cos(mmm.y);
     904                                c4.y = sin(mmm.x) * cos(mmm.y);
     905                                c4.z = sin(mmm.y);
     906
     907                                AppliquerMatriceCorrectionSimple(&result, c4);
     908
     909                                if (result.x != 0.0)
     910                                {
     911                                    targetAz = atan( result.y / result.x );
     912
     913                                    if (result.x < 0) targetAz += Pi;
     914                                }
     915                                else targetAz = Pidiv2;
     916
     917                                targetAz  = VerifAngle(targetAz);
     918
     919                                targetAlt = asin(result.z);
     920
     921
     922                                Azimut(VerifAngle(delta_ad[n] - tsl[n] + GetTSL()),  delta_de[n], &mm.x, &mm.y);
     923
     924                                dist = DistanceAngulaireEntre2Points(targetAz, targetAlt, mm.x, mm.y);
     925
     926                                if (dist> distmax) distmax=dist;
     927                            }
     928
     929
     930
     931                            if (distmax< distmax2)
     932                            {
     933                                os << "Determinant=" << det << "\n";
     934
     935                                os << "I0=" << I0 << " CD="<< CD << " ED=" << ED << " BC=" << BC << " AE=" << AE << " Theta=" << Theta << " CoeffMoteur=" << CoeffMoteur << "\n";
     936
     937                                os << DHMS(distmax*N180divPi, false) << "\n\n";
     938
     939                                AfficherLog(os.str(), true);
     940                                os.str("");
     941
     942                                distmax2=distmax;
     943                                //maxdet=distmax;
     944
     945                                memCD = CD;
     946                                memI0 = I0;
     947                                memED = ED;
     948                                memAE = AE;
     949                                memBC = BC;
     950                                memTheta = Theta;
     951                                memCoeffMoteur = CoeffMoteur;
     952                            }
     953                           
    870954                            maxdet = fabs(det - 1.0);
    871 
    872                             memCD = CD;
    873                             memED = ED;
    874                             memAE = AE;
    875                             memBC = BC;
    876                             memTheta = Theta;
    877                             memCoeffMoteur = CoeffMoteur;
    878955                        }
    879956                    }
    880                 }
    881             }
     957                }             
     958            }
     959              if ((int)Arrondi((interv - j) / (2.0 * interv) * 100.0) % 10 == 0)
     960        {           
     961            os << 100.0 - (interv - j) / (2.0 * interv) * 100.0 << " %\n";
     962            AfficherLog(os.str(), true);
     963             os.str("");
    882964        }
    883 
    884         if ((int)Arrondi((interv - i) / (2.0 * interv) * 100.0) % 10 == 0)
    885         {
    886             os.str("");
    887             os << 100.0 - (interv - i) / (2.0 * interv) * 100.0 << " %\n";
    888             AfficherLog(os.str(), true);
     965       
    889966        }
    890     }
    891 
    892 
    893     AfficherLog("\n\nFin du calcul.\n", true);
     967       
     968    }
     969
    894970
    895971    CD = memCD;
     
    897973    AE = memAE;
    898974    BC = memBC;
     975    I0 = memI0;
    899976    Theta = memTheta;
    900977    CoeffMoteur = memCoeffMoteur;
    901978
    902     m1.y = Motor2Alt(Alt2Motor(delta_de[0]));
     979    os << "\n\nParamÚtres  : I0=" << I0 << " CD=" << CD << " ED=" << ED << " BC=" << BC << " AE=" << AE << " Theta=" << Theta << " CoeffMoteur=" << CoeffMoteur << "\n\nFin du calcul\n";
     980
     981
     982    AfficherLog(os.str(), true);
    903983
    904984    Azimut(m1.x, m1.y, &mm.x, &mm.y);
     985
     986    mm.y = Motor2Alt2(Alt2Motor(mm.y * N180divPi)) * Pidiv180;
     987
    905988    mm1.x = cos(mm.x) * cos(mm.y);
    906989    mm1.y = sin(mm.x) * cos(mm.y);
    907990    mm1.z = sin(mm.y);
    908991
    909     m2.y = Motor2Alt(Alt2Motor(delta_de[1]));
    910 
    911992    Azimut(m2.x, m2.y, &mm.x, &mm.y);
     993
     994    mm.y = Motor2Alt2(Alt2Motor(mm.y * N180divPi)) * Pidiv180;
     995
    912996    mm2.x = cos(mm.x) * cos(mm.y);
    913997    mm2.y = sin(mm.x) * cos(mm.y);
    914998    mm2.z = sin(mm.y);
    915999
    916     m3.y = Motor2Alt(Alt2Motor(delta_de[2]));
    917 
    9181000    Azimut(m3.x, m3.y, &mm.x, &mm.y);
     1001
     1002    mm.y = Motor2Alt2(Alt2Motor(mm.y * N180divPi)) * Pidiv180;
     1003
    9191004    mm3.x = cos(mm.x) * cos(mm.y);
    9201005    mm3.y = sin(mm.x) * cos(mm.y);
  • BAORadio/libindi/libindi/communs/alignement.h

    r688 r691  
    101101    void   OptimisationGeometrieAntenne();
    102102    double Alt2Motor(double targetAlt);
    103     inline double Motor2Alt(double pas);
     103     double Motor2Alt(double pas);
     104     double Alt2Motor2(double targetAlt);
     105     double Motor2Alt2(double pas);
    104106
    105107
     
    149151    double Theta;
    150152
    151 };
     153}; 
    152154
    153155#endif
  • BAORadio/libindi/libindi/communs/astro.cpp

    r688 r691  
    656656    CalculTSL();
    657657
    658     for (int i = 0; i < 120; i++)
    659     {
    660         tsl += (double)i * 5.0 / 60.0 / 24.0 ;
     658    for (int i = 0; i < 720; i++)
     659    {
     660        tsl += 1.0 / 60.0 / 24.0 * Pi2 ;
    661661
    662662        Azimut( AD, Dec, &az, &ha);
     663       
     664        az = VerifAngle(az + Pi);
    663665
    664666        if ( az > max ) max = az;
     
    666668        if ( az < min ) min = az;
    667669
    668         if ( ha < HAUTMIN * Pidiv180) break;
    669     }
    670 
    671     *azmin = (long int) Arrondi( min * (double)NBREPASCODEURSAZ / 360.0) - NBREPASCODEURSAZ;
    672 
    673     *azmax = (long int) Arrondi( max * (double)NBREPASCODEURSAZ / 360.0) + NBREPASCODEURSAZ;
    674 
     670        if ( ha < HAUTMIN * Pidiv180 || az > Pi2-0.01) break;
     671    }
     672
     673    *azmin = (long int) Arrondi( min * (double)NBREPASCODEURSAZ / Pi2 ) -NBREPASCODEURSAZ;
     674
     675    *azmax = (long int) Arrondi( max * (double)NBREPASCODEURSAZ / Pi2 ) ;
     676   
    675677    CalculTSL();
    676678}
  • BAORadio/libindi/libindi/communs/const.h

    r688 r691  
    88//////////////////////////////////////////
    99
     10#define VERSION "0.61"
     11#define VERSION_DATE "01/08/12"
    1012
    11 #define ET_UT 0.0
    12 //#define 66.185
     13//#define ET_UT 0.0
     14#define ET_UT 66.185
    1315
    1416// ParamÚtres de l'instrument
     
    4446// Définition des limites autorisées pour l'azimut (en pas codeur)
    4547
    46 #define MAXAZCODEURS 3800
    4748#define MINAZCODEURS -1680
    48 
     49#define MAXAZCODEURS  3800
    4950
    5051
     
    172173#define UPDATETRANSITDELAY ( 15.0 * 60.0 )
    173174
    174 #define JOYSTICK
     175//#define JOYSTICK
    175176
    176 #define JOY_DEV "/dev/input/js1"
    177 //#define JOY_DEV "/dev/js0"
     177#define JOY_DEV "/dev/input/js0"
    178178
    179179
  • BAORadio/libindi/libindi/drivers/telescope/BAO.cpp

    r688 r691  
    7777    // dans les modes transit et tracking
    7878
    79     ActualisationTMTransit  = UPDATETRANSITDELAY;          // Délai entre 2 actualisations dans le mode transit (en sec)
    80 
    81     ActualisationTMTracking = UPDATETRACKINGDELAY;  //                "                 "        tracking
     79    // Délai entre 2 actualisations dans le mode transit (en sec)
     80
     81    ActualisationTMTransit  = UPDATETRANSITDELAY;
     82
     83    // Délai entre 2 actualisations dans le mode tracking (en sec)
     84
     85    ActualisationTMTracking = UPDATETRACKINGDELAY;
    8286
    8387    // cette variable vaut "true" lorsque le thread de l'aplication a été initialisé
     
    110114    Exit                  = false;
    111115
     116    AutoriserTourComplet  = false;
     117
     118
    112119    // Initialisation des paramÚtres atmosphériques par défaut
    113120
     
    116123    Temp                  = 10.0;
    117124
    118     // raquette
     125    // ParamÚtres de la raquette
    119126
    120127    delta_az              = 0;
     
    143150    // Numéro de version
    144151
    145     AfficherLog("Indi server BAORadio...\n");
    146     AfficherLog("Driver Version: 0.6 (19-05-2012)\n");
     152    AfficherLog("Indi server BAORadio...\nDriver Version: %s (%s)\n",VERSION, VERSION_DATE);
    147153
    148154    //connect_telescope();
     
    239245        if (!avertissement)
    240246        {
    241             string chaine = "Impossible d'écrire dans le fichier " + fichier +"\nMerci de vérifier les permissions\n";
     247            string chaine = "Impossible d'écrire dans le fichier " + fichier;
     248            chaine +="\nMerci de vérifier les permissions\n";
    242249            chaine += "ou exécutez le programme en mode superutilisateur.\n\n";
    243250
     
    656663            {
    657664                IDSetText(&CommandTP, "Optimisation de la geometrie de l antenne\n" );
    658                
    659                 if (targetAlignmentIP != -1)
    660                 {
    661                   Sockets[targetAlignmentIP].AlignementAntenne->OptimisationGeometrieAntenne();
    662                 }               
     665
     666                if (targetAlignmentIP != -1)
     667                {
     668                    Sockets[targetAlignmentIP].AlignementAntenne->OptimisationGeometrieAntenne();
     669                }
    663670            }
    664671            else if (chaine[0] == 'C')
     
    721728                            Coord vect, r;
    722729
     730
    723731                            if (Sockets[targetAlignmentIP].AlignementAntenne->MethodeAlignement == SIMPLE)
    724732                            {
     733
     734                                b = Sockets[targetAlignmentIP].AlignementAntenne->Motor2Alt(Sockets[targetAlignmentIP].AlignementAntenne->Alt2Motor2(b * N180divPi)) * Pidiv180;
     735
    725736                                vect.x = cos(a) * cos(b);
    726737                                vect.y = sin(a) * cos(b);
     
    14191430
    14201431        IDSetSwitch(&AlignementAzP, "Delta en azimut = %s  delta en hauteur = %s  az = %s  ha = %s (Vitesse raquette = %d)\n",
    1421                     DHMS(delta_az * PasDeltaAz, false).c_str(),
    1422                     DHMS(delta_ha * PasDeltaHa, false).c_str(),
     1432                    DHMS(delta_az * PasDeltaAz * N180divPi, false).c_str(),
     1433                    DHMS(delta_ha * PasDeltaHa * N180divPi, false).c_str(),
    14231434                    DHMS(az * N180divPi, false).c_str(),
    14241435                    DHMS(ha * N180divPi, false).c_str(),
     
    18151826                // On reconnaît les formules de passage des coordonnées
    18161827                // sphériques aux coordonnées rectangulaires
     1828
    18171829                if (Sockets[i].AlignementAntenne->MethodeAlignement == SIMPLE)
    18181830                {
    1819                     vect.x = cos(targetAz) * cos(targetAlt);
    1820                     vect.y = sin(targetAz) * cos(targetAlt);
    1821                     vect.z = sin(targetAlt);
     1831                    //TODO :: à vérifier en détails
     1832
     1833                    double targetAltC = Sockets[i].AlignementAntenne->Motor2Alt(Sockets[i].AlignementAntenne->Alt2Motor2(targetAlt * N180divPi)) * Pidiv180;
     1834
     1835                    vect.x = cos(targetAz) * cos(targetAltC);
     1836                    vect.y = sin(targetAz) * cos(targetAltC);
     1837                    vect.z = sin(targetAltC);
    18221838
    18231839                    Sockets[i].AlignementAntenne->AppliquerMatriceCorrectionSimple(&result, vect);
     
    18381854
    18391855                    targetAlt = asin(result.z);
    1840 
    18411856                }
    18421857                else
     
    18651880                }
    18661881            }
    1867 
    1868             // Application du delta en azimut (préalablement réglé sur la polaire)
    1869             // Correspond à la variable AlignementAntenne->delta_az_polar
    1870             // Ne s'applique que pour les alignements AFFINE et TAKI
    1871 
    1872             //if (Sockets[i].AlignementAntenne->MethodeAlignement != SIMPLE) targetAz += Sockets[i].AlignementAntenne->delta_az_polar * PasDeltaAD;
    18731882
    18741883            // Correction de la réfraction atmosphérique
     
    19331942
    19341943                Sockets[i].TargetPosition.x += delta_az;
     1944
    19351945                Sockets[i].TargetPosition.y += delta_ha;
    19361946
     1947                //TODO : solution à trouver pour maintenir efficacement l'antenne dans l'intervalle
    19371948
    19381949                // est-ce que le transit de l'objet suivi va nous emmener à sortir de l'intervalle [MINAZCODEURS..MAXAZCODEURS] ?
    19391950
    1940                 if ( azmincodeur < MINAZCODEURS ) Sockets[i].TargetPosition.x += NBREPASCODEURSAZ;
    1941 
    1942                 if ( azmincodeur > MAXAZCODEURS ) Sockets[i].TargetPosition.x -= NBREPASCODEURSAZ;
    1943 
    1944                 // Corrections sup pour rester dans l'intervalle [-1693.. 3867]
    1945 
    1946                 if ( Sockets[i].TargetPosition.x > MAXAZCODEURS ) Sockets[i].TargetPosition.x -= NBREPASCODEURSAZ;
    1947 
    1948                 if ( Sockets[i].TargetPosition.x < MINAZCODEURS ) Sockets[i].TargetPosition.x += NBREPASCODEURSAZ;
     1951                AutoriserTourComplet = false;
     1952
     1953                if ( azmincodeur < MINAZCODEURS ) {
     1954                    Sockets[i].TargetPosition.x += NBREPASCODEURSAZ;
     1955                    AutoriserTourComplet = true;
     1956                     AfficherLog("test1\n");
     1957
     1958                }
     1959
     1960                if ( azmaxcodeur > MAXAZCODEURS ) {
     1961                    Sockets[i].TargetPosition.x -= NBREPASCODEURSAZ;
     1962                    AutoriserTourComplet = true;
     1963                    AfficherLog("test2\n");
     1964
     1965                }
     1966
     1967                 if ( Sockets[i].TargetPosition.x < MINAZCODEURS ) {
     1968                    Sockets[i].TargetPosition.x += NBREPASCODEURSAZ;
     1969                    AutoriserTourComplet = true;
     1970                    AfficherLog("test3\n");
     1971
     1972                }
     1973
     1974                if ( Sockets[i].TargetPosition.x > MAXAZCODEURS ) {
     1975                    Sockets[i].TargetPosition.x -= NBREPASCODEURSAZ;
     1976                    AutoriserTourComplet = true;
     1977                    AfficherLog("test4\n");
     1978
     1979                }
    19491980
    19501981                // Message de debug
    19511982
    1952                 AfficherLog("Nbre de pas codeurs Az = %i  Alt = %i\n", Sockets[i].TargetPosition.x, Sockets[i].TargetPosition.y);
     1983                AfficherLog("Intervalle autorise pour le suivi de l objet [%i..%i]\n", azmincodeur, azmaxcodeur);
     1984
     1985                AfficherLog("Positions codeurs Az = %i  Alt = %i\n", Sockets[i].TargetPosition.x, Sockets[i].TargetPosition.y);
    19531986            }
    19541987        }
     
    21842217                                    // La position devrait être valide si on arrive ici...
    21852218
    2186                                     if ( Sockets[i].PosValides = (ExtractPosition(reponse, &Sockets[i].Pos) == true) )
     2219                                    Sockets[i].PosValides = ExtractPosition(reponse, &Sockets[i].Pos);
     2220
     2221                                    if ( Sockets[i].PosValides )
    21872222                                    {
    21882223                                        // La fonction extractPositon confirme que les positions transmises
     
    22062241                                        IDSetSwitch(&OnCoordSetSP, "Antenne %s : La position n est pas valide !\n",
    22072242                                                    Sockets[i].IP.c_str());
     2243                                        AfficherLog("Antenne %s : La position n est pas valide !\n",
     2244                                                    Sockets[i].IP.c_str());
     2245
    22082246                                    }
    22092247                                }
     
    26032641
    26042642                                IDSetSwitch(&OnCoordSetSP, "Erreur sur l antenne %s : pas d acknowledge recu apres l ordre POSITION. \
    2605 Deconnexion de l antenne.", Sockets[i].IP.c_str());
     2643Fin du suivi. Verifier les connexions.\n", Sockets[i].IP.c_str());
    26062644                                AfficherLog("Erreur sur l antenne %s : pas d acknowledge recu apres l ordre POSITION. \
    2607 Deconnexion de l antenne.", Sockets[i].IP.c_str());
     2645Fin du suivi. Verifier les connexions.\n", Sockets[i].IP.c_str());
     2646
     2647                                Suivi=false;
     2648
     2649                                RealisationGoto = false;
     2650
     2651                                InitAntennes();
    26082652
    26092653                                // On déconnecte l'antenne
     
    26622706
    26632707                                IDSetSwitch(&OnCoordSetSP, "Erreur sur l antenne %s : la position retournee n est pas valide. \
    2664 Deconnexion de l antenne.", Sockets[i].IP.c_str());
     2708Fin du suivi. Verifier les connexions.\n", Sockets[i].IP.c_str());
    26652709                                AfficherLog("Erreur sur l antenne %s : la position retournee n est pas valide. \
    2666 Deconnexion de l antenne.", Sockets[i].IP.c_str());
     2710Fin du suivi. Verifier les connexions.\n", Sockets[i].IP.c_str());
     2711
     2712                                Suivi=false;
     2713
     2714                                RealisationGoto = false;
     2715
     2716                                InitAntennes();
    26672717
    26682718                                //Déconnexion de l'antenne
     
    27082758                                OnCoordSetSP.s = IPS_ALERT;
    27092759
    2710                                 IDSetSwitch(&OnCoordSetSP, "Erreur sur l antenne %s : pas d acknowledge recu apres l ordre GOTO. Deconnexion de l antenne.", Sockets[i].IP.c_str());
    2711                                 AfficherLog("Erreur sur l antenne %s : pas d acknowledge recu apres l ordre GOTO. Deconnexion de l antenne.", Sockets[i].IP.c_str());
     2760                                IDSetSwitch(&OnCoordSetSP, "Erreur sur l antenne %s : pas d acknowledge recu apres l ordre GOTO. Fin du suivi. Verifier les connexions.\n", Sockets[i].IP.c_str());
     2761                                AfficherLog("Erreur sur l antenne %s : pas d acknowledge recu apres l ordre GOTO. Fin du suivi. Verifier les connexions.\n", Sockets[i].IP.c_str());
     2762
     2763                                Suivi=false;
     2764
     2765                                RealisationGoto = false;
     2766
     2767                                InitAntennes();
    27122768
    27132769                                // DeconnecterSocket(i);
     
    27532809
    27542810                                // Message d'erreur
    2755                                 IDSetSwitch(&OnCoordSetSP, "Erreur sur l antenne %s : l antenne n a pas renvoye GOTO/OK. Deconnexion de l antenne.", Sockets[i].IP.c_str());
    2756                                 AfficherLog("Erreur sur l antenne %s : l antenne n a pas renvoye GOTO/OK. Deconnexion de l antenne.", Sockets[i].IP.c_str());
     2811                                IDSetSwitch(&OnCoordSetSP, "Erreur sur l antenne %s : l antenne n a pas renvoye GOTO/OK. Fin du suivi. Verifier les connexions.\n", Sockets[i].IP.c_str());
     2812                                AfficherLog("Erreur sur l antenne %s : l antenne n a pas renvoye GOTO/OK. Fin du suivi. Verifier les connexions.\n", Sockets[i].IP.c_str());
     2813
     2814                                Suivi=false;
     2815
     2816                                RealisationGoto = false;
     2817
     2818                                InitAntennes();
    27572819
    27582820
     
    28282890                    // Erreur dans les logs
    28292891
    2830                     IDSetSwitch(&OnCoordSetSP, "Erreur sur l antenne %s : deconnexion de l antenne.", Sockets[i].IP.c_str());
    2831                     AfficherLog("Erreur sur l antenne %s : deconnexion de l antenne.", Sockets[i].IP.c_str());
     2892                    IDSetSwitch(&OnCoordSetSP, "Erreur sur l antenne %s : Fin du suivi. Vérifier les connexions.\n", Sockets[i].IP.c_str());
     2893                    AfficherLog("Erreur sur l antenne %s : Fin du suivi. Vérifier les connexions.\n", Sockets[i].IP.c_str());
     2894
     2895                    Suivi=false;
     2896
     2897                    RealisationGoto = false;
     2898
     2899                    InitAntennes();
    28322900
    28332901                    // Déconnexion antenne
     
    28722940        // les rotations inutiles
    28732941
    2874         RechercheAzimutFinSuivi(targetRA, targetDEC, &azmincodeur, &azmaxcodeur);
     2942        RechercheAzimutFinSuivi(targetRA * 15.0 * Pidiv180, targetDEC * Pidiv180, &azmincodeur, &azmaxcodeur);
    28752943
    28762944        // On prépare les antennes pour le prochain goto
     
    29222990        // les rotations inutiles
    29232991
    2924         RechercheAzimutFinSuivi(targetRA, targetDEC, &azmincodeur, &azmaxcodeur);
     2992        RechercheAzimutFinSuivi(targetRA * 15.0 * Pidiv180, targetDEC * Pidiv180, &azmincodeur, &azmaxcodeur);
    29252993
    29262994        InitAntennes();
     
    29633031        ConnectSP.s = IPS_OK;
    29643032        IDSetSwitch (&ConnectSP, "BAORadio is online. Retrieving basic data...");
    2965 
    2966         // Petit message
    2967 
    2968         AfficherLog("\nHello BAORadio !\n");
    29693033
    29703034        // On lance le thread !
     
    31393203
    31403204    // ne pas faire des tours complets en Az pour rien...
    3141 
     3205   
     3206     // Corrections sup pour rester dans l'intervalle [-1693.. 3867]
     3207
     3208     AfficherLog("deltaAz1=%i\n", deltaAz, true);
     3209       
    31423210    while (deltaAz > NBREPASCODEURSAZ) deltaAz -= NBREPASCODEURSAZ;
    31433211
    3144     // Doit résoudre tous les problÚmes concernant l'azimut...
    3145 
    3146     if (deltaAz > NBREPASCODEURSAZ / 2 )
    3147     {
    3148         deltaAz = NBREPASCODEURSAZ - deltaAz;
    3149 
    3150         sensAz = 1 - sensAz;
    3151     }
     3212   
     3213    //TODO : a verifier en details
     3214 
     3215    if ( !AutoriserTourComplet )
     3216    {
     3217
     3218        // Doit résoudre tous les problÚmes concernant l'azimut...
     3219
     3220        if (deltaAz > NBREPASCODEURSAZ / 2 )
     3221        {
     3222            deltaAz = NBREPASCODEURSAZ - deltaAz;
     3223
     3224            sensAz = 1 - sensAz;
     3225        }
     3226    }
     3227   
     3228    AfficherLog("deltaAz2=%i\n", deltaAz, true);
    31523229
    31533230    //on envoie les coordonnées au driver
  • BAORadio/libindi/libindi/drivers/telescope/BAO.h

    r682 r691  
    243243    bool   Suivi;                        // Est-ce que les antennes suivent actuellement un objet ?
    244244    bool   UpdatedGoto;                  // On peut exécuter un Goto
     245    bool   AutoriserTourComplet;
    245246    bool   Exit;                         // On ferme le driver
    246 
     247   
    247248    int    currentSet;                   // mode de suivi actuel - tracking ou transit
    248249    int    MethodeAlignement;            // Méthode d'alignement
  • BAORadio/libindi/libindi/result_recherche_bao

    r677 r691  
    1919Use this format                    for this catalogue
    2020---------------                    ----------------
    21    MAFFEI 2:[TH94] NN              Objects from 1994ApJ...421..122T
    22 or MESSIER 051:[TH94] NN
    23 or MESSIER 083:[TH94] NN
    24 or NGC NNNN:[TH94] NN
    25    [T95] J0240-343A                Objects from 1995MNRAS.277..609T
    26 or [T95] 11
    27    TOLOLO NNNNN                    Tololo catalogue
    28    MS 1358.4+6245:[T98] GN         Objects from 1998AJ....115....1T
    29 or [YDG81] 1115+080:[T98] Gx
    30 or [PBW92] B1422+231:[T98] Gx
    31    TON NNNN                        Tonantzintla catalogue
    32    [T99] GJHHMM-DDMM               Objects from 1999MNRAS.303..565T
    33 or [T99] QJHHMM-DDMM
    34    [TH2001] A                      Objects from 2001ApJ...563..673T
    35    [T99a] NN                       Objects from 1999A&A...352L.103T
    36    [TH2002] NNN                    Objects from 2002MNRAS.333..423T
    37    NGC 0253:[TH85] N               Objects from 1985ApJ...299L..77T
    38    NGC 0253:[T2004] A              Objects from 2004AJ....127...10T
    39    HDF:[T2003] NNNN                Objects from 2003ApJ...596..748T
    40    NGC 6822:[T2006] ANN            Objects from 2006AJ....132.1372T
     21   GNA NNN                         Objects from 1986MNRAS.221..233P
     22or GSA NNN
     23   Cl 0017-20:[G90]                Objects from 1990A&AS...83....1G
     24or Cl 0017-20:[G90] NNN
     25or Cl 0017-20:[G90] A
     26or ABELL S0506:[G90] NN
     27or ABELL S0506:[G90] A
     28   [G92a] 201315.05-691258.6       Object  from 1992IAUC.5682....1G
     29   [G92b] 211637.86-672603.4       Object  from 1992IAUC.5682....1G
     30   [G92c] 204253.55-533007.0       Object  from 1992IAUC.5682....1G
     31   [G92d] 132206.16-320938.6       Object  from 1992IAUC.5682....1G
     32   [G96] J132907.16-291401.6       Objects from 1996IAUC.6424A...1G
     33   GSC NNNN NNNNN                  Objects from HST Guide Star Catalogue
     34   [G98] J121818.10+204430.0       Object  from 1998IAUC.6917A...1G
     35   [G2000] NN                      Objects from 2000AJ....119.2118G
     36   SMC:[G75] NN                    Objects from 1975PASP...87..641G
     37   NGC 0300:[G84] NN               Objects from 1984AJ.....89.1332G
     38   MESSIER 031:[G62b] NNN          Objects from 1962AJ.....67..334G
     39   LMC:[GM86] ANNN                 Objects from 1986ApJS...62..451G
     40or LMC:[GM86] SNNN-DD
     41or LMC:[GM86] SOI NNN
     42   LMC:[G77a] NN                   Objects from 1977PASP...89..425G
     43   LMC:[G85] NN/NGC 1786           Objects from 1985PASP...97..676G
     44   LMC:[G74] NN/NGC 1835           Objects from 1974AJ.....79..363G
     45   LMC:[G70a] LMV NNNN             Objects from 1970SAOSR.310....1G
     46   NGC 0188:[G2005] NNN            Objects from 2005A&A...438..291G
    4147 
    42    SN 1995:[T97]                   Object  from 1997A&A...321...81T
    4348Key:  A = alphabetic character
    4449   :  a = optional alphabetic character
Note: See TracChangeset for help on using the changeset viewer.