Converted CoordTopographic to struct
parent
989999ea45
commit
cb741f3695
|
@ -2,19 +2,19 @@
|
||||||
|
|
||||||
CoordTopographic::CoordTopographic(const CoordTopographic& b) {
|
CoordTopographic::CoordTopographic(const CoordTopographic& b) {
|
||||||
|
|
||||||
azimuth_ = b.azimuth_;
|
azimuth = b.azimuth;
|
||||||
elevation_ = b.elevation_;
|
elevation = b.elevation;
|
||||||
range_ = b.range_;
|
range = b.range;
|
||||||
range_rate_ = b.range_rate_;
|
range_rate = b.range_rate;
|
||||||
}
|
}
|
||||||
|
|
||||||
CoordTopographic& CoordTopographic::operator =(const CoordTopographic& b) {
|
CoordTopographic& CoordTopographic::operator =(const CoordTopographic& b) {
|
||||||
|
|
||||||
if (this != &b) {
|
if (this != &b) {
|
||||||
azimuth_ = b.azimuth_;
|
azimuth = b.azimuth;
|
||||||
elevation_ = b.elevation_;
|
elevation = b.elevation;
|
||||||
range_ = b.range_;
|
range = b.range;
|
||||||
range_rate_ = b.range_rate_;
|
range_rate = b.range_rate;
|
||||||
}
|
}
|
||||||
|
|
||||||
return (*this);
|
return (*this);
|
||||||
|
@ -22,10 +22,10 @@ CoordTopographic& CoordTopographic::operator =(const CoordTopographic& b) {
|
||||||
|
|
||||||
bool CoordTopographic::operator ==(const CoordTopographic& b) const {
|
bool CoordTopographic::operator ==(const CoordTopographic& b) const {
|
||||||
|
|
||||||
if (azimuth_ == b.azimuth_ &&
|
if (azimuth == b.azimuth &&
|
||||||
elevation_ == b.elevation_ &&
|
elevation == b.elevation &&
|
||||||
range_ == b.range_ &&
|
range == b.range &&
|
||||||
range_rate_ == b.range_rate_) {
|
range_rate == b.range_rate) {
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
|
@ -34,10 +34,10 @@ bool CoordTopographic::operator ==(const CoordTopographic& b) const {
|
||||||
|
|
||||||
bool CoordTopographic::operator !=(const CoordTopographic& b) const {
|
bool CoordTopographic::operator !=(const CoordTopographic& b) const {
|
||||||
|
|
||||||
if (azimuth_ == b.azimuth_ &&
|
if (azimuth == b.azimuth &&
|
||||||
elevation_ == b.elevation_ &&
|
elevation == b.elevation &&
|
||||||
range_ == b.range_ &&
|
range == b.range &&
|
||||||
range_rate_ == b.range_rate_) {
|
range_rate == b.range_rate) {
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -1,15 +1,15 @@
|
||||||
#ifndef COORDTOPOGRAPHIC_H_
|
#ifndef COORDTOPOGRAPHIC_H_
|
||||||
#define COORDTOPOGRAPHIC_H_
|
#define COORDTOPOGRAPHIC_H_
|
||||||
|
|
||||||
class CoordTopographic {
|
struct CoordTopographic {
|
||||||
public:
|
public:
|
||||||
|
|
||||||
CoordTopographic()
|
CoordTopographic()
|
||||||
: azimuth_(0.0), elevation_(0.0), range_(0.0), range_rate_(0.0) {
|
: azimuth(0.0), elevation(0.0), range(0.0), range_rate(0.0) {
|
||||||
}
|
}
|
||||||
|
|
||||||
CoordTopographic(double azimuth, double elevation, double range, double range_rate)
|
CoordTopographic(double az, double el, double rnge, double rnge_rate)
|
||||||
: azimuth_(azimuth), elevation_(elevation), range_(range), range_rate_(range_rate) {
|
: azimuth(az), elevation(el), range(rnge), range_rate(rnge_rate) {
|
||||||
}
|
}
|
||||||
|
|
||||||
CoordTopographic(const CoordTopographic& b);
|
CoordTopographic(const CoordTopographic& b);
|
||||||
|
@ -21,55 +21,22 @@ public:
|
||||||
bool operator ==(const CoordTopographic& b) const;
|
bool operator ==(const CoordTopographic& b) const;
|
||||||
bool operator !=(const CoordTopographic& b) const;
|
bool operator !=(const CoordTopographic& b) const;
|
||||||
|
|
||||||
void SetAzimuth(const double azimuth) {
|
|
||||||
azimuth_ = azimuth;
|
|
||||||
}
|
|
||||||
|
|
||||||
void SetElevation(const double elevation) {
|
|
||||||
elevation_ = elevation;
|
|
||||||
}
|
|
||||||
|
|
||||||
void SetRange(const double range) {
|
|
||||||
range_ = range;
|
|
||||||
}
|
|
||||||
|
|
||||||
void SetRangeRate(const double range_rate) {
|
|
||||||
range_rate_ = range_rate;
|
|
||||||
}
|
|
||||||
|
|
||||||
double GetAzimuth() const {
|
|
||||||
return azimuth_;
|
|
||||||
}
|
|
||||||
|
|
||||||
double GetElevation() const {
|
|
||||||
return elevation_;
|
|
||||||
}
|
|
||||||
|
|
||||||
double GetRange() const {
|
|
||||||
return range_;
|
|
||||||
}
|
|
||||||
|
|
||||||
double GetRangeRate() const {
|
|
||||||
return range_rate_;
|
|
||||||
}
|
|
||||||
|
|
||||||
private:
|
|
||||||
/*
|
/*
|
||||||
* radians
|
* radians
|
||||||
*/
|
*/
|
||||||
double azimuth_;
|
double azimuth;
|
||||||
/*
|
/*
|
||||||
* radians
|
* radians
|
||||||
*/
|
*/
|
||||||
double elevation_;
|
double elevation;
|
||||||
/*
|
/*
|
||||||
* kilometers
|
* kilometers
|
||||||
*/
|
*/
|
||||||
double range_;
|
double range;
|
||||||
/*
|
/*
|
||||||
* kilometers / second
|
* kilometers / second
|
||||||
*/
|
*/
|
||||||
double range_rate_;
|
double range_rate;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue