Index: /trunk/MagicSoft/Cosy/Changelog
===================================================================
--- /trunk/MagicSoft/Cosy/Changelog	(revision 8846)
+++ /trunk/MagicSoft/Cosy/Changelog	(revision 8847)
@@ -11,4 +11,30 @@
      videodev/Camera.[h,cc]:
      - renamed MyThreadX to MThread
+
+   * Makefile:
+     - removed include of mvideo
+
+   * videodev/Makefile:
+     - removed include of mvideo
+     - added class MVideo
+
+   * videodev/MVideo.[h,cc]:
+     - added
+
+   * base/coord.h, base/log.h, base/threads.h:
+     - obsolete -> removed
+
+   * catalog/SaoFile.h, catalog/SlaPlanets.h, catalog/SlaStars.[h,cc],
+     catalog/Slalib.[h,cc], catalog/StarCatalog.h, gui/MGAccuracy.cc,
+     gui/MGCoordinates.cc, gui/MGCosy.cc, gui/MGPngReader.cc,
+     gui/MGSkyPosition.cc, gui/MGVelocity.cc, main/MStargHistograms.[h,cc],
+     main/MStarguider.cc, main/MTracking.h, tcpip/MDriveCom.cc,
+     tpoint/TPointIncl.h:
+     - revised includes
+     - revised global defines in header files
+
+   * videodev/Writer.[h,cc]:
+     - revised includes
+     - replaced XY by TVector2
 
 
Index: unk/MagicSoft/Cosy/base/File.cc
===================================================================
--- /trunk/MagicSoft/Cosy/base/File.cc	(revision 8846)
+++ 	(revision )
@@ -1,92 +1,0 @@
-#include "File.h"
-
-#include <stdlib.h>
-
-File::File(const char *name, const char *flags)
-{
-    f = fopen(name, flags);
-    if (!f)
-        printf("WARNING: Cannot open '%s'\n", name);
-}
-
-File::~File()
-{
-    if (f)
-        fclose(f);
-}
-
-char File::Getc() const
-{
-    return fgetc(f);
-}
-
-int File::Eof() const
-{
-    return feof(f);
-}
-
-void File::Seek(long pos) const
-{
-    fseek(f, pos, SEEK_SET);
-}
-
-void File::Reset() const
-{
-    fseek(f, 0, SEEK_SET);
-}
-
-long File::Tell() const
-{
-    return ftell(f);
-}
-
-long File::Size() const
-{
-    long l = ftell(f);
-    fseek(f, 0, SEEK_END);
-    long s = ftell(f);
-    fseek(f, l, SEEK_SET);
-    return s;
-}
-
-char *File::Gets(char *c, int cnt) const
-{
-    for (int i=0; i<cnt; i++)
-        *c++=fgetc(f);
-    *c='\0';
-
-    return c;
-}
-
-void File::Newline() const
-{
-    int g;
-    do g=fgetc(f);
-    while (g!=0x0A && g!=EOF);
-}
-
-int File::Geti(int cnt) const
-{
-    char *c = new char[cnt+1];
-    Gets(c, cnt);
-    int result = atoi(c);
-    delete c;
-    return result;
-}
-
-float File::Getf(int cnt) const
-{
-    char *c = new char[cnt+1];
-    Gets(c, cnt);
-    float result = atof(c);
-    delete c;
-    return result;
-}
-
-void File::Skip(int cnt) const
-{
-    char *c = new char[cnt+1];
-    Gets(c, cnt);
-    delete c;
-}
-
Index: unk/MagicSoft/Cosy/base/File.h
===================================================================
--- /trunk/MagicSoft/Cosy/base/File.h	(revision 8846)
+++ 	(revision )
@@ -1,33 +1,0 @@
-#ifndef FILE_H
-#define FILE_H
-
-#include <stdio.h>
-
-class File
-{
-private:
-    FILE *f;
-
-public:
-    File(const char *name, const char *flags);
-    ~File();
-
-    void Reset() const;
-    int  Eof() const;
-
-    void Seek(long pos) const;
-    long Tell() const;
-    long Size() const;
-
-    char  Getc() const;
-    char *Gets(char *c, int cnt) const;
-    int   Geti(int cnt) const;
-    float Getf(int cnt) const;
-
-    void Newline() const;
-    void Skip(int cnt) const;
-
-    int operator!() { return !f; }
-};
-
-#endif
Index: unk/MagicSoft/Cosy/base/timer.cc
===================================================================
--- /trunk/MagicSoft/Cosy/base/timer.cc	(revision 8846)
+++ 	(revision )
@@ -1,153 +1,0 @@
-#include "timer.h"
-
-#include <stdio.h>
-#include <iostream.h>
-
-#include <math.h>           // modf
-#include "sys/time.h"       // struct timeval
-#include "slalib/slalib.h"  // slacldj
-
-void Timer::SetTimer(int tv_sec, double tv_usec)
-{
-    fSecs = tv_sec;
-    fMs = tv_usec;
-
-    SetMjd((fMs+fSecs)/(60*60*24) + 40587);
-
-    fSec  = tv_sec%60;
-    tv_sec /= 60;
-
-    fMin = tv_sec%60;
-    tv_sec /= 60;
-
-    fHor = tv_sec%24;
-    tv_sec /= 24;
-
-//    fDiv = fmod((fMs+fSecs)/(60*60*24), 1.0);
-}
-
-void Timer::GetTimeval(struct timeval *tv) const
-{
-    tv->tv_sec  = fSecs;
-    tv->tv_usec = (__suseconds_t)fMs;
-}
-
-/*
-void Timer::Set(const long mjd)
-{
-    SetMjd(mjd);
-
-    //
-    // Express day in Gregorian calendar
-    //  (taken from slalib slaDjcl)
-    //
-    const long jd   = mjd + 2400001;
-    const long n4   = (((((jd*4-17918)/146097)*6)/4+1)/2+jd-37)*4;
-    const long nd10 = (((n4-237)%1461)/4)*10+5;
-
-    fYea = n4/1461 - 4712;
-    fMon = ((nd10/306+2)%12) + 1;
-    fDay = (nd10%306)/10 + 1;
-}
-*/
-void Timer::SetTimer(const struct timeval *tv)
-{
-    SetTimer(tv->tv_sec, (double)tv->tv_usec/1000000.0);
-}
-
-Timer::Timer(double t)
-{
-    double inte;
-    double frac = modf(t, &inte);
-    SetTimer(inte, frac);
-}
-
-Timer::Timer(struct timeval *tv)
-{
-    SetTimer(tv);
-}
-
-Timer::Timer(const Timer &t)
-{
-    fMs   = t.fMs;
-    fDiv  = t.fDiv;
-    fSec  = t.fSec;
-    fSecs = t.fSecs;
-    fMin  = t.fMin;
-    fHor  = t.fHor;
-    fDay  = t.fDay;
-    fMon  = t.fMon;
-    fYea  = t.fYea;
-    fMjd  = t.fMjd;
-}
-
-void Timer::SetMjd(double mjd)
-{
-    //
-    // Express day in Gregorian calendar
-    //  (taken from slalib slaDjcl)
-    //
-    fMjd = mjd;
-
-    const long jd   = (long)mjd + 2400001;
-    const long n4   = (((((jd*4-17918)/146097)*6)/4+1)/2+jd-37)*4;
-    const long nd10 = (((n4-237)%1461)/4)*10+5;
-
-    fYea = n4/1461 - 4712;
-    fMon = ((nd10/306+2)%12) + 1;
-    fDay = (nd10%306)/10 + 1;
-
-    fDiv = fmod(mjd, 1.0);
-
-    mjd -= 40587;
-
-    mjd *= 24;
-    fHor = (int)fmod(mjd, 24);
-
-    mjd *= 60;
-    fMin = (int)fmod(mjd, 60);
-
-    mjd *= 60;
-    fSec = (int)fmod(mjd, 60);
-
-    fMs = fmod(mjd * 1000, 1000)/1000;
-}
-
-double Timer::Now() //[s]
-{
-    struct timeval tv;
-    gettimeofday(&tv, NULL);
-
-    SetTimer(&tv);
-
-    return fMs+fSecs;
-}
-
-Timer::operator double() const //[s]
-{
-    return fMs+fSecs;
-}
-
-void Timer::Print()
-{
-    cout << fSec << "s +" << fMs << "s" << endl;
-}
-
-const char *Timer::GetTimeStr()
-{
-    sprintf(fDateStr, "%2d/%02d/%02d %d:%02d:%02d.%06li",
-            fYea, fMon, fDay, fHor, fMin, fSec, (long)(1000000.0*fMs));
-
-    return fDateStr;
-}
-
-ostream &operator<<(ostream &out, Timer &t)
-{
-    char text[256];
-
-    sprintf(text, "%2d/%02d/%02d %d:%02d:%02d.%01li",
-            t.fYea, t.fMon, t.fDay, t.fHor, t.fMin, t.fSec, (long)(10.0*t.fMs));
-
-    out << text;
-    return out;
-}
Index: unk/MagicSoft/Cosy/base/timer.h
===================================================================
--- /trunk/MagicSoft/Cosy/base/timer.h	(revision 8846)
+++ 	(revision )
@@ -1,78 +1,0 @@
-#ifndef COSY_Timer
-#define COSY_Timer
-
-struct timeval;
-
-class ostream;
-
-class Timer
-{
-    friend ostream &operator<<(ostream &out, Timer &t);
-private:
-    double fMs;  // Microsec in units of sec as returned by gettimeofday
-    int fSecs;   // Seconds as returned by gettimeofday
-
-    int fSec;    // Sec of time
-    int fMin;    // Min of time
-    int fHor;    // Hor of time
-    int fDay;    // Day of time
-    int fMon;    // Mon of time
-    int fYea;    // Yea of time
-
-    double fDiv; // Division of day
-    double fMjd; // MJD
-
-    char fDateStr[30];
-
-    //void Set(const long mjd);
-
-public:
-    Timer(int d, int m, int y, int h, int min, int s, double ms)
-        : fMs(ms), fSecs(0), fSec(s), fMin(m), fHor(h), fDay(d), fMon(m), fYea(y), fDiv(0), fMjd(0) {}
-    Timer() : fMs(0), fSecs(0), fSec(0), fMin(0), fHor(0), fDay(0), fMon(0), fYea(0), fDiv(0), fMjd(0) {}
-    Timer(double t);
-    Timer(struct timeval *tv);
-    Timer(const Timer &t);
-
-    void SetTimer(int tv_sec, double tv_usec);
-    void SetTimer(const struct timeval *tv);
-    void SetTimer(int y, int m, int d, int h, int min, int s, double ms)
-    {
-        fMs = ms;
-        fSec = s;
-        fMin = min;
-        fHor = h;
-        fDay = d;
-        fMon = m;
-        fYea = y;
-    }
-
-    void GetTimeval(struct timeval *tv) const;
-
-    int GetSecs() { return fSecs; }
-
-    double Now(); //[s]
-    double GetMjd() const { return fMjd/*+fDiv*/; }
-
-    virtual void SetMjd(double mjd);
-
-    int Day() const   { return fDay; }
-    int Month() const { return fMon; }
-    int Year() const  { return fYea; }
-
-    int H() const { return fHor; }
-    int M() const { return fMin; }
-    int S() const { return fSec; }
-    int MilliSec() const { return (int)(fMs*1000); }
-    double MicroSec() const { return fMs; }
-
-    const char *GetTimeStr();
-
-    void Print();
-
-    operator double() const; //[s]
-};
-
-ostream &operator<<(ostream &out, Timer &t);
-
-#endif
Index: unk/MagicSoft/Cosy/catalog/SaoFile.cc
===================================================================
--- /trunk/MagicSoft/Cosy/catalog/SaoFile.cc	(revision 8846)
+++ 	(revision )
@@ -1,239 +1,0 @@
-#include "SaoFile.h"
-
-#include <iostream.h>
-#include <string.h>
-
-#include "slamac.h"
-
-#include "File.h"
-
-#define FALSE 0
-#define TRUE  1
-
-ClassImp(SaoFile);
-
-static int lt(sort_t *t1, sort_t *t2)
-{
-    // t1->ra < t2->ra
-    if (t1->ra < t2->ra)
-        return 1;
-
-    // t1->ra > t2->ra
-    if (t1->ra > t2->ra)
-        return 0;
-
-    // t1->ra == t2->ra
-    if (t1->dec < t2->dec)
-        return 1;
-    else
-        return 0;
-}
-
-
-static void rekMergesort(sort_t **a, int length, int l, int r)
-{
-    // a recursive merge sort algorithm
-    if ( r <= l )
-        return;
-
-    sort_t **b = new sort_t*[length];
-
-    int m = (r+l)/2;
-
-    rekMergesort(a, length, l, m);
-
-    rekMergesort(a, length, m+1, r);
-
-    int i;
-    for (i=m+1; i>l; i--)
-        b[i-1]=a[i-1];
-
-    int j;
-    for (j=m; j<r; j++)
-        b[r+m-j]=a[j+1];
-
-    int k;
-    for (k=l; k<=r; k++)
-    {
-        if (lt( b[i],b[j]) )
-            a[k]=b[i++];
-        else
-            a[k]=b[j--];
-    }
-
-    delete b;
-}
-
-SaoFile::SaoFile(const char *name)
-{
-    file = new File(name, "r");
-
-    if (!*file)
-        exit(0);
-
-    compressed = !strcasecmp(name+strlen(name)-4, ".cmp");
-
-    fEntries = file->Size()/(compressed?70-20:205);
-
-    cout << "Opening" << (compressed?" compressed":"") << " catalog '" << name << "'"
-        << " with " << fEntries << " entries" << endl;
-
-    delFlag = ' ';
-}
-
-SaoFile::~SaoFile()
-{
-    delete file;
-}
-
-int SaoFile::GetEntryNr() const
-{
-    return file->Tell()/(compressed?70-20:205);
-}
-
-int SaoFile::GetEntry(const int i)
-{
-    file->Seek(i*(compressed?70-20:205));
-    return GetNextEntry();
-}
-
-void SaoFile::Reset() const
-{
-    file->Seek(0);
-}
-
-int SaoFile::GetNextEntry()
-{
-    if (file->Eof())
-        return FALSE;
-
-    SAO = file->Geti(6);
-    if (!compressed)
-    {
-        delFlag = file->Getc();
-        file->Skip(77-8);
-    }
-    Pmag      = file->Getf(4);
-    Vmag      = file->Getf(4);
-    if (!compressed)
-        file->Skip(161/*151*/-85);
-    /*
-     RA2000h   = file->geti(2);
-     RA2000m   = file->geti(2);
-     RA2000s   = file->getf(6);
-     */
-    pmRA2000  = file->Getf(7);
-    if (!compressed)
-        file->Skip(178-168);
-    /*
-     DE2000sgn = file->getc();
-     DE2000d   = file->geti(2);
-     DE2000m   = file->geti(2);
-     DE2000s   = file->getf(5);
-     */
-    pmDE2000  = file->Getf(6);
-    RA2000rad = file->Getf(10);
-    DE2000rad = file->Getf(11);
-    file->Newline();
-
-    sprintf(data, "%6i%4.1f%4.1f"/*"%2i%2i%6.3f"*/"%7.4f"/*"%c%2i%2i%5.2f"*/"%6.3f%10.8f%11.8f\n",
-            Nr(), MagP(), MagV(), /*RaH(), RaM(), RaS(),*/ RaPm(),
-            /*DecSgn(), DecD(), DecM(), DecS(),*/ DecPm(), Ra(), Dec());
-
-    return !file->Eof();
-}
-
-void SaoFile::Print() const
-{
-    cout << SAO << " " << delFlag << " " << Pmag << " " << Vmag << " "
-        << /*RA2000h << "h" << RA2000m << "m" << RA2000s << "s " << */pmRA2000 << " "
-        << /*DE2000sgn << DE2000d << "d" << DE2000m << "m" << DE2000s << "s " << */pmDE2000 << " Ra:"
-        << RA2000rad << " Dec:" << DE2000rad << endl;
-}
-
-void SaoFile::Compress()
-{
-    FILE *f = fopen("sao.cmp", "w");
-
-    cout << endl << " Compressing catalog..." << flush;
-
-    const int entries = GetNrOfEntries();
-    const int step    = entries/360;
-
-    for (int i=0; i<entries; i++)
-    {
-        GetNextEntry();
-
-        if (!DelFlag())
-            fprintf(f, String());
-
-        if (i%step==0)
-            cout << "." << flush;
-    }
-    cout << "done." << endl;
-
-    fclose(f);
-}
-
-void SaoFile::Sort()
-{
-    cout << endl << "Reading coordinates..." << flush;
-
-    const int entries=GetNrOfEntries();
-
-    sort_t **srt = new sort_t*[entries];
-    for (int i=0; i<entries; i++)
-        srt[i] = new sort_t;
-
-    int counter=0;
-    const int step = entries/360;
-    while(GetNextEntry())
-    {
-        srt[counter]->ra  = (int)(360.0*(Ra()/D2PI));
-        srt[counter]->dec = (int)(360.0*(Dec()/D2PI));
-        srt[counter]->nr  = counter;
-
-        if (counter%step==0)
-            cout << "." << flush;
-
-        counter++;
-    }
-    cout << "done." << endl << endl;
-
-    /* sort entries */
-    cout << "Sorting coordinates..." << flush;
-    rekMergesort(srt, entries, 0, entries-1);
-    cout << "done." << endl << endl;
-
-    cout << "Writing sorted catalogue..." << flush;
-    FILE *f   = fopen("sao-sort.cmp", "w");
-    FILE *idx = fopen("sao-sort.idx", "w");
-
-    int ra=0, ral=0;
-    int dec=0, decl=0;
-    for (int i=0; i<entries; i++)
-    {
-        GetEntry(srt[i]->nr);
-
-        ra  = (int)(360.0*Ra()/D2PI);
-        dec = (int)(360.0*Dec()/D2PI);
-
-        if (ra!=ral || dec!=decl)
-        {
-            if (ra!=ral)
-                cout << "." << flush;
-            fprintf(idx, "%3d %3d %10d\n", ra, dec, i);
-        }
-
-        ral = ra;
-        decl = dec;
-
-        fprintf(f, String());
-        if (i%5000==0)
-            cout << "." << flush;
-    }
-    fclose(idx);
-    fclose(f);
-    cout << "done." << endl;
-}
-
Index: unk/MagicSoft/Cosy/catalog/SaoFile.h
===================================================================
--- /trunk/MagicSoft/Cosy/catalog/SaoFile.h	(revision 8846)
+++ 	(revision )
@@ -1,86 +1,0 @@
-#ifndef COSY_SaoFile
-#define COSY_SaoFile
-
-#ifndef ROOT_TROOT
-#include <TROOT.h>
-#endif
-
-struct _sort
-{
-   int ra;
-   int dec;
-   int nr;
-};
-
-typedef struct _sort sort_t;
-
-class File;
-
-class SaoFile
-{
-private:
-    File *file;
-    int compressed;
-
-    char data[205];
-
-    int   SAO;
-    char  delFlag;
-    float Pmag;
-    float Vmag;
-    // int   RA2000h;
-    // int   RA2000m;
-    // float RA2000s;
-    float pmRA2000;
-    // char  DE2000sgn;
-    // int   DE2000d;
-    // int   DE2000m;
-    float DE2000s;
-    float pmDE2000;
-    float RA2000rad;
-    float DE2000rad;
-
-    int fEntries;
-
-public:
-    SaoFile(const char *name);
-    virtual ~SaoFile();
-
-    void  Compress();
-    void  Sort();
-
-    int   GetEntryNr() const;
-    int   GetEntry(const int i);
-    void  Reset() const;
-    int   GetNextEntry();
-    void  Print() const;
-
-    int   GetNrOfEntries() const { return fEntries; }
-
-    int   Nr() const          { return SAO; }
-    int   DelFlag() const     { return delFlag=='D'; }
-    float MagP() const        { return Pmag; }
-    float MagV() const        { return Vmag; }
-    float Ra() const          { return RA2000rad; }
-    float Dec() const         { return DE2000rad; }
-    RaDec GetRaDec() const    { return RaDec(RA2000rad, DE2000rad); }
-
-    float RaPm() const        { return pmRA2000; }
-    float DecPm() const       { return pmDE2000; }
-    RaDec GetRaDecPm() const  { return RaDec(pmRA2000, pmDE2000); }
-
-
-    // char DecSgn()   { return DE2000sgn; }
-    // int   RaH()     { return RA2000h; }
-    // int   DecD()    { return DE2000d; }
-    // int   RaM()     { return RA2000m; }
-    // int   DecM()    { return DE2000m; }
-    // float RaS()     { return RA2000s; }
-    // float DecS()    { return DE2000s; }
-
-    const char *String() const { return data; }
-
-    ClassDef(SaoFile, 0)
-};
-
-#endif
Index: /trunk/MagicSoft/Cosy/catalog/SlaPlanets.h
===================================================================
--- /trunk/MagicSoft/Cosy/catalog/SlaPlanets.h	(revision 8846)
+++ /trunk/MagicSoft/Cosy/catalog/SlaPlanets.h	(revision 8847)
@@ -1,7 +1,11 @@
-#ifndef SLAPLANETS_H
-#define SLAPLANETS_H
+#ifndef COSY_SlaPlanets
+#define COSY_SlaPlanets
 
-#ifndef SLALIB_H
+#ifndef COSY_Slalib
 #include "Slalib.h"
+#endif
+
+#ifndef MARS_MPointing
+#include "MPointing.h"
 #endif
 
Index: /trunk/MagicSoft/Cosy/catalog/SlaStars.cc
===================================================================
--- /trunk/MagicSoft/Cosy/catalog/SlaStars.cc	(revision 8846)
+++ /trunk/MagicSoft/Cosy/catalog/SlaStars.cc	(revision 8847)
@@ -2,4 +2,6 @@
 
 #include "slalib.h"
+
+#include "MPointing.h"
 
 ClassImp(SlaStars);
Index: /trunk/MagicSoft/Cosy/catalog/SlaStars.h
===================================================================
--- /trunk/MagicSoft/Cosy/catalog/SlaStars.h	(revision 8846)
+++ /trunk/MagicSoft/Cosy/catalog/SlaStars.h	(revision 8847)
@@ -1,8 +1,12 @@
-#ifndef SLASTARS_H
-#define SLASTARS_H
+#ifndef COSY_SlaStars
+#define COSY_SlaStars
 
+#ifndef COSY_Slalib
 #include "Slalib.h"
+#endif
 
-#include "coord.h"
+#ifndef MARS_MPointing
+#include "MPointing.h"
+#endif
 
 class SlaStars : public Slalib
Index: /trunk/MagicSoft/Cosy/catalog/Slalib.cc
===================================================================
--- /trunk/MagicSoft/Cosy/catalog/Slalib.cc	(revision 8846)
+++ /trunk/MagicSoft/Cosy/catalog/Slalib.cc	(revision 8847)
@@ -4,5 +4,5 @@
 #include <iostream>  // cout
 
-#include "coord.h"
+#include "MPointing.h"
 
 #include "slalib.h"
Index: /trunk/MagicSoft/Cosy/catalog/Slalib.h
===================================================================
--- /trunk/MagicSoft/Cosy/catalog/Slalib.h	(revision 8846)
+++ /trunk/MagicSoft/Cosy/catalog/Slalib.h	(revision 8847)
@@ -1,10 +1,14 @@
-#ifndef SLALIB_H
-#define SLALIB_H
+#ifndef COSY_Slalib
+#define COSY_Slalib
 
-#include <TROOT.h>
+#ifndef MARS_MTime
+#include "MTime.h"
+#endif
 
-#include "coord.h"
-#include "MTime.h"
+#ifndef MARS_MObservatory
 #include "MObservatory.h"
+#endif
+
+class ZdAz;
 
 class Slalib : public MObservatory
Index: /trunk/MagicSoft/Cosy/catalog/StarCatalog.h
===================================================================
--- /trunk/MagicSoft/Cosy/catalog/StarCatalog.h	(revision 8846)
+++ /trunk/MagicSoft/Cosy/catalog/StarCatalog.h	(revision 8847)
@@ -8,12 +8,7 @@
 #include <GuiTypes.h>
 #endif
-#ifndef SAOFILE_H
-#include "SaoFile.h"
-#endif
-#ifndef SLASTARS_H
+#ifndef COSY_SlaStars
 #include "SlaStars.h"
 #endif
-
-#include "coord.h"
 
 typedef unsigned char byte;
Index: /trunk/MagicSoft/Cosy/gui/MGAccuracy.cc
===================================================================
--- /trunk/MagicSoft/Cosy/gui/MGAccuracy.cc	(revision 8846)
+++ /trunk/MagicSoft/Cosy/gui/MGAccuracy.cc	(revision 8847)
@@ -11,7 +11,7 @@
 #include <TCanvas.h>
 
-#include "coord.h"
 #include "MTime.h"
 #include "MAstro.h"
+#include "MPointing.h"
 
 ClassImp(MGAccuracy);
Index: /trunk/MagicSoft/Cosy/gui/MGCoordinates.cc
===================================================================
--- /trunk/MagicSoft/Cosy/gui/MGCoordinates.cc	(revision 8846)
+++ /trunk/MagicSoft/Cosy/gui/MGCoordinates.cc	(revision 8847)
@@ -10,5 +10,4 @@
 
 #include "MGCoordinate.h"
-#include "coord.h"
 
 ClassImp(MGCoordinates);
Index: /trunk/MagicSoft/Cosy/gui/MGCosy.cc
===================================================================
--- /trunk/MagicSoft/Cosy/gui/MGCosy.cc	(revision 8846)
+++ /trunk/MagicSoft/Cosy/gui/MGCosy.cc	(revision 8847)
@@ -3,6 +3,4 @@
 #include <iomanip>
 #include <fstream>
-
-#include <TROOT.h>
 
 #include <TGTab.h>         // TGTab
@@ -36,9 +34,4 @@
 
 #include "SlaStars.h"
-/*
-#include "msgqueue.h"
-#include "coord.h"
-#include "slalib.h"
-*/
 
 #define DEBUG
Index: /trunk/MagicSoft/Cosy/gui/MGPngReader.cc
===================================================================
--- /trunk/MagicSoft/Cosy/gui/MGPngReader.cc	(revision 8846)
+++ /trunk/MagicSoft/Cosy/gui/MGPngReader.cc	(revision 8847)
@@ -6,4 +6,13 @@
 
 #include <TTimer.h>
+
+#include <TH1.h>
+#include <TH2.h>
+#include <TGraph.h>
+#include <TCanvas.h>
+
+#include <TFile.h>
+#include <TTree.h>
+#include <TBranch.h>
 
 #include <TGMenu.h>
@@ -17,6 +26,4 @@
 #include "MGDispCoordinates.h"
 
-#include "coord.h"
-
 #include "StarCatalog.h"
 
@@ -28,13 +35,4 @@
 
 #include "MStarList.h"
-
-#include <TH1.h>
-#include <TH2.h>
-#include <TGraph.h>
-#include <TCanvas.h>
-
-#include <TFile.h>
-#include <TTree.h>
-#include <TBranch.h>
 
 #include "Led.h"
Index: /trunk/MagicSoft/Cosy/gui/MGSkyPosition.cc
===================================================================
--- /trunk/MagicSoft/Cosy/gui/MGSkyPosition.cc	(revision 8846)
+++ /trunk/MagicSoft/Cosy/gui/MGSkyPosition.cc	(revision 8847)
@@ -15,5 +15,4 @@
 #include <TCanvas.h>
 
-#include "coord.h"
 #include "MAstro.h"
 #include "SlaStars.h"
Index: /trunk/MagicSoft/Cosy/gui/MGVelocity.cc
===================================================================
--- /trunk/MagicSoft/Cosy/gui/MGVelocity.cc	(revision 8846)
+++ /trunk/MagicSoft/Cosy/gui/MGVelocity.cc	(revision 8847)
@@ -18,6 +18,4 @@
 #include <TCanvas.h>
 
-#include "coord.h"
-
 ClassImp(MGVelocity);
 
Index: /trunk/MagicSoft/Cosy/main/MStargHistograms.cc
===================================================================
--- /trunk/MagicSoft/Cosy/main/MStargHistograms.cc	(revision 8846)
+++ /trunk/MagicSoft/Cosy/main/MStargHistograms.cc	(revision 8847)
@@ -13,4 +13,5 @@
 
 #include "MTime.h"
+#include "MPointing.h"
 
 #include "Led.h"
@@ -20,6 +21,4 @@
 #include "FilterLed.h"
 #include "MStarList.h"
-
-#include "coord.h"
 
 using namespace std;
Index: /trunk/MagicSoft/Cosy/main/MStargHistograms.h
===================================================================
--- /trunk/MagicSoft/Cosy/main/MStargHistograms.h	(revision 8846)
+++ /trunk/MagicSoft/Cosy/main/MStargHistograms.h	(revision 8847)
@@ -40,10 +40,4 @@
     MStargHistograms() : fFile(NULL)
     {
-  
-    }
-
-    ~MStargHistograms()
-    {
-    
     }
 
@@ -51,5 +45,5 @@
 	      Ring &center, /*ZdAz &centerzdaz,*/ ZdAz &star, Double_t bright,
 	      const ZdAz &pos, const MTime &t);
-    
+
     void OpenFile();
     void CloseFile();
Index: /trunk/MagicSoft/Cosy/main/MStarguider.cc
===================================================================
--- /trunk/MagicSoft/Cosy/main/MStarguider.cc	(revision 8846)
+++ /trunk/MagicSoft/Cosy/main/MStarguider.cc	(revision 8847)
@@ -39,6 +39,4 @@
 #include "MGImage.h"
 #include "MGCoordinates.h"
