WSF
P6DofUtils.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 2003-2015 The Boeing 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 P6DOF_UTILS_H
13#define P6DOF_UTILS_H
14
15#include "p6dof_export.h"
16
17#include <memory>
18#include <string>
19#include <vector>
20
21#include "P6DofVehicleData.hpp"
22#include "UtVec3dX.hpp"
23
24class P6DofVehicle;
25class P6DofTableTool;
26
27namespace P6DofUtils
28{
35
36P6DOF_EXPORT void Autotune(P6DofVehicle* aVehicle);
37P6DOF_EXPORT void CreateAutopilotConfigFile(P6DofVehicle* aVehicle, const std::string& aFilename);
38P6DOF_EXPORT std::vector<P6DOF::Pid::Type> GetRelevantPids(P6DofVehicle* aVehicle);
40 const P6DOF::AutopilotPidGroupValueData& aPidValues);
41
42// The throttle input assumes that 0 is idle, 1 is full power without
43// augmentation/afterburner (military power), and 2 is full power with
44// full augmentation/afterburner (full afterburner).
45P6DOF_EXPORT CanFlyAtReturnValue
46CanFlyAt(P6DofVehicle* aObject, double aAltitude_ft, double aVelocity_fps, double aThrottleForward, double aFlapsDown);
47
48// The filename is typically "autopilot_support_tables.txt"
49P6DOF_EXPORT void CreateAutopilotSupportFile(P6DofVehicle* aObject, const std::string& aFilename);
50
51// The filename is typically "autopilot_support_tables.txt"
53 const std::string& aFilename,
54 const double& aMaxMach);
55
56// This provides the processing that is common between CreateAutopilotSupportFile()
57// and CreateAutopilotSupportFileWithMaxMach()
58P6DOF_EXPORT void CommonCreateAutopilotSupportFile(P6DofTableTool& aTool, const std::string& aFilename);
59
60P6DOF_EXPORT int64_t TimeToTime(double aSimTime_sec);
61P6DOF_EXPORT double TimeToTime(int64_t aSimTime_nanosec);
62
63// Any delta-T less than or equal to the epsilon value is treated as if it were zero
64static constexpr int64_t cEPSILON_SIMTIME_NANOSEC = 100;
65static constexpr double cEPSILON_SIMTIME_SEC = (0.000000001 * static_cast<double>(cEPSILON_SIMTIME_NANOSEC));
66
67P6DOF_EXPORT void CalcSphericalLatLonAlt(const UtVec3dX& aPos_m, double& aLat_deg, double& aLon_deg, double& aAlt_m);
68
69P6DOF_EXPORT void CalcSphericalVecToNED(const UtVec3dX& aPos, const UtVec3dX& aSphericalVec, UtVec3dX& aNEDVec);
70
71P6DOF_EXPORT void CalcUnitVectors(const UtDCM& aDCM, UtVec3dX& aUnitVecX, UtVec3dX& aUnitVecY, UtVec3dX& aUnitVecZ);
72
73P6DOF_EXPORT void CalcLocalNEDVectors(const UtVec3dX& aPos, UtVec3dX& aLocalNorth, UtVec3dX& aLocalEast, UtVec3dX& aLocalDown);
74
75P6DOF_EXPORT void CalcLocalAngles(const UtVec3dX& aLocalNorth,
76 const UtVec3dX& aLocalEast,
77 const UtVec3dX& aLocalDown,
78 const UtVec3dX& aUnitVecX,
79 const UtVec3dX& aUnitVecZ,
80 double& aLocalYaw_rad,
81 double& aLocalPitch_rad,
82 double& aLocalRoll_rad);
83
84P6DOF_EXPORT void CalcSphericalWCSAngles(const UtDCM& aDCM, double& aYaw_rad, double& aPitch_rad, double& aRoll_rad);
85
86P6DOF_EXPORT void SphericalGreatCircleHeadingAndDistance(const double aLat,
87 const double aLon,
88 const double aTargetLat,
89 const double aTargetLon,
90 double& aTargetHeading_r,
91 double& aTargetDistance_m);
92
93P6DOF_EXPORT void
94CalcSphericalPositionFromLatLonAlt(const double aLat_deg, const double aLon_deg, const double aAlt_m, UtVec3dX& aPos_m);
95
96P6DOF_EXPORT void InertialToBodyRel(const UtDCM& aMatrix, const UtVec3dX& aInertial, UtVec3dX& aBodyRel);
97
98// This is used for the earth radius when mUseSphericalEarth is true
99// Note: The AFSIM cEARTH_RADIUS = 6366707.0194937074958 (6366.7 km)
100// Typical earth radius is 6371 km -- note the 4.3 km discrepancy
101// Distances from points on the surface to the center range from
102// 6,353 km to 6,384 km. Several different ways of modeling the
103// Earth as a sphere each yield a mean radius of 6,371 km.
104
105P6DOF_EXPORT double GetSphericalEarthRadius_m();
106
107P6DOF_EXPORT void DCM_InertialToBodyRel(const UtDCM& aMatrix, const UtVec3dX& aInertial, UtVec3dX& aBodyRel);
108
109P6DOF_EXPORT void SetSphericalDCM(const double aLat, const double aLon, UtDCM& aDCM);
110
111P6DOF_EXPORT void SetSphericalDCM(const double aLat,
112 const double aLon,
113 const double aYaw_rad,
114 const double aPitch_rad,
115 const double aRoll_rad,
116 UtDCM& aDCM);
117
118P6DOF_EXPORT void SetSphericalDCM(const UtVec3dX& aPos_m,
119 const double aHdg_rad,
120 const double aPitch_rad,
121 const double aRoll_rad,
122 UtDCM& aDCM);
123
124P6DOF_EXPORT void
125GetSphericalNEDAngles(const UtDCM& aDCM, const UtVec3dX& aPos, double& aHdg_rad, double& aPitch_rad, double& aRoll_rad);
126
127P6DOF_EXPORT UtVec3dX CalcWGS84VecToNED(const UtVec3dX& aWGS84Pos_m, const UtVec3dX& aVecWGS84_m);
128
129P6DOF_EXPORT void CalcSphericalNEDVelToSphericalVel(const UtVec3dX& aPos, const UtVec3dX& aNEDVec, UtVec3dX& aSphericalVec);
130
131P6DOF_EXPORT double CalcSphericalRangeToPoint_m(const UtVec3dX& aPos, const UtVec3dX& aPoint);
132
133P6DOF_EXPORT double CalcSphericalHeadingToPoint_r(const UtVec3dX& aPos, const UtVec3dX& aPoint);
134
135P6DOF_EXPORT void AlphaBetaFromInertialVel(const UtDCM& aMatrix,
136 const UtVec3dX& aInertialVel_mps,
137 double& aSpeed_fps,
138 double& aAlpha_deg,
139 double& aBeta_deg);
140
141P6DOF_EXPORT void AlphaBetaFromBodyRelVel(const UtVec3dX& aVel_fps, double& aAlpha_deg, double& aBeta_deg, double& aSpeed_fps);
142
143P6DOF_EXPORT void AlphaBetaFromBodyRelVel(const UtVec3dX& aVel_fps, double& aAlpha_deg, double& aBeta_deg);
144
145P6DOF_EXPORT void GetPositionFromLLA(const double aLat,
146 const double aLon,
147 const double aAlt_m,
148 const bool aUseSpericalCoords,
149 UtVec3dX& aPosition_m);
150
151P6DOF_EXPORT void GetVelocityFromVelNED(const double aNorthVel_mps,
152 const double aEastVel_mps,
153 const double aDownVel_mps,
154 const bool aUseSpericalCoords,
155 UtVec3dX& aPosition_m,
156 UtVec3dX& aVelocity_mps);
157
158P6DOF_EXPORT void
159GetLLAFromPosition(const UtVec3dX& aPosition_m, const bool aUseSpericalCoords, double& aLat, double& aLon, double& aAlt_m);
160
161// This limits the aThrottle argument between 0 and 1
162P6DOF_EXPORT void LimitThrottleNormalized(double& aThrottle);
163
164// This limits the aThrottle argument between 0 and 2
165P6DOF_EXPORT void LimitThrottleAfterburner(double& aThrottle);
166}; // namespace P6DofUtils
167
168class P6DOF_EXPORT P6DofMachParamDataTable
169{
170public:
173
175
177
178 void CreateNewMach(double aMach);
179 void AddNewParamDataPair(double aParameter, double aData);
180
181 double GetValueAtMachParam(double aMach, double aParameter) const;
182
183 double GetMinParameterAtMach(double aMach) const;
184 double GetMaxParameterAtMach(double aMach) const;
185
186 double GetMinDataAtMach(double aMach) const;
187 double GetMaxDataAtMach(double aMach) const;
188
189 // aParameterType typically is "alpha" or "cl"
190 // aParameterUnitsString typically is "units deg" or "precision float"
191 void OutputToString(std::string& aInput,
192 const std::string& aTableName,
193 const std::string& aParameterType,
194 const std::string& aParameterUnitsString) const;
195
196protected:
198
200 {
201 double parameter; // This can be anything (for example, alpha_deg or CL)
202 double value;
203 };
204
206 {
207 double mach;
208 std::vector<paramDataPair*> paramDataList;
209 };
210
211 double GetParameterAtMach(double aMach, bool aGetMin) const;
212 double GetMinParameter(const machParamDataListPair* aMachParamDataListPair) const;
213 double GetMaxParameter(const machParamDataListPair* aMachParamDataListPair) const;
214
215 double GetDataAtMach(double aMach, bool aGetMin) const;
216 double GetMinData(const machParamDataListPair* aMachParamDataListPair) const;
217 double GetMaxData(const machParamDataListPair* aMachParamDataListPair) const;
218
219 double GetValueAtParam(std::vector<paramDataPair*>& aList, double aParameter) const;
220
221 std::vector<machParamDataListPair*> mMachParamDataList;
222
224};
225
226// -------------------------------------------------------------------------------
227
228class P6DOF_EXPORT P6DofMachDataTable
229{
230public:
233
235
236 P6DofMachDataTable* Clone() const;
237
238 void CreateNewMachValuePair(double aMach, double aValue);
239
240 double GetValueAtMach(double aMach) const;
241
242 void OutputToString(std::string& aInput, const std::string& aTableName) const;
243
244protected:
246
248 {
249 double mach;
250 double value;
251 };
252
253 std::vector<machDataPair*> mMachDataList;
254};
255
256// -------------------------------------------------------------------------------
257
258class P6DofVehicle;
259
260class P6DOF_EXPORT P6DofTableTool
261{
262public:
263 explicit P6DofTableTool(P6DofVehicle* aObject);
264 ~P6DofTableTool() = default;
265
266 void InitializeTableMachValues(double aMaxMach);
267
268 // Returns true if everything worked properly
270
271 // These functions output tabular data to a string, useful
272 // for outputting data to a file
273 void OutputCLMaxMachTableToInputString(std::string& aInput) const;
274 void OutputCLMinMachTableToInputString(std::string& aInput) const;
275 void OutputAlphaMaxMachTableToInputString(std::string& aInput) const;
276 void OutputAlphaMinMachTableToInputString(std::string& aInput) const;
277 void OutputAlphaMachCLTableToInputString(std::string& aInput) const;
278 void OutputStickMachAlphaTablesToInputString(std::string& aInput) const;
279 void OutputCLMachAlphaTableToInputString(std::string& aInput) const;
280
281protected:
282 double CalcCLFromCLArea(double aCLArea);
283
284 void CreateMachTestList(double aMaxMach);
285
286 bool CalculateStickForZeroMoment(double aMach,
287 double aAlpha_rad,
288 bool aIsPowerOn,
289 double& aThrustProduced_lbs,
290 double& aStickBack);
291
292 bool CalculateStickForZeroMoment(double aMach, double aAlpha_rad, double& aStickBack);
293
294 void AddStickAndCL(double aMach, double aAlpha_rad, double& aStickBack, bool& aMachAdded, bool aLowPoint, bool aHighPoint);
295
296 bool CalcStickAndCL(double aMach,
297 double aAlpha_rad,
298 double& aStickBackBaseline,
299 double& aStickBackThrustShift,
300 double& aStickBackXCmShift,
301 double& aStickBackZCmShift);
302
303 // Here, we pre-compute the stick and CL values. This is redundant, but gives us an
304 // avenue to check data points before we add an uncontrollable mach to our table.
305 int CountValidStickAndCL(double aMach, std::vector<double> aAlphaVector_deg);
306
307 void AddAlphaVsMachCL(double aMach, double aCL, double aMinAlpha_deg, double aMaxAlpha_deg, bool& aMachAdded);
308
310 std::unique_ptr<P6DofMachDataTable> mCLMaxVsMachTable;
311 std::unique_ptr<P6DofMachDataTable> mCLMinVsMachTable;
312 std::unique_ptr<P6DofMachDataTable> mAlphaMax_degVsMachTable;
313 std::unique_ptr<P6DofMachDataTable> mAlphaMin_degVsMachTable;
314 std::unique_ptr<P6DofMachParamDataTable> mStickForZeroMomentVsMachAlphaTablePtr; // Mach-Alpha
315 std::unique_ptr<P6DofMachParamDataTable> mThrustDeltaStickForZeroMomentVsMachAlphaTablePtr; // Mach-Alpha
316 std::unique_ptr<P6DofMachParamDataTable> mXcgDeltaStickForZeroMomentVsMachAlphaTablePtr; // Mach-Alpha
317 std::unique_ptr<P6DofMachParamDataTable> mZcgDeltaStickForZeroMomentVsMachAlphaTablePtr; // Mach-Alpha
318 std::unique_ptr<P6DofMachParamDataTable> mCLVsMachAlphaTable;
319 std::unique_ptr<P6DofMachParamDataTable> mAlphaVsMachCLTable;
320
321 // These lists are used to store effective lists of mach, alpha,
322 // and beta values for generating tabular data.
323 std::vector<double> mMachTestList;
325
326private:
327 void Initialize();
328 bool CreateCLMaxAndAlphaMaxTables();
329 bool CreateCLMinAndAlphaMinTables();
330 bool CreateStickForZeroMomentTable();
331 bool CreateAlphaVsMachCLTable();
332};
333
334// -------------------------------------------------------------------------------
335
336#endif
aObjectPtr Autotune()
std::vector< machDataPair * > mMachDataList
Definition P6DofUtils.hpp:253
P6DofMachDataTable & operator=(const P6DofMachDataTable &other)=delete
P6DofMachDataTable * Clone() const
Definition P6DofUtils.cpp:1923
P6DofMachDataTable()
Definition P6DofUtils.cpp:1904
double GetValueAtMach(double aMach) const
Definition P6DofUtils.cpp:1936
void OutputToString(std::string &aInput, const std::string &aTableName) const
Definition P6DofUtils.cpp:1963
void CreateNewMachValuePair(double aMach, double aValue)
Definition P6DofUtils.cpp:1928
P6DofMachParamDataTable()
Definition P6DofUtils.cpp:1271
double GetDataAtMach(double aMach, bool aGetMin) const
Definition P6DofUtils.cpp:1605
double GetMinParameterAtMach(double aMach) const
Definition P6DofUtils.cpp:1360
double GetParameterAtMach(double aMach, bool aGetMin) const
Definition P6DofUtils.cpp:1380
std::vector< machParamDataListPair * > mMachParamDataList
Definition P6DofUtils.hpp:221
double GetMinData(const machParamDataListPair *aMachParamDataListPair) const
Definition P6DofUtils.cpp:1782
void AddNewParamDataPair(double aParameter, double aData)
Definition P6DofUtils.cpp:1319
double GetMaxParameter(const machParamDataListPair *aMachParamDataListPair) const
Definition P6DofUtils.cpp:1581
double GetValueAtParam(std::vector< paramDataPair * > &aList, double aParameter) const
Definition P6DofUtils.cpp:1830
double GetMaxData(const machParamDataListPair *aMachParamDataListPair) const
Definition P6DofUtils.cpp:1806
double GetMaxDataAtMach(double aMach) const
Definition P6DofUtils.cpp:1375
double GetMinParameter(const machParamDataListPair *aMachParamDataListPair) const
Definition P6DofUtils.cpp:1557
P6DofMachParamDataTable * Clone() const
Definition P6DofUtils.cpp:1305
machParamDataListPair * mCurrentMachParamDataPairPtr
Definition P6DofUtils.hpp:223
double GetMaxParameterAtMach(double aMach) const
Definition P6DofUtils.cpp:1365
double GetValueAtMachParam(double aMach, double aParameter) const
Definition P6DofUtils.cpp:1329
P6DofMachParamDataTable & operator=(const P6DofMachParamDataTable &other)=delete
void CreateNewMach(double aMach)
Definition P6DofUtils.cpp:1310
void OutputToString(std::string &aInput, const std::string &aTableName, const std::string &aParameterType, const std::string &aParameterUnitsString) const
Definition P6DofUtils.cpp:1859
double GetMinDataAtMach(double aMach) const
Definition P6DofUtils.cpp:1370
Definition P6DofUtils.hpp:261
std::unique_ptr< P6DofMachDataTable > mAlphaMax_degVsMachTable
Definition P6DofUtils.hpp:312
std::vector< double > mMachTestList
Definition P6DofUtils.hpp:323
void OutputCLMaxMachTableToInputString(std::string &aInput) const
Definition P6DofUtils.cpp:2578
void OutputCLMachAlphaTableToInputString(std::string &aInput) const
Definition P6DofUtils.cpp:2660
bool CalculateStickForZeroMoment(double aMach, double aAlpha_rad, bool aIsPowerOn, double &aThrustProduced_lbs, double &aStickBack)
Definition P6DofUtils.cpp:2001
void OutputAlphaMinMachTableToInputString(std::string &aInput) const
Definition P6DofUtils.cpp:2608
P6DofVehicle * mObject
Definition P6DofUtils.hpp:309
bool CalcStickAndCL(double aMach, double aAlpha_rad, double &aStickBackBaseline, double &aStickBackThrustShift, double &aStickBackXCmShift, double &aStickBackZCmShift)
Definition P6DofUtils.cpp:2380
std::unique_ptr< P6DofMachDataTable > mCLMinVsMachTable
Definition P6DofUtils.hpp:311
void CreateMachTestList(double aMaxMach)
Definition P6DofUtils.cpp:2677
std::unique_ptr< P6DofMachParamDataTable > mZcgDeltaStickForZeroMomentVsMachAlphaTablePtr
Definition P6DofUtils.hpp:317
std::unique_ptr< P6DofMachParamDataTable > mXcgDeltaStickForZeroMomentVsMachAlphaTablePtr
Definition P6DofUtils.hpp:316
std::unique_ptr< P6DofMachDataTable > mAlphaMin_degVsMachTable
Definition P6DofUtils.hpp:313
void OutputCLMinMachTableToInputString(std::string &aInput) const
Definition P6DofUtils.cpp:2588
P6DofTableTool(P6DofVehicle *aObject)
Definition P6DofUtils.cpp:1978
void OutputAlphaMaxMachTableToInputString(std::string &aInput) const
Definition P6DofUtils.cpp:2598
void AddAlphaVsMachCL(double aMach, double aCL, double aMinAlpha_deg, double aMaxAlpha_deg, bool &aMachAdded)
Definition P6DofUtils.cpp:2304
std::unique_ptr< P6DofMachParamDataTable > mThrustDeltaStickForZeroMomentVsMachAlphaTablePtr
Definition P6DofUtils.hpp:315
void AddStickAndCL(double aMach, double aAlpha_rad, double &aStickBack, bool &aMachAdded, bool aLowPoint, bool aHighPoint)
Definition P6DofUtils.cpp:2450
bool mTableListsInitialized
Definition P6DofUtils.hpp:324
std::unique_ptr< P6DofMachDataTable > mCLMaxVsMachTable
Definition P6DofUtils.hpp:310
std::unique_ptr< P6DofMachParamDataTable > mCLVsMachAlphaTable
Definition P6DofUtils.hpp:318
void OutputAlphaMachCLTableToInputString(std::string &aInput) const
Definition P6DofUtils.cpp:2618
void OutputStickMachAlphaTablesToInputString(std::string &aInput) const
Definition P6DofUtils.cpp:2630
std::unique_ptr< P6DofMachParamDataTable > mAlphaVsMachCLTable
Definition P6DofUtils.hpp:319
bool CreateAutopilotTables()
Definition P6DofUtils.cpp:2272
double CalcCLFromCLArea(double aCLArea)
Definition P6DofUtils.cpp:2251
void InitializeTableMachValues(double aMaxMach)
Definition P6DofUtils.cpp:2672
std::unique_ptr< P6DofMachParamDataTable > mStickForZeroMomentVsMachAlphaTablePtr
Definition P6DofUtils.hpp:314
~P6DofTableTool()=default
int CountValidStickAndCL(double aMach, std::vector< double > aAlphaVector_deg)
Definition P6DofUtils.cpp:2428
Definition P6DofVehicle.hpp:53
Type
Definition P6DofVehicleData.hpp:182
Definition P6DofUtils.hpp:28
P6DOF_EXPORT void LimitThrottleNormalized(double &aThrottle)
Definition P6DofUtils.cpp:1259
P6DOF_EXPORT double GetSphericalEarthRadius_m()
Definition P6DofUtils.cpp:944
P6DOF_EXPORT void CreateAutopilotConfigFile(P6DofVehicle *aVehicle, const std::string &aFilename)
Definition P6DofUtils.cpp:238
P6DOF_EXPORT int64_t TimeToTime(double aSimTime_sec)
Definition P6DofUtils.cpp:646
P6DOF_EXPORT void CalcSphericalPositionFromLatLonAlt(const double aLat_deg, const double aLon_deg, const double aAlt_m, UtVec3dX &aPos_m)
Definition P6DofUtils.cpp:909
P6DOF_EXPORT void CalcUnitVectors(const UtDCM &aDCM, UtVec3dX &aUnitVecX, UtVec3dX &aUnitVecY, UtVec3dX &aUnitVecZ)
Definition P6DofUtils.cpp:714
static constexpr double cEPSILON_SIMTIME_SEC
Definition P6DofUtils.hpp:65
CanFlyAtReturnValue
Definition P6DofUtils.hpp:30
@ CONTROL_FAIL
Definition P6DofUtils.hpp:32
@ CAN_FLY
Definition P6DofUtils.hpp:33
@ CAN_NOT_FLY
Definition P6DofUtils.hpp:31
P6DOF_EXPORT void SphericalGreatCircleHeadingAndDistance(const double aLat, const double aLon, const double aTargetLat, const double aTargetLon, double &aTargetHeading_r, double &aTargetDistance_m)
Definition P6DofUtils.cpp:871
P6DOF_EXPORT void GetPositionFromLLA(const double aLat, const double aLon, const double aAlt_m, const bool aUseSpericalCoords, UtVec3dX &aPosition_m)
Definition P6DofUtils.cpp:1195
P6DOF_EXPORT void CalcLocalAngles(const UtVec3dX &aLocalNorth, const UtVec3dX &aLocalEast, const UtVec3dX &aLocalDown, const UtVec3dX &aUnitVecX, const UtVec3dX &aUnitVecZ, double &aLocalYaw_rad, double &aLocalPitch_rad, double &aLocalRoll_rad)
Definition P6DofUtils.cpp:743
P6DOF_EXPORT void CreateAutopilotSupportFileWithMaxMach(P6DofVehicle *aObject, const std::string &aFilename, const double &aMaxMach)
Definition P6DofUtils.cpp:586
P6DOF_EXPORT void AlphaBetaFromInertialVel(const UtDCM &aMatrix, const UtVec3dX &aInertialVel_mps, double &aSpeed_fps, double &aAlpha_deg, double &aBeta_deg)
Definition P6DofUtils.cpp:1110
P6DOF_EXPORT double CalcSphericalRangeToPoint_m(const UtVec3dX &aPos, const UtVec3dX &aPoint)
Definition P6DofUtils.cpp:1060
P6DOF_EXPORT const P6DOF::SinglePidValueData & GetSinglePidData(P6DOF::Pid::Type aPidType, const P6DOF::AutopilotPidGroupValueData &aPidValues)
Definition P6DofUtils.cpp:470
P6DOF_EXPORT void CalcSphericalNEDVelToSphericalVel(const UtVec3dX &aPos, const UtVec3dX &aNEDVec, UtVec3dX &aSphericalVec)
Definition P6DofUtils.cpp:1044
P6DOF_EXPORT CanFlyAtReturnValue CanFlyAt(P6DofVehicle *aObject, double aAltitude_ft, double aVelocity_fps, double aThrottleForward, double aFlapsDown)
Definition P6DofUtils.cpp:519
P6DOF_EXPORT std::vector< P6DOF::Pid::Type > GetRelevantPids(P6DofVehicle *aVehicle)
Definition P6DofUtils.cpp:455
P6DOF_EXPORT void CalcSphericalWCSAngles(const UtDCM &aDCM, double &aYaw_rad, double &aPitch_rad, double &aRoll_rad)
Definition P6DofUtils.cpp:811
P6DOF_EXPORT void CalcLocalNEDVectors(const UtVec3dX &aPos, UtVec3dX &aLocalNorth, UtVec3dX &aLocalEast, UtVec3dX &aLocalDown)
Definition P6DofUtils.cpp:729
P6DOF_EXPORT UtVec3dX CalcWGS84VecToNED(const UtVec3dX &aWGS84Pos_m, const UtVec3dX &aVecWGS84_m)
Definition P6DofUtils.cpp:1026
P6DOF_EXPORT void GetSphericalNEDAngles(const UtDCM &aDCM, const UtVec3dX &aPos, double &aHdg_rad, double &aPitch_rad, double &aRoll_rad)
Definition P6DofUtils.cpp:1010
P6DOF_EXPORT void CommonCreateAutopilotSupportFile(P6DofTableTool &aTool, const std::string &aFilename)
Definition P6DofUtils.cpp:597
P6DOF_EXPORT void LimitThrottleAfterburner(double &aThrottle)
Definition P6DofUtils.cpp:1264
P6DOF_EXPORT void GetVelocityFromVelNED(const double aNorthVel_mps, const double aEastVel_mps, const double aDownVel_mps, const bool aUseSpericalCoords, UtVec3dX &aPosition_m, UtVec3dX &aVelocity_mps)
Definition P6DofUtils.cpp:1215
P6DOF_EXPORT double CalcSphericalHeadingToPoint_r(const UtVec3dX &aPos, const UtVec3dX &aPoint)
Definition P6DofUtils.cpp:1085
P6DOF_EXPORT void SetSphericalDCM(const double aLat, const double aLon, UtDCM &aDCM)
Definition P6DofUtils.cpp:970
P6DOF_EXPORT void CalcSphericalLatLonAlt(const UtVec3dX &aPos_m, double &aLat_deg, double &aLon_deg, double &aAlt_m)
Definition P6DofUtils.cpp:659
P6DOF_EXPORT void DCM_InertialToBodyRel(const UtDCM &aMatrix, const UtVec3dX &aInertial, UtVec3dX &aBodyRel)
Definition P6DofUtils.cpp:949
P6DOF_EXPORT void CalcSphericalVecToNED(const UtVec3dX &aPos, const UtVec3dX &aSphericalVec, UtVec3dX &aNEDVec)
Definition P6DofUtils.cpp:699
P6DOF_EXPORT void CreateAutopilotSupportFile(P6DofVehicle *aObject, const std::string &aFilename)
Definition P6DofUtils.cpp:576
static constexpr int64_t cEPSILON_SIMTIME_NANOSEC
Definition P6DofUtils.hpp:64
P6DOF_EXPORT void GetLLAFromPosition(const UtVec3dX &aPosition_m, const bool aUseSpericalCoords, double &aLat, double &aLon, double &aAlt_m)
Definition P6DofUtils.cpp:1240
P6DOF_EXPORT void AlphaBetaFromBodyRelVel(const UtVec3dX &aVel_fps, double &aAlpha_deg, double &aBeta_deg, double &aSpeed_fps)
Definition P6DofUtils.cpp:1134
P6DOF_EXPORT void InertialToBodyRel(const UtDCM &aMatrix, const UtVec3dX &aInertial, UtVec3dX &aBodyRel)
Definition P6DofUtils.cpp:923
Definition P6DofVehicleData.hpp:220
Definition P6DofVehicleData.hpp:152
Definition P6DofUtils.hpp:248
double mach
Definition P6DofUtils.hpp:249
double value
Definition P6DofUtils.hpp:250
double mach
Definition P6DofUtils.hpp:207
std::vector< paramDataPair * > paramDataList
Definition P6DofUtils.hpp:208
Definition P6DofUtils.hpp:200
double parameter
Definition P6DofUtils.hpp:201
double value
Definition P6DofUtils.hpp:202
Copyrights Multiple, All Rights Reserved