Skip to content

Commit

Permalink
Fixed bug in cylindrical projection
Browse files Browse the repository at this point in the history
  • Loading branch information
psigen committed Jun 19, 2013
1 parent 4b4c54f commit 8727d5e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions atlas_snapshot/src/service.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,8 @@ void snapshot_callback(const std_msgs::EmptyConstPtr &msg)
double j = remap(atan2(point.y, point.x),
-fovx/2.0, fovx/2.0,
(double)width, 0);
double i = remap(atan2(point.z, sqrt(point.x*point.x + point.y*point.y)),
-fovy/2.0, fovy/2.0,
double i = remap(point.z / sqrt(point.x*point.x + point.y*point.y + 1e-8),
-tan(fovy/2.0), tan(fovy/2.0),
(double)height, 0);
double d = remap(1.0 / sqrt(point.x*point.x + point.y*point.y),
(1.0/30.0), (1.0/0.25),
Expand Down

0 comments on commit 8727d5e

Please sign in to comment.