It is currently Sat, 18-11-17, 12:14 GMT

All times are UTC




Post new topic Reply to topic  [ 66 posts ]  Go to page Previous  1, 2, 3, 4, 5  Next
Author Message
PostPosted: Mon, 10-03-14, 5:17 GMT 
Offline
User avatar

Joined: Mon, 03-09-07, 23:01 GMT
Posts: 388
Location: Tuscany, Tyrrhenian Sea
INFO...

Nutation table is very big to substain the equinox of the date without to drop FPS... This time I've shutdown all the returning functions for distances outside the user settings' range. To stay on Earth or in its orbit will drop down about 35 of free system FPS due to its features displayed (ecliptic/equatorial/CIP/CIO[p]) and those of the objects which are referred to the precession quantities. Fly out instead resumes up to 20 FPS and drops down about 15 FPS of the free system FPS to hold the bar displayed (in the case).

_________________
Never at rest.


Top
 Profile  
 
PostPosted: Tue, 18-03-14, 5:59 GMT 
Offline
User avatar

Joined: Mon, 03-09-07, 23:01 GMT
Posts: 388
Location: Tuscany, Tyrrhenian Sea
Precession from equinox J2000.0 to equinox of the date. Modified for the IAU 2000A_R06 precession, P03 solution
For plugins/scripts which uses "celutil.lua" or its functions to get the J2000.0 equatorial/celestial coordinates.
Values returns in radiants.

Code:
-- local function to stay within 0/PI2 range
local rangeRad = function(x)
   local PI2 = 2.0 * math.pi;
   local b = x / PI2;
    local a = PI2 * (b - math.floor(b));
    if a < 0 then
      a = PI2 + a;
   end
    return a;
end

local Equatorial_Of_Date = function(obj)
   if not empty(obj) then
      local raJ2000, decJ2000 = celutil.get_ra_dec(obj);
         raJ2000, decJ2000 = math.rad(raJ2000), math.rad(decJ2000);
         
      -- reduction of positions from equinox J2000.0 to date
      -- modified for IAU 2000A_R06 precession, P03 solution
      local TDB = celestia:gettime();
      local T = (TDB - 2451545.0) / 36525; -- TDB century
      
      -- equatorial precession angles
      local zetaA = (2.650545
               + 2306.083227 * T
                    + 0.2988499 * T^2
                    + 0.01801828 * T^3
                    - 0.000005971 * T^4
                    - 0.0000003173 * T^5);
         zetaA = math.rad(zetaA / 3600.0);
         
      local zA = (-2.650545
             + 2306.077181 * T
                 + 1.0927348 * T^2
                 + 0.01826837 * T^3
                 - 0.000028596 * T^4
                 - 0.0000002904 * T^5);
         zA = math.rad(zA / 3600.0);
         
      local thetaA = (2004.191903 * T
                     - 0.4294934 * T^2
                     - 0.04182264 * T^3
                     - 0.000007089 * T^4
                     - 0.0000001274 * T^5);
         thetaA = math.rad(thetaA / 3600.0);
      
      -- equatorial R.A. of the date (Meeus, A.A. 21.4)
      local EqxA = math.cos(decJ2000) * math.sin(raJ2000 + zetaA);
      local EqxB = math.cos(thetaA) * math.cos(decJ2000) * math.cos(raJ2000 + zetaA) - math.sin(thetaA) * math.sin(decJ2000);
      local ra_zA = math.atan2(EqxA , EqxB);
      local raEqx = rangeRad(ra_zA + zA);
      
      -- equatorial Declination of the date (Meeus, A.A. 21.4)
      local decEqx = math.sin(thetaA) * math.cos(decJ2000) * math.cos(raJ2000 + zetaA) + math.cos(thetaA) * math.sin(decJ2000);
         decEqx = math.asin(decEqx);
      
      local ra, dec = raEqx, decEqx;
      
      return ra, dec;
   else
      return 0.0, 0.0;
   end
end

local Celestial_Of_Date = function(obj)
   if not empty(obj) then
      local ecliptic_longJ2000, ecliptic_latJ2000 = celutil.get_ecliptic_long_lat(obj);
         ecliptic_longJ2000, ecliptic_latJ2000 = math.rad(ecliptic_longJ2000), math.rad(ecliptic_latJ2000);
      
      -- reduction of positions from equinox J2000.0 to date
      -- modified for IAU 2000A_R06 precession, P03 solution
      local TDB = celestia:gettime();
      local T = (TDB - 2451545.0) / 36525; -- TDB century
      
      -- ecliptic precession angles
-- angle between the ecliptic J2000.0 and the ecliptic of the date (rho, in Meeus, A.A. 21.5)
      local piA = (46.998973 * T
              - 0.0334926 * T^2
              - 0.00012559 * T^3
              + 0.000000113 * T^4
              - 0.0000000022 * T^5);
         piA = math.rad(piA / 3600.0);
         
      local UpiA = (629546.7936
               - 867.95758 * T
               + 0.157992 * T^2
               - 0.0005371 * T^3
               - 0.00004797 * T^4
               + 0.000000072 * T^5);
         UpiA = math.rad(UpiA / 3600.0);
         
      local pA = (5028.796195 * T
                 + 1.1054348 * T^2
                 + 0.00007964 * T^3
                 - 0.000023857 * T^4
                 - 0.0000000383 * T^5);
            
      -- ecliptic longitude of the date (Meeus, A.A. 21.7)
      local EqxA = math.cos(piA) * math.cos(ecliptic_latJ2000) * math.sin(UpiA - ecliptic_longJ2000) - math.sin (piA) * math.sin(ecliptic_latJ2000);
      local EqxB = math.cos(ecliptic_latJ2000) * math.cos(UpiA - ecliptic_longJ2000);
      local long_pA_UpiA = math.atan2(EqxA , EqxB);
      local ecliptic_longEqx = rangeRad(math.abs(long_pA_UpiA - (pA + UpiA)));
      
      -- ecliptic latitude of the date (Meeus, A.A. 21.7)
      local ecliptic_latEqx = math.cos(pA) * math.sin(ecliptic_latJ2000) + math.sin(pA) * math.cos(ecliptic_latJ2000) * math.sin(UpiA - ecliptic_longJ2000);
         ecliptic_latEqx = math.asin(ecliptic_latEqx);

      local ecliptic_long, ecliptic_lat = ecliptic_longEqx, ecliptic_latEqx;
      
      return ecliptic_long, ecliptic_lat;
   else
      return 0.0, 0.0;
   end
end


An example about how to "inject" the precession into the returned "celutil.lua" J2000.0 equatorial/celestial coordinates
Values returns in radiants.
Code:
My_Code = function(obj)
   local mercury = celestia:find("Sol/Mercury")
   local mercury_ra_of_date, mercury_dec_of_date = Equatorial_Of_Date(mercury)
   local mercury_ecliptic_long_of_date, mercury_ecliptic_lat_of_date = Celestial_Of_Date(mercury)
   return mercury_ra_of_date, mercury_dec_of_date, mercury_ecliptic_long_of_date, mercury_ecliptic_lat_of_date
end


EDIT LATER: fix a comment

_________________
Never at rest.


Last edited by fenerit on Sat, 29-03-14, 11:30 GMT, edited 1 time in total.

Top
 Profile  
 
PostPosted: Sat, 22-03-14, 0:12 GMT 
Offline
User avatar

Joined: Mon, 03-09-07, 23:01 GMT
Posts: 388
Location: Tuscany, Tyrrhenian Sea
ADVANCEMENTS IN ADVANCE...

Year 4000 AD vernal equinox around Meeus timings (good)
Attachment:
equinox4000.png
equinox4000.png [ 212.82 KiB | Viewed 3752 times ]

Year 5000 AD (bad)
Attachment:
equinox5000.png
equinox5000.png [ 277.21 KiB | Viewed 3752 times ]


P.S.
Rotation angle and sidereal times uses system time and were independent from the rest of the simulation.

_________________
Never at rest.


Top
 Profile  
 
PostPosted: Mon, 31-03-14, 11:16 GMT 
Offline
User avatar

Joined: Mon, 03-09-07, 23:01 GMT
Posts: 388
Location: Tuscany, Tyrrhenian Sea
Ephemerides 3.2
Attachment:
ephem_3.2.png
ephem_3.2.png [ 104.84 KiB | Viewed 3718 times ]

FIXES:
- Fix a bug in decimal degrees mode;
- Fix bugs within FR and IT languages;
- Fix a bug with the defect of illumination;
- Fix the Equation of Time;

CHANGES:
- change (GST = ERA + EO) to (GST = ERA - EO) sequence accordingly with IERS table by flipping the polynomial part of EO; this latter is then re-inverted-in-sign in seat of display.
- the elongation of the objects now uses the position angle of the bright limb to display its orientation and no longer their synodic period;
- split the ephemerides of the moons/minormoons within another module ("ephemMoons.lua");
- split shared local functions within other modules ("ephemUtil.lua", "ephemArgs.lua")
- new modules for precession and GCRS (Geocentric Celestial Reference System) expressions;
- several optimizations and corrections;

ADD:
- precession for all the J2000.0 equatorial/celestial quantities except the constellations (see below);
- RA/Dec for the date;
- Celestial Intermediate Origin (CIO) features;
- Celestial Intermediate Pole (CIP);
- CIO/TIO (Terrestrial Intermediate Origin) locators;
- sidereal time(s);
- ecliptic pole;
- ecliptic on GCRS (Geocentric Celestial Reference System) equator;
- precession of the equator;
- nutation;
- equation of the equinoxes;
- eccentricity of the Earth's orbit;

REGRESSIONS:
- removed constellations IDs;
- removed the annual aberration;
- removed the defect of illumination for the Moon;

LIMITATIONS:
- CIP axis doesn't account for the FNC (Free Core Nutation), maybe in future;

FREEFORM NOTES:
This is the most stable and reliable version so far, at least up to year 4000 AD. All IAU J2000.0 quantity of the planets/moons' north pole position angle RA/DEC are precessed for the equinox of the date in real time. This fact does improve their accuracy.

There is an option within the "ephemCfg.lua" for the Earth rotation angle/Greenwich sidereal time:
1)
-
Code:
UT_ERA = true

set the systemtime for the Earth rotation angle and therefore for the Greenwich sidereal time. This condition makes these two quantities tied in with the computer's clock in real time; in this case the spacebar key (pause) or whatelse Celestia's timing will not stop their run. If this option is set, an exclamation mark will appear before the items.
2)
-
Code:
UT_ERA = false

in this case these two quantities will follows the Celestia's timing and the pause key will stop their run.

Both methods gives the same result; atomic-clock servers utilities can be used to eventually tuning up the computer's clock, with the sole difference that in the second condition (UT_ERA = false) once the computer's clock has been "atomically" set must be set also the Celestia's time to apply the change, even after a tiny pause or after a simulation (you know that, of course). Local sidereal time follows as consequence of the observer longitude in both the options (right togglin' Earth too).

- default shortcut ("CTRL-e") doesn't work on Celestia SVN (1.7 QT version) and the key must be substituted by number (e.a "CTRL-4")

- average frame drops: 15 fps; max drops at Earth with the Earth selected. Feedbacks about your fps' behavior are appreciated.

- this is the last version for which I manage the four languages; future versions or service packs, if any, will have the new features inserted in english; please, do translate those parts by yourself and feel free to post the translation, eventually. This avoid bad translations, bugs and stops in numerical developments due to parallel concerns when I change something in the main language (a computer has lot of memory, me not-a-lot).

Attachment:
ephemerides_3.2.zip [149.43 KiB]
Downloaded 115 times

_________________
Never at rest.


Top
 Profile  
 
PostPosted: Thu, 17-07-14, 10:39 GMT 
Offline

Joined: Thu, 17-07-14, 9:44 GMT
Posts: 2
Hello there,
as there seems to be no help section for this, I will post my question here.
I would really like to use the ephemerides plug in to be able to understand more of the earth's motion. However I am not able to get it to work at all.
Following the instructions is quite easy thanks a lot for that Fenerit and all the work you put into the plugin is much appreciated :-)
Somehow it just doesn't work for me, I am running windows 8.1 and the lua plugin I found under this link works fine. http://gvince.perso.sfr.fr/celestia/lua/
As this link is a bit old, is the problem maybe that there is a newer version or anything else I have to do?
I tried to set the ephemerisBox to true in the config.lua but that does no change.
Another problem might be that i for whatever reason can't select the english languague in celestia, but i think this is only the gui languague anyway.

Any ideas maybe?
Kind regards
sty


Top
 Profile  
 
PostPosted: Thu, 17-07-14, 12:23 GMT 
Offline
User avatar

Joined: Mon, 03-09-07, 23:01 GMT
Posts: 388
Location: Tuscany, Tyrrhenian Sea
HI!
startrucky wrote:
Somehow it just doesn't work for me, I am running windows 8.1 and the lua plugin I found under this link works fine. http://gvince.perso.sfr.fr/celestia/lua/

