~ubuntu-branches/ubuntu/precise/stellarium/precise

« back to all changes in this revision

Viewing changes to src/core/StelObject.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Scott Howard
  • Date: 2010-02-15 20:48:39 UTC
  • mfrom: (1.1.9 upstream)
  • Revision ID: james.westby@ubuntu.com-20100215204839-u3qgbv60rho997yk
Tags: 0.10.3-0ubuntu1
* New upstream release.
  - fixes intel rendering bug (LP: #480553)

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
#include <QRegExp>
29
29
#include <QDebug>
30
30
 
31
 
void intrusive_ptr_add_ref(StelObject* p)
32
 
{
33
 
        p->retain();
34
 
}
35
 
 
36
 
void intrusive_ptr_release(StelObject* p)
37
 
{
38
 
        p->release();
39
 
}
40
31
 
41
32
Vec3d StelObject::getEquinoxEquatorialPos(const StelNavigator* nav) const
42
33
{
66
57
{
67
58
        QString res;
68
59
        const StelNavigator* nav = core->getNavigator();
69
 
        
 
60
 
70
61
        if (flags&RaDecJ2000)
71
62
        {
72
63
                double dec_j2000, ra_j2000;
73
64
                StelUtils::rectToSphe(&ra_j2000,&dec_j2000,getJ2000EquatorialPos(nav));
74
65
                res += q_("RA/DE (J2000): %1/%2").arg(StelUtils::radToHmsStr(ra_j2000,true), StelUtils::radToDmsStr(dec_j2000,true)) + "<br>";
75
66
        }
76
 
        
 
67
 
77
68
        if (flags&RaDecOfDate)
78
69
        {
79
70
                double dec_equ, ra_equ;
80
71
                StelUtils::rectToSphe(&ra_equ,&dec_equ,getEquinoxEquatorialPos(nav));
81
72
                res += q_("RA/DE (of date): %1/%2").arg(StelUtils::radToHmsStr(ra_equ), StelUtils::radToDmsStr(dec_equ)) + "<br>";
82
73
        }
83
 
        
 
74
 
84
75
        if (flags&HourAngle)
85
76
        {
86
77
                double dec_sideral, ra_sideral;
88
79
                ra_sideral = 2.*M_PI-ra_sideral;
89
80
                res += q_("Hour angle/DE: %1/%2").arg(StelUtils::radToHmsStr(ra_sideral), StelUtils::radToDmsStr(dec_sideral)) + "<br>";
90
81
        }
91
 
        
 
82
 
92
83
        if (flags&AltAzi)
93
84
        {
94
85
                // calculate alt az
96
87
                StelUtils::rectToSphe(&az,&alt,getAltAzPos(nav));
97
88
                az = 3.*M_PI - az;  // N is zero, E is 90 degrees
98
89
                if (az > M_PI*2)
99
 
                        az -= M_PI*2;    
 
90
                        az -= M_PI*2;
100
91
                res += q_("Az/Alt: %1/%2").arg(StelUtils::radToDmsStr(az), StelUtils::radToDmsStr(alt)) + "<br>";
101
92
        }
102
93
        return res;