2
#Converter for LLA WGS84 to local coord system
4
roslib.load_manifest('xsens_mtig')
7
from sensor_msgs.msg import NavSatFix
10
global long, lat, radius
14
global long, lat, radius
16
br = tf.TransformBroadcaster()
19
ang_ecc = math.acos(b/a)
24
radius = a/math.sqrt(1-pow(math.sin(lat)*math.sin(ang_ecc),2))
25
long = math.radians(data.longitude)
26
lat = math.radians(data.latitude)
31
x = radius*math.sin(math.radians(data.latitude)-lat)
32
y = radius*math.sin(math.radians(data.longitude)-long)
36
br.sendTransform((x, y, 0),
37
tf.transformations.quaternion_from_euler(0, 0, 0),
43
if __name__ == '__main__':
44
rospy.init_node('lla2tf', anonymous=True)
45
rospy.Subscriber("/nav", NavSatFix, satData)
54
print "\nROS shutdown"