mirror of
https://github.com/f4exb/sdrangel.git
synced 2025-07-31 13:02:27 -04:00
Azel: Mark methods as const.
This commit is contained in:
parent
1304926162
commit
db9ccd9ca8
@ -22,7 +22,7 @@
|
||||
#include <cmath>
|
||||
|
||||
// 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 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
|
||||
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_y = b.m_y - a.m_y;
|
||||
|
@ -69,22 +69,22 @@ public:
|
||||
sphericalToCartesian(m_target);
|
||||
}
|
||||
|
||||
AzElSpherical getLocationSpherical()
|
||||
AzElSpherical getLocationSpherical() const
|
||||
{
|
||||
return m_location.m_spherical;
|
||||
}
|
||||
|
||||
AzElCartesian getLocationCartesian()
|
||||
AzElCartesian getLocationCartesian() const
|
||||
{
|
||||
return m_location.m_cart;
|
||||
}
|
||||
|
||||
AzElSpherical getTargetSpherical()
|
||||
AzElSpherical getTargetSpherical() const
|
||||
{
|
||||
return m_target.m_spherical;
|
||||
}
|
||||
|
||||
AzElCartesian getTargetCartesian()
|
||||
AzElCartesian getTargetCartesian() const
|
||||
{
|
||||
return m_target.m_cart;
|
||||
}
|
||||
@ -113,8 +113,8 @@ public:
|
||||
|
||||
private:
|
||||
|
||||
double cartDistance(const AzElPoint& a, const AzElPoint& b);
|
||||
bool normVectorDiff(const AzElCartesian& a, const AzElCartesian& b, AzElCartesian& n);
|
||||
double cartDistance(const AzElPoint& a, const AzElPoint& b) const;
|
||||
bool normVectorDiff(const AzElCartesian& a, const AzElCartesian& b, AzElCartesian& n) const;
|
||||
double geocentricLatitude(double latRad) const;
|
||||
double earthRadiusInMetres(double geodeticLatRad) const;
|
||||
void sphericalToCartesian(AzElPoint& point);
|
||||
|
Loading…
x
Reference in New Issue
Block a user