Skip to content

NaN values in Mission waypoints saved with MAVWPLoader.save() create invalid .waypoints file for Mission Planner #1096

@HB-Stratos

Description

@HB-Stratos

https://mavlink.io/en/messages/common.html#MAV_CMD_NAV_WAYPOINT documents that I should use waypoint parameter4 as NaN if I want the vehicle to use system yaw.

However, if I create a MAVLink_mission_item_message with param4=math.nan and then write this to file by creating a MAVWPLoader object and calling save(), these NaNs are written to file (sort of as expected).

When I then try to load this waypoints file into mission planner, it fails claiming the line is invalid. Manually changing the NaNs to zero makes the file load correctly in mission planner. However I am not sure if it is then correctly using system yaw.

Test file the save spat out:

test.waypoints.txt

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions