16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-22 16:19:19 +02:00

Merge branch 'tmj-dev' into milek-dev

This commit is contained in:
milek7
2019-09-07 02:25:43 +02:00
31 changed files with 6383 additions and 737 deletions

View File

@@ -657,6 +657,7 @@ struct TCoupling {
double CForce = 0.0; /*sila z jaka dzialal*/
double Dist = 0.0; /*strzalka ugiecia zderzaków*/
bool CheckCollision = false; /*czy sprawdzac sile czy pedy*/
float stretch_duration { 0.f }; // seconds, elapsed time with excessive force applied to the coupler
power_coupling power_high;
// power_coupling power_low; // TODO: implement this
@@ -1143,6 +1144,7 @@ public:
/*--opis konkretnego egzemplarza taboru*/
TLocation Loc { 0.0, 0.0, 0.0 }; //pozycja pojazdów do wyznaczenia odległości pomiędzy sprzęgami
TRotation Rot { 0.0, 0.0, 0.0 };
glm::vec3 Front{};
std::string Name; /*nazwa wlasna*/
TCoupling Couplers[2]; //urzadzenia zderzno-sprzegowe, polaczenia miedzy wagonami
std::array<neighbour_data, 2> Neighbours; // potential collision sources
@@ -1408,6 +1410,8 @@ public:
bool Attach(int ConnectNo, int ConnectToNr, TMoverParameters *ConnectTo, int CouplingType, bool Forced = false, bool Audible = true);
int DettachStatus(int ConnectNo);
bool Dettach(int ConnectNo);
void damage_coupler( int const End );
void derail( int const Reason );
bool DirectionForward();
bool DirectionBackward( void );/*! kierunek ruchu*/
void BrakeLevelSet(double b);
@@ -1417,8 +1421,8 @@ public:
bool ChangeCab(int direction);
bool CurrentSwitch(bool const State);
void UpdateBatteryVoltage(double dt);
double ComputeMovement(double dt, double dt1, const TTrackShape &Shape, TTrackParam &Track, TTractionParam &ElectricTraction, const TLocation &NewLoc, TRotation &NewRot); //oblicza przesuniecie pojazdu
double FastComputeMovement(double dt, const TTrackShape &Shape, TTrackParam &Track, const TLocation &NewLoc, TRotation &NewRot); //oblicza przesuniecie pojazdu - wersja zoptymalizowana
double ComputeMovement(double dt, double dt1, const TTrackShape &Shape, TTrackParam &Track, TTractionParam &ElectricTraction, TLocation const &NewLoc, TRotation const &NewRot); //oblicza przesuniecie pojazdu
double FastComputeMovement(double dt, const TTrackShape &Shape, TTrackParam &Track, TLocation const &NewLoc, TRotation const &NewRot); //oblicza przesuniecie pojazdu - wersja zoptymalizowana
void compute_movement_( double const Deltatime );
double ShowEngineRotation(int VehN);
@@ -1498,7 +1502,7 @@ public:
/*funkcje obliczajace sily*/
void ComputeConstans(void);//ABu: wczesniejsze wyznaczenie stalych dla liczenia sil
double ComputeMass(void);
void ComputeMass(void);
void ComputeTotalForce(double dt);
double Adhesive(double staticfriction) const;
double TractionForce(double dt);
@@ -1507,7 +1511,7 @@ public:
double BrakeForceP(double press, double velocity);
double BrakeForce(const TTrackParam &Track);
double CouplerForce(int const End, double dt);
void CollisionDetect(int CouplerN, double dt);
void CollisionDetect(int const End, double const dt);
/*obrot kol uwzgledniajacy poslizg*/
double ComputeRotatingWheel(double WForce, double dt, double n) const;
@@ -1646,3 +1650,11 @@ private:
};
//double Distance(TLocation Loc1, TLocation Loc2, TDimension Dim1, TDimension Dim2);
namespace simulation {
using weights_table = std::unordered_map<std::string, float>;
extern weights_table Weights;
} // simulation