swift
Loading...
Searching...
No Matches
interpolant.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) 2018 swift Project Community / Contributors
2// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-swift-pilot-client-1
3
5
6#ifndef SWIFT_MISC_SIMULATION_INTERPOLATION_INTERPOLANT_H
7#define SWIFT_MISC_SIMULATION_INTERPOLATION_INTERPOLANT_H
8
10
11namespace swift::misc::simulation
12{
15 {
16 public:
18 IInterpolant() = default;
19
21 explicit IInterpolant(qint64 interpolatedTime) : m_interpolatedTime(interpolatedTime) {}
22
23 virtual ~IInterpolant() = default;
24
27 virtual std::tuple<geo::CCoordinateGeodetic, aviation::CAltitude> interpolatePositionAndAltitude() const = 0;
28
31
33 virtual const IInterpolatorPbh &pbh() const = 0;
34
36 qint64 getInterpolatedTime() const { return m_interpolatedTime; }
37
39 bool isValid() const { return m_valid; }
40
42 void setValid(bool valid) { m_valid = valid; }
43
45 bool isRecalculated() const { return m_recalculated; }
46
48 void setRecalculated(bool reCalculated) { m_recalculated = reCalculated; }
49
50 protected:
51 qint64 m_interpolatedTime = -1;
52 bool m_valid = true;
53 bool m_recalculated = false;
54 };
55} // namespace swift::misc::simulation
56#endif // SWIFT_MISC_SIMULATION_INTERPOLATION_INTERPOLANT_H
Information about the ground status.
bool m_recalculated
recalculated interpolant
Definition interpolant.h:53
virtual aviation::COnGroundInfo interpolateGroundFactor() const =0
Interpolate the ground information/factor.
IInterpolant(qint64 interpolatedTime)
Constructor.
Definition interpolant.h:21
IInterpolant()=default
Default ctor.
qint64 getInterpolatedTime() const
"Real time" representing the interpolated situation
Definition interpolant.h:36
qint64 m_interpolatedTime
"Real time "of interpolated situation
Definition interpolant.h:51
virtual const IInterpolatorPbh & pbh() const =0
Get the PBH interpolator.
virtual std::tuple< geo::CCoordinateGeodetic, aviation::CAltitude > interpolatePositionAndAltitude() const =0
Perform the interpolation.
bool isRecalculated() const
Is recalculated interpolant?
Definition interpolant.h:45
void setValid(bool valid)
Valid?
Definition interpolant.h:42
void setRecalculated(bool reCalculated)
Set recalculated interpolant.
Definition interpolant.h:48
Base class for Pitch-Bank-Heading interpolators.