Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
TraiectorieIdeala
#include <iostream> #include <math.h> using namespace std; int main() { //constante double z=0.89,z0=0.25,g=9.81,pi=3.1416; double rhinoWheelDiameter=0.096,maxAngle=41,maxLegalSpeed=6.5; //variabile double d,v0,tg,cs; double a,b,c,delta; cin>>d; //Cand totul este intre maxime tg=2*(z-z0)/d; v0=sqrt((tg*tg+1)*2*g*(z-z0))/tg; //Viteza mai mare decat maximul if(v0>maxLegalSpeed){ v0=maxLegalSpeed; a=g*d*d; b=-2*d*v0*v0; c=2*v0*v0*(z-z0)+g*d*d; delta=b*b-4*a*c; tg=(-b-sqrt(delta))/2/a; } //Unghi mai mare decat maximul if(atan(tg)*180/pi>maxAngle){ tg=tan(maxAngle*pi/180.0); cs=cos(maxAngle*pi/180.0); v0=d/(cs*sqrt(2*(d*tg-(z-z0))/g)); if(v0>maxLegalSpeed) v0=maxLegalSpeed; } cout<<"Viteza: "<<v0<<endl; cout<<"RPM fara frecari: "<<60*v0/rhinoWheelDiameter/pi<<endl; cout<<"Unghi: "<<atan(tg)*180/pi<<endl; }
run
|
edit
|
history
|
help
0
NonparaRuns
23
Working variables benchmark
TmpFib
spiral traversal of a matrix
მატრიცა
Finding Ocean
‘int R::print() const’ cannot be overloaded
CPP - Arrays - Ex.3
Print Euler Path