Premise: I do not have Win 8.1 for myself but on friends' PC they works in such OS. It works also on Linux OpenSuse 64bit 12.3, 13.1.

From the above I suppose you have installed the luaplugin2.zip file. If instead are installed the lua_edu_tools.x.zip the ephemerides will not works. Remember: the two LUA ambients are mutually exclusive, either the LUATOOLS or the LUAPLUGIN. Then, suppose you have correctly set the relevant hook within Celestia's "celestia.cfg" configuration file:
Code:
Configuration
{
LuaHook "luahookinit.lua" --<- string to add within "celestia.cfg"
...

and extracted the ephemerides zip (with their paths, not by "drag&drop") within the main Celestia's root, made the addition on "config.lua" file of the LUAPLUGINS like specified within the "readme_3.2.txt", the ephemerides should be ready to work.

Thus my questions are:
1) Is Celestia installed outside the "..Program files\.. " or such, that I heard is causing bad behaviour?
2) Is the key shortcut "CTRL+e" pressed at Celestia's prompt to display the ephemerides' bar? By default they are not loaded unless tapped.
3) is an eventual "..\extras\lua_edu_tools" folder renamed as "..\extras\_lua_edu_tools" in order to skip its search? (remember: they mutually exclusiveness must concern also here)

startrucky wrote:
I tried to set the ephemerisBox to true in the config.lua but that does no change.

This is unnecessary. To have the bar always displayed at Celestia's prompt you must set "display_ephemeris = true" within the "ephemCfg.lua".

startrucky wrote:
Another problem might be that i for whatever reason can't select the english languague in celestia, but i think this is only the gui languague anyway.

Right, it is independent.

Hope this help.

_________________
Never at rest.


Top
 Profile  
 
PostPosted: Thu, 17-07-14, 12:46 GMT 
Offline

Joined: Thu, 17-07-14, 9:44 GMT
Posts: 2
Thanks that solved my problem.
To be precise drag and drop is working and actually a lot easier for win 8.1, as the windows environment prevents you from adding stuff to programm folders the easy way.
Anyhow these two:
fenerit wrote:
2) Is the key shortcut "CTRL+e" pressed at Celestia's prompt to display the ephemerides' bar? By default they are not loaded unless tapped.

To have the bar always displayed at Celestia's prompt you must set "display_ephemeris = true" within the "ephemCfg.lua".

where the important informations, as even though I have read most of the former posts I did not catch that and it is actually not in the readme file.
Thanks a lot for the quick response.

Kind regards
sty


Top
 Profile  
 
PostPosted: Thu, 17-07-14, 19:25 GMT 
Offline
User avatar

Joined: Mon, 03-09-07, 23:01 GMT
Posts: 388
Location: Tuscany, Tyrrhenian Sea
Happy you've solved the issue. The readme.txt will be enhanced soon. ;)

_________________
Never at rest.


Top
 Profile  
 
PostPosted: Tue, 22-07-14, 1:27 GMT 
Offline
User avatar

Joined: Mon, 03-09-07, 23:01 GMT
Posts: 388
Location: Tuscany, Tyrrhenian Sea
Based upon:
Habitable Zones Around Main-Sequence Stars: New Estimates
Habitable Zone boundaries for b Vel. Liquid water sustainable around 300 au...
Attachment:
HZ_b_Vel.png
HZ_b_Vel.png [ 379.99 KiB | Viewed 3528 times ]

_________________
Never at rest.


Top
 Profile  
 
PostPosted: Tue, 22-07-14, 16:20 GMT 
Offline
User avatar

Joined: Mon, 03-09-07, 23:01 GMT
Posts: 388
Location: Tuscany, Tyrrhenian Sea
...extended to the exoplanets will be so: (MU Ara b)
Attachment:
MU Ara.png
MU Ara.png [ 375.83 KiB | Viewed 3515 times ]

the HZ is where the exoplanet is in-between edges; when the exoplanet is between the "moist greenhouse" and the "maximum greenhouse", the label "liquid water sustainable" will be shown. The edges are accurate as long as the data concerning the exoplanets (and stars) are accurate.
Unfortunately, the CELX/Lua methods doesn't calls for the 'Eccentricity' declaration, thus the possibly "in&out" HZ edges-crossing computation for eccentric exoplanetary orbits, cannot be directly taken into account.

EDIT LATER...
read: the eccentricity of the stellar flux cannot be directly taken into account.

_________________
Never at rest.


Top
 Profile  
 
PostPosted: Wed, 27-08-14, 15:27 GMT 
Offline
User avatar

Joined: Mon, 03-09-07, 23:01 GMT
Posts: 388
Location: Tuscany, Tyrrhenian Sea
Ephemerides 3.3

FIXES:
- fix a rise/set time issue within the Sky&Telescope BAS routine for the three-fold events (thanks to Marco Klunder);
- fix a numeric typo within Mercury and Saturn's stations finder;
- fix a numeric typo within minor bodies' magnitude equation;
- fix the defect of illumination;
- fix topocentric: RA, DEC, azimuth and altitude always apparent.
- fix the date's holding for the actual event day in which lunar/solar eclipses falls.
- fix vibration of the custom marker;

CHANGES:
- GUI improvement;
- optimized performances: "ephemerisBox.lua" now calls for the functions after the menus' draw;
- razionalized LUA modules;
- main rise/set function now account also for the Moon;
- atomospheric refraction label account for all visible arc;
- the position angle for the Moon follows the Pricipal Axis mode (JPL HORIZONS) and not the Mean Earth (ME) mode;
- verbose Moon's libration region is always topocentric in both modes;
- updated values of the direction of the objects' north pole of rotation and of the prime meridian to IAU 2009 report;
- planetocentric to planetographic declinations of the Earth/Sun for planets Mars to Neptune (JPL Horizons conform);
- illuminated fraction in percent;
- Central Meridian to Prime Meridian (misleading point);
- RA, DEC always apparent;
- updated Mercury and Venus magnitudes to the Astronomical Almanac's values as in J. L. Hilton (2005);
- removed the SPICE option: no longer required whether Celestia SPICE is correctly set. This is not a plugin's issue;
- remove the topocentric mark; whether or not topocentric is specified through the first menu's "preamble";
- restored constellations (equinox of the date);

ADD:
- secondary color; to have a favourite color without the use of the roulette (optional);
- restored the defect of illumination for the Moon;
- verbose orientations to the longitudes of the Earth/Sun for the Moon's ephemeris (conform to Celestia's grid);
- length of the seasons;
- precession to RA, DEC computation for rise/set time routine;
- culmination's event;
- Habitable Zone of/for exoplanets/stars;
- direction of the north pole of rotation and of the prime meridian for few minor bodies;
- free core nutation (FCN) effect to the Celestial Intermediate Pole (CIP) coordinates (optional);

;) ...clak!... zip!... zip!... :/

NOTES TO:

fixes:
- the "three-fold events" means those places on Earth in which there are more than one diurnal rise/set event for an object at certain period of the year.
- while the phase angle for itself can be returned through the atan function, its use for the defect of illumination needed the atan2 function;
- mainly intended for the solar eclipses, which date desappeared just the day of the event, now it remains for the date in question.
- the vibrational, oscillatory motion of the custom pointer seem present on Celestia SVN versions only; 1.6.1 official version doesn't has this issue neither on my system nor on other PCs. The fix concern the marker frame from "ecliptic" (the "vibrational one") to "bodyfixed" (the "stable one"). Note that "bodyfixed" and "ecliptic" frame are supported by both Celestia versions; then such a different marker's behaviour is weird to understand and may be rooted elsewhere.

:X ...zip!, zip!, zip!, FLASH!!!...sssssssffffff...ssssssSSSSSSSSSSFFFFFFFFFFFFFFFFFFF... :shock:

