3 XCSoar Glide Computer - http://www.xcsoar.org/
4 Copyright (C) 2000-2013 The XCSoar Project
5 A detailed list of copyright holders can be found in the file "AUTHORS".
7 This program is free software; you can redistribute it and/or
8 modify it under the terms of the GNU General Public License
9 as published by the Free Software Foundation; either version 2
10 of the License, or (at your option) any later version.
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software
19 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
22 #ifndef UNORDEREDTASK_H
23 #define UNORDEREDTASK_H
25 #include "Task/AbstractTask.hpp"
28 * Common class for all unordered task types
37 * @param tb Global task behaviour settings
40 UnorderedTask(TaskType _type
,
41 const TaskBehaviour
&tb
);
44 /* virtual methods from class AbstractTask */
45 virtual bool CheckTask() const override
;
46 virtual bool CalcBestMC(const AircraftState
&state_now
,
47 const GlidePolar
&glide_polar
,
48 fixed
& best
) const override
;
49 virtual fixed
CalcRequiredGlide(const AircraftState
&state_now
,
50 const GlidePolar
&glide_polar
) const override
;
51 virtual fixed
CalcGradient(const AircraftState
&state_now
) const override
;
52 virtual fixed
ScanTotalStartTime(const AircraftState
&state_now
) override
;
53 virtual fixed
ScanLegStartTime(const AircraftState
&state_now
) override
;
54 virtual fixed
ScanDistanceNominal() override
;
55 virtual fixed
ScanDistancePlanned() override
;
56 virtual fixed
ScanDistanceRemaining(const GeoPoint
&ref
) override
;
57 virtual fixed
ScanDistanceScored(const GeoPoint
&ref
) override
;
58 virtual fixed
ScanDistanceTravelled(const GeoPoint
&ref
) override
;
59 virtual void ScanDistanceMinMax(const GeoPoint
&ref
, bool full
,
60 fixed
*dmin
, fixed
*dmax
) override
;
61 virtual void GlideSolutionRemaining(const AircraftState
&state_now
,
62 const GlidePolar
&polar
,
63 GlideResult
&total
, GlideResult
&leg
) override
;
64 virtual void GlideSolutionTravelled(const AircraftState
&state_now
,
65 const GlidePolar
&glide_polar
,
66 GlideResult
&total
, GlideResult
&leg
) override
;
67 virtual void GlideSolutionPlanned(const AircraftState
&state_now
,
68 const GlidePolar
&glide_polar
,
71 DistanceStat
&total_remaining_effective
,
72 DistanceStat
&leg_remaining_effective
,
73 const GlideResult
&solution_remaining_total
,
74 const GlideResult
&solution_remaining_leg
) override
;
75 virtual bool IsScored() const override
{ return false; }