### Initialize Navigation Tree and Search Source: https://github.com/starsbane/astroroutines/blob/main/doc/html/index.html Sets up the navigation tree and search functionality for the documentation interface. These scripts are crucial for navigating the project's documentation. ```javascript $(function() { initMenu('',true,false,'search.php','Search',true); $(function() { init_search(); }); }); $(function(){initNavTree('index.html','',''); }); ``` -------------------------------- ### AstroRoutines.AR.S00a Source: https://github.com/starsbane/astroroutines/blob/main/doc/html/class_astro_routines_1_1_a_r-members.html Calculates the Julian date for the start of the year. ```APIDOC ## POST /astro/routines/s00a ### Description Calculates the Julian date for the beginning of a given year. ### Method POST ### Endpoint /astro/routines/s00a ### Parameters #### Request Body - **date1** (double) - Required - Year part of the date. - **date2** (double) - Required - Day part of the date. ### Request Example ```json { "date1": 2000.0, "date2": 1.0 } ``` ### Response #### Success Response (200) - **jd** (double) - The calculated Julian date. #### Response Example ```json { "jd": 2451544.5 } ``` ``` -------------------------------- ### AstroRoutines.AR.S06a Source: https://github.com/starsbane/astroroutines/blob/main/doc/html/class_astro_routines_1_1_a_r-members.html Calculates the Julian date for the start of the astronomical year. ```APIDOC ## POST /astro/routines/s06a ### Description Calculates the Julian date for the beginning of the astronomical year. ### Method POST ### Endpoint /astro/routines/s06a ### Parameters #### Request Body - **date1** (double) - Required - Year part of the date. - **date2** (double) - Required - Day part of the date. ### Request Example ```json { "date1": 2000.0, "date2": 1.0 } ``` ### Response #### Success Response (200) - **jd** (double) - The calculated Julian date. #### Response Example ```json { "jd": 2451544.5 } ``` ``` -------------------------------- ### Initialize Navigation Tree (JavaScript) Source: https://github.com/starsbane/astroroutines/blob/main/doc/html/class_astro_routines_1_1_l_d_b_o_d_y-members.html Initializes the navigation tree for the documentation interface. This function is responsible for setting up the expandable and collapsible navigation structure, likely used in Doxygen-generated documentation. ```javascript $(function(){initNavTree('class_astro_routines_1_1_l_d_b_o_d_y.html','',''); }); ``` -------------------------------- ### AstroRoutines Class Members Source: https://github.com/starsbane/astroroutines/blob/main/doc/html/functions_z.html This section details the documented class members of the AstroRoutines library, specifically those starting with 'Z'. ```APIDOC ## AstroRoutines Class Members ### Description This section lists the documented class members of the AstroRoutines library, including their return types and links to their documentation. ### Methods #### Zp() - **Return Type**: [AstroRoutines.AR] - **Link**: class_astro_routines_1_1_a_r.html#ac1bf1f8df29f50a1927f8b96d5fff63a #### Zpv() - **Return Type**: [AstroRoutines.AR] - **Link**: class_astro_routines_1_1_a_r.html#af52c36703dacdc7169e848a687edfe50 #### Zr() - **Return Type**: [AstroRoutines.AR] - **Link**: class_astro_routines_1_1_a_r.html#a5108832efb72e529020811ca93449299 ``` -------------------------------- ### Apply Light Deflection by Solar System Bodies (C#) Source: https://github.com/starsbane/astroroutines/blob/main/doc/html/class_astro_routines_1_1_a_r.html Applies light deflection by multiple solar system bodies for a star, transforming the coordinate direction into the natural direction. It requires the number of bodies, their data, the observer's barycentric position, the observer-to-star coordinate direction, and outputs the observer-to-deflected-star direction. ```csharp void AstroRoutines.AR.Ldn(int _n_, [LDBODY][] _b_, double[] _ob_, double[] _sc_, ref double[] _sn_) static ``` -------------------------------- ### Initialize Search Box and Navigation Tree Source: https://github.com/starsbane/astroroutines/blob/main/doc/html/annotated.html Initializes the search box functionality with a specified search path and file extension. It also sets up the navigation tree for the documentation interface. ```JavaScript var searchBox = new SearchBox("searchBox", "search/", ".html"); $(function() { codefold.init(); }); $(function() { initMenu('', true, false, 'search.php', 'Search', true); $(function() { init_search(); }); }); $(function(){ initNavTree('annotated.html','',''); }); ``` -------------------------------- ### AstroRoutines Functions (s-prefix) Source: https://github.com/starsbane/astroroutines/blob/main/doc/html/functions_func_s.html Lists functions within the AstroRoutines class that start with the prefix 's'. Each function is linked to its detailed documentation within the AstroRoutines.AR class. ```plaintext * S00() : [AstroRoutines.AR](class_astro_routines_1_1_a_r.html#a570556bc4c919ac6a4dc2b0847479a6d) * S00a() : [AstroRoutines.AR](class_astro_routines_1_1_a_r.html#aa2a717f0eb0ade3f703be79f837d0563) * S00b() : [AstroRoutines.AR](class_astro_routines_1_1_a_r.html#a9275d77b7d4d4be7d79914e4de22bcf8) * S06() : [AstroRoutines.AR](class_astro_routines_1_1_a_r.html#ad9ffc98ce57bfd594d0dc31266d712b1) * S06a() : [AstroRoutines.AR](class_astro_routines_1_1_a_r.html#a3ad495099679f2efa1235b0fa2984cf7) * S2c() : [AstroRoutines.AR](class_astro_routines_1_1_a_r.html#a3a066465448dc38beb5f416035542bab) * S2p() : [AstroRoutines.AR](class_astro_routines_1_1_a_r.html#ad58c9517dbf5767c7b189487dbb84a3d) * S2pv() : [AstroRoutines.AR](class_astro_routines_1_1_a_r.html#a9bc9bfa40c62b1bf5a6d9e9b85f528f2) * S2xpv() : [AstroRoutines.AR](class_astro_routines_1_1_a_r.html#ab4d17d333fc5eeea9501c885016b6776) * Sepp() : [AstroRoutines.AR](class_astro_routines_1_1_a_r.html#a9e5295c761546a7366310fdcb49e9b9e) * Seps() : [AstroRoutines.AR](class_astro_routines_1_1_a_r.html#a59fe8305077aa730e44ee7448045578e) * Sp00() : [AstroRoutines.AR](class_astro_routines_1_1_a_r.html#a197db7406588202923daa582e54350a1) * Starpm() : [AstroRoutines.AR](class_astro_routines_1_1_a_r.html#acb5a7cdbfc93a2faad724b99958fd163) * Starpv() : [AstroRoutines.AR](class_astro_routines_1_1_a_r.html#a4036a9d96494f79089d48faa633952ce) * Sxp() : [AstroRoutines.AR](class_astro_routines_1_1_a_r.html#a0ff7a619ad46a677c9905e80f7ac56d0) * Sxpv() : [AstroRoutines.AR](class_astro_routines_1_1_a_r.html#a9c3e52b3639018ca3b67ab2c55774f31) ``` -------------------------------- ### Initialize Search Box and Code Folding Source: https://github.com/starsbane/astroroutines/blob/main/doc/html/functions_x.html Initializes the search box functionality and code folding for the documentation interface. This is typically found in the page's JavaScript setup. ```javascript var searchBox = new SearchBox("searchBox", "search/", ".html"); $(function() { codefold.init(); }); $(function() { initMenu('',true,false,'search.php','Search',true); $(function() { init_search(); }); }); ``` -------------------------------- ### Ir() Source: https://github.com/starsbane/astroroutines/blob/main/doc/html/class_astro_routines_1_1_a_r.html Initializes an r-matrix to the identity matrix. ```APIDOC ## POST /ar/Ir ### Description Initialize an r-matrix to the identity matrix. ### Method POST ### Endpoint /ar/Ir ### Parameters #### Request Body - **r** (double[][]) - Required - r-matrix to be initialized ### Request Example ```json { "r": [ [0.0, 0.0, 0.0], [0.0, 0.0, 0.0], [0.0, 0.0, 0.0] ] } ``` ### Response #### Success Response (200) - **r** (double[][]) - Initialized r-matrix (identity matrix) #### Response Example ```json { "r": [ [1.0, 0.0, 0.0], [0.0, 1.0, 0.0], [0.0, 0.0, 1.0] ] } ``` ``` -------------------------------- ### Initialize Astrometry Parameters using ASTROM in C# Source: https://context7.com/starsbane/astroroutines/llms.txt This C# code snippet demonstrates how to initialize and use the `ASTROM` structure from the AstroRoutines library. It sets up observation parameters such as date, time, observer location, atmospheric conditions, and wavelength to calculate astrometric quantities using the `AR.Apco13` function. The output includes key astrometric results derived from the initialized parameters. ```csharp using System; using AstroRoutines; class AstromExample { public static void Main() { // Create astrometry context for observations var astrom = new ASTROM(); // Setup observation parameters AR.Cal2jd(2025, 6, 20, out double utc1, out double utc2); double dut1 = 0.0; double elong = -0.5236; // Longitude (radians) double phi = 0.8727; // Latitude (radians) double hm = 100.0; // Height (meters) double xp = 0.0, yp = 0.0; // Polar motion double phpa = 1013.25; // Pressure (hPa) double tc = 15.0; // Temperature (C) double rh = 0.5; // Humidity double wl = 0.55; // Wavelength (micrometers) double eo = 0; // Initialize astrometry context int status = AR.Apco13(utc1, utc2, dut1, elong, phi, hm, xp, yp, phpa, tc, rh, wl, ref astrom, ref eo); if (status >= 0) { Console.WriteLine($"PM time interval: {astrom.pmt} years"); Console.WriteLine($"Observer distance from Sun: {astrom.em} AU"); Console.WriteLine($"Local Earth rotation angle: {astrom.eral} radians"); Console.WriteLine($"Geodetic latitude: {astrom.phi} radians"); Console.WriteLine($"Refraction constant A: {astrom.refa} radians"); Console.WriteLine($"Refraction constant B: {astrom.refb} radians"); Console.WriteLine($"Barycentric observer velocity: [{astrom.v[0]}, {astrom.v[1]}, {astrom.v[2]}] (fraction of c)"); } } } ``` -------------------------------- ### Get FK5 Hour Angle and Declination Source: https://github.com/starsbane/astroroutines/blob/main/doc/html/class_astro_routines_1_1_a_r-members.html Calculates the hour angle (rh) and declination (dh) in the FK5 system from 5-based coordinates (r5, d5) and their proper motions and radial velocity. This is useful for real-time tracking and observations. ```C# static void Fk52h(double r5, double d5, double dr5, double dd5, double px5, double rv5, out double rh, out double dh, out double drh, out double ddh, out double pxh, out double rvh) ``` -------------------------------- ### Initialize Navigation Tree Source: https://github.com/starsbane/astroroutines/blob/main/doc/html/namespaces.html Initializes the navigation tree for the documentation. This function is responsible for setting up the hierarchical structure of the navigation panel, allowing users to browse through the project's components. ```javascript $(function(){initNavTree('namespaces.html','',''); }); ``` -------------------------------- ### Get FK5 Hour Angle and Declination (Simplified) Source: https://github.com/starsbane/astroroutines/blob/main/doc/html/class_astro_routines_1_1_a_r-members.html Calculates the hour angle (rh) and declination (dh) in the FK5 system from 5-based coordinates (r5, d5) and two dates (date1, date2). This version is simpler and might be used for specific time-dependent calculations. ```C# static void Fk5hz(double r5, double d5, double date1, double date2, out double rh, out double dh) ``` -------------------------------- ### Initialize Search Box and Code Folding (JavaScript) Source: https://github.com/starsbane/astroroutines/blob/main/doc/html/class_astro_routines_1_1_l_d_b_o_d_y-members.html Initializes the search box functionality with specified parameters and the code folding feature for documentation. This script is typically used in web-based documentation generated by tools like Doxygen. ```javascript var searchBox = new SearchBox("searchBox", "search/",".html"); $(function() { codefold.init(); }); $(function() { initMenu('',true,false,'search.php','Search',true); $(function() { init_search(); }); }); ``` -------------------------------- ### Form Polar Motion Matrix (C#) Source: https://github.com/starsbane/astroroutines/blob/main/doc/html/class_astro_routines_1_1_a_r.html Forms the polar motion matrix for a given date using the IAU 2000 model. Requires pole coordinates (xp, yp) and the TIO locator s' (sp) in radians. ```csharp void AstroRoutines.AR.Pom00( double _xp_, double _yp_, double _sp_, ref double _rpom_[] ) ``` -------------------------------- ### Prepare Star-Independent Astrometry Parameters with Equation of Origins (Apci13) Source: https://github.com/starsbane/astroroutines/blob/main/doc/html/class_astro_routines_1_1_a_r.html Prepares star-independent astrometry parameters for transformations between ICRS and geocentric CIRS coordinates for a terrestrial observer, also returning the equation of the origins. Requires TDB as a 2-part Julian Date. ```csharp void AstroRoutines.AR.Apci13( double _date1_, double _date2_, ref ASTROM _astrom_, out double _eo_ ) ``` -------------------------------- ### IAU SOFA C Library Time and Coordinate Calculations Source: https://github.com/starsbane/astroroutines/blob/main/README.md Demonstrates how to use the IAU SOFA C library for date and time conversions, including calculating Julian dates, time differences, and astronomical time scales. It also shows how to perform astrometric calculations like precession, nutation, and polar motion using functions such as iauCal2jd, iauTf2d, iauUtcut1, iauPn06a, iauXys06a, iauC2ixys, iauEra00, and iauA2tf. ```c #include #include static void tx_pn() { double utc1, utc2; iauCal2jd(2025, 6, 20, &utc1, &utc2); double days; iauTf2d('+', 21, 24, 37.5, &days); utc2 += days; double dut1 = 0.3341; double date1; double date2; iauUtcut1(utc1, utc2, dut1, &date1, &date2); double dpsi; double deps; double epsa; double rb[3][3]; double rp[3][3]; double rbp[3][3]; double rn[3][3]; double rbpn[3][3]; iauPn06a(date1, date2, &dpsi, &deps, &epsa, rb, rp, rbp, rn, rbpn); double x = 0, y = 0, s = 0; iauXys06a(date1, date2, &x, &y, &s); double cio[3][3]; iauC2ixys(x, y, s, cio); double era0 = iauEra00(date1, date2); iauRz(era0, cio); char sign = ' '; int era[4]; iauA2tf(5, era0, &sign, &era); printf("era = %c %d %d %d %d\n", sign, era[0], era[1], era[2], era[3]); } ``` -------------------------------- ### Form Celestial-to-Terrestrial Matrix (C2teqx) - C# Source: https://github.com/starsbane/astroroutines/blob/main/doc/html/class_astro_routines_1_1_a_r.html Forms the celestial-to-terrestrial matrix using the bias-precession-nutation matrix (rbpn), Greenwich Sidereal Time (gst), and the polar motion matrix (rpom). ```csharp void AstroRoutines.AR.C2teqx( double _rbpn_[,], double _gst_, double _rpom_[,], out double _rc2t_[,] ) ``` -------------------------------- ### SearchBox Initialization - JavaScript Source: https://github.com/starsbane/astroroutines/blob/main/doc/html/functions_d.html Initializes the search box component for the documentation. It takes the ID of the search box element, the path to search results, and the file extension for search results as parameters. ```javascript var searchBox = new SearchBox("searchBox", "search/", ".html"); ``` -------------------------------- ### P-vector Addition (C#) Source: https://github.com/starsbane/astroroutines/blob/main/doc/html/class_astro_routines_1_1_a_r.html Performs P-vector addition (a + b). Takes two p-vectors as input and returns their sum. ```csharp void AstroRoutines.AR.Ppp( double[] _a_, double[] _b_, ref double[] _apb_ ) ``` -------------------------------- ### Quick CIRS to Observed Place Transformation (C#) Source: https://github.com/starsbane/astroroutines/blob/main/doc/html/class_astro_routines_1_1_a_r.html Provides a quick transformation from CIRS coordinates to the observed place (azimuth, zenith distance, hour angle, declination, and right ascension). This method utilizes pre-calculated star-independent astrometry parameters. Inputs are CIRS RA and Dec in radians, and the astrom object. Outputs are the observed azimuth, zenith distance, hour angle, declination, and right ascension in radians. ```csharp static void AstroRoutines.AR.Atioq(double ri, double di, ref ASTROM astrom, out double aob, out double zob, out double hob, out double dob, out double rob) ``` -------------------------------- ### Prepare Astrometry Parameters for Terrestrial Observers (C++) Source: https://github.com/starsbane/astroroutines/blob/main/doc/html/class_astro_routines_1_1_a_r.html These functions prepare star-independent astrometry parameters for transformations between CIRS and observed coordinates for a terrestrial observer. Apio uses direct inputs, while Apio13 incorporates more detailed time and atmospheric parameters. ```cpp static void Apio(double sp, double theta, double elong, double phi, double hm, double xp, double yp, double refa, double refb, ref ASTROM astrom) static int Apio13(double utc1, double utc2, double dut1, double elong, double phi, double hm, double xp, double yp, double phpa, double tc, double rh, double wl, ref ASTROM astrom) ``` -------------------------------- ### Initialize Search and Navigation Source: https://github.com/starsbane/astroroutines/blob/main/doc/html/functions_func_s.html Initializes the search functionality and navigation tree for the documentation. It sets up event handlers for when the DOM is ready. ```javascript var searchBox = new SearchBox("searchBox", "search/", ".html"); $(function() { codefold.init(); }); $(function() { initMenu('',true,false,'search.php','Search',true); $(function() { init_search(); }); }); $(function(){initNavTree('functions_func_s.html','',''); }); ``` -------------------------------- ### JavaScript Initialization for AstroRoutines Documentation Source: https://github.com/starsbane/astroroutines/blob/main/doc/html/dir_d3f4adcff4cc3fec2e647e21236a82ce.html This JavaScript code initializes the search box and code folding features for the AstroRoutines documentation. It also sets up the initial search functionality and navigation tree. Dependencies include jQuery and custom scripts like 'codefold' and 'initMenu'. ```javascript var searchBox = new SearchBox("searchBox", "search/", ".html"); $(function() { codefold.init(); }); $(function() { initMenu('',true,false,'search.php','Search',true); $(function() { init_search(); }); }); $(function(){initNavTree('dir_d3f4adcff4cc3fec2e647e21236a82ce.html','',''); }); ``` -------------------------------- ### Vector and Matrix Operations Source: https://github.com/starsbane/astroroutines/blob/main/doc/html/class_astro_routines_1_1_a_r.html Functions for initializing or zeroing p-vectors, pv-vectors, and r-matrices. ```APIDOC ## Zero P-vector ### Description Zeros a p-vector. ### Method `void Zp(ref double[] p)` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters Description - **p** (ref double[]) - P-vector to be zeroed ### Request Example ```csharp // Example usage (conceptual) double[] p_vector = new double[10]; // Initialize a p-vector AstroRoutines.AR.Zp(ref p_vector); ``` ### Response #### Success Response (void) This function does not return a value directly; the input array is modified in place. #### Response Example ```json { "message": "P-vector zeroed." } ``` ## Zero PV-vector ### Description Zeros a pv-vector. ### Method `void Zpv(ref double[,] pv)` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters Description - **pv** (ref double[,]) - PV-vector to be zeroed ### Request Example ```csharp // Example usage (conceptual) double[,] pv_vector = new double[3, 2]; // Initialize a pv-vector AstroRoutines.AR.Zpv(ref pv_vector); ``` ### Response #### Success Response (void) This function does not return a value directly; the input array is modified in place. #### Response Example ```json { "message": "PV-vector zeroed." } ``` ## Initialize R-matrix to Null Matrix ### Description Initializes an r-matrix to the null matrix. ### Method `void Zr(ref double[,] r)` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters Description - **r** (ref double[,]) - R-matrix to be zeroed ### Request Example ```csharp // Example usage (conceptual) double[,] r_matrix = new double[3, 3]; // Initialize an r-matrix AstroRoutines.AR.Zr(ref r_matrix); ``` ### Response #### Success Response (void) This function does not return a value directly; the input array is modified in place. #### Response Example ```json { "message": "R-matrix initialized to null." } ``` ``` -------------------------------- ### AstroRoutines C# Wrapper for IAU SOFA Calculations Source: https://github.com/starsbane/astroroutines/blob/main/README.md Demonstrates the equivalent C# implementation using the AstroRoutines library, which wraps the IAU SOFA C library. This snippet shows how to perform similar astronomical calculations like date conversions and astrometric computations using C# syntax and the 'AR' namespace. ```csharp using System; using AstroRoutines; class YourClass { public static void tx_pn() { double utc1, utc2; AR.Cal2jd(2025, 6, 20, out utc1, out utc2); AR.Tf2d('+', 21, 24, 37.5, out var days); utc2 += days; var dut1 = 0.3341; var date1 = 0.0; var date2 = 0.0; AR.Utcut1(utc1, utc2, dut1, ref date1, ref date2); double dpsi; double deps; double epsa; var rb = new double[3, 3]; var rp = new double[3, 3]; var rbp = new double[3, 3]; var rn = new double[3, 3]; var rbpn = new double[3, 3]; AR.Pn06a(date1, date2, out dpsi, out deps, out epsa, out rb, out rp, out rbp, out rn, out rbpn); double x = 0, y = 0, s = 0; AR.Xys06a(date1, date2, ref x, ref y, ref s); var cio = new double[3, 3]; AR.C2ixys(x, y, s, ref cio); var era0 = AR.Era00(date1, date2); AR.Rz(era0, ref cio); var era = new int[4]; AR.A2tf(5, era0, out char sign, ref era); Console.WriteLine($"{nameof(era)} = {sign}{era[0]:D} {era[1]:D} {era[2]:D} {era[3]:D}"); } } ``` -------------------------------- ### Form Celestial-to-Intermediate Matrix from CIP X,Y and CIO locator s Source: https://github.com/starsbane/astroroutines/blob/main/doc/html/class_astro_routines_1_1_a_r.html Forms the celestial-to-intermediate-frame-of-date matrix given the CIP X,Y coordinates and the CIO locator s. This is a direct method for matrix construction. ```csharp static void C2ixys (double x, double y, double s, ref double[,] rc2i) ``` -------------------------------- ### Form Celestial-to-Intermediate Matrix (C2ibpn) - C# Source: https://github.com/starsbane/astroroutines/blob/main/doc/html/class_astro_routines_1_1_a_r.html Forms the celestial-to-intermediate matrix for a given date using the bias-precession-nutation matrix. It utilizes the IAU 2000 standard. Requires TT as a two-part Julian date and the celestial-to-true matrix as input. ```csharp void AstroRoutines.AR.C2ibpn( double _date1_, double _date2_, double _rbpn_[,], ref double _rc2i_[,] ) ``` -------------------------------- ### Prepare Star-Independent Astrometry Parameters for Observed Coordinates (Apco13) Source: https://github.com/starsbane/astroroutines/blob/main/doc/html/class_astro_routines_1_1_a_r.html Prepares star-independent astrometry parameters for transformations between ICRS and observed coordinates for a terrestrial observer, returning the equation of the origins. Accepts UTC as a 2-part quasi Julian Date and includes parameters for UT1-UTC, observer location, atmospheric conditions, and wavelength. Returns a status code. ```csharp int AstroRoutines.AR.Apco13( double _utc1_, double _utc2_, double _dut1_, double _elong_, double _phi_, double _hm_, double _xp_, double _yp_, double _phpa_, double _tc_, double _rh_, double _wl_, ref ASTROM _astrom_, ref double _eo_ ) ``` -------------------------------- ### Prepare Star-Independent Astrometry Parameters (Apci) Source: https://github.com/starsbane/astroroutines/blob/main/doc/html/class_astro_routines_1_1_a_r.html Prepares star-independent astrometry parameters for transformations between ICRS and geocentric CIRS coordinates for a terrestrial observer. Requires TDB as a 2-part Julian Date, Earth barycentric PV, Earth heliocentric position, CIP components, and CIO locator. ```csharp void AstroRoutines.AR.Apci( double _date1_, double _date2_, double _ebpv_[], double[] _ehp_, double _x_, double _y_, double _s_, ref ASTROM _astrom_ ) ``` -------------------------------- ### Initialize SearchBox and Code Folding Source: https://github.com/starsbane/astroroutines/blob/main/doc/html/functions_p.html Initializes the search box component with specified parameters and activates the code folding functionality. This script typically runs on page load. ```javascript var searchBox = new SearchBox("searchBox", "search/", '.html'); $(function() { codefold.init(); }); ``` -------------------------------- ### Initialize R-Matrix to Identity (C#) Source: https://github.com/starsbane/astroroutines/blob/main/doc/html/class_astro_routines_1_1_a_r.html Initializes a given r-matrix (rotation matrix) to the identity matrix. This is a common operation when setting up rotation transformations. ```C# static void Ir(ref double[,] r) { // Implementation details for initializing r-matrix to identity } ``` -------------------------------- ### CIO Locator (Simplified) (C#) Source: https://github.com/starsbane/astroroutines/blob/main/doc/html/class_astro_routines_1_1_a_r.html A simplified version of the CIO locator function, taking only two date arguments. It positions the Celestial Intermediate Origin on the equator of the Celestial Intermediate Pole. ```csharp static double S06a (double date1, double date2) ``` -------------------------------- ### Prepare Star-Independent Astrometry Parameters for Observed Coordinates (Apco) Source: https://github.com/starsbane/astroroutines/blob/main/doc/html/class_astro_routines_1_1_a_r.html Prepares star-independent astrometry parameters for transformations between ICRS and observed coordinates for a terrestrial observer. Requires TDB as a 2-part Julian Date, Earth barycentric PV, Earth heliocentric position, CIP components, CIO locator, Earth rotation angle, observer's longitude, latitude, height, polar motion, TIO locator, and refraction constants. ```csharp void AstroRoutines.AR.Apco( double _date1_, double _date2_, double _ebpv_[], double[] _ehp_, double _x_, double _y_, double _s_, double _theta_, double _elong_, double _phi_, double _hm_, double _xp_, double _yp_, double _sp_, double _refa_, double _refb_, ref ASTROM _astrom_ ) ``` -------------------------------- ### Form Celestial-to-Intermediate Matrix from BPN Matrix (IAU 2000) Source: https://github.com/starsbane/astroroutines/blob/main/doc/html/class_astro_routines_1_1_a_r.html Forms the celestial-to-intermediate matrix for a given date when the bias-precession-nutation matrix is already known. Uses the IAU 2000 standard. ```csharp static void C2ibpn (double date1, double date2, double[,] rbpn, ref double[,] rc2i) ``` -------------------------------- ### AstroRoutines.AR.Ppp Source: https://github.com/starsbane/astroroutines/blob/main/doc/html/class_astro_routines_1_1_a_r.html Performs P-vector addition. ```APIDOC ## AstroRoutines.AR.Ppp ### Description P-vector addition. ### Method `void` (static) ### Endpoint `AstroRoutines.AR.Ppp` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```json { "example": "No request body, parameters are passed directly." } ``` ### Response #### Success Response (200) - **a** ([]) (double) - First p-vector - **b** ([]) (double) - Second p-vector - **apb** ([]) (ref double) - a + b #### Response Example ```json { "example": "Output parameters are populated directly." } ``` ``` -------------------------------- ### Add PV-vectors (C#) Source: https://github.com/starsbane/astroroutines/blob/main/doc/html/class_astro_routines_1_1_a_r.html Adds one pv-vector to another (a + b). The result is stored in 'apb'. ```csharp void AstroRoutines.AR.Pvppv( double[,] _a_, double[,] _b_, ref double[,] _apb_ ) ``` -------------------------------- ### Initialize Navigation Tree Source: https://github.com/starsbane/astroroutines/blob/main/doc/html/functions_o.html Initializes the navigation tree structure for the documentation. This function is responsible for setting up the hierarchical display of documentation pages. ```javascript $(function(){initNavTree('functions_o.html','',''); }); ``` -------------------------------- ### Form Precession/Nutation Matrix (C#) Source: https://github.com/starsbane/astroroutines/blob/main/doc/html/class_astro_routines_1_1_a_r.html Forms the matrix of precession/nutation for a given date using IAU 1976 precession and IAU 1980 nutation models. Requires TT as a 2-part Julian Date. ```csharp void AstroRoutines.AR.Pnm80( double _date1_, double _date2_, out double _rmatpn_[] ) ``` -------------------------------- ### Prepare Astrometric Parameters (Geocentric, ICRS-GCRS, 2013) (C#) Source: https://github.com/starsbane/astroroutines/blob/main/doc/html/class_astro_routines_1_1_a_r.html Prepares star-independent astrometry parameters for transformations between ICRS and GCRS coordinates for a geocentric observer, specifically using the 2013 epoch standards. This function simplifies the input by only requiring the date as a two-part Julian Date. ```csharp void AstroRoutines.AR.Apcg13(double _date1_, double _date2_, ref ASTROM _astrom_) ``` -------------------------------- ### Initialize Search Functionality Source: https://github.com/starsbane/astroroutines/blob/main/doc/html/functions_func_j.html Initializes the search functionality for the documentation. This typically involves setting up event listeners and search index loading. ```javascript $(function() { init_search(); }); ``` -------------------------------- ### Nutation Matrix Calculation (IAU 2000A) (C#) Source: https://github.com/starsbane/astroroutines/blob/main/doc/html/class_astro_routines_1_1_a_r.html Forms the nutation matrix for a given date using the IAU 2000A model. Requires the TT date as a 2-part Julian Date, and outputs the nutation matrix. ```csharp void AstroRoutines.AR.Num00a(double _date1_, double _date2_, ref double[] _rmatn_) static ``` -------------------------------- ### Calculate Precession-Nutation (IAU 2006) Source: https://github.com/starsbane/astroroutines/blob/main/doc/html/class_astro_routines_1_1_a_r.html Performs precession-nutation calculations using the IAU 2006 model. Outputs various rotation matrices and angles. ```csharp static void Pn06(double date1, double date2, double dpsi, double deps, out double epsa, out double[,] rb, out double[,] rp, out double[,] rbp, out double[,] rn, out double[,] rbpn) { // Implementation details... } ``` -------------------------------- ### Calculate Precession-Nutation (IAU 2000A) Source: https://github.com/starsbane/astroroutines/blob/main/doc/html/class_astro_routines_1_1_a_r.html Performs precession-nutation calculations using the IAU 2000A model. Outputs various rotation matrices and angles. ```csharp static void Pn00a(double date1, double date2, out double dpsi, out double deps, out double epsa, out double[,] rb, out double[,] rp, out double[,] rbp, out double[,] rn, out double[,] rbpn) { // Implementation details... } ``` -------------------------------- ### Star Catalog Conversion (FK4 to FK5) Source: https://github.com/starsbane/astroroutines/blob/main/doc/html/class_astro_routines_1_1_a_r.html Provides functionality to convert star catalog data from the B1950.0 FK4 system to the J2000.0 FK5 system. ```APIDOC ## POST /AstroRoutines/AR/Fk425 ### Description Converts star catalog data from the B1950.0 FK4 system to the J2000.0 FK5 system. ### Method POST ### Endpoint /AstroRoutines/AR/Fk425 ### Parameters #### Request Body - **r1950** (double) - Required - B1950.0 Right Ascension (radians) - **d1950** (double) - Required - B1950.0 Declination (radians) - **dr1950** (double) - Required - B1950.0 Proper motion in RA (radians/tropical year) - **dd1950** (double) - Required - B1950.0 Proper motion in Dec (radians/tropical year) - **p1950** (double) - Required - Parallax (arcseconds) - **v1950** (double) - Required - Radial velocity (km/s, +ve = moving away) ### Request Example ```json { "r1950": 0.1234, "d1950": 0.5678, "dr1950": 0.0001, "dd1950": 0.0002, "p1950": 10.5, "v1950": 5.2 } ``` ### Response #### Success Response (200) - **r2000** (double) - J2000.0 Right Ascension (radians) - **d2000** (double) - J2000.0 Declination (radians) - **dr2000** (double) - J2000.0 Proper motion in RA (radians/Julian year) - **dd2000** (double) - J2000.0 Proper motion in Dec (radians/Julian year) - **p2000** (double) - Parallax (arcseconds) - **v2000** (double) - Radial velocity (km/s, +ve = moving away) #### Response Example ```json { "r2000": 0.1235, "d2000": 0.5679, "dr2000": 0.000105, "dd2000": 0.000210, "p2000": 10.5, "v2000": 5.2 } ``` ``` -------------------------------- ### Form Celestial-to-Terrestrial Matrix (C2t06a) - C# Source: https://github.com/starsbane/astroroutines/blob/main/doc/html/class_astro_routines_1_1_a_r.html Forms the celestial-to-terrestrial matrix using the IAU 2006/2000A precession-nutation model. Inputs include TT and UT1 as two-part Julian dates, and polar motion coordinates (xp, yp). ```csharp void AstroRoutines.AR.C2t06a( double _tta_, double _ttb_, double _uta_, double _utb_, double _xp_, double _yp_, out double _rc2t_[,] ) ``` -------------------------------- ### Calculate Precession-Nutation (IAU 2000) Source: https://github.com/starsbane/astroroutines/blob/main/doc/html/class_astro_routines_1_1_a_r.html Performs precession-nutation calculations using the IAU 2000 model. Outputs various rotation matrices and angles. ```csharp static void Pn00(double date1, double date2, double dpsi, double deps, out double epsa, out double[,] rb, out double[,] rp, out double[,] rbp, out double[,] rn, out double[,] rbpn) { // Implementation details... } ``` -------------------------------- ### Form Celestial-to-Intermediate Matrix (C2ixy) - C# Source: https://github.com/starsbane/astroroutines/blob/main/doc/html/class_astro_routines_1_1_a_r.html Forms the celestial-to-intermediate-frame-of-date matrix given the Celestial Intermediate Pole (CIP) X and Y coordinates. It relies on the IAU 2000 standard. Inputs include TT as a two-part Julian date. ```csharp void AstroRoutines.AR.C2ixy( double _date1_, double _date2_, double _x_, double _y_, ref double _rc2i_[,] ) ``` -------------------------------- ### Construct CIO-based Celestial to Intermediate Matrix (C#) Source: https://context7.com/starsbane/astroroutines/llms.txt Constructs the celestial-to-intermediate matrix using CIO coordinates and applies Earth rotation. Requires date and time inputs in UT1 and DUT1. ```csharp using System; using AstroRoutines; class CIOMatrixExample { public static void Main() { // Setup date AR.Cal2jd(2006, 1, 15, out double utc1, out double utc2); AR.Tf2d('+', 21, 24, 37.5, out double days); utc2 += days; double dut1 = 0.3341; double date1 = 0, date2 = 0; AR.Utcut1(utc1, utc2, dut1, ref date1, ref date2); // Get CIO coordinates X, Y, s double x = 0, y = 0, s = 0; AR.Xys06a(date1, date2, ref x, ref y, ref s); Console.WriteLine($"CIO X coordinate: {x} radians"); Console.WriteLine($"CIO Y coordinate: {y} radians"); Console.WriteLine($"CIO s parameter: {s} radians"); // Construct celestial-to-intermediate matrix var cio = new double[3, 3]; AR.C2ixys(x, y, s, ref cio); Console.WriteLine("\nCelestial-to-intermediate matrix:"); for (int i = 0; i < 3; i++) { for (int j = 0; j < 3; j++) { Console.WriteLine($" cio[{i},{j}] = {cio[i,j]:E15}"); } } // Apply Earth rotation double era0 = AR.Era00(date1, date2); AR.Rz(era0, ref cio); Console.WriteLine("\nMatrix after Earth rotation:"); for (int i = 0; i < 3; i++) { for (int j = 0; j < 3; j++) { Console.WriteLine($" cio[{i},{j}] = {cio[i,j]:E15}"); } } } } ``` -------------------------------- ### Assemble Celestial-to-Terrestrial Matrix (C2tcio) - C# Source: https://github.com/starsbane/astroroutines/blob/main/doc/html/class_astro_routines_1_1_a_r.html Assembles the celestial-to-terrestrial matrix from CIO-based components: the celestial-to-intermediate matrix (rc2i), the Earth Rotation Angle (era), and the polar motion matrix (rpom). ```csharp void AstroRoutines.AR.C2tcio( double _rc2i_[,], double _era_, double _rpom_[,], out double _rc2t_[,] ) ``` -------------------------------- ### Transform Hipparcos Star Data to FK5 (H2fk5) Source: https://github.com/starsbane/astroroutines/blob/main/doc/html/class_astro_routines_1_1_a_r.html Transforms Hipparcos star data into the FK5 (J2000.0) system. It accepts star parameters like RA, Dec, proper motion, parallax, and radial velocity in Hipparcos format and outputs the equivalent values in FK5 format. All inputs and outputs are in radians or arcseconds as specified. ```csharp void AstroRoutines.AR.H2fk5( double _rh_, double _dh_, double _drh_, double _ddh_, double _pxh_, double _rvh_, out double _r5_, out double _d5_, out double _dr5_, out double _dd5_, out double _px5_, out double _rv5_ ) static ``` -------------------------------- ### Equation of Origins (IAU 2006/2000A) Source: https://github.com/starsbane/astroroutines/blob/main/doc/html/class_astro_routines_1_1_a_r.html Calculates the equation of the origins using IAU 2006 precession and IAU 2000A nutation. This is a key component in transforming between different celestial reference frames. ```csharp static double Eo06a(double date1, double date2) ``` -------------------------------- ### Initialize Menu and Search Source: https://github.com/starsbane/astroroutines/blob/main/doc/html/functions_func_j.html Initializes the main menu and search interface. This function sets up the behavior and state for these interactive elements. ```javascript $(function() { initMenu('',true,false,'search.php','Search',true); $(function() { init_search(); }); }); ``` -------------------------------- ### Form Precession-Nutation Matrix (IAU 2006/2000A) Source: https://github.com/starsbane/astroroutines/blob/main/doc/html/class_astro_routines_1_1_a_r.html Forms the matrix of precession-nutation for a given date using the IAU 2006/2000A model. ```csharp static void Pnm06a(double date1, double date2, ref double[,] rbpn) { // Implementation details... } ``` -------------------------------- ### General Coordinate Transformations Source: https://github.com/starsbane/astroroutines/blob/main/doc/html/class_astro_routines_1_1_a_r.html A collection of classes for various general coordinate transformations and calculations within astronomy, including conversions between FK5 and GCRS. ```C# /* src/AstroRoutines/Classes/Fw2m.cs */ // Represents FK5 to Modified Julian Date transformations. ``` ```C# /* src/AstroRoutines/Classes/Fw2xy.cs */ // Represents FK5 to XY coordinate transformations. ``` ```C# /* src/AstroRoutines/Classes/Gd2gc.cs */ // Represents Galactic to Galactic coordinate transformations. ``` ```C# /* src/AstroRoutines/Classes/Gd2gce.cs */ // Represents Galactic to Galactic coordinate transformations with epoch adjustments. ``` ```C# /* src/AstroRoutines/Classes/Ir.cs */ // Represents IR coordinate transformations. ``` ```C# /* src/AstroRoutines/Classes/Lteceq.cs */ // Represents light time corrections for Earth-centered equinox. ``` ```C# /* src/AstroRoutines/Classes/Ltecm.cs */ // Represents light time corrections for Moon-centered. ``` ```C# /* src/AstroRoutines/Classes/Lteqec.cs */ // Represents light time corrections for equinox. ``` ```C# /* src/AstroRoutines/Classes/Ltp.cs */ // Represents light time corrections for planets. ``` ```C# /* src/AstroRoutines/Classes/Ltpb.cs */ // Represents light time corrections for planets (beta). ``` ```C# /* src/AstroRoutines/Classes/Ltpecl.cs */ // Represents light time corrections for planets (ecliptic). ``` ```C# /* src/AstroRoutines/Classes/Ltpequ.cs */ // Represents light time corrections for planets (equatorial). ``` ```C# /* src/AstroRoutines/Classes/Num00a.cs */ // Number of days from epoch 2000.0 A. ``` ```C# /* src/AstroRoutines/Classes/Num00b.cs */ // Number of days from epoch 2000.0 B. ``` ```C# /* src/AstroRoutines/Classes/Num06a.cs */ // Number of days from epoch 2006.0 A. ``` ```C# /* src/AstroRoutines/Classes/Numat.cs */ // Number of days from epoch J2000.0. ``` ```C# /* src/AstroRoutines/Classes/Obl06.cs */ // Obliquity of the ecliptic for epoch 2006.0. ``` ```C# /* src/AstroRoutines/Classes/Obl80.cs */ // Obliquity of the ecliptic for epoch 1980.0. ``` ```C# /* src/AstroRoutines/Classes/P06e.cs */ // Planet position for epoch 2006.0 (ecliptic). ``` ```C# /* src/AstroRoutines/Classes/P2pv ``` -------------------------------- ### JavaScript: Initialize Search and Navigation UI Source: https://github.com/starsbane/astroroutines/blob/main/doc/html/dir_ffc71c89d436bfc03a97c1180c855e9f.html Initializes the search box, code folding functionality, and the navigation menu for the generated documentation. This JavaScript code is responsible for the interactive elements of the Doxygen-generated website. ```javascript var searchBox = new SearchBox("searchBox", "search/",".html"); $(function() { codefold.init(); }); $(function() { initMenu('',true,false,'search.php','Search',true); $(function() { init_search(); }); }); $(function(){initNavTree('dir_ffc71c89d436bfc03a97c1180c855e9f.html','',''); }); ```