const float dt = 0.01;
float ttot = 0;
float pos = 30;
float vel = 0;
float acc = 0;
float F = 0;
const float mass = 2;
const float rho = 1.293;
const float C = 0.47;
const float area = 0.0314;
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
}
void loop() {
// put your main code here, to run repeatedly:
while(pos>0){F=.5*rho*vel*vel*C*area-mass*9.8;
acc=F/mass;
vel=vel+acc*dt;
pos=pos+vel*dt;
ttot=ttot+dt;
Serial.println(ttot);}
}