changes:
- diversely from the past versions, now there is no delay between the drop-down menu and the function's calls; hence the performance gains in FPS when the menus are closed or switched because the freeing of the relevant resources. This mean that deactivating the plugin, flying elsewhere or staying at prompt with the closed menus is the same whatelse be the selected object. Such optimization makes the max. frame drops about 8 FPS. Just the activation of the plugin makes a tiny 0.3 FPS drop.
- LUA modules are now razionalized by moving out the functions from within "ephemLib.lua" to the new modules; this fact has brought to the devoiding of this latter, then has been removed.
- the relevant function for the Moon's rise/set events has been removed from within the lunar module (the file, not the spacecraft).
- the choice of the Principal Axis mode (DE403 conform, J.G.Williams, 1994 cit. in Konopliv et al. 2001) for the direction of Moon'axis is mainly due to its check out through the reference system of the JPL HORIZONS' ephemerides;
- to update the prime meridian and the direction of north pole of rotation for Pluto to the IAU 2009 values is cause of a diffent behaviour between the ephemeris values and the Celestia's VSOP87 settings/display, because the new Pluto's pole direction is no longer conform to the IAU specifications on which the VSOP87 theory was based upon (reversed).
- while with SPICE configuration the planetocentric to planetographic declinations of the Earth/Sun for planets Mars to Neptune well-matches the JPL HORIZONS results, with the default VSOP87 just Neptune shows discrepances up to 1 degree; Mars to Uranus matches also therein. All the remaining objects have the planetocentric declinations, either because their flatness is absent/unknown or because they are triaxial ellipsoids for which the .SSC's SemiAxes directive is absent/uncallable through CELX/LUA methods. These items along with the longitudes and others must have the light travel delay (LT) set ON in order to display the correct values. Note that the longitudes of the Earth/Sun for Jupiter well-matches with the JPL HORIZONS ephemerides only with the SPICE configuration.
- local topocentric info parameters like altitude, pressure etc. are displayed only when such option is set.
- the "identification of a constellation from a position" is performed in real time by precessing back to Bessellian year 1875 the object's RA, DEC of the date; then for years apart from J2000 the object's position amongst constellations will not match the Celestia's position/RA,DEC because these latters are always those referred to equinox J2000.

:oops: ...MMMMMMMMffffppMMMMMMMMMMMfffMMMMMMMMMMMM... :oops:

add:
- the secondary color is a fast option to have a favourite color for highlighted places without to search for it all the time through the pseudo-random roulette (still existent, of course). The print option for both main/secondary colors is now set up in such a manner that the colors are returned with their variables for a rapid copy/paste insertion within the "ephemCfg.lua" file;
- precession to the rise/set computation makes the backward/forward rise/set's prediction times correct.
- the culmination is the culmination's event "tout court"; it doesn't discriminate whether superior or inferior by some verbose modalities. If an object rise before to set it will be "superior"; if an object set before to rise, it will be "inferior". For a three-fold case will be displayed the two culmination's events.
- the Habitable Zones is based upon:
r. k. kopparapu et al. - habitable zones around main-sequence stars, dependence on planetary mass (2014),
and it is relevant to exoplanets with 1.0x Earth masses. The paper shows also how to calculate the HZ for 0.1 and 4x Earth masses but the .SSCs for exoplanets either doesn't show the mass or the CELX/LUA call for such parameter is unstable/deprecated; then have been avoided. Maybe in future, when the exoplanets insertion in Celestia will be more defined, will be accounted for. The HZ belt in which the liquid water should be sustainable has the lower/upper edges' distances in AU enclosed by the "|" symbol.
- Free core nutation (FCN). To set true this option absolutely doesn't affect the performances, then it is true by default. The effect on the CIP is so unnoticeable that to be sure it was working I did create two fake labels for the relevant function. More informations are within its module. The reference site for the yearly table of the FCN cos/sin amplitudes is this. The model is updated once a year on 1 July, and the updates can revised the prior year. However, unless new values are published, makes trust the last ones.
See here.
- A special thanks to Vincent, whose credits were implicit as the author of lua_plugins without which this plugin wouldn't work.

:oops: ...MMMMFFFFFFFFFFfffffffffffffffffffffffffffffffffffff... :o ...coke!, coke! :cry:

This is a completely new assested, bug fixes and rationalized version, uncompatible with the previous ones: please, do backup the existent, remove it by erasing all the files and then unzip the pack as usual within the main Celestia's root.
Always do take a look at "ephemCfg.lua" file for both new/your settings and/or new hints, before to load Celestia.

Attachment:
ephemerides_3.3.zip [164.11 KiB]
Downloaded 83 times

_________________
Never at rest.


Top
 Profile  
 
PostPosted: Thu, 11-09-14, 22:55 GMT 
Offline
User avatar

Joined: Mon, 03-09-07, 23:01 GMT
Posts: 388
Location: Tuscany, Tyrrhenian Sea
Ephemerides 3.3 Service Pack 1

CHANGES:
- Switch observer from "synchronous" to "follow" when one go outside the plugin's range to the selected object; this avoid the motion of the sky in case of fast rotator object, mainly pulsars;
- regression: restored the topocentric marks for azimuth and altitude; they are useful as reminders, being the two quantities always topocentric also in geocentric mode;

ADD:
- Atmospheric extinction; based upon ICQ, International Comet Quarterly
http://www.icq.eps.harvard.edu/ICQExtinct.html. Its label is together with the visual magnitude label; their sum is the extincted magnitude. Note that these optical matters are too much complex to be derived from scratch for all the home places and far beyond the goal of this plugin, then the ICQ method is welcome.

extract the zip inside the ephemerides folder or manage it manually.

Attachment:
ephemerides_3.3_sp1.zip [26.59 KiB]
Downloaded 86 times

_________________
Never at rest.


Top
 Profile  
 
PostPosted: Tue, 21-10-14, 1:56 GMT 
Offline
User avatar

Joined: Mon, 03-09-07, 23:01 GMT
Posts: 388
Location: Tuscany, Tyrrhenian Sea
Added supergalactic coordinates... :wall: ^^'

_________________
Never at rest.


Top
 Profile  
 
PostPosted: Sat, 25-10-14, 0:38 GMT 
Offline
User avatar

Joined: Mon, 03-09-07, 23:01 GMT
Posts: 388
Location: Tuscany, Tyrrhenian Sea
fenerit wrote:
Precession from equinox J2000.0 to equinox of the date. Modified for the IAU 2000A_R06 precession, P03 solution
For plugins/scripts which uses "celutil.lua" or its functions to get the J2000.0 equatorial/celestial coordinates.
Values returns in radiants.

Code:
-- local function to stay within 0/PI2 range
local rangeRad = function(x)
   local PI2 = 2.0 * math.pi;
   local b = x / PI2;
    local a = PI2 * (b - math.floor(b));
    if a < 0 then
      a = PI2 + a;
   end
    return a;
end

local Equatorial_Of_Date = function(obj)
   if not empty(obj) then
      local raJ2000, decJ2000 = celutil.get_ra_dec(obj);
         raJ2000, decJ2000 = math.rad(raJ2000), math.rad(decJ2000);
         
      -- reduction of positions from equinox J2000.0 to date
      -- modified for IAU 2000A_R06 precession, P03 solution
      local TDB = celestia:gettime();
      local T = (TDB - 2451545.0) / 36525; -- TDB century
      
      -- equatorial precession angles
      local zetaA = (2.650545
               + 2306.083227 * T
                    + 0.2988499 * T^2
                    + 0.01801828 * T^3
                    - 0.000005971 * T^4
                    - 0.0000003173 * T^5);
         zetaA = math.rad(zetaA / 3600.0);
         
      local zA = (-2.650545
             + 2306.077181 * T
                 + 1.0927348 * T^2
                 + 0.01826837 * T^3
                 - 0.000028596 * T^4
                 - 0.0000002904 * T^5);
         zA = math.rad(zA / 3600.0);
         
      local thetaA = (2004.191903 * T
                     - 0.4294934 * T^2
                     - 0.04182264 * T^3
                     - 0.000007089 * T^4
                     - 0.0000001274 * T^5);
         thetaA = math.rad(thetaA / 3600.0);
      
      -- equatorial R.A. of the date (Meeus, A.A. 21.4)
      local EqxA = math.cos(decJ2000) * math.sin(raJ2000 + zetaA);
      local EqxB = math.cos(thetaA) * math.cos(decJ2000) * math.cos(raJ2000 + zetaA) - math.sin(thetaA) * math.sin(decJ2000);
      local ra_zA = math.atan2(EqxA , EqxB);
      local raEqx = rangeRad(ra_zA + zA);
      
      -- equatorial Declination of the date (Meeus, A.A. 21.4)
      local decEqx = math.sin(thetaA) * math.cos(decJ2000) * math.cos(raJ2000 + zetaA) + math.cos(thetaA) * math.sin(decJ2000);
         decEqx = math.asin(decEqx);
      
      local ra, dec = raEqx, decEqx;
      
      return ra, dec;
   else
      return 0.0, 0.0;
   end
end

local Celestial_Of_Date = function(obj)
   if not empty(obj) then
      local ecliptic_longJ2000, ecliptic_latJ2000 = celutil.get_ecliptic_long_lat(obj);
         ecliptic_longJ2000, ecliptic_latJ2000 = math.rad(ecliptic_longJ2000), math.rad(ecliptic_latJ2000);
      
      -- reduction of positions from equinox J2000.0 to date
      -- modified for IAU 2000A_R06 precession, P03 solution
      local TDB = celestia:gettime();
      local T = (TDB - 2451545.0) / 36525; -- TDB century
      
      -- ecliptic precession angles
-- angle between the ecliptic J2000.0 and the ecliptic of the date (rho, in Meeus, A.A. 21.5)
      local piA = (46.998973 * T
              - 0.0334926 * T^2
              - 0.00012559 * T^3
              + 0.000000113 * T^4
              - 0.0000000022 * T^5);
         piA = math.rad(piA / 3600.0);
         
      local UpiA = (629546.7936
               - 867.95758 * T
               + 0.157992 * T^2
               - 0.0005371 * T^3
               - 0.00004797 * T^4
               + 0.000000072 * T^5);
         UpiA = math.rad(UpiA / 3600.0);
         
      local pA = (5028.796195 * T
                 + 1.1054348 * T^2
                 + 0.00007964 * T^3
                 - 0.000023857 * T^4
                 - 0.0000000383 * T^5);
              pA = math.rad(pA / 3600.0);
      -- ecliptic longitude of the date (Meeus, A.A. 21.7)
      local EqxA = math.cos(piA) * math.cos(ecliptic_latJ2000) * math.sin(UpiA - ecliptic_longJ2000) - math.sin (piA) * math.sin(ecliptic_latJ2000);
      local EqxB = math.cos(ecliptic_latJ2000) * math.cos(UpiA - ecliptic_longJ2000);
      local long_pA_UpiA = math.atan2(EqxA , EqxB);
      local ecliptic_longEqx = rangeRad(math.abs(long_pA_UpiA - (pA + UpiA)));
      
      -- ecliptic latitude of the date (Meeus, A.A. 21.7)
      local ecliptic_latEqx = math.cos(pA) * math.sin(ecliptic_latJ2000) + math.sin(pA) * math.cos(ecliptic_latJ2000) * math.sin(UpiA - ecliptic_longJ2000);
         ecliptic_latEqx = math.asin(ecliptic_latEqx);

      local ecliptic_long, ecliptic_lat = ecliptic_longEqx, ecliptic_latEqx;
      
      return ecliptic_long, ecliptic_lat;
   else
      return 0.0, 0.0;
   end
end


An example about how to "inject" the precession into the returned "celutil.lua" J2000.0 equatorial/celestial coordinates
Values returns in radiants.
Code:
My_Code = function(obj)
   local mercury = celestia:find("Sol/Mercury")
   local mercury_ra_of_date, mercury_dec_of_date = Equatorial_Of_Date(mercury)
   local mercury_ecliptic_long_of_date, mercury_ecliptic_lat_of_date = Celestial_Of_Date(mercury)
   return mercury_ra_of_date, mercury_dec_of_date, mercury_ecliptic_long_of_date, mercury_ecliptic_lat_of_date
end


EDIT LATER: fix a comment


EDIT VERY LATER: fix a forgotten deg -> rad conversion within ecliptic precessional formula. I apologize for the inconvenience.

_________________
Never at rest.


Top
 Profile  
 
PostPosted: Tue, 16-12-14, 20:51 GMT 
Offline
User avatar

Joined: Mon, 03-09-07, 23:01 GMT
Posts: 388
Location: Tuscany, Tyrrhenian Sea
Below a preview about the new print on file option (new button)

Attachment:
e_p_1.png
e_p_1.png [ 55.63 KiB | Viewed 2753 times ]

Attachment:
e_p_2.png
e_p_2.png [ 63.23 KiB | Viewed 2753 times ]


The header asterisk take the light-travel delay into account, and therefore one must print with the light-travel (LT) set OFF (the most common prompt). In seat of printing this is possible because the time will be set in pause by the user and hence will be performed the relevant computation, otherwise an advertisement will be displayed. Speed of light costant and timing follows the "celestiacore.cpp" routine and the printed values matches with the Ephemeris' HUD values displayed when the LT is set ON. The routine will runs through 31 days-step-one (86400 sec.) and then does hark back to the paused time. This operation is achieved on my (now old) system smoothly, without jumps, flicks and displacement of any heaven. This monthly-forward printing is for every start date one choose. The structure follows the menues, but some day-changing values within the event-phenomena button (e.a. the eccentricity of the Earth's orbit) will be print along with the other values.

_________________
Never at rest.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 66 posts ]  Go to page Previous  1, 2, 3, 4, 5  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group