Inventor Pradhap

ஆதியும் அந்தமும் என் தமிழே🙏

Post Page Advertisement [Top]

Battery Range Calculation for EV Bike/Cycle in C Program

Battery Range Calculation for EV Bike/Cycle in C Program

Battery Range Calculation for EV Bike/Cycle



#include
int main()
{
    
int di,nm,rps,sp;
float dm,dtr,dt_os,ah,ic_i,bat_r,range,dt_os_km ;
printf("\nEnter the value of wheel diameter in Inch         :");		
scanf("%d",&di);
dm = (di * 0.0254);
printf("\nThe diameter of wheel in metre is                 :%0.4f",dm);

printf("\nEnter the speed of wheel in RPM                   :");
scanf("%d",&nm);
rps = nm/60;
printf("\nThe revolution per second of wheel is              :%d",rps);
dtr = 3.14*dm;
printf("\nDistance travelled by one revolution is           :%0.4f m",dtr);
dt_os = (dtr*rps);
printf("\nDistance travelled in one second is               :%0.2f m/s",dt_os);
dt_os_km = (dt_os*(3600/1000));
printf("\nDistance travelled in one second in Km/h is       :%0.2f Km/h",dt_os_km);
printf("\nEnter the value of Battery Ah                     :");
scanf("%f",&ah);
printf("\nEnter the value of Input current                  :");
scanf("%f",&ic_i);
bat_r = (ah/ic_i);
printf("\nThe battery Range is                              :%2f Hour",bat_r);
range = (bat_r *dt_os_km);
printf("\n%2f of Ah need to achieve %2f Km",ah,range);
return 0;
}

Inventor Pradhap

No comments:

Post a Comment

Bottom Ad [Post Page]