Advertisement
Guest User

Untitled

a guest
Mar 20th, 2019
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <math.h>
  4.  
  5. int main(int argc, char** argv)
  6. {
  7. if(argc < 3){
  8. printf("%s <height_camera> <theta_perpendiculer_camera>\n", *(argv+0));
  9. return 1;
  10. }
  11. double n = atof(*(argv+1));
  12. double t = atof(*(argv+2)) * M_PI / 180;
  13. double ta = 21.25 * M_PI / 180;
  14.  
  15. double tb = (M_PI/2 - t) - ta;
  16. double t_all = ta*2 + tb;
  17. double m = tan(t_all) * n - tan(tb) * n;
  18. printf("%f\n", m);
  19. return 0;
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement