mirror of
https://github.com/f4exb/sdrangel.git
synced 2025-08-02 14:02:27 -04:00
Azel: Mark methods as const.
This commit is contained in:
parent
1304926162
commit
db9ccd9ca8
@ -22,7 +22,7 @@
|
|||||||
#include <cmath>
|
#include <cmath>
|
||||||
|
|
||||||
// Calculate cartesian distance between two points
|
// Calculate cartesian distance between two points
|
||||||
double AzEl::cartDistance(const AzElPoint& a, const AzElPoint& b)
|
double AzEl::cartDistance(const AzElPoint& a, const AzElPoint& b) const
|
||||||
{
|
{
|
||||||
double dx = b.m_cart.m_x - a.m_cart.m_x;
|
double dx = b.m_cart.m_x - a.m_cart.m_x;
|
||||||
double dy = b.m_cart.m_y - a.m_cart.m_y;
|
double dy = b.m_cart.m_y - a.m_cart.m_y;
|
||||||
@ -31,7 +31,7 @@ double AzEl::cartDistance(const AzElPoint& a, const AzElPoint& b)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Calculate vector difference then normalise the result
|
// Calculate vector difference then normalise the result
|
||||||
bool AzEl::normVectorDiff(const AzElCartesian& a, const AzElCartesian& b, AzElCartesian& n)
|
bool AzEl::normVectorDiff(const AzElCartesian& a, const AzElCartesian& b, AzElCartesian& n) const
|
||||||
{
|
{
|
||||||
n.m_x = b.m_x - a.m_x;
|
n.m_x = b.m_x - a.m_x;
|
||||||
n.m_y = b.m_y - a.m_y;
|
n.m_y = b.m_y - a.m_y;
|
||||||
|
@ -69,22 +69,22 @@ public:
|
|||||||
sphericalToCartesian(m_target);
|
sphericalToCartesian(m_target);
|
||||||
}
|
}
|
||||||
|
|
||||||
AzElSpherical getLocationSpherical()
|
AzElSpherical getLocationSpherical() const
|
||||||
{
|
{
|
||||||
return m_location.m_spherical;
|
return m_location.m_spherical;
|
||||||
}
|
}
|
||||||
|
|
||||||
AzElCartesian getLocationCartesian()
|
AzElCartesian getLocationCartesian() const
|
||||||
{
|
{
|
||||||
return m_location.m_cart;
|
return m_location.m_cart;
|
||||||
}
|
}
|
||||||
|
|
||||||
AzElSpherical getTargetSpherical()
|
AzElSpherical getTargetSpherical() const
|
||||||
{
|
{
|
||||||
return m_target.m_spherical;
|
return m_target.m_spherical;
|
||||||
}
|
}
|
||||||
|
|
||||||
AzElCartesian getTargetCartesian()
|
AzElCartesian getTargetCartesian() const
|
||||||
{
|
{
|
||||||
return m_target.m_cart;
|
return m_target.m_cart;
|
||||||
}
|
}
|
||||||
@ -113,8 +113,8 @@ public:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
double cartDistance(const AzElPoint& a, const AzElPoint& b);
|
double cartDistance(const AzElPoint& a, const AzElPoint& b) const;
|
||||||
bool normVectorDiff(const AzElCartesian& a, const AzElCartesian& b, AzElCartesian& n);
|
bool normVectorDiff(const AzElCartesian& a, const AzElCartesian& b, AzElCartesian& n) const;
|
||||||
double geocentricLatitude(double latRad) const;
|
double geocentricLatitude(double latRad) const;
|
||||||
double earthRadiusInMetres(double geodeticLatRad) const;
|
double earthRadiusInMetres(double geodeticLatRad) const;
|
||||||
void sphericalToCartesian(AzElPoint& point);
|
void sphericalToCartesian(AzElPoint& point);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user