Skip to content

[Sensor] vectornav: Support MSL altitude using new GnssAltMSL field for VN-300 (Firmware v1.1.0.1) #27743

Description

@JoonhanSon

Describe problem solved by the proposed feature

I am currently using the VectorNav VN-300. While looking into the vectornav driver (src/drivers/ins/vectornav/VectorNav.cpp), I noticed that the GNSS ellipsoid altitude is being assigned to both the MSL and ellipsoid altitude fields in the sensor_gps topic:

sensor_gps.altitude_msl_m = positionGpsLla.c[2];
sensor_gps.altitude_ellipsoid_m = sensor_gps.altitude_msl_m;

Since positionGpsLla.c[2] is the altitude above the WGS84 ellipsoid, this results in an inaccurate MSL altitude. I understand this was likely a necessary workaround because older firmware versions only provided the ellipsoid altitude.

Describe your preferred solution

I propose updating the vectornav driver to natively support the true Mean Sea Level (MSL) altitude provided by the newer VN-300 firmware (v1.1.0.1+). Specifically, the driver should be modified to:

  1. Update Configuration: Enable the GnssAltMSL bit (Bit Offset 18) in the binary output configuration register during the sensor initialization sequence.

  2. Update Parser: Modify the VnUartPacket parser to correctly extract the new GnssAltMSL measurement from the incoming byte stream.

  3. Correct Mapping: Map the extracted GnssAltMSL value directly to sensor_gps.altitude_msl_m, while dedicating the existing positionGpsLla.c[2] measurement strictly to sensor_gps.altitude_ellipsoid_m.

Describe possible alternatives

I haven't considered any other specific alternatives. Since the VN-300 now explicitly supports this true MSL data, extracting it directly from the sensor seems like the most straightforward and optimal approach.

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    status:needs-triageAuto-assigned to new issues and removed after maintainers review it and assign the specific label.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions