43 dNorthMeters_{dNorthMeters},
44 dEastMeters_{dEastMeters},
45 dUpMeters_{dUpMeters}{}
77 if((dYawRadians != 0.0) || (dPitchRadians != 0.0) || (dRollRadians != 0.0))
80 double dRotatedNorthMeters =
81 dNorthMeters_ * cos(dYawRadians) * cos(dPitchRadians) +
82 dEastMeters_ * sin(dYawRadians) * cos(dPitchRadians) +
83 dUpMeters_ * sin(dPitchRadians);
85 double dRotatedEastMeters =
86 -dNorthMeters_ * (cos(dYawRadians) * sin(dPitchRadians) * sin(dRollRadians) +
87 sin(dYawRadians) * cos(dRollRadians)) +
88 dEastMeters_ * (cos(dYawRadians) * cos(dRollRadians) +
89 sin(dYawRadians) * sin(dPitchRadians) * sin(dRollRadians)) -
90 dUpMeters_ * (cos(dPitchRadians) * sin(dRollRadians));
92 double dRotatedUpMeters =
93 -dNorthMeters_ * (cos(dYawRadians) * sin(dPitchRadians) * cos(dRollRadians) +
94 sin(dYawRadians) * sin(dRollRadians)) -
95 dEastMeters_ * (sin(dYawRadians) * sin(dPitchRadians) * cos(dRollRadians) -
96 cos(dYawRadians) * sin(dRollRadians)) +
97 dUpMeters_ * (cos(dPitchRadians) * cos(dRollRadians));
99 dNorthMeters_ = dRotatedNorthMeters;
100 dEastMeters_ = dRotatedEastMeters;
101 dUpMeters_ = dRotatedUpMeters;
108 dNorthMeters_ += dNorthMeters;
109 dEastMeters_ += dEastMeters;
110 dUpMeters_ += dUpMeters;
double getNorthMeters() const
double getYawRadians() const
void rotate(const Orientation &orientation)
double getPitchRadians() const
double getRollRadians() const
double getUpMeters() const
Holds pitch, yaw and roll.
void adjust(double dNorthMeters, double dEastMeters, double dUpMeters)
double getEastMeters() const