|
EGXPhys
|
Functions | |
| template<typename T > | |
| T | EGXMath::DegreeToRadian (const T &decimalDegree) |
| Converts an angle in (decimal) degrees to radians. \[\alpha_{rad}=\alpha_{deg}\frac{\pi}{180}\] . More... | |
| template<typename T > | |
| T | EGXMath::DegreeToMilliradian (const T &decimalDegree) |
| Converts an angle in (decimal) degrees to milliradians. \[\alpha_{mrad}=\alpha_{deg}\frac{\pi}{180}*10^3\] . More... | |
| template<typename T > | |
| T | EGXMath::DegreeToTurn (const T &decimalDegree) |
| Converts an angle in (decimal) degree to turn. \[\alpha_{turn}=\alpha_{deg}\frac{1}{360}\] . More... | |
| template<typename T > | |
| T | EGXMath::DegreeToDecimalDegree (const T &decimalDegree) |
| Converts an angle in (decimal) degree to decimal degree. \[\alpha_{deg}=\alpha_{deg}\] . More... | |
| template<typename T > | |
| T | EGXMath::DegreeToArcdegree (const T &decimalDegree) |
| Converts an angle in (decimal) degree to (decimal) arc degree. \[\alpha_{deg}=\alpha_{deg}\] . More... | |
| template<typename T > | |
| T | EGXMath::DegreeToIntegerDegree (const T &decimalDegree) |
| Converts an angle in (decimal) degree to integer degree. This rounds to the nearest integer. \[\alpha_{deg int}=round(\alpha_{deg})\] . More... | |
| template<typename T , typename T2 > | |
| T | EGXMath::DegreeToBinaryDegree (const T &decimalDegree, const T2 &bits=8) |
| Converts an angle in (decimal) degree to binary degree (brad). \[\alpha_{deg\ bin}=round(\alpha_{deg}\frac{2^{(n-1)}}{360})\] Where \(n\) is the number of bits avaliable to store the number. \(n\) defaults to 8, the tradiational number for binary degrees. More... | |
| template<typename T > | |
| T | EGXMath::DegreeToArcminute (const T &decimalDegree) |
| Converts an angle in (decimal) degree to arcminute. Note that arcminutes are not equal to minutes. \[\alpha_{arcmin}= 60 * \alpha_{deg}\] . More... | |
| template<typename T > | |
| T | EGXMath::DegreeToArcsecond (const T &decimalDegree) |
| Converts an angle in (decimal) degree to arcsecond. Note that arcsecond are not equal to seconds. \[\alpha_{arcsec}=60 * 60 * \alpha_{deg}\] . More... | |
| template<typename T > | |
| T | EGXMath::DegreeToMilliarcsecond (const T &decimalDegree) |
| Converts an angle in (decimal) degree to milliarcsecond. \[\alpha_{mas}=60 * 60 * 10^3 * \alpha_{deg} \] . More... | |
| template<typename T > | |
| T | EGXMath::DegreeToMicroarcsecond (const T &decimalDegree) |
| Converts an angle in (decimal) degree to microarcsecond. \[\alpha_{\mu as}=60 * 60 * 10^6 * \alpha_{deg}\] . More... | |
| template<typename T > | |
| void | EGXMath::DegreeToDegreesMinutesSeconds (const T &decimalDegree, T &integerDegree, T &arcminute, T &arcsecond) |
| Converts an angle in (decimal) degree to degrees minutes seconds (DMS). \({DD}^{\circ}{MM}'{SS.SS}''\) format. \[degree=trun(\alpha_{deg})\] \[arcminute=trun(60 * |\alpha_{deg} - degree|)\] \[arcsecond=60 * ((60 * |\alpha_{deg} - degree|)-arcminute)\] . More... | |
| template<typename T > | |
| void | EGXMath::DegreeToDMS (const T &decimalDegree, T &integerDegree, T &arcminute, T &arcsecond) |
| Converts an angle in (decimal) degree to degrees minutes seconds (DMS). \({DD}^{\circ}{MM}'{SS.SS}''\) format. \[degree=trun(\alpha_{deg})\] \[arcminute=trun(60 * |\alpha_{deg} - degree|)\] \[arcsecond=60 * ((60 * |\alpha_{deg} - degree|)-arcminute)\] . More... | |
| template<typename T > | |
| void | EGXMath::DegreeToHoursMinutesSeconds (const T &decimalDegree, T &hour, T &minute, T &second) |
| Converts an angle in (decimal) degree to hours minutes seconds (HMS). \({HH}^{h}{MM}^{m}{SS.SS}^{s}\) format. \[hour=trun(\frac{\alpha_{deg}}{15})\] \[minute=trun(60 * |\frac{\alpha_{deg}}{15} - hour|)\] \[second=60 * ((60 * |\frac{\alpha_{deg}}{15} - hour|)-minute)\] . More... | |
| template<typename T > | |
| void | EGXMath::DegreeToHMS (const T &decimalDegree, T &hour, T &minute, T &second) |
| Converts an angle in (decimal) degree to hours minutes seconds (HMS). \({HH}^{h}{MM}^{m}{SS.SS}^{s}\) format. \[hour=trun(\frac{\alpha_{deg}}{15})\] \[minute=trun(60 * |\frac{\alpha_{deg}}{15} - hour|)\] \[second=60 * ((60 * |\frac{\alpha_{deg}}{15} - hour|)-minute)\] . More... | |
| template<typename T > | |
| T | EGXMath::DegreeToGradian (const T &decimalDegree) |
| Converts an angle in (decimal) degree to gradian. \[\alpha_{g}=\alpha_{deg}\frac{10}{9}\] . More... | |
| template<typename T > | |
| T | EGXMath::DegreeToGon (const T &decimalDegree) |
| Converts an angle in (decimal) degree to gradians. \[\alpha_{g}=\alpha_{deg}\frac{10}{9}\] . More... | |
| template<typename T > | |
| std::string | EGXMath::DegreeToCompassWind (const T &decimalDegree, const unsigned int winds, const bool abbreviate) |
| Converts an angle in (decimal) degree to a n-Wind compass point name. More... | |
| T EGXMath::DegreeToArcdegree | ( | const T & | decimalDegree | ) |
Converts an angle in (decimal) degree to (decimal) arc degree.
\[\alpha_{deg}=\alpha_{deg}\]
.
See https://en.wikipedia.org/wiki/Degree_(angle) and https://en.wikipedia.org/wiki/Decimal_degrees
| decimalDegree | \(\alpha_{deg}\ (deg)\) is the angle in (decimal) degrees. |
| T EGXMath::DegreeToArcminute | ( | const T & | decimalDegree | ) |
Converts an angle in (decimal) degree to arcminute. Note that arcminutes are not equal to minutes.
\[\alpha_{arcmin}= 60 * \alpha_{deg}\]
.
See https://en.wikipedia.org/wiki/Minute_and_second_of_arc
| decimalDegree | \(\alpha_{deg}\ (deg)\) is the angle in (decimal) degrees. |
| T EGXMath::DegreeToArcsecond | ( | const T & | decimalDegree | ) |
Converts an angle in (decimal) degree to arcsecond. Note that arcsecond are not equal to seconds.
\[\alpha_{arcsec}=60 * 60 * \alpha_{deg}\]
.
See https://en.wikipedia.org/wiki/Minute_and_second_of_arc
| decimalDegree | \(\alpha_{deg}\ (deg)\) is the angle in (decimal) degrees. |
| T EGXMath::DegreeToBinaryDegree | ( | const T & | decimalDegree, |
| const T2 & | bits = 8 |
||
| ) |
Converts an angle in (decimal) degree to binary degree (brad).
\[\alpha_{deg\ bin}=round(\alpha_{deg}\frac{2^{(n-1)}}{360})\]
Where \(n\) is the number of bits avaliable to store the number. \(n\) defaults to 8, the tradiational number for binary degrees.
See https://en.wikipedia.org/wiki/Binary_scaling#Binary_angles and https://www.globalspec.com/reference/14722/160210/Chapter-7-5-3-Binary-Angular-Measure
| decimalDegree | \(\alpha_{deg}\ (deg)\) is the angle in (decimal) degrees. |
| bits | \(n\ (bit)\) is the number of bits avaliable to store the number. Defaults to 8. |
| std::string EGXMath::DegreeToCompassWind | ( | const T & | decimalDegree, |
| const unsigned int | winds, | ||
| const bool | abbreviate | ||
| ) |
Converts an angle in (decimal) degree to a n-Wind compass point name.
See https://en.wikipedia.org/wiki/Points_of_the_compass
| decimalDegree | \(\alpha_{deg}\ (deg)\) is the angle in (decimal) degrees. |
| winds | \(winds\ (int)\) The number of points(names) that the compass should have. Must be 2,4,8,16 or 32. |
| abbreviate | \(abbreviate\ (bool)\) should the compass point name be abbreviated. |
| T EGXMath::DegreeToDecimalDegree | ( | const T & | decimalDegree | ) |
Converts an angle in (decimal) degree to decimal degree.
\[\alpha_{deg}=\alpha_{deg}\]
.
See https://en.wikipedia.org/wiki/Degree_(angle) and https://en.wikipedia.org/wiki/Decimal_degrees
| decimalDegree | \(\alpha_{deg}\ (deg)\) is the angle in (decimal) degree. |
| void EGXMath::DegreeToDegreesMinutesSeconds | ( | const T & | decimalDegree, |
| T & | integerDegree, | ||
| T & | arcminute, | ||
| T & | arcsecond | ||
| ) |
Converts an angle in (decimal) degree to degrees minutes seconds (DMS). \({DD}^{\circ}{MM}'{SS.SS}''\) format.
\[degree=trun(\alpha_{deg})\]
\[arcminute=trun(60 * |\alpha_{deg} - degree|)\]
\[arcsecond=60 * ((60 * |\alpha_{deg} - degree|)-arcminute)\]
.
Where trunc is the integer truncation command.
See https://en.wikipedia.org/wiki/Geographic_coordinate_conversion and https://en.wikipedia.org/wiki/Minute_and_second_of_arc
| decimalDegree | \(\alpha_{deg}\ (deg)\) is the angle in (decimal) degrees. |
| integerDegree | \(degree\ (deg int)\) is the angle in integer degrees. |
| arcminute | \(arcminute\ (arcmin)\) is the angle in arcminutes in whole numbers. Note that this is 1/60 of an degree. It is not equal to minutes. |
| arcsecond | \(arcsecond\ (arcsec)\) is the angle in arcseconds. Note that this is 1/60 of a arcminute, not minute. It is not equal to seconds. |
| void EGXMath::DegreeToDMS | ( | const T & | decimalDegree, |
| T & | integerDegree, | ||
| T & | arcminute, | ||
| T & | arcsecond | ||
| ) |
Converts an angle in (decimal) degree to degrees minutes seconds (DMS). \({DD}^{\circ}{MM}'{SS.SS}''\) format.
\[degree=trun(\alpha_{deg})\]
\[arcminute=trun(60 * |\alpha_{deg} - degree|)\]
\[arcsecond=60 * ((60 * |\alpha_{deg} - degree|)-arcminute)\]
.
See https://en.wikipedia.org/wiki/Geographic_coordinate_conversion and https://en.wikipedia.org/wiki/Minute_and_second_of_arc Where trunc is the integer truncation command.
| decimalDegree | \(\alpha_{deg}\ (deg)\) is the angle in (decimal) degrees. |
| integerDegree | \(degree\ (deg int)\) is the angle in integer degrees. |
| arcminute | \(arcminute\ (arcmin)\) is the angle in arcminutes in whole numbers. Note that this is 1/60 of an degree. It is not equal to minutes. |
| arcsecond | \(arcsecond\ (arcsec)\) is the angle in arcseconds. Note that this is 1/60 of a arcminute, not minute. It is not equal to seconds. |
| T EGXMath::DegreeToGon | ( | const T & | decimalDegree | ) |
Converts an angle in (decimal) degree to gradians.
\[\alpha_{g}=\alpha_{deg}\frac{10}{9}\]
.
See https://en.wikipedia.org/wiki/Gradian
| decimalDegree | \(\alpha_{deg}\ (deg)\) is the angle in (decimal) degrees. |
| T EGXMath::DegreeToGradian | ( | const T & | decimalDegree | ) |
Converts an angle in (decimal) degree to gradian.
\[\alpha_{g}=\alpha_{deg}\frac{10}{9}\]
.
See https://en.wikipedia.org/wiki/Gradian
| decimalDegree | \(\alpha_{deg}\ (deg)\) is the angle in (decimal) degrees. |
| void EGXMath::DegreeToHMS | ( | const T & | decimalDegree, |
| T & | hour, | ||
| T & | minute, | ||
| T & | second | ||
| ) |
Converts an angle in (decimal) degree to hours minutes seconds (HMS). \({HH}^{h}{MM}^{m}{SS.SS}^{s}\) format.
\[hour=trun(\frac{\alpha_{deg}}{15})\]
\[minute=trun(60 * |\frac{\alpha_{deg}}{15} - hour|)\]
\[second=60 * ((60 * |\frac{\alpha_{deg}}{15} - hour|)-minute)\]
.
See and https://en.wikipedia.org/wiki/Right_ascension and https://en.wikipedia.org/wiki/Hour_angle
| decimalDegree | \(\alpha_{deg}\ (deg)\) is the angle in (decimal) degrees. |
| hour | \(hour\ (hour)\) is the angle in hours. |
| minute | \(minute\ (min)\) is the angle in minutes in whole numbers. Note that this is 1/60 of an hour. It is not equal to arcminutes. |
| second | \(second\ (sec)\) is the angle in seconds. Note that this is 1/60 of a minute, not arcminute. It is not equal to arcseconds. |
| void EGXMath::DegreeToHoursMinutesSeconds | ( | const T & | decimalDegree, |
| T & | hour, | ||
| T & | minute, | ||
| T & | second | ||
| ) |
Converts an angle in (decimal) degree to hours minutes seconds (HMS). \({HH}^{h}{MM}^{m}{SS.SS}^{s}\) format.
\[hour=trun(\frac{\alpha_{deg}}{15})\]
\[minute=trun(60 * |\frac{\alpha_{deg}}{15} - hour|)\]
\[second=60 * ((60 * |\frac{\alpha_{deg}}{15} - hour|)-minute)\]
.
See and https://en.wikipedia.org/wiki/Right_ascension and https://en.wikipedia.org/wiki/Hour_angle
| decimalDegree | \(\alpha_{deg}\ (deg)\) is the angle in (decimal) degrees. |
| hour | \(hour\ (hour)\) is the angle in hours. |
| minute | \(minute\ (min)\) is the angle in minutes in whole numbers. Note that this is 1/60 of an hour. It is not equal to arcminutes. |
| second | \(second\ (sec)\) is the angle in seconds. Note that this is 1/60 of a minute, not arcminute. It is not equal to arcseconds. |
| T EGXMath::DegreeToIntegerDegree | ( | const T & | decimalDegree | ) |
Converts an angle in (decimal) degree to integer degree. This rounds to the nearest integer.
\[\alpha_{deg int}=round(\alpha_{deg})\]
.
See https://en.wikipedia.org/wiki/Degree_(angle) and https://en.wikipedia.org/wiki/Decimal_degrees
| decimalDegree | \(\alpha_{deg}\ (deg)\) is the angle in (decimal) degree. |
| T EGXMath::DegreeToMicroarcsecond | ( | const T & | decimalDegree | ) |
Converts an angle in (decimal) degree to microarcsecond.
\[\alpha_{\mu as}=60 * 60 * 10^6 * \alpha_{deg}\]
.
See https://en.wikipedia.org/wiki/Minute_and_second_of_arc
| decimalDegree | \(\alpha_{deg}\ (deg)\) is the angle in (decimal) degrees. |
| T EGXMath::DegreeToMilliarcsecond | ( | const T & | decimalDegree | ) |
Converts an angle in (decimal) degree to milliarcsecond.
\[\alpha_{mas}=60 * 60 * 10^3 * \alpha_{deg} \]
.
See https://en.wikipedia.org/wiki/Minute_and_second_of_arc
| decimalDegree | \(\alpha_{deg}\ (deg)\) is the angle in (decimal) degrees. |
| T EGXMath::DegreeToMilliradian | ( | const T & | decimalDegree | ) |
Converts an angle in (decimal) degrees to milliradians.
\[\alpha_{mrad}=\alpha_{deg}\frac{\pi}{180}*10^3\]
.
See https://en.wikipedia.org/wiki/Milliradian
| decimalDegree | \(\alpha_{deg}\ (deg)\) is the angle in decimal degrees. |
| T EGXMath::DegreeToRadian | ( | const T & | decimalDegree | ) |
Converts an angle in (decimal) degrees to radians.
\[\alpha_{rad}=\alpha_{deg}\frac{\pi}{180}\]
.
See https://en.wikipedia.org/wiki/Radian
| decimalDegree | \(\alpha_{deg}\ (deg)\) is the angle in decimal degrees. |
| T EGXMath::DegreeToTurn | ( | const T & | decimalDegree | ) |
Converts an angle in (decimal) degree to turn.
\[\alpha_{turn}=\alpha_{deg}\frac{1}{360}\]
.
See https://en.wikipedia.org/wiki/Turn_(geometry)
| decimalDegree | \(\alpha_{deg}\ (deg)\) is the angle in (decimal) degree. |