Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- #include <math.h>
- int main(int argc, char** argv)
- {
- if(argc < 3){
- printf("%s <height_camera> <theta_perpendiculer_camera>\n", *(argv+0));
- return 1;
- }
- double n = atof(*(argv+1));
- double t = atof(*(argv+2)) * M_PI / 180;
- double ta = 21.25 * M_PI / 180;
- double tb = (M_PI/2 - t) - ta;
- double t_all = ta*2 + tb;
- double m = tan(t_all) * n - tan(tb) * n;
- printf("%f\n", m);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement