Filter löschen
Filter löschen

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.

21 Ansichten (letzte 30 Tage)
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 Kommentare
Abhishek Singh
Abhishek Singh am 2 Jun. 2022
One more question I have is that how we can directly give the mission start command from Q ground control insted of using a step input with "startFlightTime" as step time?
Abhishek Singh
Abhishek Singh am 6 Jun. 2022
Thank you for this solution, Now its starting from the specified MAP but the UAV is still not starting from the Take off posotion specified, but some distance away from it in the MAP.
I think as in the default missionplan Launch point is different from the takeoff point so maybe similar thing is needed to do here as well.
i am using this mission plan:
{
"fileType": "Plan",
"geoFence": {
"circles": [
],
"polygons": [
],
"version": 2
},
"groundStation": "QGroundControl",
"mission": {
"cruiseSpeed": 15,
"firmwareType": 0,
"globalPlanAltitudeMode": 0,
"hoverSpeed": 5,
"items": [
{
"AMSLAltAboveTerrain": 15,
"Altitude": 15,
"AltitudeMode": 1,
"autoContinue": true,
"command": 22,
"doJumpId": 1,
"frame": 3,
"params": [
15,
0,
0,
0,
17.44875199,
78.35700722,
15
],
"type": "SimpleItem"
},
{
"AMSLAltAboveTerrain": 15,
"Altitude": 15,
"AltitudeMode": 1,
"autoContinue": true,
"command": 16,
"doJumpId": 2,
"frame": 3,
"params": [
0,
0,
0,
null,
17.44981242,
78.35700722,
15
],
"type": "SimpleItem"
},
{
"AMSLAltAboveTerrain": 15,
"Altitude": 15,
"AltitudeMode": 1,
"autoContinue": true,
"command": 16,
"doJumpId": 3,
"frame": 3,
"params": [
0,
0,
0,
null,
17.44981242,
78.3564921,
15
],
"type": "SimpleItem"
},
{
"AMSLAltAboveTerrain": 0,
"Altitude": 0,
"AltitudeMode": 1,
"autoContinue": true,
"command": 21,
"doJumpId": 4,
"frame": 3,
"params": [
0,
0,
0,
null,
17.44870673,
78.35649888,
0
],
"type": "SimpleItem"
}
],
"plannedHomePosition": [
17.44875199,
78.35700722,
179
],
"vehicleType": 2,
"version": 2
},
"rallyPoints": {
"points": [
],
"version": 2
},
"version": 1
}
%% Thank You

Melden Sie sich an, um zu kommentieren.

Antworten (1)

Jianxin Sun
Jianxin Sun am 2 Jun. 2022
Verschoben: Remo Pillat am 3 Mai 2023
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.

Produkte


Version

R2022a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by