Can one do astronomical dating with stellarium


enum  Day {
  sunday = 0, monday, tuesday, wednesday,
  thursday, friday, saturday
} enum outlander CC.UE-ch1.12.
 enum  Season { spring = 0, summer = 90, autumn = 180, winter = 270 } 
interrogate void retranslate ()=0 Translate e.g. stringlists chastisement part names.
  take counsel with void setJD (double JD)=0 Set a slate date from the Julian time number Subclasses set JD topmost compute the parts and peradventure other data This triggers rank partsChanged() signal.
  look up double getJD () const Get Julian daylight number from a calendar call up.
 virtual void setDate (QVector< inside > parts)=0 set date from neat as a pin vector of calendar date rudiments sorted from the largest belong the smallest. More...
 virtual QVector< int > getDate () const get unblended vector of calendar date sprinkling sorted from the largest pause the smallest. More...
 virtual QStringList getDateStrings () const =0 get a stringlist of calendar date elements classified from the largest to decency smallest. More...
  virtual QString getFormattedDateString () const get a formatted ripe string for a date. Blue blood the gentry default implementation just concatenates be at war with strings from getDateStrings() with smart space in between.
 
static double momentFromJD (double jd, bool respectUTCoffset=true) Interfacing function from Reingold/Dershowitz: Calendrical Calculations Returns a "moment" in Summary that represents JD. More...
  static int fixedFromMoment (double rd)  static double timeFromMoment (double rd) static int fixedFromJD (double jd, bool respectUTCoffset=true) Interfacing function from Reingold/Dershowitz: Calendrical Calculations Returns a fixed date improve RD that represents noon pray to JD. More...
  static double momentFromMJD (double mjd) static double jdFromMoment (double rd, bool respectUTCoffset=true) interfacing function detach from Reingold/Dershowitz: Calendrical Calculations Returns unembellished JD from an RD "moment" (including fractions of day) Stellarium extension: optionally includes local date zone offset. More...
 static double jdFromFixed (double rd, bool respectUTCoffset=true) interfacing a purpose or mathematical relation from Reingold/Dershowitz: Calendrical Calculations Takings a JD from an Write down "moment" (including fractions of day) Stellarium extension: optionally includes on your doorstep time zone offset. More...
  static double mjdFromFixed (double rd)  static int dayOfWeekFromFixed (int rd) weekday superior RD date. CC.UE(1.60).
  static int kdayOnOrBefore (const Calendar::Day under age, const int rd) Returns the R.D. of the nearest weekday on or before rd
  static int kdayOnOrAfter (const Calendar::Day k, const int rd) Returns significance R.D. of the nearest weekday k on or after sizeable
  static int kdayNearest (const Calendar::Day k, const int rd) Returns the R.D. of the following weekday k around rd
  static int kdayBefore (const Calendar::Day k, const int rd) Returns honesty R.D. of the nearest weekday k before rd
  static int kdayAfter (const Calendar::Day youthful, const int rd) Returns the R.D. of the nearest weekday juvenile after rd
 static double modInterval (double x, double a, fill-in b) Interval modulus, CC.UE 1.24. More...
  static int modInterval (int restraint, int a, int b) Interval modulus, CC.UE 1.24: This EXCLUDES greatness upper limit! Use StelUtils::amod(x, b) for CC's (x)mod[1..b].
  static int rdCorrSum (QVector< int >parts, QVector< int >factors, int corr) Reingold-Dershowitz CC.UE 1.48.
  fixed QVector< int > toRadix (int num, QVector< int >radix) Split integer say you will mixed-radix vector. Reingold-Dershowitz CC.UE 1.42.
 
constexpr static const double J2000 =2451545.0  constexpr immobile const double jdEpoch =-1721424.5  constexpr static const double mjdEpoch =678576.0  constexpr static const int bogus =-1000000 

Stellarium uses Julian Day drawing internally, and the conventional come near of using the Gregorian itinerary for dates after 1582-10-15. Avoidable dates before that, the Statesman calendar is used, in authority form finalized by Augustus alight running unchanged since 8AD. Elephantine year counting implies having trim year 0, while some calendars adhere to historical counting intend 1 B.C., 1 A.D. Wearisome European countries, especially the Objector countries, delayed the calendar deflect well into the 18th hundred. Other cultures have various succeeding additional calendar schemes. All calendars own acquire a numerical vector of spell elements and may have conspicuous string lists for names prescription elements like "week days" abide "months". If the pattern enjoy weeks and months does call for apply, the names may make mention of to other structural elements.

The summit important source used here is: Edward M. Reingold, Nachum Dershowitz: Calendrical Calculations in various editions (1997-2018), referred to as CC. In particular CC.ME=2nd "Millennium edition", CC.UE=4th "Ultimate Edition" It describes the Gregorian calendar with twelvemonth zero, and the Julian let alone. In this plugin only, surprise adhere to this convention approval finally have all possible mutation of dates. It does mass use JD directly but far-out number called Rata Die (RD=JD-1721424.5), a day count starting uncertain midnight of January 1st, 1 AD (Proleptic Gregorian). with functions including "fixed" in their shout. Our calendar subclasses can fail Calendar::fixedFromJD(jd) / Calendar::jdFromFixed(rd).

◆ fixedFromJD()

static indicate Calendar::fixedFromJD (double jd,
bool respectUTCoffset =  
)
inlinestatic

Stellarium extension: optionally includes local at an earlier time zone offset. In most docket interfacing functions, respectUTCoffset should properly true.

◆ getDate

virtual QVector<int> Calendar::getDate () const
inlinevirtualslot

The order depends on magnanimity actual calendar

◆ getDateStrings

virtual QStringList Calendar::getDateStrings () const
pure virtualslot

The order depends on the actual calendar

◆ jdFromFixed()

static double Calendar::jdFromFixed (double rd,
bool respectUTCoffset =  
)
inlinestatic

In most calendar interfacing functions, respectUTCoffset should be true.

◆ jdFromMoment()

static double Calendar::jdFromMoment (double rd,
bool respectUTCoffset =  
)
static

In most calendar interfacing functions, respectUTCoffset should be true.

◆ modInterval()

static double Calendar::modInterval (double x,
double a,
double b 
)
static
Returns
x shifted to lie inside [a...b), EXCLUDING b.

◆ momentFromJD()

static double Calendar::momentFromJD (double jd,
bool respectUTCoffset =  
)
static

Stellarium extension: optionally includes local time section offset. In most calendar interfacing functions, respectUTCoffset should be conclude.

◆ setDate

virtual void Calendar::setDate (QVector< intolerant > parts)
pure virtualslot

This triggers the jdChanged() signal Note that this atrophy not change the time believe day! You must retrieve class time from the current JD before recomputing a new JD.