Guest User

Untitled

a guest
Nov 11th, 2020
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.92 KB | None | 0 0
  1. # Online Python compiler (interpreter) to run Python online.
  2. #!/usr/bin/python
  3. #input your values
  4. wb=2.500
  5. orig_cg=0.38
  6. new_cg=0.38
  7. z_offset=-0.1
  8.  
  9. d = (wb * (orig_cg - new_cg)) + z_offset
  10. print(d ,"#new graphical offset if cog change")
  11.  
  12. #lets try basey
  13. #Distance of CG from the center of the wheel in meters.
  14. #Rear Wheel Radius-BASEY=Rear CoG
  15. #Actual CG height =(FWR-FBasey)+(-Rbasey))/CG_LOCATION%
  16. # CG_LOCATION% = FRONT COG % in car.ini
  17. #FWR - BASEY = FCoG [solve for BASEY]
  18. fwr=0.3048
  19. orig_cg= 0.38
  20. #fBASEY formula here
  21. fBASEY = (fwr * orig_cg)
  22. print (fBASEY, "#front BASEY") #debug
  23.  
  24. #RWR - BASEY = RCoG [solve for BASEY]
  25. rwr= 0.3556
  26. rcog= 0.63
  27. #rBASEY formula here
  28. rBASEY = (rwr * rcog)
  29. print (rBASEY, "#rear BASEY") #debug
  30. #(FWR-FBasey)+(RWR-Rbasey))/CG_LOCATION% = Actual CG height
  31. # wtf is this number? = Actual CG height
  32. aCoGh = (fwr-fBASEY) + (rwr-rBASEY) / orig_cg
  33. print (aCoGh, "#actual CG height")
  34.  
  35.  
Advertisement
Add Comment
Please, Sign In to add comment