Ignore:
Timestamp:
Sep 21, 2016, 3:07:48 PM (5 years ago)
Author:
Thomas Fuhrmann
Message:

Add lat, lon and alt fields + adapt processing of MissionSend?

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/mavlink/tools/Controller/Mavlink/src/GuiGcs.cpp

    r79 r81  
    106106    // Parse param3
    107107    float param3 = std::stof(missionCommand.substr(0, missionCommand.find(delimiter)));
     108    missionCommand.erase(0, missionCommand.find(delimiter) + delimiter.length());
     109    // Parse latitude
     110    float latitude = std::stof(missionCommand.substr(0, missionCommand.find(delimiter)));
     111    missionCommand.erase(0, missionCommand.find(delimiter) + delimiter.length());
     112    // Parse longitude
     113    float longitude = std::stof(missionCommand.substr(0, missionCommand.find(delimiter)));
     114    missionCommand.erase(0, missionCommand.find(delimiter) + delimiter.length());
     115    // Parse altitude
     116    float altitude = std::stof(missionCommand.substr(0, missionCommand.find(delimiter)));
     117    missionCommand.erase(0, missionCommand.find(delimiter) + delimiter.length());
    108118    // cout << "[INFO] Mission item commands : " << command << ", " << param1 << ", " << param2 << ", " << param3 << std::endl;
    109     mavCom->sendMissionItem(mavCom->target.getSysID(), mavCom->target.getCompID(), 0, MAV_FRAME_GLOBAL_RELATIVE_ALT, MavCommandGet(command), 0, 1, 0, 0, 0, 0, param1, param2, param3);
     119    mavCom->sendMissionItem(mavCom->target.getSysID(), mavCom->target.getCompID(), 0, MAV_FRAME_GLOBAL_RELATIVE_ALT, MavCommandGet(command), 0, 1, param1, param2, param3, 0, latitude, longitude, altitude);
    110120    mavCom->waitMissionAck(ACK_TIMEOUT);
    111121  }
Note: See TracChangeset for help on using the changeset viewer.