Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Distance calculations (http://www.chiefdelphi.com/forums/showthread.php?t=44309)

Max Brin 19-02-2006 13:38

Distance calculations
 
We are looking for the complete code to calculate the distance from the camera to the light...

Thanks in advance. :confused:

Windward 19-02-2006 14:28

Re: Distance calculations
 
http://www.chiefdelphi.com/forums/sh...amera+distance

Specifically
Quote:

The camera center to target center formula is similar:

camera to target angle = target pixel * (camera fov angle / camera pixels) - center pixel

Then combine:

bot to target angle = bot to camera angle + camera to target angle

This might also be helplful, but it is about how to calculate the angle to which one should fire.
http://www.chiefdelphi.com/forums/sh...e ra+distance

Keith Watson 19-02-2006 19:17

Re: Distance calculations
 
Then once you have an accurate tilt angle from the camera to the target it is normal trig (tangent) to use that angle and the vertical height between the camera and the target center.

The article Windward quoted I do not believe has any example code with it. I certainly never went that far since our team isn't using the enhanced accuracy values.

Denz 22-02-2006 21:38

Re: Distance calculations
 
We had a nice Distance_Function() in our program using the tan function and everything, but we found it to not be necessary, since it correlates directly to the tilt_angle so we mapped out distances using the tilt angle as a primary source of measure, works the same, it's just much simpler.


All times are GMT -5. The time now is 01:33.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi