~petr-kubanek/stellarium/stellarium

« back to all changes in this revision

Viewing changes to src/core/modules/Comet.cpp

  • Committer: Georg Zotti
  • Date: 2017-06-04 22:02:27 UTC
  • mfrom: (9439.1.13 split_ssystem)
  • Revision ID: georg.zotti@univie.ac.at-20170604220227-s27sv4f56228nix9
Merge split_ssystem. From now on we have separate ssystem_major.ini and ssystem_minor.ini. Only the latter shall be editable for the users. The SS editor still lists Pluto for deletion, but does not delete it. SS editor allows deletion of several objects at once, or loading of SS objects in ini format (e.g. ssystem_1000comets.ini).

Show diffs side-by-side

added added

removed removed

Lines of Context:
61
61
             const QString& atexMapName,
62
62
             const QString& aobjModelName,
63
63
             posFuncType coordFunc,
64
 
             void* auserDataPtr,
 
64
             void* orbitPtr,
65
65
             OsculatingFunctType *osculatingFunc,
66
66
             bool acloseOrbit,
67
67
             bool hidden,
79
79
                  "", // no normalmap.
80
80
                  aobjModelName,
81
81
                  coordFunc,
82
 
                  auserDataPtr,
 
82
                  orbitPtr,
83
83
                  osculatingFunc,
84
84
                  acloseOrbit,
85
85
                  hidden,
239
239
                // GZ: Add speed. I don't know where else to place that bit of information.
240
240
                // xgettext:no-c-format
241
241
                oss << QString(q_("Speed: %1 km/s"))
242
 
                           .arg(((CometOrbit*)userDataPtr)->getVelocity().length()*AU/86400.0, 0, 'f', 3);
 
242
                           .arg(((CometOrbit*)orbitPtr)->getVelocity().length()*AU/86400.0, 0, 'f', 3);
243
243
                oss << "<br>";
244
244
 
245
245
                const Vec3d& observerHelioPos = core->getObserverHeliocentricEclipticPos();
339
339
        double dateJDE=core->getJDE();
340
340
 
341
341
        // The CometOrbit is in fact available in userDataPtr!
342
 
        CometOrbit* orbit=(CometOrbit*)userDataPtr;
 
342
        CometOrbit* orbit=(CometOrbit*)orbitPtr;
343
343
        Q_ASSERT(orbit);
344
344
        if (!orbit->objectDateValid(dateJDE)) return; // don't do anything if out of useful date range. This allows having hundreds of comet elements.
345
345
 
352
352
                lastJDEtail=dateJDE;
353
353
 
354
354
                // The CometOrbit is in fact available in userDataPtr!
355
 
                CometOrbit* orbit=(CometOrbit*)userDataPtr;
 
355
                CometOrbit* orbit=(CometOrbit*)orbitPtr;
356
356
                Q_ASSERT(orbit);
357
357
                if (!orbit->objectDateValid(dateJDE)) return; // out of useful date range. This should allow having hundreds of comet elements.
358
358
 
505
505
                return;
506
506
        }
507
507
        // The CometOrbit is in fact available in userDataPtr!
508
 
        CometOrbit* orbit=(CometOrbit*)userDataPtr;
 
508
        CometOrbit* orbit=(CometOrbit*)orbitPtr;
509
509
        Q_ASSERT(orbit);
510
510
        if (!orbit->objectDateValid(core->getJDE())) return; // don't draw at all if out of useful date range. This allows having hundreds of comet elements.
511
511