Skip to content

Change misleading variable name in Magnetometer msgs #579

Description

@bayukael

Desired behavior

In the magnetometer message format, the variable field_tesla often is published not in tesla, but in Gauss. This happens for the built-in plugin gz-sim-magnetometer-system where user can choose whether to publish in Tesla unit or in Gauss unit. This situation creates confusion because the variable name is called field_tesla but user can publish in any other unit. Maybe it can be better if the variable name is called field_strength so that it doesn't confuse people.

Alternatives considered

It might be better to modify the built-in plugin instead because it is the plugin that incorrectly publishes magnetometer in Gauss instead of Tesla. However, the fix that was done on the plugin side was merely to add option whether to publish in Gauss unit or in Tesla unit.

Implementation suggestion

Change the variable name from field_tesla to field_strength

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions