Commit b0645eeb authored by Tillmann Zwiener's avatar Tillmann Zwiener
Browse files

Fix addet new initVehicl

parent bfe213fa
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorProject>
<!-- Written by QtCreator 5.0.2, 2021-11-08T16:48:54. -->
<!-- Written by QtCreator 5.0.2, 2021-11-15T14:57:27. -->
<qtcreator>
<data>
<variable>EnvironmentId</variable>
......@@ -244,6 +244,7 @@
<value type="bool" key="RunConfiguration.UseLibrarySearchPath">true</value>
<value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
<value type="bool" key="RunConfiguration.UseTerminal">true</value>
<value type="QString" key="RunConfiguration.WorkingDirectory.default">C:/Users/TZbox/Documents/build-Praktikum_2-Desktop_Qt_6_2_0_MinGW_64_bit-Debug</value>
</valuemap>
<value type="int" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
......
......@@ -15,9 +15,13 @@
using namespace std;
//---------------------------
void sumulate(void);
void accel (void);
int initVeichle (double dt_in, double s_in); // to Do Default Werte
int initVeichle (double , double, int ); // to Do Default Werte
int getXPos(void);
int getYPos(void);
string getVehicleString(void);
......@@ -32,6 +36,8 @@ struct car{
double dt =0; //deltra time in second
};
struct car BMW;
int main()
{
......@@ -39,22 +45,32 @@ int main()
}
void sumulate(void){
struct car BMW;
BMW.speed += BMW.acceleration *BMW.dt;
}
void accel(void){
struct car BMW;
BMW.F_akt = BMW.F_max;
}
int roll(void){
struct car BMW;
BMW.F_akt = 0;
return 0;
}
string getVehicleString(void){
struct car BMW;
int initVeichle (double dt_in = 1, double s_in =0, double F_max =0, int mass =1){
BMW.dt = dt_in;
BMW.acceleration =0;
BMW.F_max = F_max;
BMW.postion =0;
BMW.mass = mass;
return 0;
}
string getVehicleString(void){
std::stringstream sstr1;
sstr1 << "a = "<< BMW.acceleration << "v = "<< BMW.speed<< "pos X" << BMW.speed;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment