1 | initial version |

- Use the
`datum`

parameter, correct. 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.- 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.

2 | No.2 Revision |

Use the

`datum`

parameter, correct.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):

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

~~inv(rot)~~- 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.

...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 | No.3 Revision |

Use the

`datum`

parameter, correct.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):

~~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.- 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.

ROS Answers is licensed under Creative Commons Attribution 3.0 Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.