loading
 
object GPS position
Anthony from Australia  [4 posts]
4 years
Hi I am wanting to display the calculated gps position of a found target on screen.

I have a rc plane with downward looking camera,the gps position of the plane is displayed on screen and target has been found and draws a line from target to center of screen which would be the position of the rc plane(see attached photo for example)

Is it possible for roborealm to calculate and display the gps position of the target based on the known position of the center of the image(rc aircraft).

Other factors to take into account would be altitude of aircraft say 100 meters and viewing angle of lens on the camera.

Basically I want to geo reference a found target in the image.

Ay help with this would be greatly appreciated

 
Steven Gentner from United States  [1370 posts] 4 years
Anthony,

Yes, this is possible but you've got a little math to do to figure this out. We helped out FIRST last year do a similar calculation where they wanted to know the distance to an object but knew the size. In your case, its the other way around, you know the perpendicular distance (altitude) and instead want the size (i.e. distance from target to center image).

Note that, this only works if the aircraft camera is pointed directly down following the line of gravity since that's approximately what the altitude is being calculated on. For example, if your aircraft is tilted towards the target, the camera image will show the target in the middle with no offset and your altitude will reflect the position of the aircraft perpendicular to the ground ... and thus the calculation will be wrong.

If you feel that these readings can be made with the aircraft in a level position, have a look at

http://www.roborealm.com/FRC2013/slide060.php

and 3/4 down the page you will see a VBScript block which calculates depth/altitude knowing the dimensions. You'd need to turn that around to instead calculate dimension knowing depth/altitude.

Note that the technique used there didn't need the level requirement since the shape of the square was used to adjust for rotation. With only a single point you can't do this which is why the aircraft needs to be level.

STeven.
Anthony from Australia  [4 posts] 4 years
Thanks for the help I will have a look at the VBscript and see what I can come up with.
The camera is always facing down as it is in a gimbal which keeps it facing directly down even when the plane pitches up or banks.
Anonymous 3 years
Just wondering if someone can help with this as i am new to vb script.

I want to change the target COG xy coordinates to a gps position.
I have this data available
Current gps position which is the center of the image.

Heading direction being top of image which is the direction the aircraft is heading(as an example 290degress heading).

Image width is 797 pixels, Height is 593 pixels which = a image width of 100 meters and image height of 80 meters at an aircraft height of 100 meters.

So at a height of only 50m the image size in meters would be half of what is at 100m (hoping the script can also calculate this based on GPS height and using the 100 meter height calculation as a reference.

target cog in this example is x 480 and y94
and the center of the image in X,Y position would be (797/2)=398.5 X and (593/2)=296.5 Y which is the current gps coordinates.


From this information a script should be able to be written to calculate the position of the target and convert to a gps coordinates.

hope this makes sense
Im still working on it any help on this would be great thanks.

This forum thread has been closed due to inactivity (more than 4 months) or number of replies (more than 50 messages). Please start a New Post and enter a new forum thread with the appropriate title.

 New Post   Forum Index