-
-#include "coord.h"
 
 #include "Camera.h"
Index: /trunk/MagicSoft/Cosy/main/MTracking.h
===================================================================
--- /trunk/MagicSoft/Cosy/main/MTracking.h	(revision 8846)
+++ /trunk/MagicSoft/Cosy/main/MTracking.h	(revision 8847)
@@ -1,6 +1,4 @@
 #ifndef COSY_MTracking
 #define COSY_MTracking
-
-#include "coord.h"
 
 #ifndef COSY_MSlewing
@@ -12,4 +10,5 @@
 #endif
 
+class RaDec;
 class SlaStars;
 
Index: /trunk/MagicSoft/Cosy/tcpip/MDriveCom.cc
===================================================================
--- /trunk/MagicSoft/Cosy/tcpip/MDriveCom.cc	(revision 8846)
+++ /trunk/MagicSoft/Cosy/tcpip/MDriveCom.cc	(revision 8847)
@@ -3,5 +3,4 @@
 #include <iostream>
 
-#include "coord.h"
 #include "MAstro.h"
 #include "MCosy.h"
Index: /trunk/MagicSoft/Cosy/tpoint/TPointIncl.h
===================================================================
--- /trunk/MagicSoft/Cosy/tpoint/TPointIncl.h	(revision 8846)
+++ /trunk/MagicSoft/Cosy/tpoint/TPointIncl.h	(revision 8847)
@@ -1,5 +1,3 @@
 #ifndef __CINT__
 
-#include "coord.h"
-
 #endif // __CINT__
Index: /trunk/MagicSoft/Cosy/videodev/Writer.cc
===================================================================
--- /trunk/MagicSoft/Cosy/videodev/Writer.cc	(revision 8846)
+++ /trunk/MagicSoft/Cosy/videodev/Writer.cc	(revision 8847)
@@ -4,7 +4,8 @@
 #include <fstream>  // ofstream
 
+#include <TVector2.h>
+
 #include <stdio.h>    // FILE
 #include <png.h>
-#include <coord.h>
 
 #include "MTime.h"
@@ -15,5 +16,5 @@
 
 void Writer::Png(const char *fname, const byte *buf,
-                 struct timeval *date, const XY xy)
+                 struct timeval *date, const TVector2 xy)
 {
     MTime t(*date);
@@ -139,5 +140,5 @@
 }
 
-void Writer::Ppm(const char *fname, const byte *img, struct timeval *date, const XY xy)
+void Writer::Ppm(const char *fname, const byte *img, struct timeval *date, const TVector2 xy)
 {
     TString name = fname;
Index: /trunk/MagicSoft/Cosy/videodev/Writer.h
===================================================================
--- /trunk/MagicSoft/Cosy/videodev/Writer.h	(revision 8846)
+++ /trunk/MagicSoft/Cosy/videodev/Writer.h	(revision 8847)
@@ -9,7 +9,5 @@
 #endif
 
-#ifndef COORD_H
-#include <coord.h>
-#endif
+class TVector2;
 
 typedef unsigned char byte;
@@ -22,6 +20,6 @@
     virtual ~Writer() { }
 
-    static void Ppm(const char *fname, const byte *img, struct timeval *date, const XY xy);
-    static void Png(const char *fname, const byte *buf, struct timeval *date, const XY xy);
+    static void Ppm(const char *fname, const byte *img, struct timeval *date, const TVector2 xy);
+    static void Png(const char *fname, const byte *buf, struct timeval *date, const TVector2 xy);
 
     ClassDef(Writer, 0)
