7#include "schedulerjob.h"
10#include "artificialhorizoncomponent.h"
11#include "kstarsdata.h"
12#include "skymapcomposite.h"
15#include "schedulermodulestate.h"
16#include "schedulerutils.h"
19#include <knotification.h>
21#include <ekos_scheduler_debug.h>
23#define BAD_SCORE -1000
24#define MIN_ALTITUDE 15.0
28GeoLocation *SchedulerJob::storedGeo =
nullptr;
29KStarsDateTime *SchedulerJob::storedLocalTime =
nullptr;
30ArtificialHorizon *SchedulerJob::storedHorizon =
nullptr;
53 return QString(
"????");
62 case SCHEDSTAGE_SLEWING:
64 case SCHEDSTAGE_SLEW_COMPLETE:
65 return "SLEW_COMPLETE";
66 case SCHEDSTAGE_FOCUSING:
68 case SCHEDSTAGE_FOCUS_COMPLETE:
69 return "FOCUS_COMPLETE";
70 case SCHEDSTAGE_ALIGNING:
72 case SCHEDSTAGE_ALIGN_COMPLETE:
73 return "ALIGN_COMPLETE";
74 case SCHEDSTAGE_RESLEWING:
76 case SCHEDSTAGE_RESLEWING_COMPLETE:
77 return "RESLEWING_COMPLETE";
78 case SCHEDSTAGE_POSTALIGN_FOCUSING:
79 return "POSTALIGN_FOCUSING";
80 case SCHEDSTAGE_POSTALIGN_FOCUSING_COMPLETE:
81 return "POSTALIGN_FOCUSING_COMPLETE";
82 case SCHEDSTAGE_GUIDING:
84 case SCHEDSTAGE_GUIDING_COMPLETE:
85 return "GUIDING_COMPLETE";
86 case SCHEDSTAGE_CAPTURING:
88 case SCHEDSTAGE_COMPLETE:
91 return QString(
"????");
94QString SchedulerJob::jobStartupConditionString(
StartupCondition condition)
const
101 return QString(
"AT %1").arg(getStartAtTime().
toString(
"MM/dd hh:mm"));
103 return QString(
"????");
110 case FINISH_SEQUENCE:
117 return QString(
"AT %1").arg(getFinishAtTime().
toString(
"MM/dd hh:mm"));
119 return QString(
"????");
122SchedulerJob::SchedulerJob()
124 if (KStarsData::Instance() !=
nullptr)
129SchedulerJob::SchedulerJob(KSMoon *moonPtr)
134void SchedulerJob::setName(
const QString &value)
139void SchedulerJob::setGroup(
const QString &value)
146void SchedulerJob::setCompletedIterations(
int value)
148 completedIterations = value;
149 if (completionCondition == FINISH_REPEAT)
150 setRepeatsRemaining(getRepeatsRequired() - completedIterations);
153KStarsDateTime SchedulerJob::getLocalTime()
155 return Ekos::SchedulerModuleState::getLocalTime();
158ArtificialHorizon
const *SchedulerJob::getHorizon()
161 return storedHorizon;
162 if (KStarsData::Instance() ==
nullptr || KStarsData::Instance()->skyComposite() ==
nullptr
163 || KStarsData::Instance()->skyComposite()->artificialHorizon() ==
nullptr)
165 return &KStarsData::Instance()->
skyComposite()->artificialHorizon()->getHorizon();
170 startupCondition = value;
173 if (value == START_ASAP)
174 startupTime = QDateTime();
177 setEstimatedTime(estimatedTime);
180 SchedulerModuleState::calculateDawnDusk(startupTime, nextDawn, nextDusk);
183void SchedulerJob::setStartupTime(
const QDateTime &value,
bool refreshDawnDusk)
189 startupCondition = START_AT;
191 startupCondition = fileStartupCondition;
194 altitudeAtStartup = SchedulerUtils::findAltitude(getTargetCoords(), startupTime, &settingAtStartup);
197 setEstimatedTime(estimatedTime);
200 for (
auto follower : followerJobs())
201 follower->setStartupTime(value,
false);
205 SchedulerModuleState::calculateDawnDusk(startupTime, nextDawn, nextDusk);
208void SchedulerJob::setSequenceFile(
const QUrl &value)
210 sequenceFile = value;
213void SchedulerJob::setFITSFile(
const QUrl &value)
218void SchedulerJob::setMinAltitude(
const double &value)
223bool SchedulerJob::hasAltitudeConstraint()
const
225 return hasMinAltitude() ||
226 (getEnforceArtificialHorizon() && (getHorizon() !=
nullptr) && getHorizon()->altitudeConstraintsExist()) ||
227 (Options::enableAltitudeLimits() &&
228 (Options::minimumAltLimit() > 0 ||
229 Options::maximumAltLimit() < 90));
232void SchedulerJob::setMinMoonSeparation(
const double &value)
234 minMoonSeparation = value;
237void SchedulerJob::setMaxMoonAltitude(
const double &value)
239 maxMoonAltitude = value;
242void SchedulerJob::setEnforceWeather(
bool value)
244 enforceWeather = value;
247void SchedulerJob::setStopTime(
const QDateTime &value)
254 altitudeAtStop = SchedulerUtils::findAltitude(getTargetCoords(), stopTime, &settingAtStop);
257 for (
auto follower : followerJobs())
260 if (follower->getStartupTime().isValid() && value.
isValid()
261 && (follower->getEstimatedTime() < 0 || follower->getEstimatedTime() > getEstimatedTime()))
262 follower->setEstimatedTime(getEstimatedTime());
267void SchedulerJob::setFinishAtTime(
const QDateTime &value)
269 setStopTime(QDateTime());
274 setCompletionCondition(FINISH_AT);
275 finishAtTime = value;
276 setEstimatedTime(-1);
279 else if (FINISH_LOOP == completionCondition)
281 finishAtTime = QDateTime();
282 setEstimatedTime(-1);
285 else if (startupTime.isValid())
287 finishAtTime = startupTime.addSecs(estimatedTime);
290 else setEstimatedTime(estimatedTime);
294 Q_ASSERT_X(finishAtTime.isValid() ?
295 (FINISH_AT == completionCondition || FINISH_REPEAT == completionCondition || FINISH_SEQUENCE == completionCondition) :
296 FINISH_LOOP == completionCondition,
297 __FUNCTION__,
"Valid completion time implies job is FINISH_AT/REPEAT/SEQUENCE, else job is FINISH_LOOP.");
302 completionCondition = value;
305 switch (completionCondition)
308 setFinishAtTime(QDateTime());
311 if (0 < getRepeatsRequired())
312 setRepeatsRequired(0);
315 case FINISH_SEQUENCE:
316 if (1 != getRepeatsRequired())
317 setRepeatsRequired(1);
321 if (0 == getRepeatsRequired())
322 setRepeatsRequired(1);
330void SchedulerJob::setStepPipeline(
const StepPipeline &value)
332 stepPipeline = value;
338 stateTime = getLocalTime();
344 lastErrorTime = getLocalTime();
350 setStartupCondition(fileStartupCondition);
351 setStartupTime(startAtTime);
352 setEstimatedTime(-1);
356 lastAbortTime = getLocalTime();
357 setStartupCondition(fileStartupCondition);
366 setFollowerState(value, force);
371 for (
auto follower : followerJobs())
382 follower->setState(value);
386 follower->setState(follower->getCompletionCondition() == FINISH_LOOP
392 follower->setState(value);
398void SchedulerJob::updateSharedFollowerAttributes()
401 for (
auto follower : followerJobs())
403 follower->setStartupTime(getStartupTime(),
false);
404 follower->setStartAtTime(getStartAtTime());
405 follower->setFollowerState(getState(),
true);
410void SchedulerJob::setSequenceCount(
const int count)
412 sequenceCount = count;
415void SchedulerJob::setCompletedCount(
const int count)
417 completedCount = count;
428 fileStartupCondition = value;
431void SchedulerJob::setStartAtTime(
const QDateTime &value)
436void SchedulerJob::setEstimatedTime(
const int64_t &value)
447 if (START_ASAP != fileStartupCondition && FINISH_AT == completionCondition)
449 estimatedTime = startupTime.secsTo(finishAtTime);
452 else if (FINISH_AT != completionCondition && FINISH_LOOP != completionCondition)
454 estimatedTime = value;
457 else estimatedTime = value;
460void SchedulerJob::setInSequenceFocus(
bool value)
462 inSequenceFocus = value;
465void SchedulerJob::setEnforceTwilight(
bool value)
467 enforceTwilight = value;
468 SchedulerModuleState::calculateDawnDusk(startupTime, nextDawn, nextDusk);
471void SchedulerJob::setEnforceArtificialHorizon(
bool value)
473 enforceArtificialHorizon = value;
476void SchedulerJob::setLightFramesRequired(
bool value)
478 lightFramesRequired = value;
481void SchedulerJob::setCalibrationMountPark(
bool value)
483 m_CalibrationMountPark = value;
486void SchedulerJob::setRepeatsRequired(
const uint16_t &value)
488 repeatsRequired = value;
491 if (1 < repeatsRequired)
493 if (FINISH_REPEAT != completionCondition)
494 setCompletionCondition(FINISH_REPEAT);
496 else if (0 < repeatsRequired)
498 if (FINISH_SEQUENCE != completionCondition)
499 setCompletionCondition(FINISH_SEQUENCE);
503 if (FINISH_LOOP != completionCondition)
504 setCompletionCondition(FINISH_LOOP);
508void SchedulerJob::setRepeatsRemaining(
const uint16_t &value)
510 repeatsRemaining = value;
515 capturedFramesMap = value;
518void SchedulerJob::setTargetCoords(
const dms &ra,
const dms &dec,
double djd)
520 targetCoords.setRA0(ra);
521 targetCoords.setDec0(dec);
523 targetCoords.apparentCoord(
static_cast<long double>(J2000), djd);
526void SchedulerJob::setPositionAngle(
double value)
528 m_PositionAngle = value;
531void SchedulerJob::reset()
534 stage = SCHEDSTAGE_IDLE;
535 stateTime = getLocalTime();
536 lastAbortTime = QDateTime();
537 lastErrorTime = QDateTime();
539 startupCondition = fileStartupCondition;
540 startupTime = fileStartupCondition == START_AT ? startAtTime : QDateTime();
543 SchedulerModuleState::calculateDawnDusk(startupTime, nextDawn, nextDusk);
545 stopTime = QDateTime();
549 repeatsRemaining = repeatsRequired;
550 completedIterations = 0;
556bool SchedulerJob::decreasingAltitudeOrder(SchedulerJob
const *job1, SchedulerJob
const *job2, QDateTime
const &when)
558 bool A_is_setting = job1->settingAtStartup;
559 double const altA = when.
isValid() ?
560 SchedulerUtils::findAltitude(job1->getTargetCoords(), when, &A_is_setting) :
561 job1->altitudeAtStartup;
563 bool B_is_setting = job2->settingAtStartup;
564 double const altB = when.
isValid() ?
565 SchedulerUtils::findAltitude(job2->getTargetCoords(), when, &B_is_setting) :
566 job2->altitudeAtStartup;
569 if (A_is_setting && !B_is_setting)
571 else if (!A_is_setting && B_is_setting)
575 return (A_is_setting && B_is_setting) ? altA < altB : altB < altA;
578bool SchedulerJob::satisfiesAltitudeConstraint(
double azimuth,
double altitude, QString *altitudeReason)
const
580 if (m_LeadJob !=
nullptr)
581 return m_LeadJob->satisfiesAltitudeConstraint(azimuth, altitude, altitudeReason);
584 if (Options::enableAltitudeLimits() &&
585 (altitude < Options::minimumAltLimit() ||
586 altitude > Options::maximumAltLimit()))
588 if (altitudeReason !=
nullptr)
590 if (altitude < Options::minimumAltLimit())
591 *altitudeReason = QString(
"altitude %1 < mount altitude limit %2")
592 .
arg(altitude, 0,
'f', 1).
arg(Options::minimumAltLimit(), 0,
'f', 1);
594 *altitudeReason = QString(
"altitude %1 > mount altitude limit %2")
595 .
arg(altitude, 0,
'f', 1).
arg(Options::maximumAltLimit(), 0,
'f', 1);
600 if (altitude < getMinAltitude())
602 if (altitudeReason !=
nullptr)
603 *altitudeReason = QString(
"altitude %1 < minAltitude %2").
arg(altitude, 0,
'f', 1).
arg(getMinAltitude(), 0,
'f', 1);
607 if (getHorizon() !=
nullptr && enforceArtificialHorizon)
608 return getHorizon()->isAltitudeOK(azimuth, altitude, altitudeReason);
613bool SchedulerJob::moonConstraintsOK(QDateTime
const &when, QString *reason)
const
615 if (moon ==
nullptr)
return true;
618 KStarsDateTime ltWhen(when.
isValid() ?
619 Qt::UTC == when.
timeSpec() ? SchedulerModuleState::getGeo()->UTtoLT(KStarsDateTime(when)) : when :
623 SkyPoint
const target = getTargetCoords();
629 KSNumbers numbers(ltWhen.djd());
632 CachingDms LST = SchedulerModuleState::getGeo()->GSTtoLST(SchedulerModuleState::getGeo()->LTtoUT(ltWhen).gst());
633 moon->updateCoords(&numbers,
true, SchedulerModuleState::getGeo()->lat(), &LST,
true);
634 moon->EquatorialToHorizontal(&LST, SchedulerModuleState::getGeo()->lat());
636 bool const separationOK = (getMinMoonSeparation() < 0 || (moon->angularDistanceTo(&o).Degrees() >= getMinMoonSeparation()));
637 bool const altitudeOK = (getMaxMoonAltitude() >= 90 || (moon->alt().Degrees() <= getMaxMoonAltitude()));
638 bool result = separationOK && altitudeOK;
641 if (reason !=
nullptr && !result)
643 if (!separationOK && !altitudeOK)
644 *reason = QString(
"moon separation and altitude");
645 else if (!separationOK)
646 *reason = QString(
"moon separation");
647 else if (!altitudeOK)
648 *reason = QString(
"moon altitude");
654QDateTime SchedulerJob::calculateNextTime(QDateTime
const &when,
bool checkIfConstraintsAreMet,
int increment,
655 QString *reason,
bool runningJob,
const QDateTime &until)
const
660 KStarsDateTime ltWhen(when.
isValid() ?
661 Qt::UTC == when.
timeSpec() ? SchedulerModuleState::getGeo()->UTtoLT(KStarsDateTime(when)) : when :
665 SkyPoint
const target = getTargetCoords();
671 KStarsDateTime
const ut = SchedulerModuleState::getGeo()->LTtoUT(ltWhen);
673 auto maxMinute = 1e8;
674 if (!runningJob && until.
isValid())
675 maxMinute = when.
secsTo(until) / 60;
677 if (maxMinute > 24 * 60)
681 for (
unsigned int minute = 0; minute < maxMinute; minute += increment)
683 KStarsDateTime
const ltOffset(ltWhen.addSecs(minute * 60));
686 QDateTime nextSuccess;
687 if (getEnforceTwilight() && !runsDuringAstronomicalNightTime(ltOffset, &nextSuccess))
689 if (checkIfConstraintsAreMet)
694 const int minutesToSuccess = ltOffset.secsTo(nextSuccess) / 60 - increment;
695 if (minutesToSuccess > 0)
696 minute += minutesToSuccess;
702 if (reason) *reason =
"twilight";
708 KSNumbers numbers(ltOffset.djd());
712 CachingDms
const LST = SchedulerModuleState::getGeo()->GSTtoLST(SchedulerModuleState::getGeo()->LTtoUT(ltOffset).gst());
717 bool const altitudeOK = satisfiesAltitudeConstraint(azimuth, altitude, reason);
723 if (!moonConstraintsOK(ltOffset, checkIfConstraintsAreMet ?
nullptr : reason))
725 if (checkIfConstraintsAreMet)
731 if (checkIfConstraintsAreMet)
734 else if (!checkIfConstraintsAreMet)
741bool SchedulerJob::runsDuringAstronomicalNightTime(
const QDateTime &time,
742 QDateTime *nextPossibleSuccess)
const
744 if (m_LeadJob !=
nullptr)
745 return m_LeadJob->runsDuringAstronomicalNightTime(time, nextPossibleSuccess);
752 static QDateTime previousMinDawnDusk, previousTime;
753 static GeoLocation
const *previousGeo =
nullptr;
754 static bool previousAnswer;
755 static double previousPreDawnTime = 0;
756 static QDateTime nextSuccess;
759 static std::mutex nightTimeMutex;
760 const std::lock_guard<std::mutex> lock(nightTimeMutex);
764 time >= previousTime && time < previousMinDawnDusk &&
765 SchedulerModuleState::getGeo() == previousGeo &&
766 Options::preDawnTime() == previousPreDawnTime)
768 if (!previousAnswer && nextPossibleSuccess !=
nullptr)
769 *nextPossibleSuccess = nextSuccess;
770 return previousAnswer;
774 previousAnswer = runsDuringAstronomicalNightTimeInternal(time, &previousMinDawnDusk, &nextSuccess);
776 previousGeo = SchedulerModuleState::getGeo();
777 previousPreDawnTime = Options::preDawnTime();
778 if (!previousAnswer && nextPossibleSuccess !=
nullptr)
779 *nextPossibleSuccess = nextSuccess;
780 return previousAnswer;
785bool SchedulerJob::runsDuringAstronomicalNightTimeInternal(
const QDateTime &time, QDateTime *minDawnDusk,
786 QDateTime *nextPossibleSuccess)
const
788 if (m_LeadJob !=
nullptr)
789 return m_LeadJob->runsDuringAstronomicalNightTimeInternal(time, minDawnDusk, nextPossibleSuccess);
792 QDateTime nDawn = nextDawn, nDusk = nextDusk;
796 SchedulerModuleState::calculateDawnDusk(time, nDawn, nDusk);
805 QDateTime
const earlyDawn = nDawn.
addSecs(-60.0 * abs(Options::preDawnTime()));
807 *minDawnDusk = earlyDawn < nDusk ? earlyDawn : nDusk;
811 bool result = nDawn < nDusk && t <= earlyDawn;
814 if (nextPossibleSuccess !=
nullptr)
816 if (result) *nextPossibleSuccess = QDateTime();
817 else *nextPossibleSuccess = nDusk;
823void SchedulerJob::setInitialFilter(
const QString &value)
825 m_InitialFilter = value;
828const QString &SchedulerJob::getInitialFilter()
const
830 return m_InitialFilter;
833bool SchedulerJob::StartTimeCache::check(
const QDateTime &from,
const QDateTime &until,
834 QDateTime *result, QDateTime *newFrom)
const
839 foreach (
const StartTimeComputation &computation, startComputations)
841 if (from >= computation.from &&
842 (!computation.until.isValid() || from < computation.until) &&
843 (!computation.result.isValid() || from < computation.result))
845 if (computation.result.isValid() || until <= computation.until)
848 *result = computation.result;
849 *newFrom = QDateTime();
855 *result = QDateTime();
856 *newFrom = computation.until;
864void SchedulerJob::StartTimeCache::clear()
const
866 startComputations.
clear();
869void SchedulerJob::StartTimeCache::add(
const QDateTime &from,
const QDateTime &until,
const QDateTime &result)
const
872 if (startComputations.size() > 10)
873 startComputations.clear();
878 endTime = from.
addSecs(24 * 3600);
881 QDateTime oneDay = from.
addSecs(24 * 3600);
888 StartTimeComputation c;
892 startComputations.push_back(c);
896QDateTime SchedulerJob::getNextPossibleStartTime(
const QDateTime &when,
int increment,
bool runningJob,
897 const QDateTime &until)
const
900 when.
isValid() ? (
Qt::UTC == when.
timeSpec() ? SchedulerModuleState::getGeo()->UTtoLT(KStarsDateTime(when)) : when)
906 if (!runningJob && START_AT == getFileStartupCondition())
908 int secondsFromNow = ltWhen.secsTo(getStartAtTime());
909 if (secondsFromNow < -500)
912 ltWhen = secondsFromNow > 0 ? getStartAtTime() : ltWhen;
916 if (getCompletionCondition() == FINISH_AT)
918 const QDateTime &t = getFinishAtTime();
924 return calculateNextTime(ltWhen,
true, increment,
nullptr, runningJob, until);
927 QDateTime result, newFrom;
928 if (startTimeCache.check(ltWhen, until, &result, &newFrom))
935 result = calculateNextTime(ltWhen,
true, increment,
nullptr, runningJob, until);
937 startTimeCache.add(ltWhen, until, result);
943QDateTime SchedulerJob::getNextEndTime(
const QDateTime &start,
int increment, QString *reason,
const QDateTime &until)
const
946 start.
isValid() ? (
Qt::UTC == start.
timeSpec() ? SchedulerModuleState::getGeo()->UTtoLT(KStarsDateTime(start)) : start)
952 if (START_AT == getFileStartupCondition())
954 if (getStartAtTime().secsTo(ltStart) < -120)
958 if (reason) *reason =
"before start-at time";
965 if (getCompletionCondition() == FINISH_AT)
967 const QDateTime &t = getFinishAtTime();
968 if (t.
isValid() && t < ltStart)
970 if (reason) *reason =
"end-at time";
973 auto result = calculateNextTime(ltStart,
false, increment, reason,
false, until);
974 if (!result.
isValid() || result.
secsTo(getFinishAtTime()) < 0)
976 if (reason) *reason =
"end-at time";
977 return getFinishAtTime();
982 return calculateNextTime(ltStart,
false, increment, reason,
false, until);
988QString progressLineLabel(CCDFrameType frameType,
const QMap<SequenceJob::PropertyID, QVariant> &properties,
991 QString jobTargetName =
properties[SequenceJob::SJ_TargetName].toString();
992 auto exposure =
properties[SequenceJob::SJ_Exposure].toDouble();
995 int precisionRequired = 0;
996 double fraction = exposure - fabs(exposure);
997 if (fraction > .0001)
999 precisionRequired = 1;
1000 fraction = fraction * 10;
1001 fraction = fraction - fabs(fraction);
1002 if (fraction > .0001)
1004 precisionRequired = 2;
1005 fraction = fraction * 10;
1006 fraction = fraction - fabs(fraction);
1007 if (fraction > .0001)
1008 precisionRequired = 3;
1011 if (precisionRequired == 0)
1012 label += QString(
"%1s").
arg(
static_cast<int>(exposure));
1014 label += QString(
"%1s").
arg(exposure, 0,
'f', precisionRequired);
1016 if (
properties.contains(SequenceJob::SJ_Filter))
1018 auto filterType =
properties[SequenceJob::SJ_Filter].toString();
1020 label += filterType;
1028 else if (frameType != FRAME_LIGHT)
1031 label += (char)frameType;
1037QString progressLine(
const SchedulerJob::JobProgress &progress)
1039 QString
label = progressLineLabel(progress.type, progress.properties, progress.isDarkFlat).
append(
":");
1041 const double seconds = progress.numCompleted * progress.properties[SequenceJob::SJ_Exposure].
toDouble();
1045 else if (seconds < 60)
1046 timeStr = QString(
"%1 %2").
arg(
static_cast<int>(seconds)).
arg(
i18n(
"seconds"));
1047 else if (seconds < 60 * 60)
1048 timeStr = QString(
"%1 %2").
arg(seconds / 60.0, 0,
'f', 1).
arg(
i18n(
"minutes"));
1050 timeStr = QString(
"%1 %3").
arg(seconds / 3600.0, 0,
'f', 1).
arg(
i18n(
"hours"));
1054 return QString(
"%1\t%2 %3 %4")
1055 .
arg(label, -12,
' ')
1056 .
arg(progress.numCompleted, 4)
1062const QString SchedulerJob::getProgressSummary()
const
1065 for (
const auto &p : m_Progress)
1067 summary.
append(progressLine(p));
1073QJsonObject SchedulerJob::toJson()
const
1075 bool is_setting =
false;
1076 double const alt = SchedulerUtils::findAltitude(getTargetCoords(), QDateTime(), &is_setting);
1081 {
"pa", m_PositionAngle},
1082 {
"targetRA", getTargetCoords().ra0().Hours()},
1083 {
"targetDEC", getTargetCoords().dec0().Degrees()},
1086 {
"sequenceCount", sequenceCount},
1087 {
"completedCount", completedCount},
1088 {
"minAltitude", minAltitude},
1089 {
"minMoonSeparation", minMoonSeparation},
1090 {
"maxMoonAltitude", maxMoonAltitude},
1091 {
"repeatsRequired", repeatsRequired},
1092 {
"repeatsRemaining", repeatsRemaining},
1093 {
"inSequenceFocus", inSequenceFocus},
1094 {
"startupTime", startupTime.isValid() ? startupTime.toString() :
"--"},
1095 {
"completionTime", finishAtTime.isValid() ? finishAtTime.toString() :
"--"},
1097 {
"altitudeFormatted", m_AltitudeFormatted},
1098 {
"startupFormatted", m_StartupFormatted},
1099 {
"endFormatted", m_EndFormatted},
1100 {
"sequence", sequenceFile.toString() },
static KNotification * event(const QString &eventId, const QString &text=QString(), const QPixmap &pixmap=QPixmap(), const NotificationFlags &flags=CloseOnTimeout, const QString &componentName=QString())
SkyMapComposite * skyComposite()
SkyObject * findByName(const QString &name, bool exact=true) override
Search the children of this SkyMapComposite for a SkyObject whose name matches the argument.
const CachingDms & ra0() const
virtual void updateCoordsNow(const KSNumbers *num)
updateCoordsNow Shortcut for updateCoords( const KSNumbers *num, false, nullptr, nullptr,...
void EquatorialToHorizontal(const CachingDms *LST, const CachingDms *lat)
Determine the (Altitude, Azimuth) coordinates of the SkyPoint from its (RA, Dec) coordinates,...
void setRA0(dms r)
Sets RA0, the catalog Right Ascension.
const CachingDms & dec0() const
void setDec0(dms d)
Sets Dec0, the catalog Declination.
const double & Degrees() const
QString i18n(const char *text, const TYPE &arg...)
char * toString(const EngineQuery &query)
Ekos is an advanced Astrophotography tool for Linux.
SchedulerJobStage
Running stages of a SchedulerJob.
StartupCondition
Conditions under which a SchedulerJob may start.
SchedulerJobStatus
States of a SchedulerJob.
@ SCHEDJOB_ABORTED
Job encountered a transitory issue while processing, and will be rescheduled.
@ SCHEDJOB_INVALID
Job has an incorrect configuration, and cannot proceed.
@ SCHEDJOB_ERROR
Job encountered a fatal issue while processing, and must be reset manually.
@ SCHEDJOB_COMPLETE
Job finished all required captures.
@ SCHEDJOB_EVALUATION
Job is being evaluated.
@ SCHEDJOB_SCHEDULED
Job was evaluated, and has a schedule.
@ SCHEDJOB_BUSY
Job is being processed.
@ SCHEDJOB_IDLE
Job was just created, and is not evaluated yet.
QMap< QString, uint16_t > CapturedFramesMap
mapping signature --> frames count
CompletionCondition
Conditions under which a SchedulerJob may complete.
QString label(StandardShortcut id)
QDateTime addSecs(qint64 s) const const
bool isValid() const const
qint64 secsTo(const QDateTime &other) const const
void setTimeZone(const QTimeZone &toZone)
Qt::TimeSpec timeSpec() const const
QString & append(QChar ch)
QString arg(Args &&... args) const const
qsizetype size() const const
double toDouble(bool *ok) const const