- Timestamp:
- Feb 9, 2011, 9:11:44 AM (14 years ago)
- Location:
- osgVisual/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
osgVisual/trunk/include/object/visual_object.h
r221 r222 387 387 // Position 388 388 /** 389 * Latitude of the object .389 * Latitude of the object in RAD. 390 390 */ 391 391 double lat; 392 392 393 393 /** 394 * Longitude of the object .394 * Longitude of the object in RAD. 395 395 */ 396 396 double lon; 397 397 398 398 /** 399 * Altitude of the object over the ellipsoid .399 * Altitude of the object over the ellipsoid in meter. 400 400 */ 401 401 double alt; … … 403 403 // Attitude 404 404 /** 405 * Azimuth angle (Rotation along Z axis, "heading") of the object 405 * Azimuth angle (Rotation along Z axis, "heading") of the object in RAD. 406 406 */ 407 407 double azimuthAngle_psi; 408 408 409 409 /** 410 * Pitch ("nose relative to horizon") angle of the object 410 * Pitch ("nose relative to horizon") angle of the object in RAD. 411 411 */ 412 412 double pitchAngle_theta; 413 413 414 414 /** 415 * Bank angle of the object .415 * Bank angle of the object in RAD. 416 416 */ 417 417 double bankAngle_phi; -
osgVisual/trunk/src/object/visual_object.cpp
r221 r222 116 116 std::string attr_name=reinterpret_cast<const char*>(attr->name); 117 117 std::string attr_value=reinterpret_cast<const char*>(attr->children->content); 118 if( attr_name == "lat" ) lat = util::strToDouble(attr_value);119 if( attr_name == "lon" ) lon = util::strToDouble(attr_value);118 if( attr_name == "lat" ) lat = osg::DegreesToRadians(util::strToDouble(attr_value)); 119 if( attr_name == "lon" ) lon = osg::DegreesToRadians(util::strToDouble(attr_value)); 120 120 if( attr_name == "alt" ) alt = util::strToDouble(attr_value); 121 121 … … 131 131 std::string attr_name=reinterpret_cast<const char*>(attr->name); 132 132 std::string attr_value=reinterpret_cast<const char*>(attr->children->content); 133 if( attr_name == "rot_x" ) rot_x = util::strToDouble(attr_value);134 if( attr_name == "rot_y" ) rot_y = util::strToDouble(attr_value);135 if( attr_name == "rot_z" ) rot_z = util::strToDouble(attr_value);133 if( attr_name == "rot_x" ) rot_x = osg::DegreesToRadians(util::strToDouble(attr_value)); 134 if( attr_name == "rot_y" ) rot_y = osg::DegreesToRadians(util::strToDouble(attr_value)); 135 if( attr_name == "rot_z" ) rot_z = osg::DegreesToRadians(util::strToDouble(attr_value)); 136 136 137 137 attr = attr->next; … … 217 217 std::string attr_name=reinterpret_cast<const char*>(attr->name); 218 218 std::string attr_value=reinterpret_cast<const char*>(attr->children->content); 219 if( attr_name == "rot_x" ) cam_rot_x = util::strToDouble(attr_value);220 if( attr_name == "rot_y" ) cam_rot_y = util::strToDouble(attr_value);221 if( attr_name == "rot_z" ) cam_rot_z = util::strToDouble(attr_value);219 if( attr_name == "rot_x" ) cam_rot_x = osg::DegreesToRadians(util::strToDouble(attr_value)); 220 if( attr_name == "rot_y" ) cam_rot_y = osg::DegreesToRadians(util::strToDouble(attr_value)); 221 if( attr_name == "rot_z" ) cam_rot_z = osg::DegreesToRadians(util::strToDouble(attr_value)); 222 222 223 223 attr = attr->next; … … 251 251 std::string attr_name=reinterpret_cast<const char*>(attr->name); 252 252 std::string attr_value=reinterpret_cast<const char*>(attr->children->content); 253 if( attr_name == "rot_x" ) geometry_rot_x = util::strToDouble(attr_value);254 if( attr_name == "rot_y" ) geometry_rot_y = util::strToDouble(attr_value);255 if( attr_name == "rot_z" ) geometry_rot_z = util::strToDouble(attr_value);253 if( attr_name == "rot_x" ) geometry_rot_x = osg::DegreesToRadians(util::strToDouble(attr_value)); 254 if( attr_name == "rot_y" ) geometry_rot_y = osg::DegreesToRadians(util::strToDouble(attr_value)); 255 if( attr_name == "rot_z" ) geometry_rot_z = osg::DegreesToRadians(util::strToDouble(attr_value)); 256 256 257 257 attr = attr->next;
Note: See TracChangeset
for help on using the changeset viewer.