mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-18 03:09:18 +02:00
Wyrzucenie niepotrzebnych plików mover.
Rozpoczecie wyrzucania zmiennych Borlanda.
This commit is contained in:
28
DynObj.h
28
DynObj.h
@@ -21,6 +21,8 @@ http://mozilla.org/MPL/2.0/.
|
||||
#include "AdvSound.h"
|
||||
#include "Button.h"
|
||||
#include "AirCoupler.h"
|
||||
|
||||
#include <string>
|
||||
//---------------------------------------------------------------------------
|
||||
//---------------------------------------------------------------------------
|
||||
//---------------------------------------------------------------------------
|
||||
@@ -161,8 +163,8 @@ class TDynamicObject
|
||||
int &CouplNr);
|
||||
|
||||
public: // parametry położenia pojazdu dostępne publicznie
|
||||
AnsiString asTrack; // nazwa toru początkowego; wywalić?
|
||||
AnsiString asDestination; // dokąd pojazd ma być kierowany "(stacja):(tor)"
|
||||
std::string asTrack; // nazwa toru początkowego; wywalić?
|
||||
std::string asDestination; // dokąd pojazd ma być kierowany "(stacja):(tor)"
|
||||
matrix4x4 mMatrix; // macierz przekształcenia do renderowania modeli
|
||||
TMoverParameters *MoverParameters; // parametry fizyki ruchu oraz przeliczanie
|
||||
// TMoverParameters *pControlled; //wskaźnik do sterowanego członu silnikowego
|
||||
@@ -324,7 +326,7 @@ class TDynamicObject
|
||||
// TTrackFollower Axle3; //Ra: wyłączyłem, bo kąty są liczone w Segment.cpp
|
||||
int iNumAxles; // ilość osi
|
||||
int CouplCounter;
|
||||
AnsiString asModel;
|
||||
std::string asModel;
|
||||
|
||||
public:
|
||||
void ABuScanObjects(int ScanDir, double ScanDist);
|
||||
@@ -359,10 +361,10 @@ class TDynamicObject
|
||||
|
||||
int GetPneumatic(bool front, bool red);
|
||||
void SetPneumatic(bool front, bool red);
|
||||
AnsiString asName;
|
||||
AnsiString GetName()
|
||||
std::string asName;
|
||||
std::string GetName()
|
||||
{
|
||||
return this ? asName : AnsiString("");
|
||||
return this ? asName : std::string("");
|
||||
};
|
||||
|
||||
TRealSound rsDiesielInc; // youBy
|
||||
@@ -388,7 +390,7 @@ class TDynamicObject
|
||||
bool bDisplayCab; // czy wyswietlac kabine w train.cpp
|
||||
int iCabs; // maski bitowe modeli kabin
|
||||
TTrack *MyTrack; // McZapkie-030303: tor na ktorym stoi, ABu
|
||||
AnsiString asBaseDir;
|
||||
std::string asBaseDir;
|
||||
GLuint ReplacableSkinID[5]; // McZapkie:zmienialne nadwozie
|
||||
int iAlpha; // maska przezroczystości tekstur
|
||||
int iMultiTex; //<0 tekstury wskazane wpisem, >0 tekstury z przecinkami, =0 jedna
|
||||
@@ -400,9 +402,9 @@ class TDynamicObject
|
||||
TDynamicObject();
|
||||
~TDynamicObject();
|
||||
double TDynamicObject::Init( // zwraca długość pojazdu albo 0, jeśli błąd
|
||||
AnsiString Name, AnsiString BaseDir, AnsiString asReplacableSkin, AnsiString Type_Name,
|
||||
TTrack *Track, double fDist, AnsiString DriverType, double fVel, AnsiString TrainName,
|
||||
float Load, AnsiString LoadType, bool Reversed, AnsiString);
|
||||
std::string Name, std::string BaseDir, std::string asReplacableSkin, std::string Type_Name,
|
||||
TTrack *Track, double fDist, std::string DriverType, double fVel, std::string TrainName,
|
||||
float Load, std::string LoadType, bool Reversed, std::string);
|
||||
void AttachPrev(TDynamicObject *Object, int iType = 1);
|
||||
bool UpdateForce(double dt, double dt1, bool FullVer);
|
||||
void LoadUpdate();
|
||||
@@ -464,7 +466,7 @@ class TDynamicObject
|
||||
// void UpdatePos();
|
||||
|
||||
// McZapkie-260202
|
||||
void LoadMMediaFile(AnsiString BaseDir, AnsiString TypeName, AnsiString ReplacableSkin);
|
||||
void LoadMMediaFile(std::string BaseDir, std::string TypeName, std::string ReplacableSkin);
|
||||
|
||||
inline double ABuGetDirection() // ABu.
|
||||
{
|
||||
@@ -506,8 +508,8 @@ class TDynamicObject
|
||||
void ParamSet(int what, int into);
|
||||
int RouteWish(TTrack *tr); // zapytanie do AI, po którym segmencie skrzyżowania
|
||||
// jechać
|
||||
void DestinationSet(AnsiString to, AnsiString numer);
|
||||
AnsiString TextureTest(AnsiString &name);
|
||||
void DestinationSet(std::string to, std::string numer);
|
||||
std::string TextureTest(std::string &name);
|
||||
void OverheadTrack(float o);
|
||||
double MED[9][8]; // lista zmiennych do debugowania hamulca ED
|
||||
};
|
||||
|
||||
1059
McZapkie/MOVER.h
1059
McZapkie/MOVER.h
File diff suppressed because it is too large
Load Diff
@@ -6,30 +6,27 @@ distributed with this file, You can
|
||||
obtain one at
|
||||
http://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
#include "system.hpp"
|
||||
#include "classes.hpp"
|
||||
|
||||
#include <MATH.H>
|
||||
#include <FLOAT.H>
|
||||
#include <typeinfo>
|
||||
#include <fstream> // std::ifstream
|
||||
#include <sstream>
|
||||
#include <istream>
|
||||
#include <istream>
|
||||
#include <iostream>
|
||||
#include <stdio.h> // sprintf()
|
||||
#include <stdlib.h>
|
||||
#include <math.h>
|
||||
#include <cmath>
|
||||
#include <math>
|
||||
#include <stdio.h>
|
||||
|
||||
#include "Mover.h"
|
||||
#include "globals.h"
|
||||
#include "qutils.h"
|
||||
#include "mctools.hpp"
|
||||
#include "logs.h"
|
||||
#include "hamulce.hpp"
|
||||
#include "Oerlikon_ESt.hpp"
|
||||
#include "../globals.h"
|
||||
//#include "../qutils.h"
|
||||
#include "mctools.h"
|
||||
#include "../logs.h"
|
||||
#include "hamulce.h"
|
||||
#include "Oerlikon_ESt.h"
|
||||
//---------------------------------------------------------------------------
|
||||
#pragma package(smart_init)
|
||||
|
||||
@@ -37,7 +34,7 @@ http://mozilla.org/MPL/2.0/.
|
||||
// Jeœli jakieœ zmienne nie s¹ u¿ywane w mover.pas, te¿ mo¿na je przenosiæ.
|
||||
// Przeniesienie wszystkiego na raz zrobi³o by zbyt wielki chaos do ogarniêcia.
|
||||
|
||||
const dEpsilon = 0.01; // 1cm (zale¿y od typu sprzêgu...)
|
||||
const double dEpsilon = 0.01; // 1cm (zale¿y od typu sprzêgu...)
|
||||
const double CouplerTune = 0.1; // skalowanie tlumiennosci
|
||||
|
||||
long Trunc(float f)
|
||||
@@ -64,7 +61,7 @@ double TMoverParameters::current(double n, double U)
|
||||
// w zaleznosci od polozenia nastawnikow MainCtrl i ScndCtrl oraz predkosci obrotowej n
|
||||
// a takze wywala bezpiecznik nadmiarowy gdy za duzy prad lub za male napiecie
|
||||
// jest takze mozliwosc uszkodzenia silnika wskutek nietypowych parametrow
|
||||
const ep09resED = 5.8; // TODO: dobrac tak aby sie zgadzalo ze wbudzeniem
|
||||
const float ep09resED = 5.8; // TODO: dobrac tak aby sie zgadzalo ze wbudzeniem
|
||||
|
||||
double R, MotorCurrent;
|
||||
double Rz, Delta, Isf;
|
||||
|
||||
@@ -19,10 +19,7 @@ http://mozilla.org/MPL/2.0/.
|
||||
|
||||
#include "hamulce.h" // Pascal unit
|
||||
#include "friction.h" // Pascal unit
|
||||
#include <SysUtils.hpp> // Pascal unit
|
||||
#include <mctools.hpp> // Pascal unit
|
||||
#include <SysInit.hpp> // Pascal unit
|
||||
#include <System.hpp> // Pascal unit
|
||||
#include "mctools.h" // Pascal unit
|
||||
#include <string>
|
||||
|
||||
/*
|
||||
|
||||
@@ -11,9 +11,9 @@
|
||||
#pragma option push -w-
|
||||
#pragma option push -Vx
|
||||
#include <hamulce.h> // Pascal unit
|
||||
#include <friction.hpp> // Pascal unit
|
||||
#include <friction.h> // Pascal unit
|
||||
#include <SysUtils.hpp> // Pascal unit
|
||||
#include <mctools.hpp> // Pascal unit
|
||||
#include <mctools.h> // Pascal unit
|
||||
#include <SysInit.hpp> // Pascal unit
|
||||
#include <System.hpp> // Pascal unit
|
||||
|
||||
@@ -23,17 +23,17 @@ namespace Oerlikon_est
|
||||
{
|
||||
//-- type declarations -------------------------------------------------------
|
||||
class DELPHICLASS TPrzekladnik;
|
||||
class PASCALIMPLEMENTATION TPrzekladnik : public Hamulce::TReservoir
|
||||
class PASCALIMPLEMENTATION TPrzekladnik : public TReservoir
|
||||
{
|
||||
typedef Hamulce::TReservoir inherited;
|
||||
typedef TReservoir inherited;
|
||||
|
||||
public:
|
||||
Hamulce::TReservoir* *BrakeRes;
|
||||
Hamulce::TReservoir* *Next;
|
||||
TReservoir* *BrakeRes;
|
||||
TReservoir* *Next;
|
||||
virtual void __fastcall Update(double dt);
|
||||
public:
|
||||
#pragma option push -w-inl
|
||||
/* TReservoir.Create */ inline __fastcall TPrzekladnik(void) : Hamulce::TReservoir() { }
|
||||
/* TReservoir.Create */ inline __fastcall TPrzekladnik(void) : TReservoir() { }
|
||||
#pragma option pop
|
||||
|
||||
public:
|
||||
|
||||
@@ -13,24 +13,24 @@ Copyright (C) 2007-2014 Maciej Cierniak
|
||||
*/
|
||||
#include "mctools.h"
|
||||
#include <cmath>
|
||||
#include <istream>
|
||||
#include <fstream>
|
||||
|
||||
using namespace std;
|
||||
/*================================================*/
|
||||
|
||||
std::string Ups(std::string s)
|
||||
{
|
||||
int jatka;
|
||||
std::string swy;
|
||||
|
||||
swy = "";
|
||||
{
|
||||
long jatka_end = s.length() + 1;
|
||||
for (jatka = 0; jatka < jatka_end; jatka++)
|
||||
swy = swy + UpCase(s[jatka]);
|
||||
}
|
||||
return swy;
|
||||
} /*=Ups=*/
|
||||
//std::string Ups(std::string s)
|
||||
//{
|
||||
// int jatka;
|
||||
// std::string swy;
|
||||
//
|
||||
// swy = "";
|
||||
// {
|
||||
// long jatka_end = s.length() + 1;
|
||||
// for (jatka = 0; jatka < jatka_end; jatka++)
|
||||
// swy = swy + UpCase(s[jatka]);
|
||||
// }
|
||||
// return swy;
|
||||
//} /*=Ups=*/
|
||||
|
||||
int Max0(int x1, int x2)
|
||||
{
|
||||
@@ -50,22 +50,18 @@ int Min0(int x1, int x2)
|
||||
|
||||
double Max0R(double x1, double x2)
|
||||
{
|
||||
double result;
|
||||
if (x1 > x2)
|
||||
Max0R = x1;
|
||||
return x1;
|
||||
else
|
||||
Max0R = x2;
|
||||
return result;
|
||||
return x2;
|
||||
}
|
||||
|
||||
double Min0R(double x1, double x2)
|
||||
{
|
||||
double result;
|
||||
if (x1 < x2)
|
||||
Min0R = x1;
|
||||
return x1;
|
||||
else
|
||||
Min0R = x2;
|
||||
return result;
|
||||
return x2;
|
||||
}
|
||||
|
||||
int Sign(double x)
|
||||
@@ -111,7 +107,7 @@ bool FuzzyLogic(double Test, double Threshold, double Probability)
|
||||
{
|
||||
if ((Test > Threshold) && (!DebugModeFlag))
|
||||
return
|
||||
(Random < Probability * Threshold * 1.0 / Test) /*im wiekszy Test tym wieksza szansa*/;
|
||||
(Random() < Probability * Threshold * 1.0 / Test) /*im wiekszy Test tym wieksza szansa*/;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
@@ -120,53 +116,48 @@ bool FuzzyLogicAI(double Test, double Threshold, double Probability)
|
||||
{
|
||||
if ((Test > Threshold))
|
||||
return
|
||||
(Random < Probability * Threshold * 1.0 / Test) /*im wiekszy Test tym wieksza szansa*/;
|
||||
(Random() < Probability * Threshold * 1.0 / Test) /*im wiekszy Test tym wieksza szansa*/;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
std::string ReadWord(std::ifstream &infile)
|
||||
std::string ReadWord(std::ifstream& infile)
|
||||
{
|
||||
std::string result;
|
||||
std::string s;
|
||||
std::string s = "";
|
||||
char c;
|
||||
bool nextword;
|
||||
bool nextword = false;
|
||||
|
||||
s = "";
|
||||
nextword = false;
|
||||
while ((!eof(infile)) && (!nextword))
|
||||
while ((!infile.eof()) && (!nextword))
|
||||
{
|
||||
read(infile, c);
|
||||
if (c in _Spacesigns)
|
||||
infile.get(c);
|
||||
if (_spacesigns.find(c) != string::npos)
|
||||
if (s != "")
|
||||
nextword = true;
|
||||
if (!(c in _Spacesigns))
|
||||
s = s + c;
|
||||
if (_spacesigns.find(c) == string::npos)
|
||||
s += c;
|
||||
}
|
||||
ReadWord = s;
|
||||
return result;
|
||||
return s;
|
||||
}
|
||||
|
||||
std::string Cut_Space(std::string s, int Just)
|
||||
{
|
||||
std::string result;
|
||||
unsigned char ii;
|
||||
int ii;
|
||||
|
||||
switch (Just)
|
||||
{
|
||||
case CutLeft:
|
||||
{
|
||||
ii = 0;
|
||||
while ((ii < length(s)) && (s[ii + 1] == _SPACE))
|
||||
while ((ii < s.length()) && (s[ii + 1] == _SPACE))
|
||||
++ii;
|
||||
s = Copy(s, ii + 1, length(s) - ii);
|
||||
s = s.substr(ii + 1, s.length() - ii);
|
||||
}
|
||||
case CutRight:
|
||||
{
|
||||
ii = length(s);
|
||||
ii = s.length();
|
||||
while ((ii > 0) && (s[ii] == _SPACE))
|
||||
--ii;
|
||||
s = Copy(s, 1, ii);
|
||||
s = s.substr(0, ii);
|
||||
}
|
||||
case CutBoth:
|
||||
{
|
||||
@@ -174,8 +165,7 @@ std::string Cut_Space(std::string s, int Just)
|
||||
s = Cut_Space(s, CutRight);
|
||||
}
|
||||
}
|
||||
Cut_Space = s;
|
||||
return result;
|
||||
return s;
|
||||
}
|
||||
/*Cut_Space*/
|
||||
|
||||
@@ -214,30 +204,37 @@ std::string DWE(std::string s) /*Delete While Equal sign*/
|
||||
|
||||
std::string Ld2Sp(std::string s) /*Low dash to Space sign*/
|
||||
{
|
||||
std::string s2 = "";
|
||||
char tmp[] = { "_" };
|
||||
//std::string s2 = "";
|
||||
char tmp[] = { (char)"_", (char)" " };
|
||||
for (int b = 0; b < s.length(); ++b)
|
||||
{
|
||||
if (s[b] == tmp[0])
|
||||
s2 = s2 + " ";
|
||||
else
|
||||
s2 = s2 + s[b];
|
||||
}
|
||||
return s2;
|
||||
s[b] = tmp[1];
|
||||
//{
|
||||
// if (s[b] == tmp[0])
|
||||
// s2 = s2 + " ";
|
||||
// else
|
||||
// s2 = s2 + s[b];
|
||||
//}
|
||||
// return s2;
|
||||
}
|
||||
|
||||
std::string Tab2Sp(std::string s) /*Tab to Space sign*/
|
||||
{
|
||||
std::string s2 = "";
|
||||
char tmp[] = { (char)9 };
|
||||
//std::string s2 = "";
|
||||
char tmp[] = { (char)9, (char)" " };
|
||||
for (int b = 0; b < s.length(); ++b)
|
||||
{
|
||||
if (s[b] == tmp[0])
|
||||
s2 = s2 + " ";
|
||||
else
|
||||
s2 = s2 + s[b];
|
||||
s[b] = tmp[0];
|
||||
}
|
||||
return s2;
|
||||
return s;
|
||||
//{
|
||||
// if (s[b] == tmp[0])
|
||||
// s2 = s2 + " ";
|
||||
// else
|
||||
// s2 = s2 + s[b];
|
||||
//}
|
||||
//return s2;
|
||||
}
|
||||
|
||||
void ComputeArc(double X0, double Y0, double Xn, double Yn, double R, double L, double dL,
|
||||
@@ -288,9 +285,9 @@ void ComputeALine(double X0, double Y0, double Xn, double Yn, double L, double R
|
||||
if (dX != 0)
|
||||
gamma = atan(dY * 1.0 / dX);
|
||||
else if (dY > 0)
|
||||
gamma = Pi * 1.0 / 2;
|
||||
gamma = pi * 1.0 / 2;
|
||||
else
|
||||
gamma = 3 * Pi * 1.0 / 2;
|
||||
gamma = 3 * pi * 1.0 / 2;
|
||||
if (R != 0)
|
||||
alfa = L * 1.0 / R;
|
||||
Xout = X0 + L * cos(alfa * 1.0 / 2 - gamma);
|
||||
@@ -301,44 +298,36 @@ void ComputeALine(double X0, double Y0, double Xn, double Yn, double L, double R
|
||||
|
||||
double Xhor(double h)
|
||||
{
|
||||
double result;
|
||||
Xhor = h * Hstep + Xmin;
|
||||
return result;
|
||||
return h * Hstep + Xmin;
|
||||
}
|
||||
|
||||
double Yver(double v)
|
||||
{
|
||||
double result;
|
||||
Yver = (Vsize - v) * Vstep + Ymin;
|
||||
return result;
|
||||
return (Vsize - v) * Vstep + Ymin;
|
||||
}
|
||||
|
||||
long Horiz(double x)
|
||||
{
|
||||
long result;
|
||||
x = (x - Xmin) * 1.0 / Hstep;
|
||||
if (x > -MaxInt)
|
||||
if (x < MaxInt)
|
||||
Horiz = Round(x);
|
||||
if (x > -INT_MAX)
|
||||
if (x < INT_MAX)
|
||||
return Round(x);
|
||||
else
|
||||
Horiz = MaxInt;
|
||||
return INT_MAX;
|
||||
else
|
||||
Horiz = -MaxInt;
|
||||
return result;
|
||||
return -INT_MAX;
|
||||
}
|
||||
|
||||
long Vert(double Y)
|
||||
{
|
||||
long result;
|
||||
Y = (Y - Ymin) * 1.0 / Vstep;
|
||||
if (Y > -MaxInt)
|
||||
if (Y < MaxInt)
|
||||
Vert = Vsize - Round(Y);
|
||||
if (Y > -INT_MAX)
|
||||
if (Y < INT_MAX)
|
||||
return Vsize - Round(Y);
|
||||
else
|
||||
Vert = MaxInt;
|
||||
return INT_MAX;
|
||||
else
|
||||
Vert = -MaxInt;
|
||||
return result;
|
||||
return -INT_MAX;
|
||||
}
|
||||
|
||||
void ClearPendingExceptions()
|
||||
|
||||
@@ -16,8 +16,10 @@ http://mozilla.org/MPL/2.0/.
|
||||
/*konwersja zmiennych na stringi, funkcje matematyczne, logiczne, lancuchowe, I/O etc*/
|
||||
|
||||
#include <string>
|
||||
#include <istream>
|
||||
#include <fstream>
|
||||
#include <time.h>
|
||||
|
||||
using namespace std;
|
||||
|
||||
/*Ra: te sta³e nie s¹ u¿ywane...
|
||||
_FileName = ['a'..'z','A'..'Z',':','\','.','*','?','0'..'9','_','-'];
|
||||
@@ -31,6 +33,7 @@ http://mozilla.org/MPL/2.0/.
|
||||
static char _EOL[2] = { (char)13, (char)10 };
|
||||
//static char const _SPACE = " ";
|
||||
static char _Spacesigns[4] = { (char)" ",(char)9, (char)13, (char)10};
|
||||
static string _spacesigns = " " + (char)9 + (char)13 + (char)10;
|
||||
static int const CutLeft = -1;
|
||||
static int const CutRight = 1;
|
||||
static int const CutBoth = 0; /*Cut_Space*/
|
||||
@@ -54,6 +57,17 @@ double Max0R(double x1, double x2);
|
||||
double Min0R(double x1, double x2);
|
||||
|
||||
int Sign(double x);
|
||||
inline long Round(float f)
|
||||
{
|
||||
return (long)(f + 0.5);
|
||||
//return lround(f);
|
||||
}
|
||||
|
||||
inline int Random()
|
||||
{
|
||||
srand(time(NULL));
|
||||
return rand();
|
||||
}
|
||||
|
||||
/*funkcje logiczne*/
|
||||
bool TestFlag(int Flag, int Value);
|
||||
@@ -66,8 +80,8 @@ bool FuzzyLogicAI(double Test, double Threshold, double Probability);
|
||||
/*to samo ale zawsze niezaleznie od DebugFlag*/
|
||||
|
||||
/*operacje na stringach*/
|
||||
std::string ReadWord( std::ifstream & infile); /*czyta slowo z wiersza pliku tekstowego*/
|
||||
std::string Ups(std::string s);
|
||||
std::string ReadWord( std::ifstream& infile); /*czyta slowo z wiersza pliku tekstowego*/
|
||||
//std::string Ups(std::string s);
|
||||
std::string Cut_Space(std::string s, int Just);
|
||||
std::string ExtractKeyWord(std::string InS, std::string KeyWord); /*wyciaga slowo kluczowe i lancuch do pierwszej spacji*/
|
||||
std::string DUE(std::string s); /*Delete Until Equal sign*/
|
||||
|
||||
@@ -13,12 +13,12 @@ http://mozilla.org/MPL/2.0/.
|
||||
|
||||
*/
|
||||
|
||||
#include "system.hpp"
|
||||
#include "classes.hpp"
|
||||
//#include "system.hpp"
|
||||
//#include "classes.hpp"
|
||||
#pragma hdrstop
|
||||
|
||||
#include "Driver.h"
|
||||
#include "mctools.hpp"
|
||||
#include "mctools.h"
|
||||
#include "MemCell.h"
|
||||
#include "Event.h"
|
||||
#include "parser.h"
|
||||
|
||||
655
Mover.cpp
655
Mover.cpp
@@ -1,655 +0,0 @@
|
||||
/*
|
||||
This Source Code Form is subject to the
|
||||
terms of the Mozilla Public License, v.
|
||||
2.0. If a copy of the MPL was not
|
||||
distributed with this file, You can
|
||||
obtain one at
|
||||
http://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
#include "Mover.h"
|
||||
//---------------------------------------------------------------------------
|
||||
#pragma package(smart_init)
|
||||
// Ra: tu nale¿y przenosiæ funcje z mover.pas, które nie s¹ z niego wywo³ywane.
|
||||
// Jeœli jakieœ zmienne nie s¹ u¿ywane w mover.pas, te¿ mo¿na je przenosiæ.
|
||||
// Przeniesienie wszystkiego na raz zrobi³o by zbyt wielki chaos do ogarniêcia.
|
||||
|
||||
const dEpsilon = 0.01; // 1cm (zale¿y od typu sprzêgu...)
|
||||
|
||||
TMoverParameters::TMoverParameters(double VelInitial, AnsiString TypeNameInit, AnsiString NameInit,
|
||||
int LoadInitial, AnsiString LoadTypeInitial, int Cab)
|
||||
: T_MoverParameters(VelInitial, TypeNameInit, NameInit, LoadInitial, LoadTypeInitial, Cab)
|
||||
{ // g³ówny konstruktor
|
||||
DimHalf.x = 0.5 * Dim.W; // po³owa szerokoœci, OX jest w bok?
|
||||
DimHalf.y = 0.5 * Dim.L; // po³owa d³ugoœci, OY jest do przodu?
|
||||
DimHalf.z = 0.5 * Dim.H; // po³owa wysokoœci, OZ jest w górê?
|
||||
// BrakeLevelSet(-2); //Pascal ustawia na 0, przestawimy na odciêcie (CHK jest jeszcze nie
|
||||
// wczytane!)
|
||||
bPantKurek3 = true; // domyœlnie zbiornik pantografu po³¹czony jest ze zbiornikiem g³ównym
|
||||
iProblem = 0; // pojazd w pe³ni gotowy do ruchu
|
||||
iLights[0] = iLights[1] = 0; //œwiat³a zgaszone
|
||||
};
|
||||
|
||||
double TMoverParameters::Distance(const TLocation &Loc1, const TLocation &Loc2,
|
||||
const TDimension &Dim1, const TDimension &Dim2)
|
||||
{ // zwraca odleg³oœæ pomiêdzy pojazdami (Loc1) i (Loc2) z uwzglêdnieneim ich d³ugoœci (kule!)
|
||||
return hypot(Loc2.X - Loc1.X, Loc1.Y - Loc2.Y) - 0.5 * (Dim2.L + Dim1.L);
|
||||
};
|
||||
|
||||
double TMoverParameters::Distance(const vector3 &s1, const vector3 &s2, const vector3 &d1,
|
||||
const vector3 &d2){
|
||||
// obliczenie odleg³oœci prostopad³oœcianów o œrodkach (s1) i (s2) i wymiarach (d1) i (d2)
|
||||
// return 0.0; //bêdzie zg³aszaæ warning - funkcja do usuniêcia, chyba ¿e siê przyda...
|
||||
};
|
||||
|
||||
double TMoverParameters::CouplerDist(Byte Coupler)
|
||||
{ // obliczenie odleg³oœci pomiêdzy sprzêgami (kula!)
|
||||
return Couplers[Coupler].CoupleDist =
|
||||
Distance(Loc, Couplers[Coupler].Connected->Loc, Dim,
|
||||
Couplers[Coupler].Connected->Dim); // odleg³oœæ pomiêdzy sprzêgami (kula!)
|
||||
};
|
||||
|
||||
bool TMoverParameters::Attach(Byte ConnectNo, Byte ConnectToNr, TMoverParameters *ConnectTo,
|
||||
Byte CouplingType, bool Forced)
|
||||
{ //³¹czenie do swojego sprzêgu (ConnectNo) pojazdu (ConnectTo) stron¹ (ConnectToNr)
|
||||
// Ra: zwykle wykonywane dwukrotnie, dla ka¿dego pojazdu oddzielnie
|
||||
// Ra: trzeba by odró¿niæ wymóg dociœniêcia od uszkodzenia sprzêgu przy podczepianiu AI do
|
||||
// sk³adu
|
||||
if (ConnectTo) // jeœli nie pusty
|
||||
{
|
||||
if (ConnectToNr != 2)
|
||||
Couplers[ConnectNo].ConnectedNr = ConnectToNr; // 2=nic nie pod³¹czone
|
||||
TCouplerType ct = ConnectTo->Couplers[Couplers[ConnectNo].ConnectedNr]
|
||||
.CouplerType; // typ sprzêgu pod³¹czanego pojazdu
|
||||
Couplers[ConnectNo].Connected =
|
||||
ConnectTo; // tak podpi¹æ (do siebie) zawsze mo¿na, najwy¿ej bêdzie wirtualny
|
||||
CouplerDist(ConnectNo); // przeliczenie odleg³oœci pomiêdzy sprzêgami
|
||||
if (CouplingType == ctrain_virtual)
|
||||
return false; // wirtualny wiêcej nic nie robi
|
||||
if (Forced ? true : ((Couplers[ConnectNo].CoupleDist <= dEpsilon) &&
|
||||
(Couplers[ConnectNo].CouplerType != NoCoupler) &&
|
||||
(Couplers[ConnectNo].CouplerType == ct)))
|
||||
{ // stykaja sie zderzaki i kompatybilne typy sprzegow, chyba ¿e ³¹czenie na starcie
|
||||
if (Couplers[ConnectNo].CouplingFlag ==
|
||||
ctrain_virtual) // jeœli wczeœniej nie by³o po³¹czone
|
||||
{ // ustalenie z której strony rysowaæ sprzêg
|
||||
Couplers[ConnectNo].Render = true; // tego rysowaæ
|
||||
ConnectTo->Couplers[Couplers[ConnectNo].ConnectedNr].Render = false; // a tego nie
|
||||
};
|
||||
Couplers[ConnectNo].CouplingFlag = CouplingType; // ustawienie typu sprzêgu
|
||||
// if (CouplingType!=ctrain_virtual) //Ra: wirtualnego nie ³¹czymy zwrotnie!
|
||||
//{//jeœli ³¹czenie sprzêgiem niewirtualnym, ustawiamy po³¹czenie zwrotne
|
||||
ConnectTo->Couplers[Couplers[ConnectNo].ConnectedNr].CouplingFlag = CouplingType;
|
||||
ConnectTo->Couplers[Couplers[ConnectNo].ConnectedNr].Connected = this;
|
||||
ConnectTo->Couplers[Couplers[ConnectNo].ConnectedNr].CoupleDist =
|
||||
Couplers[ConnectNo].CoupleDist;
|
||||
return true;
|
||||
//}
|
||||
// pod³¹czenie nie uda³o siê - jest wirtualne
|
||||
}
|
||||
}
|
||||
return false; // brak pod³¹czanego pojazdu, zbyt du¿a odleg³oœæ, niezgodny typ sprzêgu, brak
|
||||
// sprzêgu, brak haka
|
||||
};
|
||||
|
||||
bool TMoverParameters::Attach(Byte ConnectNo, Byte ConnectToNr, T_MoverParameters *ConnectTo,
|
||||
Byte CouplingType, bool Forced)
|
||||
{ //³¹czenie do (ConnectNo) pojazdu (ConnectTo) stron¹ (ConnectToNr)
|
||||
return Attach(ConnectNo, ConnectToNr, (TMoverParameters *)ConnectTo, CouplingType, Forced);
|
||||
};
|
||||
|
||||
int TMoverParameters::DettachStatus(Byte ConnectNo)
|
||||
{ // Ra: sprawdzenie, czy odleg³oœæ jest dobra do roz³¹czania
|
||||
// powinny byæ 3 informacje: =0 sprzêg ju¿ roz³¹czony, <0 da siê roz³¹czyæ. >0 nie da siê
|
||||
// roz³¹czyæ
|
||||
if (!Couplers[ConnectNo].Connected)
|
||||
return 0; // nie ma nic, to roz³¹czanie jest OK
|
||||
if ((Couplers[ConnectNo].CouplingFlag & ctrain_coupler) == 0)
|
||||
return -Couplers[ConnectNo].CouplingFlag; // hak nie po³¹czony - roz³¹czanie jest OK
|
||||
if (TestFlag(DamageFlag, dtrain_coupling))
|
||||
return -Couplers[ConnectNo].CouplingFlag; // hak urwany - roz³¹czanie jest OK
|
||||
// ABu021104: zakomentowane 'and (CouplerType<>Articulated)' w warunku, nie wiem co to bylo, ale
|
||||
// za to teraz dziala odczepianie... :) }
|
||||
// if (CouplerType==Articulated) return false; //sprzêg nie do rozpiêcia - mo¿e byæ tylko urwany
|
||||
// Couplers[ConnectNo].CoupleDist=Distance(Loc,Couplers[ConnectNo].Connected->Loc,Dim,Couplers[ConnectNo].Connected->Dim);
|
||||
CouplerDist(ConnectNo);
|
||||
if (Couplers[ConnectNo].CouplerType == Screw ? Couplers[ConnectNo].CoupleDist < 0.0 : true)
|
||||
return -Couplers[ConnectNo].CouplingFlag; // mo¿na roz³¹czaæ, jeœli dociœniêty
|
||||
return (Couplers[ConnectNo].CoupleDist > 0.2) ? -Couplers[ConnectNo].CouplingFlag :
|
||||
Couplers[ConnectNo].CouplingFlag;
|
||||
};
|
||||
|
||||
bool TMoverParameters::Dettach(Byte ConnectNo)
|
||||
{ // rozlaczanie
|
||||
if (!Couplers[ConnectNo].Connected)
|
||||
return true; // nie ma nic, to odczepiono
|
||||
// with Couplers[ConnectNo] do
|
||||
int i = DettachStatus(ConnectNo); // stan sprzêgu
|
||||
if (i < 0)
|
||||
{ // gdy scisniete zderzaki, chyba ze zerwany sprzeg (wirtualnego nie odpinamy z drugiej strony)
|
||||
// Couplers[ConnectNo].Connected=NULL; //lepiej zostawic bo przeciez trzeba kontrolowac
|
||||
// zderzenia odczepionych
|
||||
Couplers[ConnectNo].Connected->Couplers[Couplers[ConnectNo].ConnectedNr].CouplingFlag =
|
||||
0; // pozostaje sprzêg wirtualny
|
||||
Couplers[ConnectNo].CouplingFlag = 0; // pozostaje sprzêg wirtualny
|
||||
return true;
|
||||
}
|
||||
else if (i > 0)
|
||||
{ // od³¹czamy wê¿e i resztê, pozostaje sprzêg fizyczny, który wymaga dociœniêcia (z wirtualnym
|
||||
// nic)
|
||||
Couplers[ConnectNo].CouplingFlag &= ctrain_coupler;
|
||||
Couplers[ConnectNo].Connected->Couplers[Couplers[ConnectNo].ConnectedNr].CouplingFlag =
|
||||
Couplers[ConnectNo].CouplingFlag;
|
||||
}
|
||||
return false; // jeszcze nie roz³¹czony
|
||||
};
|
||||
|
||||
void TMoverParameters::SetCoupleDist()
|
||||
{ // przeliczenie odleg³oœci sprzêgów
|
||||
if (Couplers[0].Connected)
|
||||
{
|
||||
CouplerDist(0);
|
||||
if (CategoryFlag & 2)
|
||||
{ // Ra: dla samochodów zderzanie kul to za ma³o
|
||||
}
|
||||
}
|
||||
if (Couplers[1].Connected)
|
||||
{
|
||||
CouplerDist(1);
|
||||
if (CategoryFlag & 2)
|
||||
{ // Ra: dla samochodów zderzanie kul to za ma³o
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
bool TMoverParameters::DirectionForward()
|
||||
{
|
||||
if ((MainCtrlPosNo > 0) && (ActiveDir < 1) && (MainCtrlPos == 0))
|
||||
{
|
||||
++ActiveDir;
|
||||
DirAbsolute = ActiveDir * CabNo;
|
||||
if (DirAbsolute)
|
||||
if (Battery) // jeœli bateria jest ju¿ za³¹czona
|
||||
BatterySwitch(true); // to w ten oto durny sposób aktywuje siê CA/SHP
|
||||
SendCtrlToNext("Direction", ActiveDir, CabNo);
|
||||
return true;
|
||||
}
|
||||
else if ((ActiveDir == 1) && (MainCtrlPos == 0) && (TrainType == dt_EZT))
|
||||
return MinCurrentSwitch(true); //"wysoki rozruch" EN57
|
||||
return false;
|
||||
};
|
||||
|
||||
// Nastawianie hamulców
|
||||
|
||||
void TMoverParameters::BrakeLevelSet(double b)
|
||||
{ // ustawienie pozycji hamulca na wartoϾ (b) w zakresie od -2 do BrakeCtrlPosNo
|
||||
// jedyny dopuszczalny sposób przestawienia hamulca zasadniczego
|
||||
if (fBrakeCtrlPos == b)
|
||||
return; // nie przeliczaæ, jak nie ma zmiany
|
||||
fBrakeCtrlPos = b;
|
||||
if (fBrakeCtrlPos < Handle->GetPos(bh_MIN))
|
||||
fBrakeCtrlPos = Handle->GetPos(bh_MIN); // odciêcie
|
||||
else if (fBrakeCtrlPos > Handle->GetPos(bh_MAX))
|
||||
fBrakeCtrlPos = Handle->GetPos(bh_MAX);
|
||||
BrakeCtrlPosR = fBrakeCtrlPos;
|
||||
int x = floor(fBrakeCtrlPos); // jeœli odwo³ujemy siê do BrakeCtrlPos w poœrednich, to musi byæ
|
||||
// obciête a nie zaokr¹gone
|
||||
while ((x > BrakeCtrlPos) && (BrakeCtrlPos < BrakeCtrlPosNo)) // jeœli zwiêkszy³o siê o 1
|
||||
if (!T_MoverParameters::IncBrakeLevelOld())
|
||||
break; // wyjœcie awaryjne
|
||||
while ((x < BrakeCtrlPos) && (BrakeCtrlPos >= -1)) // jeœli zmniejszy³o siê o 1
|
||||
if (!T_MoverParameters::DecBrakeLevelOld())
|
||||
break;
|
||||
BrakePressureActual = BrakePressureTable[BrakeCtrlPos + 2]; // skopiowanie pozycji
|
||||
/*
|
||||
//youBy: obawiam sie, ze tutaj to nie dziala :P
|
||||
//Ra 2014-03: by³o tak zrobione, ¿e dzia³a³o - po ka¿dej zmianie pozycji by³a wywo³ywana ta
|
||||
funkcja
|
||||
// if (BrakeSystem==Pneumatic?BrakeSubsystem==Oerlikon:false) //tylko Oerlikon akceptuje u³amki
|
||||
if(false)
|
||||
if (fBrakeCtrlPos>0.0)
|
||||
{//wartoœci poœrednie wyliczamy tylko dla hamowania
|
||||
double u=fBrakeCtrlPos-double(x); //u³amek ponad wartoœæ ca³kowit¹
|
||||
if (u>0.0)
|
||||
{//wyliczamy wartoœci wa¿one
|
||||
BrakePressureActual.PipePressureVal+=-u*BrakePressureActual.PipePressureVal+u*BrakePressureTable[BrakeCtrlPos+1+2].PipePressureVal;
|
||||
//BrakePressureActual.BrakePressureVal+=-u*BrakePressureActual.BrakePressureVal+u*BrakePressureTable[BrakeCtrlPos+1].BrakePressureVal;
|
||||
//to chyba nie bêdzie tak dzia³aæ, zw³aszcza w EN57
|
||||
BrakePressureActual.FlowSpeedVal+=-u*BrakePressureActual.FlowSpeedVal+u*BrakePressureTable[BrakeCtrlPos+1+2].FlowSpeedVal;
|
||||
}
|
||||
}
|
||||
*/
|
||||
};
|
||||
|
||||
bool TMoverParameters::BrakeLevelAdd(double b)
|
||||
{ // dodanie wartoœci (b) do pozycji hamulca (w tym ujemnej)
|
||||
// zwraca false, gdy po dodaniu by³o by poza zakresem
|
||||
BrakeLevelSet(fBrakeCtrlPos + b);
|
||||
return b > 0.0 ? (fBrakeCtrlPos < BrakeCtrlPosNo) :
|
||||
(BrakeCtrlPos > -1.0); // true, jeœli mo¿na kontynuowaæ
|
||||
};
|
||||
|
||||
bool TMoverParameters::IncBrakeLevel()
|
||||
{ // nowa wersja na u¿ytek AI, false gdy osi¹gniêto pozycjê BrakeCtrlPosNo
|
||||
return BrakeLevelAdd(1.0);
|
||||
};
|
||||
|
||||
bool TMoverParameters::DecBrakeLevel()
|
||||
{ // nowa wersja na u¿ytek AI, false gdy osi¹gniêto pozycjê -1
|
||||
return BrakeLevelAdd(-1.0);
|
||||
};
|
||||
|
||||
bool TMoverParameters::ChangeCab(int direction)
|
||||
{ // zmiana kabiny i resetowanie ustawien
|
||||
if (abs(ActiveCab + direction) < 2)
|
||||
{
|
||||
// if (ActiveCab+direction=0) then LastCab:=ActiveCab;
|
||||
ActiveCab = ActiveCab + direction;
|
||||
if ((BrakeSystem == Pneumatic) && (BrakeCtrlPosNo > 0))
|
||||
{
|
||||
// if (BrakeHandle==FV4a) //!!!POBIERAÆ WARTOŒÆ Z KLASY ZAWORU!!!
|
||||
// BrakeLevelSet(-2); //BrakeCtrlPos=-2;
|
||||
// else if ((BrakeHandle==FVel6)||(BrakeHandle==St113))
|
||||
// BrakeLevelSet(2);
|
||||
// else
|
||||
// BrakeLevelSet(1);
|
||||
BrakeLevelSet(Handle->GetPos(bh_NP));
|
||||
LimPipePress = PipePress;
|
||||
ActFlowSpeed = 0;
|
||||
}
|
||||
else
|
||||
// if (TrainType=dt_EZT) and (BrakeCtrlPosNo>0) then
|
||||
// BrakeCtrlPos:=5; //z Megapacka
|
||||
// else
|
||||
// BrakeLevelSet(0); //BrakeCtrlPos=0;
|
||||
BrakeLevelSet(Handle->GetPos(bh_NP));
|
||||
// if not TestFlag(BrakeStatus,b_dmg) then
|
||||
// BrakeStatus:=b_off; //z Megapacka
|
||||
MainCtrlPos = 0;
|
||||
ScndCtrlPos = 0;
|
||||
// Ra: to poni¿ej jest bez sensu - mo¿na przejœæ nie wy³¹czaj¹c
|
||||
// if ((EngineType!=DieselEngine)&&(EngineType!=DieselElectric))
|
||||
//{
|
||||
// Mains=false;
|
||||
// CompressorAllow=false;
|
||||
// ConverterAllow=false;
|
||||
//}
|
||||
// ActiveDir=0;
|
||||
// DirAbsolute=0;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
};
|
||||
|
||||
bool TMoverParameters::CurrentSwitch(int direction)
|
||||
{ // rozruch wysoki (true) albo niski (false)
|
||||
// Ra: przenios³em z Train.cpp, nie wiem czy ma to sens
|
||||
if (MaxCurrentSwitch(direction))
|
||||
{
|
||||
if (TrainType != dt_EZT)
|
||||
return (MinCurrentSwitch(direction));
|
||||
}
|
||||
if (EngineType == DieselEngine) // dla 2Ls150
|
||||
if (ShuntModeAllow)
|
||||
if (ActiveDir == 0) // przed ustawieniem kierunku
|
||||
ShuntMode = direction;
|
||||
return false;
|
||||
};
|
||||
|
||||
void TMoverParameters::UpdatePantVolume(double dt)
|
||||
{ // KURS90 - sprê¿arka pantografów; Ra 2014-07: teraz jest to zbiornik rozrz¹du, chocia¿ to jeszcze
|
||||
// nie tak
|
||||
if (EnginePowerSource.SourceType == CurrentCollector) // tylko jeœli pantografuj¹cy
|
||||
{
|
||||
// Ra 2014-07: zasadniczo, to istnieje zbiornik rozrz¹du i zbiornik pantografów - na razie
|
||||
// mamy razem
|
||||
// Ra 2014-07: kurek trójdrogowy ³¹czy spr.pom. z pantografami i wy³¹cznikiem ciœnieniowym
|
||||
// WS
|
||||
// Ra 2014-07: zbiornika rozrz¹du nie pompuje siê tu, tylko pantografy; potem mo¿na zamkn¹æ
|
||||
// WS i odpaliæ resztê
|
||||
if ((TrainType == dt_EZT) ? (PantPress < ScndPipePress) :
|
||||
bPantKurek3) // kurek zamyka po³¹czenie z ZG
|
||||
{ // zbiornik pantografu po³¹czony ze zbiornikiem g³ównym - ma³¹ sprê¿ark¹ siê tego nie
|
||||
// napompuje
|
||||
// Ra 2013-12: Niebugoc³aw mówi, ¿e w EZT nie ma potrzeby odcinaæ kurkiem
|
||||
PantPress = EnginePowerSource.CollectorParameters
|
||||
.MaxPress; // ograniczenie ciœnienia do MaxPress (tylko w pantografach!)
|
||||
if (PantPress > ScndPipePress)
|
||||
PantPress = ScndPipePress; // oraz do ScndPipePress
|
||||
PantVolume = (PantPress + 1) * 0.1; // objêtoœæ, na wypadek odciêcia kurkiem
|
||||
}
|
||||
else
|
||||
{ // zbiornik g³ówny odciêty, mo¿na pompowaæ pantografy
|
||||
if (PantCompFlag && Battery) // w³¹czona bateria i ma³a sprê¿arka
|
||||
PantVolume += dt * (TrainType == dt_EZT ? 0.003 : 0.005) *
|
||||
(2 * 0.45 - ((0.1 / PantVolume / 10) - 0.1)) /
|
||||
0.45; // nape³nianie zbiornika pantografów
|
||||
// Ra 2013-12: Niebugoc³aw mówi, ¿e w EZT nabija 1.5 raz wolniej ni¿ jak by³o 0.005
|
||||
PantPress = (10.0 * PantVolume) - 1.0; // tu by siê przyda³a objêtoœæ zbiornika
|
||||
}
|
||||
if (!PantCompFlag && (PantVolume > 0.1))
|
||||
PantVolume -= dt * 0.0003; // nieszczelnoœci: 0.0003=0.3l/s
|
||||
if (Mains) // nie wchodziæ w funkcjê bez potrzeby
|
||||
if (EngineType == ElectricSeriesMotor) // nie dotyczy... czego w³aœciwie?
|
||||
if (PantPress < EnginePowerSource.CollectorParameters.MinPress)
|
||||
if ((TrainType & (dt_EZT | dt_ET40 | dt_ET41 | dt_ET42)) ?
|
||||
(GetTrainsetVoltage() < EnginePowerSource.CollectorParameters.MinV) :
|
||||
true) // to jest trochê proteza; zasilanie cz³onu mo¿e byæ przez sprzêg
|
||||
// WN
|
||||
if (MainSwitch(false))
|
||||
EventFlag = true; // wywalenie szybkiego z powodu niskiego ciœnienia
|
||||
if (TrainType != dt_EZT) // w EN57 pompuje siê tylko w silnikowym
|
||||
// pierwotnie w CHK pantografy mia³y równie¿ rozrz¹dcze EZT
|
||||
for (int b = 0; b <= 1; ++b)
|
||||
if (TestFlag(Couplers[b].CouplingFlag, ctrain_controll))
|
||||
if (Couplers[b].Connected->PantVolume <
|
||||
PantVolume) // bo inaczej trzeba w obydwu cz³onach przestawiaæ
|
||||
Couplers[b].Connected->PantVolume =
|
||||
PantVolume; // przekazanie ciœnienia do s¹siedniego cz³onu
|
||||
// czy np. w ET40, ET41, ET42 pantografy cz³onów maj¹ po³¹czenie pneumatyczne?
|
||||
// Ra 2014-07: raczej nie - najpierw siê za³¹cza jeden cz³on, a potem mo¿na podnieœæ w
|
||||
// drugim
|
||||
}
|
||||
else
|
||||
{ // a tu coœ dla SM42 i SM31, aby pokazywaæ na manometrze
|
||||
PantPress = CntrlPipePress;
|
||||
}
|
||||
};
|
||||
|
||||
void TMoverParameters::UpdateBatteryVoltage(double dt)
|
||||
{ // przeliczenie obci¹¿enia baterii
|
||||
double sn1, sn2, sn3, sn4, sn5; // Ra: zrobiæ z tego amperomierz NN
|
||||
if ((BatteryVoltage > 0) && (EngineType != DieselEngine) && (EngineType != WheelsDriven) &&
|
||||
(NominalBatteryVoltage > 0))
|
||||
{
|
||||
if ((NominalBatteryVoltage / BatteryVoltage < 1.22) && Battery)
|
||||
{ // 110V
|
||||
if (!ConverterFlag)
|
||||
sn1 = (dt * 2.0); // szybki spadek do ok 90V
|
||||
else
|
||||
sn1 = 0;
|
||||
if (ConverterFlag)
|
||||
sn2 = -(dt * 2.0); // szybki wzrost do 110V
|
||||
else
|
||||
sn2 = 0;
|
||||
if (Mains)
|
||||
sn3 = (dt * 0.05);
|
||||
else
|
||||
sn3 = 0;
|
||||
if (iLights[0] & 63) // 64=blachy, nie ci¹gn¹ pr¹du //rozpisaæ na poszczególne
|
||||
// ¿arówki...
|
||||
sn4 = dt * 0.003;
|
||||
else
|
||||
sn4 = 0;
|
||||
if (iLights[1] & 63) // 64=blachy, nie ci¹gn¹ pr¹du
|
||||
sn5 = dt * 0.001;
|
||||
else
|
||||
sn5 = 0;
|
||||
};
|
||||
if ((NominalBatteryVoltage / BatteryVoltage >= 1.22) && Battery)
|
||||
{ // 90V
|
||||
if (PantCompFlag)
|
||||
sn1 = (dt * 0.0046);
|
||||
else
|
||||
sn1 = 0;
|
||||
if (ConverterFlag)
|
||||
sn2 = -(dt * 50); // szybki wzrost do 110V
|
||||
else
|
||||
sn2 = 0;
|
||||
if (Mains)
|
||||
sn3 = (dt * 0.001);
|
||||
else
|
||||
sn3 = 0;
|
||||
if (iLights[0] & 63) // 64=blachy, nie ci¹gn¹ pr¹du
|
||||
sn4 = (dt * 0.0030);
|
||||
else
|
||||
sn4 = 0;
|
||||
if (iLights[1] & 63) // 64=blachy, nie ci¹gn¹ pr¹du
|
||||
sn5 = (dt * 0.0010);
|
||||
else
|
||||
sn5 = 0;
|
||||
};
|
||||
if (!Battery)
|
||||
{
|
||||
if (NominalBatteryVoltage / BatteryVoltage < 1.22)
|
||||
sn1 = dt * 50;
|
||||
else
|
||||
sn1 = 0;
|
||||
sn2 = dt * 0.000001;
|
||||
sn3 = dt * 0.000001;
|
||||
sn4 = dt * 0.000001;
|
||||
sn5 = dt * 0.000001; // bardzo powolny spadek przy wy³¹czonych bateriach
|
||||
};
|
||||
BatteryVoltage -= (sn1 + sn2 + sn3 + sn4 + sn5);
|
||||
if (NominalBatteryVoltage / BatteryVoltage > 1.57)
|
||||
if (MainSwitch(false) && (EngineType != DieselEngine) && (EngineType != WheelsDriven))
|
||||
EventFlag = true; // wywalanie szybkiego z powodu zbyt niskiego napiecia
|
||||
if (BatteryVoltage > NominalBatteryVoltage)
|
||||
BatteryVoltage = NominalBatteryVoltage; // wstrzymanie ³adowania pow. 110V
|
||||
if (BatteryVoltage < 0.01)
|
||||
BatteryVoltage = 0.01;
|
||||
}
|
||||
else if (NominalBatteryVoltage == 0)
|
||||
BatteryVoltage = 0;
|
||||
else
|
||||
BatteryVoltage = 90;
|
||||
};
|
||||
|
||||
/* Ukrotnienie EN57:
|
||||
1 //uk³ad szeregowy
|
||||
2 //uk³ad równoleg³y
|
||||
3 //bocznik 1
|
||||
4 //bocznik 2
|
||||
5 //bocznik 3
|
||||
6 //do przodu
|
||||
7 //do ty³u
|
||||
8 //1 przyspieszenie
|
||||
9 //minus obw. 2 przyspieszenia
|
||||
10 //jazda na oporach
|
||||
11 //SHP
|
||||
12A //podnoszenie pantografu przedniego
|
||||
12B //podnoszenie pantografu tylnego
|
||||
13A //opuszczanie pantografu przedniego
|
||||
13B //opuszczanie wszystkich pantografów
|
||||
14 //za³¹czenie WS
|
||||
15 //rozrz¹d (WS, PSR, wa³ ku³akowy)
|
||||
16 //odblok PN
|
||||
18 //sygnalizacja przetwornicy g³ównej
|
||||
19 //luzowanie EP
|
||||
20 //hamowanie EP
|
||||
21 //rezerwa** (1900+: zamykanie drzwi prawych)
|
||||
22 //za³. przetwornicy g³ównej
|
||||
23 //wy³. przetwornicy g³ównej
|
||||
24 //za³. przetw. oœwietlenia
|
||||
25 //wy³. przetwornicy oœwietlenia
|
||||
26 //sygnalizacja WS
|
||||
28 //sprê¿arka
|
||||
29 //ogrzewanie
|
||||
30 //rezerwa* (1900+: zamykanie drzwi lewych)
|
||||
31 //otwieranie drzwi prawych
|
||||
32H //zadzia³anie PN siln. trakcyjnych
|
||||
33 //sygna³ odjazdu
|
||||
34 //rezerwa (sygnalizacja poœlizgu)
|
||||
35 //otwieranie drzwi lewych
|
||||
ZN //masa
|
||||
*/
|
||||
|
||||
double TMoverParameters::ComputeMovement(double dt, double dt1, const TTrackShape &Shape,
|
||||
TTrackParam &Track, TTractionParam &ElectricTraction,
|
||||
const TLocation &NewLoc, TRotation &NewRot)
|
||||
{ // trzeba po ma³u przenosiæ tu tê funkcjê
|
||||
double d;
|
||||
T_MoverParameters::ComputeMovement(dt, dt1, Shape, Track, ElectricTraction, NewLoc, NewRot);
|
||||
if (Power > 1.0) // w rozrz¹dczym nie (jest b³¹d w FIZ!) - Ra 2014-07: teraz we wszystkich
|
||||
UpdatePantVolume(dt); // Ra 2014-07: obs³uga zbiornika rozrz¹du oraz pantografów
|
||||
|
||||
if (EngineType == WheelsDriven)
|
||||
d = CabNo * dL; // na chwile dla testu
|
||||
else
|
||||
d = dL;
|
||||
DistCounter = DistCounter + fabs(dL) / 1000.0;
|
||||
dL = 0;
|
||||
|
||||
// koniec procedury, tu nastepuja dodatkowe procedury pomocnicze
|
||||
|
||||
// sprawdzanie i ewentualnie wykonywanie->kasowanie poleceñ
|
||||
if (LoadStatus > 0) // czas doliczamy tylko jeœli trwa (roz)³adowanie
|
||||
LastLoadChangeTime = LastLoadChangeTime + dt; // czas (roz)³adunku
|
||||
RunInternalCommand();
|
||||
// automatyczny rozruch
|
||||
if (EngineType == ElectricSeriesMotor)
|
||||
if (AutoRelayCheck())
|
||||
SetFlag(SoundFlag, sound_relay);
|
||||
/*
|
||||
else {McZapkie-041003: aby slychac bylo przelaczniki w sterowniczym}
|
||||
if (EngineType=None) and (MainCtrlPosNo>0) then
|
||||
for b:=0 to 1 do
|
||||
with Couplers[b] do
|
||||
if TestFlag(CouplingFlag,ctrain_controll) then
|
||||
if Connected^.Power>0.01 then
|
||||
SoundFlag:=SoundFlag or Connected^.SoundFlag;
|
||||
*/
|
||||
if (EngineType == DieselEngine)
|
||||
if (dizel_Update(dt))
|
||||
SetFlag(SoundFlag, sound_relay);
|
||||
// uklady hamulcowe:
|
||||
if (VeselVolume > 0)
|
||||
Compressor = CompressedVolume / VeselVolume;
|
||||
else
|
||||
{
|
||||
Compressor = 0;
|
||||
CompressorFlag = false;
|
||||
};
|
||||
ConverterCheck();
|
||||
if (CompressorSpeed > 0.0) // sprê¿arka musi mieæ jak¹œ niezerow¹ wydajnoœæ
|
||||
CompressorCheck(dt); //¿eby rozwa¿aæ jej za³¹czenie i pracê
|
||||
UpdateBrakePressure(dt);
|
||||
UpdatePipePressure(dt);
|
||||
UpdateBatteryVoltage(dt);
|
||||
UpdateScndPipePressure(dt); // druga rurka, youBy
|
||||
// hamulec antypoœlizgowy - wy³¹czanie
|
||||
if ((BrakeSlippingTimer > 0.8) && (ASBType != 128)) // ASBSpeed=0.8
|
||||
Hamulec->ASB(0);
|
||||
// SetFlag(BrakeStatus,-b_antislip);
|
||||
BrakeSlippingTimer = BrakeSlippingTimer + dt;
|
||||
// sypanie piasku - wy³¹czone i piasek siê nie koñczy - b³êdy AI
|
||||
// if AIControllFlag then
|
||||
// if SandDose then
|
||||
// if Sand>0 then
|
||||
// begin
|
||||
// Sand:=Sand-NPoweredAxles*SandSpeed*dt;
|
||||
// if Random<dt then SandDose:=false;
|
||||
// end
|
||||
// else
|
||||
// begin
|
||||
// SandDose:=false;
|
||||
// Sand:=0;
|
||||
// end;
|
||||
// czuwak/SHP
|
||||
// if (Vel>10) and (not DebugmodeFlag) then
|
||||
if (!DebugModeFlag)
|
||||
SecuritySystemCheck(dt1);
|
||||
return d;
|
||||
};
|
||||
|
||||
double TMoverParameters::FastComputeMovement(double dt, const TTrackShape &Shape,
|
||||
TTrackParam &Track, const TLocation &NewLoc,
|
||||
TRotation &NewRot)
|
||||
{ // trzeba po ma³u przenosiæ tu tê funkcjê
|
||||
double d;
|
||||
T_MoverParameters::FastComputeMovement(dt, Shape, Track, NewLoc, NewRot);
|
||||
if (Power > 1.0) // w rozrz¹dczym nie (jest b³¹d w FIZ!)
|
||||
UpdatePantVolume(dt); // Ra 2014-07: obs³uga zbiornika rozrz¹du oraz pantografów
|
||||
if (EngineType == WheelsDriven)
|
||||
d = CabNo * dL; // na chwile dla testu
|
||||
else
|
||||
d = dL;
|
||||
DistCounter = DistCounter + fabs(dL) / 1000.0;
|
||||
dL = 0;
|
||||
|
||||
// koniec procedury, tu nastepuja dodatkowe procedury pomocnicze
|
||||
|
||||
// sprawdzanie i ewentualnie wykonywanie->kasowanie poleceñ
|
||||
if (LoadStatus > 0) // czas doliczamy tylko jeœli trwa (roz)³adowanie
|
||||
LastLoadChangeTime = LastLoadChangeTime + dt; // czas (roz)³adunku
|
||||
RunInternalCommand();
|
||||
if (EngineType == DieselEngine)
|
||||
if (dizel_Update(dt))
|
||||
SetFlag(SoundFlag, sound_relay);
|
||||
// uklady hamulcowe:
|
||||
if (VeselVolume > 0)
|
||||
Compressor = CompressedVolume / VeselVolume;
|
||||
else
|
||||
{
|
||||
Compressor = 0;
|
||||
CompressorFlag = false;
|
||||
};
|
||||
ConverterCheck();
|
||||
if (CompressorSpeed > 0.0) // sprê¿arka musi mieæ jak¹œ niezerow¹ wydajnoœæ
|
||||
CompressorCheck(dt); //¿eby rozwa¿aæ jej za³¹czenie i pracê
|
||||
UpdateBrakePressure(dt);
|
||||
UpdatePipePressure(dt);
|
||||
UpdateScndPipePressure(dt); // druga rurka, youBy
|
||||
UpdateBatteryVoltage(dt);
|
||||
// hamulec antyposlizgowy - wy³¹czanie
|
||||
if ((BrakeSlippingTimer > 0.8) && (ASBType != 128)) // ASBSpeed=0.8
|
||||
Hamulec->ASB(0);
|
||||
BrakeSlippingTimer = BrakeSlippingTimer + dt;
|
||||
return d;
|
||||
};
|
||||
|
||||
double TMoverParameters::ShowEngineRotation(int VehN)
|
||||
{ // pokazywanie obrotów silnika, równie¿ dwóch dalszych pojazdów (3×SN61)
|
||||
int b;
|
||||
switch (VehN)
|
||||
{ // numer obrotomierza
|
||||
case 1:
|
||||
return fabs(enrot);
|
||||
case 2:
|
||||
for (b = 0; b <= 1; ++b)
|
||||
if (TestFlag(Couplers[b].CouplingFlag, ctrain_controll))
|
||||
if (Couplers[b].Connected->Power > 0.01)
|
||||
return fabs(Couplers[b].Connected->enrot);
|
||||
break;
|
||||
case 3: // to nie uwzglêdnia ewentualnego odwrócenia pojazdu w œrodku
|
||||
for (b = 0; b <= 1; ++b)
|
||||
if (TestFlag(Couplers[b].CouplingFlag, ctrain_controll))
|
||||
if (Couplers[b].Connected->Power > 0.01)
|
||||
if (TestFlag(Couplers[b].Connected->Couplers[b].CouplingFlag, ctrain_controll))
|
||||
if (Couplers[b].Connected->Couplers[b].Connected->Power > 0.01)
|
||||
return fabs(Couplers[b].Connected->Couplers[b].Connected->enrot);
|
||||
break;
|
||||
};
|
||||
return 0.0;
|
||||
};
|
||||
|
||||
void TMoverParameters::ConverterCheck()
|
||||
{ // sprawdzanie przetwornicy
|
||||
if (ConverterAllow && Mains && !ConvOvldFlag)
|
||||
ConverterFlag = true;
|
||||
else
|
||||
ConverterFlag = false;
|
||||
};
|
||||
|
||||
int TMoverParameters::ShowCurrent(Byte AmpN)
|
||||
{ // odczyt ampera¿u
|
||||
switch (EngineType)
|
||||
{
|
||||
case ElectricInductionMotor:
|
||||
switch (AmpN)
|
||||
{ // do asynchronicznych
|
||||
case 1:
|
||||
return WindingRes * Mm / Vadd;
|
||||
case 2:
|
||||
return dizel_fill * WindingRes;
|
||||
default:
|
||||
return T_MoverParameters::ShowCurrent(AmpN);
|
||||
}
|
||||
break;
|
||||
case DieselElectric:
|
||||
return fabs(Im);
|
||||
break;
|
||||
default:
|
||||
return T_MoverParameters::ShowCurrent(AmpN);
|
||||
}
|
||||
};
|
||||
186
Mover.h
186
Mover.h
@@ -1,186 +0,0 @@
|
||||
/*
|
||||
This Source Code Form is subject to the
|
||||
terms of the Mozilla Public License, v.
|
||||
2.0. If a copy of the MPL was not
|
||||
distributed with this file, You can
|
||||
obtain one at
|
||||
http://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
#ifndef MoverH
|
||||
#define MoverH
|
||||
//---------------------------------------------------------------------------
|
||||
#include "Mover.hpp"
|
||||
// Ra: Niestety "_mover.hpp" siê nieprawid³owo generuje - przek³ada sobie TCoupling na sam koniec.
|
||||
// Przy wszelkich poprawkach w "_mover.pas" trzeba skopiowaæ rêcznie "_mover.hpp" do "mover.hpp" i
|
||||
// poprawiæ b³êdy! Tak a¿ do wydzielnia TCoupling z Pascala do C++...
|
||||
// Docelowo obs³ugê sprzêgów (³¹czenie, roz³¹czanie, obliczanie odleg³oœci, przesy³ komend)
|
||||
// trzeba przenieϾ na poziom DynObj.cpp.
|
||||
// Obs³ugê silniników te¿ trzeba wydzieliæ do osobnego modu³u, bo ka¿dy osobno mo¿e mieæ poœlizg.
|
||||
#include "dumb3d.h"
|
||||
using namespace Math3D;
|
||||
|
||||
enum TProblem // lista problemów taboru, które uniemo¿liwiaj¹ jazdê
|
||||
{ // flagi bitowe
|
||||
pr_Hamuje = 1, // pojazd ma za³¹czony hamulec lub zatarte osie
|
||||
pr_Pantografy = 2, // pojazd wymaga napompowania pantografów
|
||||
pr_Ostatni = 0x80000000 // ostatnia flaga bitowa
|
||||
};
|
||||
|
||||
class TMoverParameters : public T_MoverParameters
|
||||
{ // Ra: wrapper na kod pascalowy, przejmuj¹cy jego funkcje
|
||||
public:
|
||||
vector3 vCoulpler[2]; // powtórzenie wspó³rzêdnych sprzêgów z DynObj :/
|
||||
vector3 DimHalf; // po³owy rozmiarów do obliczeñ geometrycznych
|
||||
// int WarningSignal; //0: nie trabi, 1,2: trabi syren¹ o podanym numerze
|
||||
unsigned char WarningSignal; // tymczasowo 8bit, ze wzglêdu na funkcje w MTools
|
||||
double fBrakeCtrlPos; // p³ynna nastawa hamulca zespolonego
|
||||
bool bPantKurek3; // kurek trójdrogowy (pantografu): true=po³¹czenie z ZG, false=po³¹czenie z
|
||||
// ma³¹ sprê¿ark¹
|
||||
int iProblem; // flagi problemów z taborem, aby AI nie musia³o porównywaæ; 0=mo¿e jechaæ
|
||||
int iLights[2]; // bity zapalonych œwiate³ tutaj, ¿eby da³o siê liczyæ pobór pr¹du
|
||||
private:
|
||||
double CouplerDist(Byte Coupler);
|
||||
|
||||
public:
|
||||
TMoverParameters(double VelInitial, AnsiString TypeNameInit, AnsiString NameInit,
|
||||
int LoadInitial, AnsiString LoadTypeInitial, int Cab);
|
||||
// obs³uga sprzêgów
|
||||
double Distance(const TLocation &Loc1, const TLocation &Loc2, const TDimension &Dim1,
|
||||
const TDimension &Dim2);
|
||||
double Distance(const vector3 &Loc1, const vector3 &Loc2, const vector3 &Dim1,
|
||||
const vector3 &Dim2);
|
||||
bool Attach(Byte ConnectNo, Byte ConnectToNr, TMoverParameters *ConnectTo, Byte CouplingType,
|
||||
bool Forced = false);
|
||||
bool Attach(Byte ConnectNo, Byte ConnectToNr, T_MoverParameters *ConnectTo, Byte CouplingType,
|
||||
bool Forced = false);
|
||||
int DettachStatus(Byte ConnectNo);
|
||||
bool Dettach(Byte ConnectNo);
|
||||
void SetCoupleDist();
|
||||
bool DirectionForward();
|
||||
void BrakeLevelSet(double b);
|
||||
bool BrakeLevelAdd(double b);
|
||||
bool IncBrakeLevel(); // wersja na u¿ytek AI
|
||||
bool DecBrakeLevel();
|
||||
bool ChangeCab(int direction);
|
||||
bool CurrentSwitch(int direction);
|
||||
void UpdateBatteryVoltage(double dt);
|
||||
double ComputeMovement(double dt, double dt1, const TTrackShape &Shape, TTrackParam &Track,
|
||||
TTractionParam &ElectricTraction, const TLocation &NewLoc,
|
||||
TRotation &NewRot);
|
||||
double FastComputeMovement(double dt, const TTrackShape &Shape, TTrackParam &Track,
|
||||
const TLocation &NewLoc, TRotation &NewRot);
|
||||
double ShowEngineRotation(int VehN);
|
||||
// double GetTrainsetVoltage(void);
|
||||
// bool Physic_ReActivation(void);
|
||||
// double LocalBrakeRatio(void);
|
||||
// double ManualBrakeRatio(void);
|
||||
// double PipeRatio(void);
|
||||
// double RealPipeRatio(void);
|
||||
// double BrakeVP(void);
|
||||
// bool DynamicBrakeSwitch(bool Switch);
|
||||
// bool SendCtrlBroadcast(AnsiString CtrlCommand, double ctrlvalue);
|
||||
// bool SendCtrlToNext(AnsiString CtrlCommand, double ctrlvalue, double dir);
|
||||
// bool CabActivisation(void);
|
||||
// bool CabDeactivisation(void);
|
||||
// bool IncMainCtrl(int CtrlSpeed);
|
||||
// bool DecMainCtrl(int CtrlSpeed);
|
||||
// bool IncScndCtrl(int CtrlSpeed);
|
||||
// bool DecScndCtrl(int CtrlSpeed);
|
||||
// bool AddPulseForce(int Multipler);
|
||||
// bool SandDoseOn(void);
|
||||
// bool SecuritySystemReset(void);
|
||||
// void SecuritySystemCheck(double dt);
|
||||
// bool BatterySwitch(bool State);
|
||||
// bool EpFuseSwitch(bool State);
|
||||
// bool IncBrakeLevelOld(void);
|
||||
// bool DecBrakeLevelOld(void);
|
||||
// bool IncLocalBrakeLevel(Byte CtrlSpeed);
|
||||
// bool DecLocalBrakeLevel(Byte CtrlSpeed);
|
||||
// bool IncLocalBrakeLevelFAST(void);
|
||||
// bool DecLocalBrakeLevelFAST(void);
|
||||
// bool IncManualBrakeLevel(Byte CtrlSpeed);
|
||||
// bool DecManualBrakeLevel(Byte CtrlSpeed);
|
||||
// bool EmergencyBrakeSwitch(bool Switch);
|
||||
// bool AntiSlippingBrake(void);
|
||||
// bool BrakeReleaser(Byte state);
|
||||
// bool SwitchEPBrake(Byte state);
|
||||
// bool AntiSlippingButton(void);
|
||||
// bool IncBrakePress(double &brake, double PressLimit, double dp);
|
||||
// bool DecBrakePress(double &brake, double PressLimit, double dp);
|
||||
// bool BrakeDelaySwitch(Byte BDS);
|
||||
// bool IncBrakeMult(void);
|
||||
// bool DecBrakeMult(void);
|
||||
// void UpdateBrakePressure(double dt);
|
||||
// void UpdatePipePressure(double dt);
|
||||
// void CompressorCheck(double dt);
|
||||
void UpdatePantVolume(double dt);
|
||||
// void UpdateScndPipePressure(double dt);
|
||||
// void UpdateBatteryVoltage(double dt);
|
||||
// double GetDVc(double dt);
|
||||
// void ComputeConstans(void);
|
||||
// double ComputeMass(void);
|
||||
// double Adhesive(double staticfriction);
|
||||
// double TractionForce(double dt);
|
||||
// double FrictionForce(double R, Byte TDamage);
|
||||
// double BrakeForce(const TTrackParam &Track);
|
||||
// double CouplerForce(Byte CouplerN, double dt);
|
||||
// void CollisionDetect(Byte CouplerN, double dt);
|
||||
// double ComputeRotatingWheel(double WForce, double dt, double n);
|
||||
// bool SetInternalCommand(AnsiString NewCommand, double NewValue1, double
|
||||
// NewValue2);
|
||||
// double GetExternalCommand(AnsiString &Command);
|
||||
// bool RunCommand(AnsiString command, double CValue1, double CValue2);
|
||||
// bool RunInternalCommand(void);
|
||||
// void PutCommand(AnsiString NewCommand, double NewValue1, double NewValue2, const
|
||||
// TLocation
|
||||
// &NewLocation);
|
||||
// bool DirectionBackward(void);
|
||||
// bool MainSwitch(bool State);
|
||||
// bool ConverterSwitch(bool State);
|
||||
// bool CompressorSwitch(bool State);
|
||||
void ConverterCheck();
|
||||
// bool FuseOn(void);
|
||||
// bool FuseFlagCheck(void);
|
||||
// void FuseOff(void);
|
||||
int ShowCurrent(Byte AmpN);
|
||||
// double v2n(void);
|
||||
// double current(double n, double U);
|
||||
// double Momentum(double I);
|
||||
// double MomentumF(double I, double Iw, Byte SCP);
|
||||
// bool CutOffEngine(void);
|
||||
// bool MaxCurrentSwitch(bool State);
|
||||
// bool ResistorsFlagCheck(void);
|
||||
// bool MinCurrentSwitch(bool State);
|
||||
// bool AutoRelaySwitch(bool State);
|
||||
// bool AutoRelayCheck(void);
|
||||
// bool dizel_EngageSwitch(double state);
|
||||
// bool dizel_EngageChange(double dt);
|
||||
// bool dizel_AutoGearCheck(void);
|
||||
// double dizel_fillcheck(Byte mcp);
|
||||
// double dizel_Momentum(double dizel_fill, double n, double dt);
|
||||
// bool dizel_Update(double dt);
|
||||
// bool LoadingDone(double LSpeed, AnsiString LoadInit);
|
||||
// void ComputeTotalForce(double dt, double dt1, bool FullVer);
|
||||
// double ComputeMovement(double dt, double dt1, const TTrackShape &Shape,
|
||||
// TTrackParam &Track
|
||||
// , TTractionParam &ElectricTraction, const TLocation &NewLoc, TRotation &NewRot);
|
||||
// double FastComputeMovement(double dt, const TTrackShape &Shape, TTrackParam
|
||||
// &Track, const
|
||||
// TLocation &NewLoc, TRotation &NewRot);
|
||||
// bool ChangeOffsetH(double DeltaOffset);
|
||||
// T_MoverParameters(double VelInitial, AnsiString TypeNameInit, AnsiString NameInit,
|
||||
// int LoadInitial
|
||||
// , AnsiString LoadTypeInitial, int Cab);
|
||||
// bool LoadChkFile(AnsiString chkpath);
|
||||
// bool CheckLocomotiveParameters(bool ReadyFlag, int Dir);
|
||||
// AnsiString EngineDescription(int what);
|
||||
// bool DoorLeft(bool State);
|
||||
// bool DoorRight(bool State);
|
||||
// bool DoorBlockedFlag(void);
|
||||
// bool PantFront(bool State);
|
||||
// bool PantRear(bool State);
|
||||
//
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -12,8 +12,8 @@ http://mozilla.org/MPL/2.0/.
|
||||
|
||||
*/
|
||||
|
||||
#include "system.hpp"
|
||||
#include "classes.hpp"
|
||||
//#include "system.hpp"
|
||||
//#include "classes.hpp"
|
||||
#pragma hdrstop
|
||||
|
||||
#include "math.h"
|
||||
@@ -21,7 +21,7 @@ http://mozilla.org/MPL/2.0/.
|
||||
#include "Globals.h"
|
||||
#include "Timer.h"
|
||||
#include "Logs.h"
|
||||
#include "McZapkie\mctools.hpp"
|
||||
#include "McZapkie\mctools.h"
|
||||
|
||||
TRealSound::TRealSound()
|
||||
{
|
||||
|
||||
@@ -12,12 +12,12 @@ http://mozilla.org/MPL/2.0/.
|
||||
|
||||
*/
|
||||
|
||||
#include "system.hpp"
|
||||
#include "classes.hpp"
|
||||
//#include "system.hpp"
|
||||
//#include "classes.hpp"
|
||||
#pragma hdrstop
|
||||
|
||||
#include "Traction.h"
|
||||
#include "mctools.hpp"
|
||||
#include "mctools.h"
|
||||
#include "Globals.h"
|
||||
#include "Usefull.h"
|
||||
#include "TractionPower.h"
|
||||
|
||||
@@ -13,12 +13,12 @@ http://mozilla.org/MPL/2.0/.
|
||||
|
||||
*/
|
||||
|
||||
#include "system.hpp"
|
||||
#include "classes.hpp"
|
||||
//#include "system.hpp"
|
||||
//#include "classes.hpp"
|
||||
#pragma hdrstop
|
||||
|
||||
#include "Mover.h"
|
||||
#include "mctools.hpp"
|
||||
#include "mctools.h"
|
||||
#include "Timer.h"
|
||||
#include "Globals.h"
|
||||
#include "TractionPower.h"
|
||||
|
||||
Reference in New Issue
Block a user