Get Plan Data

The above API provides list of plan data. you can search plans by plan name or paginate plan list through this API.

This API provides access to plan data, offering a secure authentication mechanism via API keys. Users can retrieve plan information using a GET request to the specified endpoint. The response encompasses essential details such as geofence points, mission waypoints, statistics, and project configuration. The comprehensive documentation below elucidates the structure of each response parameter, aiding developers in leveraging the API effectively for their applications.

Authentication with API Keys

This API uses API keys for authentication. To access the API, you'll need to include a valid API key in the Authorization header of your request using the Bearer token scheme. Here's the format:

Authorization: Bearer <YOUR_API_KEY>
  • Replace <YOUR_API_KEY> with your actual API key obtained from Aeromegh.

  • Requests without a valid API key will result in a 401 Unauthorized error.

Method

GET : get plan data

HTTP Request

https://ags.aeromegh.com/AeroMegh/AeroStack/getPlan?projectName=test&planName=xx

HTTP Response

Response codes explanation:

CodeDetails

200

message: "ok"

400

request parameters missing

500

internal server error

Code Snippet

Take a look at how you might call this method using our official libraries, or via curl:

 
 curl --location 'https://ags.aeromegh.com/AeroMegh/AeroStack/getPlan?projectName=test&planName=xx' \
--header 'Authorization: Bearer <API_KEY>'
 

Note: Replace <API_KEY> with the actual API_KEY provided by Aeromegh.

API Response

Upon successful request, the API returns a JSON object containing vital plan data. This includes geofence coordinates, mission waypoints, mission statistics, DGCA fence details, plan configuration, project name, plan name, corridor information, and obstacle data. Developers can utilize this rich dataset to integrate aerial mission planning functionality into their applications seamlessly.

        
{
            
              {
                "Geofence": {
                    "geofence": [
                        {
                            "lat": 20.009584292136523,
                            "lon": 73.7541407905519,
                            "alt": 1
                        },
                        {
                            "lat": 20.009079601546873,
                            "lon": 73.754923325032,
                            "alt": 1
                        },
                        {
                            "lat": 20.00857553941703,
                            "lon": 73.754204493016,
                            "alt": 1
                        },
                        {
                            "lat": 20.008862224951415,
                            "lon": 73.75354332849383,
                            "alt": 1
                        },
                        {
                            "lat": 20.009584292136523,
                            "lon": 73.7541407905519,
                            "alt": 1
                        }
                    ]
                },
                "Mission": {
                    "waypoints": [
                        {
                            "alt": 1,
                            "coordType": 1,
                            "lat": 20.008864460155227,
                            "lon": 73.75356073295823,
                            "speed": 1
                        },
                        {
                            "alt": 1,
                            "coordType": 0,
                            "lat": 20.008868663387137,
                            "lon": 73.75356073295823,
                            "speed": 1
                        },
                        {
                            "alt": 1,
                            "coordType": 1,
                            "lat": 20.008891803010293,
                            "lon": 73.7535798542622,
                            "speed": 1
                        },
                        {
                            "alt": 1,
                            "coordType": 0,
                            "lat": 20.00885612626373,
                            "lon": 73.7535798542622,
                            "speed": 1
                        },
                        {
                            "alt": 1,
                            "coordType": 1,
                            "lat": 20.008847792618187,
                            "lon": 73.75359897499509,
                            "speed": 1
                        }
                    ]
                },
                "MissionStatistics": {
                    "missionStatistics": [
                        {
                            "sprayingSpacing": 2,
                            "headingLockStatus": true,
                            "sprayLockHeading": 0,
                            "sprayingPumpRate": 10,
                            "sprayingSpeedMin": 1,
                            "sprayingArea": 8167.118676843368,
                            "sprayingAltitude": 1,
                            "sprayingSpot": 579,
                            "sprayingTrigger": 1,
                            "landAltLatitue": 0,
                            "landAltLongitude": 0,
                            "landAltitude": 0,
                            "landLatitue": 0,
                            "landLongitude": 0,
                            "missionDefaultAltitude": 10,
                            "missionDefaultSpeed": 5,
                            "missionHomeAltitude": 0,
                            "missionHomeLatitude": 0,
                            "missionHomeLongitude": 0,
                            "missionType": 2,
                            "planeMaxSpeed": 0,
                            "planeMinSpeed": 0,
                            "sprayingSpeed": 1,
                            "surveyCoordCount": 0,
                            "takeOffAltitude": 0,
                            "takeOffLatitue": 0,
                            "takeOffLongitude": 0,
                            "totalPlanDistance": 0,
                            "turnaroundDistance": 0,
                            "turnaroundAngle": 0,
                            "vehicleType": 0,
                            "verticalMission": 0,
                            "verticalRularScaleMaxValue": 0,
                            "wpRadius": 0
                        }
                    ]
                },
                "DGCAfence": {
                    "geofence": [
                        {
                            "lat": 20.00960202004002,
                            "lon": 73.754137683502,
                            "alt": 1
                        },
                        {
                            "lat": 20.00907992797021,
                            "lon": 73.75494244273294,
                            "alt": 1
                        },
                        {
                            "lat": 20.00855767389576,
                            "lon": 73.75420651930422,
                            "alt": 1
                        },
                        {
                            "lat": 20.008858273393678,
                            "lon": 73.75352467585893,
                            "alt": 1
                        },
                        {
                            "lat": 20.00960202004002,
                            "lon": 73.754137683502,
                            "alt": 1
                        }
                    ]
                },
                "planConfiguration": {
                    "projectDetails": [
                        {
                            "clientName": "",
                            "dateTime": "Sept 08,2023 16:53 pm",
                            "planCompletedStatus": 0,
                            "planName": "xx",
                            "projectName": "/AeroGCSWorkspace/test"
                        }
                    ]
                },
                "projectName": "test",
                "planName": "xx",
                "corridor": "File not found in DB",
                "obstacle": {
                    "polygons": [],
                    "circles": []
                }
            }
                      
            
        }

API Response Parameter Details

Response parameter includes various parameters such as geofence coordinates, mission waypoints, mission statistics, DGCA fence data, plan configuration details, project and plan names, corridor information, and obstacle specifications. Each parameter provides essential insights into the data returned by the API, facilitating comprehensive understanding and utilization of the response payload.

ParameterDescription

Geofence

Contains a list of geofence points with latitude, longitude, and altitude coordinates.

Mission

Contains a list of waypoints for the mission, each specifying altitude, coordinate type, latitude, longitude, and speed.

MissionStatistics

Contains statistics related to the mission, including parameters like spraying spacing, spraying speed, altitude, area covered, etc.

DGCAfence

Similar to the Geofence section, contains a list of geofence points with latitude, longitude, and altitude coordinates.

planConfiguration

Contains project details, including client name, date and time, plan completion status, plan name, and project name.

projectName

Specifies the name of the project ("test").

planName

Specifies the name of the plan ("xx").

corridor

Provides information about a corridor, indicating that a file associated with it was not found in the database.

obstacle

Contains information about obstacles, including polygons and circles.

Last updated