WSF
WsfOrbitalTargetingCost.hpp
Go to the documentation of this file.
1// ****************************************************************************
2// CUI
3//
4// The Advanced Framework for Simulation, Integration, and Modeling (AFSIM)
5//
6// Copyright 2021 Infoscitex, a DCS Company. All rights reserved.
7//
8// The use, dissemination or disclosure of data in this file is subject to
9// limitation or restriction. See accompanying README and LICENSE for details.
10// ****************************************************************************
11
12#ifndef WSFORBITALTARGETINGCOST_HPP
13#define WSFORBITALTARGETINGCOST_HPP
14
15#include "wsf_space_export.h"
16
17#include <string>
18
19class UtInput;
20#include "UtScriptAccessible.hpp"
21
22namespace wsf
23{
24namespace space
25{
26
28class OrbitalTargetingCost : public UtScriptAccessible
29{
30public:
31 virtual OrbitalTargetingCost* Clone() const = 0;
32 virtual bool ProcessInput(UtInput& aInput) { return false; }
33
35 virtual double operator()(double aDt, double aDv) const = 0;
36
38 virtual bool IsLeastTime() const = 0;
39
41 virtual bool IsValid() const = 0;
42
44 virtual std::string GetConfigurationRequirements() const = 0;
45};
46
52class WSF_SPACE_EXPORT BlendedCost : public OrbitalTargetingCost
53{
54public:
55 BlendedCost() = default;
56 BlendedCost(const BlendedCost& aOther) = default;
57 BlendedCost(double aA_Value, double aB_Value, double aC_Value)
58 : mA_Value{aA_Value}
59 , mB_Value{aB_Value}
60 , mC_Value{aC_Value}
61 {
62 }
63
64 BlendedCost* Clone() const override { return new BlendedCost{*this}; }
65
66 bool ProcessInput(UtInput& aInput) override;
67
68 double operator()(double aDt, double aDv) const override;
69
70 const char* GetScriptClassName() const override { return "WsfOrbitalBlendedCost"; }
71
72 bool IsLeastTime() const override;
73
74 bool IsValid() const override;
75
76 std::string GetConfigurationRequirements() const override;
77
78 double GetA_Value() const { return mA_Value; }
79 double GetB_Value() const { return mB_Value; }
80 double GetC_Value() const { return mC_Value; }
81
82 void SetA_Value(double aA_Value) { mA_Value = aA_Value; }
83 void SetB_Value(double aB_Value) { mB_Value = aB_Value; }
84 void SetC_Value(double aC_Value) { mC_Value = aC_Value; }
85
86private:
87 double mA_Value{0.0};
88 double mB_Value{1.0};
89 double mC_Value{0.0};
90};
91
92} // namespace space
93} // namespace wsf
94
95#endif // WSFORBITALTARGETINGCOST_HPP
BlendedCost(double aA_Value, double aB_Value, double aC_Value)
Definition WsfOrbitalTargetingCost.hpp:57
const char * GetScriptClassName() const override
Definition WsfOrbitalTargetingCost.hpp:70
BlendedCost(const BlendedCost &aOther)=default
void SetA_Value(double aA_Value)
Definition WsfOrbitalTargetingCost.hpp:82
double GetB_Value() const
Definition WsfOrbitalTargetingCost.hpp:79
void SetB_Value(double aB_Value)
Definition WsfOrbitalTargetingCost.hpp:83
BlendedCost * Clone() const override
Definition WsfOrbitalTargetingCost.hpp:64
double GetA_Value() const
Definition WsfOrbitalTargetingCost.hpp:78
void SetC_Value(double aC_Value)
Definition WsfOrbitalTargetingCost.hpp:84
double GetC_Value() const
Definition WsfOrbitalTargetingCost.hpp:80
A cost function to minimize when computing a solution for an orbital targeting operation.
Definition WsfOrbitalTargetingCost.hpp:29
virtual std::string GetConfigurationRequirements() const =0
Return a text description of the requirements on the cost function to be considered valid.
virtual bool IsLeastTime() const =0
Return if this cost is equivalent to a least time optimization.
virtual bool IsValid() const =0
Return if the cost function has a valid configuration.
virtual OrbitalTargetingCost * Clone() const =0
virtual bool ProcessInput(UtInput &aInput)
Definition WsfOrbitalTargetingCost.hpp:32
virtual double operator()(double aDt, double aDv) const =0
The cost function is a mapping from a delta-t, delta-v value pair into the real numbers.
Definition WsfAtmosphere.cpp:23
Function definitions for those who need run-time access to the version.
Definition WsfComm.cpp:32
Copyrights Multiple, All Rights Reserved