CONFIG LIB 1.5
Configuration Files Library (by TGG 2020)
Loading...
Searching...
No Matches
mass_file.h
1/*********************************************************************/
2/* */
3/* Config files library - (C) JM 2020 */
4/* */
5/*********************************************************************/
6/* Warszawa, 2020 */
7/*********************************************************************/
8/* */
9/* File: mass_file.h */
10/* */
11/* Author: J.Mieloszyk, modif. T.Grabowski */
12/* */
13/* Contents - MASS_FILE class definition (I/O functions) */
14/* */
15/* */
16/*********************************************************************/
17/* */
18/* */
19
24#ifndef _MASS_FILE_H_
25#define _MASS_FILE_H_
26
27#include <vector>
28
29#include "mass_data.h"
30
32{
33 public:
34
35 unsigned int n_Masses;
36 unsigned int RefInertia;
37 double Ref_x;
38 double Ref_y;
39 double Ref_z;
40
41 std::vector <MASS_OBJECT_DATA> mObjs;
42
43 double m_glob;
44 double CGx_glob;
45 double CGy_glob;
46 double CGz_glob;
47 double Ixx_glob;
48 double Iyy_glob;
49 double Izz_glob;
50 double Ixy_glob;
51 double Iyz_glob;
52 double Izx_glob;
53
54 MASS_FILE( void );
55 ~MASS_FILE( void );
57 void Clean();
59 int Read( const char *FileName );
61 int Write( const char *Filename );
62
63 private:
64
65 void WriteHeader(std::ofstream &out);
66};
67
68#endif /*_MASS_FILE_H_*/
int Read(const char *FileName)
reads masses file
Definition mass_file.cpp:46
double Iyy_glob
global inertia moment wrt CG [kg m^2]
Definition mass_file.h:48
unsigned int RefInertia
type of origin for inertia moment computation: CG/CS/Arbitrary
Definition mass_file.h:36
double Ixx_glob
global inertia moment wrt CG [kg m^2]
Definition mass_file.h:47
std::vector< MASS_OBJECT_DATA > mObjs
vector of mass objects
Definition mass_file.h:41
unsigned int n_Masses
number of mass objects
Definition mass_file.h:35
double Izx_glob
global inertia moment wrt CG [kg m^2]
Definition mass_file.h:52
double CGx_glob
global CG position X [m]
Definition mass_file.h:44
double Izz_glob
global inertia moment wrt CG [kg m^2]
Definition mass_file.h:49
void Clean()
cleans local variables
Definition mass_file.cpp:28
double Iyz_glob
global inertia moment wrt CG [kg m^2]
Definition mass_file.h:51
double Ref_y
arbitrary reference point y coordinate
Definition mass_file.h:38
double CGy_glob
global CG position Y [m]
Definition mass_file.h:45
double Ref_z
arbitrary reference point z coordinate
Definition mass_file.h:39
int Write(const char *Filename)
writes masses file
Definition mass_file.cpp:74
double CGz_glob
global CG position Z [m]
Definition mass_file.h:46
double Ixy_glob
global inertia moment wrt CG [kg m^2]
Definition mass_file.h:50
double Ref_x
arbitrary reference point x coordinate
Definition mass_file.h:37
double m_glob
global mass value [kg]
Definition mass_file.h:43
mass objects data manipulation