use enums instead of bools to distinguish true/magnetic headings and tracks and MSL/AGL altitudes

This commit is contained in:
Mathew Sutcliffe
2013-08-19 18:11:54 +01:00
parent 5f267e8245
commit cec9de5cc5
12 changed files with 104 additions and 74 deletions

View File

@@ -67,7 +67,7 @@ CCoordinateNed CInterpolator::pushUpdate(const CCoordinateGeodetic &pos, const C
m_state_end->timestamp = m_time.elapsed();
m_state_end->position = CCoordinateTransformation::toEcef(pos);
m_state_end->orientation.heading = CHeading(normalizeRadians(heading), false);
m_state_end->orientation.heading = CHeading(normalizeRadians(heading), CHeading::True);
m_state_end->orientation.pitch = normalizeRadians(pitch);
m_state_end->orientation.bank = normalizeRadians(bank);
m_state_end->groundspeed = groundSpeed;
@@ -131,7 +131,7 @@ bool CInterpolator::stateNow(TPlaneState *state)
// Plane Orientation
double vEast = state->velNED.east();
double vNorth = state->velNED.north();
state->orientation.heading = CHeading(atan2(vNorth, vEast), false, CAngleUnit::rad());
state->orientation.heading = CHeading(atan2(vNorth, vEast), CHeading::True, CAngleUnit::rad());
return true;
}

View File

@@ -82,7 +82,7 @@ void CMultiPlayer::onPositionUpdate(const FSD::FSD_MSG_Plane_Position *plane_pos
plane->addPosition(position,
CSpeed(plane_position->Speed(), CSpeedUnit::kts()),
CHeading((qint32)pitchBankHeading.hdg, false, CAngleUnit::deg()),
CHeading((qint32)pitchBankHeading.hdg, CHeading::True, CAngleUnit::deg()),
CAngle((qint32)pitchBankHeading.pitch, CAngleUnit::deg()),
CAngle((qint32)pitchBankHeading.bank, CAngleUnit::deg()));