ModelSpace
All Classes Namespaces Functions Variables Enumerations Pages
conversions.h
1/******************************************************************************
2* Copyright (c) ATTX LLC 2024. All Rights Reserved.
3*
4* This software and associated documentation (the "Software") are the
5* proprietary and confidential information of ATTX, LLC. The Software is
6* furnished under a license agreement between ATTX and the user organization
7* and may be used or copied only in accordance with the terms of the agreement.
8* Refer to 'license/attx_license.adoc' for standard license terms.
9*
10* EXPORT CONTROL NOTICE: THIS SOFTWARE MAY INCLUDE CONTENT CONTROLLED UNDER THE
11* INTERNATIONAL TRAFFIC IN ARMS REGULATIONS (ITAR) OR THE EXPORT ADMINISTRATION
12* REGULATIONS (EAR99). No part of the Software may be used, reproduced, or
13* transmitted in any form or by any means, for any purpose, without the express
14* written permission of ATTX, LLC.
15******************************************************************************/
16/**
17 * File: Conversions.h
18 *
19 * This file contains analysis utilities to convert units in the circular restricted
20 * three body problem (cr3bp).
21 *
22 * All conversions are per Dr. Pernicka of Missouri S&T and the following online utilities:
23 * https://orbital-mechanics.space/the-n-body-problem/circular-restricted-three-body-problem.html
24 *
25 * Author: Alex Reynolds <alex.reynolds@attx.tech>
26 */
27#ifndef CR3BPUTILS_CONVERSIONS_H
28#define CR3BPUTILS_CONVERSIONS_H
29
30#include <cmath>
31
32#include "core/CartesianVector.hpp"
33#include "core/macros.h"
34
35namespace modelspace {
36
37 /// @brief Function to return the characteristic mass for CR3BP
38 /// @param m1 The mass of the primary body
39 /// @param m2 The mass of the secondary body
40 /// @return The characteristic mass
41 double muStar(double m1, double m2);
42
43 /// @brief Function to return the characteristic length for CR3BP
44 /// @param r The circular orbit radius of the secondary body about the first
45 /// @return The characteristic length
46 double lStar(double r);
47
48 /// @brief Function to return the characteristic time for the CR3BP
49 /// @param r The circular orbit radius of the secondary body about the first
50 /// @param mu The mass of the primary body
51 /// @return The characteristic time
52 double tStar(double r, double mu);
53
54 /// @brief Function to convert position from dimensional to characteristic units
55 /// @param pos_d The position of the body in dimensional units
56 /// @param l_star The characteristic length of the system
57 /// @return Position in characteristic units
59
60 /// @brief Function to convert velocity from dimensional to characteristic units
61 /// @param vel_d The velocity of the body in dimensional units
62 /// @param l_star The characteristic length of the system
63 /// @param t_star The characteristic time of the system
64 /// @return Velocity in characteristic units
65 CartesianVector3D convertVelDim2Nd(CartesianVector3D vel_d, double l_star, double t_star);
66
67 /// @brief Function to convert position from characteristic to dimensional units
68 /// @param pos_nd The position of the body in non-dimensional units
69 /// @param l_star The characteristic length of the system
70 /// @return Position in dimensional units
72
73 /// @brief Function to convert velocity from characteristic to dimensional units
74 /// @param vel_nd The velocity of the body in non-dimensional units
75 /// @param l_star The characteristic length of the system
76 /// @param t_star The characteristic time of the system
77 /// @return Velocity in dimensional units
78 CartesianVector3D convertVelNd2Dim(CartesianVector3D vel_nd, double l_star, double t_star);
79
80}
81
82#endif
#define CartesianVector3D
Definition macros.h:54
Class to propagate CR3BP dynamics in characteristic units.
Definition ConfigurationWriter.cpp:18
double tStar(double r, double mu)
Function to return the characteristic time for the CR3BP.
Definition conversions.cpp:25
clockwerk::CartesianVector< double, 3 > convertVelDim2Nd(clockwerk::CartesianVector< double, 3 > vel_d, double l_star, double t_star)
Function to convert velocity from dimensional to characteristic units.
Definition conversions.cpp:32
clockwerk::CartesianVector< double, 3 > convertPosDim2Nd(clockwerk::CartesianVector< double, 3 > pos_d, double l_star)
Function to convert position from dimensional to characteristic units.
Definition conversions.cpp:27
double lStar(double r)
Function to return the characteristic length for CR3BP.
Definition conversions.cpp:23
double muStar(double m1, double m2)
Function to return the characteristic mass for CR3BP.
Definition conversions.cpp:21
clockwerk::CartesianVector< double, 3 > convertVelNd2Dim(clockwerk::CartesianVector< double, 3 > vel_nd, double l_star, double t_star)
Function to convert velocity from characteristic to dimensional units.
Definition conversions.cpp:41
clockwerk::CartesianVector< double, 3 > convertPosNd2Dim(clockwerk::CartesianVector< double, 3 > pos_nd, double l_star)
Function to convert position from characteristic to dimensional units.
Definition conversions.cpp:37