I want to change the location of map from Qgroundcontrol along with new misssion plan, But when we follow the same "2. connecting to GCS" steps it follows the default mission.
22 ビュー (過去 30 日間)
古いコメントを表示
As shown in the picture i am using another mission plan but the drone stills go to the default plan you mentioned in your website.
I guess it the problem with launch point.
4 件のコメント
回答 (1 件)
Jianxin Sun
2022 年 6 月 2 日
移動済み: Remo Pillat
2023 年 5 月 3 日
For the start point, if you want to use the "home location" defined in your mission plan file, you can use the jsondecode function to parse the file and extract the location value:
y = jsondecode(fileread(pathToYourPlanFile));
dd = Simulink.data.dictionary.open('uavPackageDeliveryDataDict.sldd');
sec = dd.getSection('Design Data');
uavIC_latLon = evalin(sec, 'uavIC_latLon');
uavIC_latLon(1:2) = y.mission.plannedHomePosition(1:2);
assignin(sec, 'uavIC_latLon', uavIC_latLon);
If you want the model to wait for the mission start command from QGC, you'll need to implement the logic in the "utilities\MAVLinkMissionProtocolExample\exampleHelperMAVMissionProtocol.m" file. You'll probably want to subscribe to the take off command sent by QGC and generate control signals in Simulink model to takeoff.
0 件のコメント
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!