Changeset 9516


Ignore:
Timestamp:
10/21/09 10:49:36 (15 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Cosy
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Cosy/catalog/SlaPlanets.cc

    r9439 r9516  
    99using namespace std;
    1010
    11 SlaPlanets::SlaPlanets(MObservatory::LocationName_t key) : Slalib(key), fDt(slaDt(2000.0)/60./60./24.)
    12 {
    13 }
    14 
    15 SlaPlanets::~SlaPlanets()
     11SlaPlanets::SlaPlanets(MObservatory::LocationName_t key) : SlaStars(key), fDt(slaDt(2000.0)/60./60./24.)
    1612{
    1713}
     
    1915void SlaPlanets::SetMjd(double mjd)
    2016{
    21     Slalib::SetMjd(mjd);
     17    SlaStars::SetMjd(mjd);
    2218
    2319    fTt = GetMjd() + slaDtt(GetMjd())/60./60./24.;
     
    3329}
    3430
    35 void SlaPlanets::UpdatePlanetPos(ePlanets_t planet)
     31// --------------------------------------------------------------------------
     32//
     33// coordinates of planet: topocentric, equatorial, J2000
     34//
     35RaDec SlaPlanets::CalcPlanetRaDec(ePlanets_t planet)
    3636{
    37     //
    3837    // coordinates of planet: topocentric, equatorial, J2000
    39     //
    4038    double ra, dec, diam;
    4139
    42     // One can use TT instead of TDB for all planets
    43     // (except the moon)
     40    // One can use TT instead of TDB for all planets (except the moon?)
    4441    // TDB, planet, elong, phi, *ra, *dec, *diam
    4542    slaRdplan(fTt, planet, GetElong(), GetPhi(), &ra, &dec, &diam);
    4643
     44    return RaDec(ra, dec);
     45}
     46
     47void SlaPlanets::UpdatePlanetPos(ePlanets_t planet)
     48{
     49    // coordinates of planet: topocentric, equatorial, J2000
     50    const RaDec rd = CalcPlanetRaDec(planet);
     51
    4752    double az, el;
    48     slaDe2h(GetAlpha()-ra, dec, GetPhi(), &az, &el);
     53    slaDe2h(GetAlpha()-rd.Ra(), rd.Dec(), GetPhi(), &az, &el);
    4954
    5055    fZdAz[planet].Set(TMath::Pi()/2-el, az);
    5156}
     57
  • trunk/MagicSoft/Cosy/catalog/SlaPlanets.h

    r8847 r9516  
    22#define COSY_SlaPlanets
    33
    4 #ifndef COSY_Slalib
    5 #include "Slalib.h"
     4#ifndef COSY_SlaStars
     5#include "SlaStars.h"
    66#endif
    77
     
    2424} ePlanets_t;
    2525
    26 class SlaPlanets : public Slalib
     26class SlaPlanets : public SlaStars
    2727{
    2828private:
     
    3838public:
    3939    SlaPlanets(MObservatory::LocationName_t key);
    40     virtual ~SlaPlanets();
    4140
    4241    void SetMjd(double mjd);
    4342
    44     void UpdatePlanetPos(ePlanets_t planet);
    45     ZdAz GetPlanetPos(ePlanets_t planet) const { return fZdAz[planet]; }
     43    RaDec CalcPlanetRaDec(ePlanets_t planet);
     44    void  UpdatePlanetPos(ePlanets_t planet);
     45    ZdAz  GetPlanetPos(ePlanets_t planet) const { return fZdAz[planet]; }
     46
     47    void SetPlanet(ePlanets_t planet) { Set(CalcPlanetRaDec(planet)/TMath::DegToRad()); }
    4648
    4749    ClassDef(SlaPlanets, 0)
  • trunk/MagicSoft/Cosy/catalog/SlaStars.cc

    r9439 r9516  
    33#include "slalib.h"
    44
     5#include "MAstro.h"
    56#include "MPointing.h"
    67
     
    2930void SlaStars::Set(const RaDec &radec)
    3031{
     32    double ha;
     33
    3134    fRaDec = radec * TMath::DegToRad();
    32     fAltAz = CalcAltAz(fRaDec);
     35    fAltAz = CalcAltAz(fRaDec, &ha);
     36
     37    fHourAngle = ha;
    3338}
    3439
     
    136141}
    137142
    138 ZdAz SlaStars::CalcZdAz(const RaDec &radec) const
     143ZdAz SlaStars::CalcZdAz(const RaDec &radec, double *ha) const
    139144{
    140145    //
     
    167172              &r1);   // observed right ascension (radians)
    168173
     174    if (ha)
     175        *ha = h0*MAstro::RadToHor();
     176
    169177    return ZdAz(zd, az);
    170178}
    171 AltAz SlaStars::CalcAltAz(const RaDec &radec) const
     179AltAz SlaStars::CalcAltAz(const RaDec &radec, double *ha) const
    172180{
    173     ZdAz zdaz = CalcZdAz(radec);
     181    ZdAz zdaz = CalcZdAz(radec, ha);
    174182    return AltAz(TMath::Pi()/2-zdaz.Zd(), zdaz.Az());
    175183}
  • trunk/MagicSoft/Cosy/catalog/SlaStars.h

    r8847 r9516  
    1313{
    1414private:
    15     AltAz    fAltAz;    // [rad]
    16     RaDec    fRaDec;    // [rad]
     15    AltAz    fAltAz;     // [rad]
     16    RaDec    fRaDec;     // [rad]
     17
     18    Double_t fHourAngle; // [h]
    1719
    1820    double   fAmprms[21];
     
    2426
    2527    //    const AltAz GetAltAz() const { return fAltAz*360/D2PI; }
    26     //    const ZdAz  GetZdAz()  const { return ZdAz(DPI/2-fAltAz.Alt(), fAltAz.Az())*360/D2PI; }
    27     //    const RaDec GetRaDec() const { return fRaDec*360/D2PI; }
     28    const ZdAz   GetZdAz()  const     { return ZdAz(TMath::Pi()/2-fAltAz.Alt(), fAltAz.Az())*TMath::DegToRad(); }
     29    const RaDec  GetRaDec() const     { return fRaDec/TMath::DegToRad(); }
     30    const double GetHourAngle() const { return fHourAngle; }
    2831
    2932    virtual void SetMjd(double mjd);
     
    4144    RaDec  CalcRaDecFast(const ZdAz  &altaz) const;
    4245
    43     AltAz  CalcAltAz(const RaDec &radec) const;
    44     ZdAz   CalcZdAz (const RaDec &radec) const;
     46    AltAz  CalcAltAz(const RaDec &radec, double *ha=0) const;
     47    ZdAz   CalcZdAz (const RaDec &radec, double *ha=0) const;
    4548
    46     AltAz  CalcAltAz(const RaDec &radec, double mjd)
    47     { SetMjd(mjd); return CalcAltAz(radec); }
    48     ZdAz   CalcZdAz (const RaDec &radec, double mjd)
    49     { SetMjd(mjd); return CalcZdAz(radec); }
     49    AltAz  CalcAltAz(const RaDec &radec, double mjd, double *ha=0)
     50    { SetMjd(mjd); return CalcAltAz(radec, ha); }
     51    ZdAz   CalcZdAz (const RaDec &radec, double mjd, double *ha=0)
     52    { SetMjd(mjd); return CalcZdAz(radec, ha); }
    5053
    5154    AltAz  CalcAltAzFast(const RaDec &radec) const;
  • trunk/MagicSoft/Cosy/main/MCosy.cc

    r9439 r9516  
    349349
    350350    return point.SetPosition(dst, track);
     351}
     352
     353void MCosy::TrackPlanet(const Int_t &p) // ra, dec [rad]
     354{
     355    MTracking track(this);
     356    track.SetOut(fOutRep);
     357
     358    track.SetPointAcc(0.03, 0.01);
     359    track.SetPointVelocity(0.3);
     360    track.SetTrackAcc(0.01, 0.01);
     361
     362    track.TrackPlanet((ePlanets_t)p);
    351363}
    352364
     
    657669        {
    658670            RaDec dest = ((RaDec*)mp)[0];
    659             if (fStarguider)
    660                 fStarguider->SetPointingPosition(((RaDec*)mp)[1]);
    661671            if (!CheckNetwork())
    662672                return 0xebb0;
     
    670680        return 0x8888;
    671681
     682    case WM_PLANET:
     683        //cout << "WM_PLANET: START" << endl;
     684        {
     685            const Int_t p = ((Int_t*)mp)[0];
     686            if (!CheckNetwork())
     687                return 0xebb1;
     688
     689            TrackPlanet(p);
     690        }
     691        //cout << "WM_PLANET: done. (return 0x8889)" << endl;
     692        return 0x8889;
     693/*
    672694    case WM_NEWTRACK:
    673695        //cout << "WM_NewTrack: START" << endl;
     
    675697        //cout << "WM_NewTrack: done. (return 0x9999)" << endl;
    676698        return 0x9999;
    677 
     699*/
    678700    case WM_LOADBENDING:
    679701        //cout << "WM_LoadBending: START" << endl;
     
    826848    {
    827849        tout.Start(999);
    828         fCom->SendReport(fStatus, fRaDec, fZdAzSoll, bendist, fTrackingError, armed,
     850        fCom->SendReport(fStatus, fRaDec, fHourAngle, fZdAzSoll, bendist, fTrackingError, armed,
    829851                         fStarguider ? fStarguider->GetStarguiderMode() : 0);
    830852    }
  • trunk/MagicSoft/Cosy/main/MCosy.h

    r9439 r9516  
    3030//#define WM_CALIB        0x1004
    3131#define WM_TPOINT       0x1005
    32 #define WM_NEWTRACK     0x1006
     32//#define WM_NEWTRACK     0x1006
    3333#define WM_LOADBENDING  0x1007
    3434#define WM_RESETBENDING 0x1008
     
    4646#define WM_STARGTPOINT  0x1014
    4747#define WM_STARGMODE    0x1015
     48#define WM_PLANET       0x1016
    4849
    4950class Dkc;
     
    7778    TMutex fMutexGui;
    7879
    79     ZdAz  fTrackingError; // [rad] Tracking Offset between SE and calc-pos
    80     ZdAz  fZdAzSoll;      // [rad] Soll position when moving
    81     RaDec fRaDec;         // Position to track
    82     ZdAz  fAccuracy;      // Actual accuracy of Tracking
    83     ZdAz  fMin;
    84     ZdAz  fMax;
     80    ZdAz     fTrackingError; // [rad] Tracking Offset between SE and calc-pos
     81    ZdAz     fZdAzSoll;      // [rad] Soll position when moving
     82    RaDec    fRaDec;         // Position to track
     83    Double_t fHourAngle;     // Hour Angle of Position to track
     84    ZdAz     fAccuracy;      // Actual accuracy of Tracking
     85    ZdAz     fMin;
     86    ZdAz     fMax;
    8587
    8688    MPointing fBending;
     
    101103
    102104    int  SetPosition(const ZdAz &dst, Bool_t track=kFALSE);
     105    void TrackPlanet(const Int_t &p);
    103106    void TrackPosition(const RaDec &dst);    // ra, dec [rad]
    104107    void TrackPositionGRB(const RaDec &dst); // ra, dec [rad]
  • trunk/MagicSoft/Cosy/main/MTracking.cc

    r9443 r9516  
    44
    55#include "dkc.h"
    6 //#include "shaftencoder.h"
     6
     7#include "SlaStars.h"
    78
    89#include "MCosy.h"
    9 #include "SlaStars.h"
     10#include "MStarguider.h"
    1011
    1112#include "MDriveCom.h"
     
    1718//#define EXPERT
    1819#undef EXPERT
     20
     21MTracking::MTracking(MCosy *cosy)
     22    : MSlewing(cosy), MThread("MTracking"), fSlalib(fCosy->fObservatory),
     23    fTrackAcc(0, 0), fOut(0)
     24{
     25}
    1926
    2027// --------------------------------------------------------------------------
     
    146153// velocities are limited to the maximum velocity.
    147154//
    148 Bool_t MTracking::LimitSpeed(const ZdAz &vt, const SlaStars &sla) const
     155Bool_t MTracking::LimitSpeed(const ZdAz &vt) const
    149156{
    150157    // vt [deg/min]
     
    159166
    160167    // Calculate approximate velocity of both axis
    161     ZdAz vcalc = sla.GetApproxVel(fCosy->fRaDec);  // [rad/rad]
     168    ZdAz vcalc = fSlalib.GetApproxVel(fCosy->fRaDec);  // [rad/rad]
    162169
    163170    //vcalc *= 1./(24*60);          // [U_tel/min]
     
    209216}
    210217
    211 void MTracking::TrackPosition(const RaDec &dst) // ra, dec [rad]
    212 {
    213     SlaStars sla(fCosy->fObservatory);
    214 
    215     //
    216     // Position to actual position
    217     //
    218     sla.Now();
    219     ZdAz dest = sla.CalcZdAz(dst);
    220 
    221     gLog << all << sla.GetTime() << ": Track Position " << dst.Ra()*kRad2Deg/15 << "h, " << dst.Dec()*kRad2Deg <<"deg" << endl;
     218void MTracking::UpdateSlalib(SlaPlanets &sla)
     219{
     220    if (fTrackType<0)
     221        sla.Set(fTrackPos);
     222    else
     223        sla.SetPlanet((ePlanets_t)fTrackType);
     224
     225    if (fCosy->fStarguider)
     226        fCosy->fStarguider->SetPointingPosition(sla.GetRaDec());
     227}
     228
     229void MTracking::UpdateSlalib(Double_t dt=0)
     230{
     231    fSlalib.Now(dt);
     232    UpdateSlalib(fSlalib);
     233
     234    fCosy->fRaDec     = fSlalib.GetRaDec();
     235    fCosy->fHourAngle = fSlalib.GetHourAngle();
     236}
     237
     238void MTracking::UpdateSlalib(SlaPlanets &sla, Double_t mjd)
     239{
     240    sla.SetMjd(mjd);
     241    UpdateSlalib(sla);
     242}
     243
     244bool MTracking::Move()
     245{
     246    const RaDec &dst = fSlalib.GetRaDec();
     247
     248    ZdAz dest = fSlalib.GetZdAz();//fSlalib.CalcZdAz(dst);
     249
     250    gLog << all << fSlalib.GetTime() << ": Track Position " << dst.Ra()*kRad2Deg/15 << "h, " << dst.Dec()*kRad2Deg <<"deg" << endl;
    222251
    223252    // If the star is culminating behind the zenith (South) we want to
     
    225254    // culminating before the zenith (north) we want the star to be
    226255    // aligned between -180 and 180deg (which is the default of CalcZdAz)
    227     if (sla.GetPhi()>dst.Dec() && dest.Az()<0)
     256    if (fSlalib.GetPhi()>dst.Dec() && dest.Az()<0)
    228257    {
    229258        // align az from -180/180 to 0/360
     
    238267    {
    239268        gLog << err << "ERROR - Cannot start tracking, positioning failed." << endl;
     269        return false;
     270    }
     271
     272    return true;
     273}
     274
     275void MTracking::TrackPosition(const RaDec &dst)
     276{
     277    fTrackPos  = dst;
     278    fTrackType = -1;
     279
     280    // Start tracking
     281    Track();
     282}
     283
     284void MTracking::TrackPlanet(ePlanets_t planet)
     285{
     286    fTrackPos  = RaDec();
     287    fTrackType = planet;
     288
     289    // Start tracking
     290    Track();
     291}
     292
     293void MTracking::Track() // ra, dec [rad]
     294{
     295    // Position to corrent nominal position
     296    UpdateSlalib();
     297
     298    if (!Move())
    240299        return;
    241     }
     300
     301    //fCosy->fRaDec = fSlalib.GetRaDec();
    242302
    243303    // Initialize Tracker (slalib or starguider)
    244     fCosy->fRaDec = dst;
    245 
    246304    RunThread();
    247305
     
    256314
    257315    // Get current nominal local position
    258     sla.Now();
    259     ZdAz pos = sla.CalcZdAz(fCosy->fRaDec);
     316    UpdateSlalib();
     317    //fCosy->fRaDec = fSlalib.GetRaDec();
     318
     319    ZdAz pos = fSlalib.GetZdAz();//fSlalib.CalcZdAz(fSlalib.GetRaDec());
    260320
    261321    // Some output
    262     XY xy(TMath::RadToDeg()*dst.Ra()*24/360, TMath::RadToDeg()*dst.Dec());
    263     gLog << all << sla.GetTime() << " - Start Tracking: Ra=" << xy.X() << "h Dec=";
     322    XY xy(TMath::RadToDeg()*fCosy->fRaDec.Ra()/15, TMath::RadToDeg()*fCosy->fRaDec.Dec());
     323    gLog << all << fSlalib.GetTime() << " - Start Tracking: Ra=" << xy.X() << "h Dec=";
    264324    gLog << xy.Y() << "\xb0 @ Zd=" << pos.Zd()*kRad2Deg <<"deg Az=" << pos.Az()*kRad2Deg <<"deg" << endl;
    265325
     
    295355        // Request Target position for Now+dt
    296356        //
    297         sla.Now(dt);
     357        UpdateSlalib();
     358        //fCosy->fRaDec = fSlalib.GetRaDec();
    298359
    299360        //
    300361        // Request nominal position for this time in the future (To+dt)
    301362        //
    302         const ZdAz pointing = sla.CalcZdAz(fCosy->fRaDec); // [rad]
     363        const ZdAz pointing = fSlalib.GetZdAz(); //fSlalib.CalcZdAz(fSlalib.GetRaDec()); // [rad]
    303364        ZdAz dest = fCosy->AlignTrackingPos(pointing);     // fix ambiguity
    304365
     
    329390        //v.Az(v.Az()*(1+TMath::Min(0.3, kpAz)));
    330391
    331         if (LimitSpeed(v, sla))
     392        if (LimitSpeed(v))
    332393        {
    333394            gLog << dbg << "vt: " << v.Zd() << " " << v.Az() << "re/min" << endl;
     
    372433    }
    373434
    374     sla.Now();
     435    fSlalib.Now();
    375436
    376437    CancelThread();
     
    379440    fCosy->StopMovement();
    380441
    381     gLog << all << sla.GetTime() << " - Tracking stopped @ Zd=";
     442    gLog << all << fSlalib.GetTime() << " - Tracking stopped @ Zd=";
    382443    gLog << fCosy->fZdAzSoll.Zd()*TMath::RadToDeg() <<"deg Az=";
    383444    gLog << fCosy->fZdAzSoll.Az()*TMath::RadToDeg() <<"deg" << endl;
     
    391452    gLog << inf2 << "- Tracking Thread started (" << MTime(-1) << ")" << endl;
    392453
    393     SlaStars sla(fCosy->fObservatory);
    394     sla.Now();
    395 
    396     ZdAz soll = sla.CalcZdAz(fCosy->fRaDec); // [rad]
     454    SlaPlanets sla(fSlalib.GetObservatoryKey());
     455
     456    UpdateSlalib(sla);
     457
     458    //ZdAz soll = sla.GetZdAz(); //sla.CalcZdAz(sla.GetRaDec()); // [rad]
    397459
    398460    //
     
    434496        if (phca1)
    435497        {
    436             ZdAz dummy = sla.CalcZdAz(fCosy->fRaDec, mjdzd);
     498            UpdateSlalib(sla, mjdzd);
     499
     500            ZdAz dummy = sla.GetZdAz();//sla.CalcZdAz(radec, mjdzd);
    437501            dummy = fCosy->AlignTrackingPos(dummy);
    438502            fCosy->fZdAzSoll.Zd(dummy.Zd());
    439             soll.Zd(fCosy->fBending(dummy).Zd()); // [rad]
    440 
    441             fCosy->fTrackingError.Zd(soll.Zd()-istse.Zd());
     503            fCosy->fTrackingError.Zd(fCosy->fBending(dummy).Zd()-istse.Zd());
    442504
    443505            TThread::CancelPoint();
     
    445507        if (phcaz)
    446508        {
    447             ZdAz dummy = sla.CalcZdAz(fCosy->fRaDec, mjdaz);
     509            UpdateSlalib(sla, mjdaz);
     510
     511            ZdAz dummy = sla.GetZdAz();//sla.CalcZdAz(radec, mjdaz);
    448512            dummy = fCosy->AlignTrackingPos(dummy);
    449513            fCosy->fZdAzSoll.Az(dummy.Az());
    450             soll.Az(fCosy->fBending(dummy).Az()); // [rad]
    451 
    452             fCosy->fTrackingError.Az(soll.Az()-istse.Az());
     514            fCosy->fTrackingError.Az(fCosy->fBending(dummy).Az()-istse.Az());
    453515
    454516            TThread::CancelPoint();
  • trunk/MagicSoft/Cosy/main/MTracking.h

    r9132 r9516  
    44#ifndef COSY_MSlewing
    55#include "MSlewing.h"
     6#endif
     7
     8#ifndef COSY_SlaPlanets
     9#include "SlaPlanets.h"
    610#endif
    711
     
    1721{
    1822private:
     23    SlaPlanets fSlalib;
     24
    1925    ZdAz fTrackAcc;
     26
     27    Int_t fTrackType;
     28    RaDec fTrackPos;
    2029
    2130    MLog   *fOut;
    2231
     32    void UpdateSlalib(SlaPlanets &sla);
     33    void UpdateSlalib(Double_t dt);
     34    void UpdateSlalib(SlaPlanets &sla, Double_t mjd);
     35
    2336    bool SetVelocity(const ZdAz &v);
    24     bool LimitSpeed(const ZdAz &vt, const SlaStars &sla) const;
     37    bool LimitSpeed(const ZdAz &vt) const;
    2538    bool InitTracking();
     39    bool Move();
     40    void Track();
    2641
    2742    Int_t Thread();
    2843
    2944public:
    30     MTracking(MCosy *cosy) : MSlewing(cosy), MThread("MTracking"), fTrackAcc(0, 0), fOut(0) { }
     45    MTracking(MCosy *cosy);
    3146
    3247    void TrackPosition(const RaDec &dst); // ra, dec [rad]
     48    void TrackPlanet(ePlanets_t planet);  // ra, dec [rad]
    3349    void SetTrackAcc(Float_t zd, Float_t az) { fTrackAcc.Zd(zd); fTrackAcc.Az(az); }
    3450
  • trunk/MagicSoft/Cosy/tcpip/MDriveCom.cc

    r9515 r9516  
    6464    ra *= 15; // h -> deg
    6565
    66     RaDec rd[2] = { RaDec(ra, dec), RaDec(ra, dec) };
     66    RaDec rd(ra, dec);
    6767
    6868    //cout << "MDriveCom - TRACK... start." << endl;
     
    122122    if (fQueue)
    123123        fQueue->PostMsg(WM_POSITION, &za, sizeof(za));
     124    //cout << "MDriveCom - POSITION... done." << endl;
     125    return true;
     126}
     127
     128bool MDriveCom::CommandCELEST(TString &str)
     129{
     130    str = str.Strip(TString::kBoth);
     131    if (str.IsNull())
     132    {
     133        gLog << err << "ERROR - CELEST command empty." << endl;
     134        return false;
     135    }
     136
     137    Int_t id, len; // Starguider switched on or not
     138    Float_t dra, ddec;
     139    Int_t n=sscanf(str.Data(), "%d %f %f %n", &id, &dra, &ddec, &len);
     140    if (n!=1)
     141    {
     142        gLog << warn << "WARNING - Not enough argmuents (CELEST)." << endl;
     143        return kCONTINUE;
     144    }
     145
     146    str.Remove(0, len);
     147    str = str.Strip(TString::kBoth);
     148
     149    if (!str.IsNull())
     150    {
     151        gLog << err << "ERROR - Too many bytes in command CELEST" << endl;
     152        return false;
     153    }
     154
     155    gLog << all << "CC-COMMAND " << MTime(-1) << " CELEST ID=" << id << " dRa=" << dra << "deg dDec=" << ddec << "deg" << endl;
     156
     157    if (id==0)
     158    {
     159        gLog << err << "ERROR - Tracking the sun IS STRICLY FORBIDDEN - ignored." << endl;
     160        return false;
     161    }
     162
     163    if (id<0 || id>9)
     164    {
     165        gLog << err << "ERROR - Unknown id " << id << " (must be between 1 and 9)." << endl;
     166        return false;
     167    }
     168
     169    // Moon;
     170    id = 3;
     171
     172    gLog << warn << "WARNING - Tracking the moon's center forced." << endl;
     173
     174    //cout << "MDriveCom - POSITION... start." << endl;
     175    if (fQueue)
     176        fQueue->PostMsg(WM_PLANET, &id, sizeof(id));
    124177    //cout << "MDriveCom - POSITION... done." << endl;
    125178    return true;
     
    245298        return CommandZDAZ(str);
    246299
     300    if (cmd==(TString)"CELEST")
     301        return CommandCELEST(str);
     302
    247303    if (cmd==(TString)"PREPS")
    248304        return CommandPREPS(str);
     
    277333}
    278334
    279 bool MDriveCom::SendReport(UInt_t stat, RaDec rd, ZdAz so, ZdAz is, ZdAz er, Bool_t armed, Int_t stargmd)
     335bool MDriveCom::SendReport(UInt_t stat, RaDec rd, double ha, ZdAz so, ZdAz is, ZdAz er, Bool_t armed, Int_t stargmd)
    280336{
    281337    // rd [rad]
     
    304360    Print(str, rd.Ra());    // Ra
    305361    Print(str, rd.Dec());   // Dec
    306     Print(str, 0);          // HA
     362    Print(str, ha);         // HA
    307363    str += MString::Format("%12.6f ", t.GetMjd()); // mjd
    308364    Print(str, so.Zd());
  • trunk/MagicSoft/Cosy/tcpip/MDriveCom.h

    r9439 r9516  
    3030    bool CommandGRB(TString &str);
    3131    bool CommandZDAZ(TString &str);
     32    bool CommandCELEST(TString &str);
    3233    bool CommandPREPS(TString &str);
    3334    bool CommandARM(TString &str);
     
    5354
    5455
    55     bool SendReport(UInt_t stat, RaDec rd, ZdAz so, ZdAz is, ZdAz er, Bool_t armed, Int_t stargmd);
     56    bool SendReport(UInt_t stat, RaDec rd, double ha, ZdAz so, ZdAz is, ZdAz er, Bool_t armed, Int_t stargmd);
    5657    bool SendStargReport(UInt_t stat, ZdAz miss, ZdAz nompos, Ring center, Int_t num, Int_t n, Double_t bright, Double_t mjd, Int_t numleds, Int_t numrings);
    57 //    bool SendTPoint(char type);
    5858    bool SendTPoint(bool stat, char type, Float_t mag, const char *name, const AltAz &za0, const ZdAz &za1,
    5959                    const TVector2 &xy, Float_t dzd, Float_t daz, const MTime &t,
    6060                    const Ring &center, const Led &star, Int_t numleds, Int_t numrings,
    6161                    Int_t numstars=0, Int_t numcor=0, Float_t bright=0);
     62
    6263    bool SendStatus(const char *stat);
    6364};
Note: See TracChangeset for help on using the changeset viewer.