-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMain.cpp
104 lines (76 loc) · 3.66 KB
/
Main.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
#include <main.h>
void addProperty(const QString name, QObject *obj){
engine_ptr->rootContext()->setContextProperty(name, obj);
//qDebug() << "MAIN: Property added " << name;
}
int main(int argc, char **argv)
{
qDebug(" ");
qDebug("");
qDebug("//////////////////////////////////////////////////////////");
qDebug("//////////////////////////////////////////////////////////");
qDebug("//////////////////////////////////////////////////////////");
qDebug("//////////////////////////////////////////////////////////");
qDebug("//////////////////////////////////////////////////////////");
qDebug("");
qDebug("EFR Full Vehicle Simulation v1.0 by Hans Blaettermann ");
qDebug("[email protected]");
qDebug("---");
qDebug("GIT:");
qDebug("https://github.com/Olgidos/efrSIM ");
qDebug("Credits: ");
qDebug("Qt: https://www.qt.io/");
qDebug("Icon made by https://smashicons.com/ from www.flaticon.com");
qDebug("");
qDebug("//////////////////////////////////////////////////////////");
qDebug(" ");
qDebug(" ");
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
QApplication app(argc, argv);
QQmlApplicationEngine engine;
engine_ptr = &engine;
qDebug() << "Engine created";
Data::instance();
SimController* controller = new SimController();
qDebug() << "Model/Controller created";
const QUrl url(QStringLiteral("qrc:/Viewer/Main.qml"));
QObject::connect(&engine, &QQmlApplicationEngine::objectCreated, &app, [url](QObject *obj, const QUrl &objUrl) {
if (!obj && url == objUrl)
QCoreApplication::exit(-1);
}, Qt::QueuedConnection);
qDebug() << "Engine loaded";
double t = 0.0;
double f = 0.0;
/* MFT_FX_PureLongSlip(1529.9, 0.15, 3.9547, &t, &f);
qDebug() << "1400.0, 0.05, 0.0" << t << " " << f;
MFT_FX_PureLongSlip(1529.9, 0.1, 3.9547, &t, &f);
qDebug() << "1400.0, 0.1, 0.0" << t << " " << f;
MFT_FX_PureLongSlip(1529.9, 0.075, 3.9547, &t, &f);
qDebug() << "1400.0, 0.05, 0.0" << t << " " << f;
MFT_FX_PureLongSlip(1529.9, 0.05, 3.9547, &t, &f);
qDebug() << "1400.0, -0.25, 0.0" << t << " " << f;
MFT_FX_PureLongSlip(1529.9, 0.025, 3.9547, &t, &f);
qDebug() << "500.0 0.1 0.0" << t << " " << f;
MFT_FX_PureLongSlip(1529.9, 0, 3.9547, &t, &f);
qDebug() << "500.0 -0.15 0.0" << t << " " << f;
MFT_FX_PureLongSlip(1529.9, -0.025, 3.9547, &t, &f);
qDebug() << "1400.0, 0.05, 0.0" << t << " " << f;
MFT_FX_PureLongSlip(1529.9, -0.05, 3.9547, &t, &f);
qDebug() << "500.0 -0.15 0.0" << t << " " << f;
MFT_FX_PureLongSlip(1529.9, -0.075, 3.9547, &t, &f);
qDebug() << "1400.0, 0.05, 0.075" << t << " " << f;
MFT_FX_PureLongSlip(1529.9, -0.1, 3.9547, &t, &f);
qDebug() << "500.0 -0.15 0.0" << t << " " << f;
MFT_FX_PureLongSlip(1529.9, -0.15, 3.9547, &t, &f);
qDebug() << "800N 0.2 0.0" << t << " " << f;
qDebug() << "Overturning " << MFT_MX_OverturningCouple(1000.0, 4.0 , 0);
qDebug() << "Overturning " << MFT_MX_OverturningCouple(1000.0, 1.0 , 0);
qDebug() << "Overturning " << MFT_MX_OverturningCouple(1000.0, 0.0 , 0);
qDebug() << "Rolling Resistance " << MFT_MY_RollingResistance(1000.0, 20.0 , 3000);
qDebug() << "Rolling Resistance " << MFT_MY_RollingResistance(1000.0, 10.0 , 3000);
qDebug() << "Rolling Resistance " << MFT_MY_RollingResistance(1000.0, 0.0 , 3000);*/
//MFT_FX_PureLongSlip(500, -0.15, 0, &t, &f);
//qDebug() << "500.0, -0.15, 0.0" << t << " " << f;
engine.load(url);
return app.exec();
}