# Revision history [back]

1. Use the datum parameter, correct.
2. The reason for those values is that the map->UTM transform involves rotation. If you create a transformation matrix with the values you posted (MATLAB or Octave code shown):

mat = [cos(1.754486327)   -sin( 1.754486327)   309151.07
sin(1.754486327)    cos( 1.754486327)   3328209.18
0                   0                   1         ];
inv(rot)


...you'll get

-0.182658729774357         0.983176377074439          -3215747.5019837
-0.983176377074439        -0.182658729774357          911876.490213439
0                         0                         1


That's all we're doing in the code: we create a transform with the converted datum values and the yaw offset, and then invert it. I do note that the values aren't exactly what the node is producing, but that is almost certainly related to this. Also, you may have just copied and pasted this incorrectly, but the parameter should be publish_filtered_gps. Unrelated to your question, but it's worth mentioning.

3. The -1.754 value is the summation of your yaw_offset an magnetic_declination_radians parameters: 1.570796327 + 0.18369 = 1.754486327. Please see this page for details.
1. Use the datum parameter, correct.

1. The reason for those values is that the map->UTM transform involves rotation. If you create a transformation matrix with the values you posted (MATLAB or Octave code shown):

mat = [cos(1.754486327)   -sin( 1.754486327)   309151.07
sin(1.754486327)    cos( 1.754486327)   3328209.18
0                   0                   1         ];
inv(rot)

inv(rot)

...you'll get

-0.182658729774357         0.983176377074439          -3215747.5019837
-0.983176377074439        -0.182658729774357          911876.490213439
0                         0                         1


That's all we're doing in the code: we create a transform with the converted datum values and the yaw offset, and then invert it. I do note that the values aren't exactly what the node is producing, but that is almost certainly related to this. Also, you may have just copied and pasted this incorrectly, but the parameter should be publish_filtered_gps. Unrelated to your question, but it's worth mentioning.

1. The -1.754 value is the (inverted) summation of your yaw_offset an magnetic_declination_radians parameters: 1.570796327 + 0.18369 = 1.754486327. Please see this page for details.
1. Use the datum parameter, correct.

1. The reason for those values is that the map->UTM transform involves rotation. If you create a transformation matrix with the values you posted (MATLAB or Octave code shown):

mat = [cos(1.754486327)   -sin( 1.754486327)   309151.07
sin(1.754486327)    cos( 1.754486327)   3328209.18
0                   0                   1         ];
inv(rot)
2. 
inv(rot) 

...you'll get

-0.182658729774357         0.983176377074439          -3215747.5019837
-0.983176377074439        -0.182658729774357          911876.490213439
0                         0                         1


That's all we're doing in the code: we create a transform with the converted datum values and the yaw offset, and then invert it. I do note that the values aren't exactly what the node is producing, but that is almost certainly related to this. Also, you may have just copied and pasted this incorrectly, but the parameter should be publish_filtered_gps. Unrelated to your question, but it's worth mentioning.

1. The -1.754 value is the (inverted) (negated) summation of your yaw_offset an magnetic_declination_radians parameters: 1.570796327 + 0.18369 = 1.754486327. Please see this page for details.