FlintHill / SUAS-Competition

SUAS Competition Code for team Animus Ferus
4 stars 10 forks source link

GCS:WebUI -> Added Capability of Submitting Emergent Targets #112

Closed jvillemare closed 6 years ago

jvillemare commented 6 years ago

Summary

Add a new tab on the specifications pill of GCS:WebUI to submit emergent targets.

Purpose

Emergent targets are dummies, typically dressed in firefighter gear, located in some vague, but specified area. They only require a few details to be submitted: the geolocation and location description of emergent. They do not require shape, color, orientation, etc.

Since emergent targets, and other targets are differentiated, we need two tabs in the Specifications Pane to support sending two different type of targets.

Off-axis target will not be included because it will not be attempted.

Specifics

The same /post/target endpoint should be expanded to support the submission of the current standard targets and new emergent targets.

Standard Target

data: {
    type: "standard", // <<<

    targetTopLeftX,
    targetTopLeftY,

    targetBottomRightX,
    targetBottomRightY,

    imageFilename,

    // pertinent to STANDARD targets:
    targetShape,
    targetColor,
    targetContent,
    contentColor,
    targetOrientation
}

Emergent Target

data: {
    type: "emergent", // <<<

    targetTopLeftX,
    targetTopLeftY,

    targetBottomRightX,
    targetBottomRightY,

    imageFilename,

    // pertinent to EMERGENT targets:
    description
}

Delegation

I will add in the tabs and other code into the GCS:WebUI, @DarkmatterVale will work on writing in flask_gcs.py.

jvillemare commented 6 years ago

I created the branch https://github.com/FlintHill/SUAS-Competition/tree/gcs-webui-emergent-target-addition to commit my changes.

One additional note: The description will be a max of 1000 characters. @DarkmatterVale could implement a server-side check, but it's not strictly necessary since we'll be on a closed network.

jvillemare commented 6 years ago

Here's what the new specification's pane looks like, now:

screen shot 2018-02-21 at 11 42 23 am

Edit: The image on the far-right is with the mouse hovering over the STANDARD | EMERGENT tab selector.

DarkmatterVale commented 6 years ago

Looks good. Do I need to code in the server-side submission now?

jvillemare commented 6 years ago

@DarkmatterVale yes. In my commit, https://github.com/FlintHill/SUAS-Competition/commit/2c346037512aa9ce56afe210fb56bf08577ea4e7 , I now send the submit the data for standard and emergent targets:

Standard Target:

screen shot 2018-02-22 at 10 49 09 am

Emergent Target:

screen shot 2018-02-22 at 10 49 55 am

jvillemare commented 6 years ago

I talked with @DarkmatterVale : Waiting on opportunity to do full test with Interop. server and all GCS.

jvillemare commented 6 years ago

@DarkmatterVale : Successfully tested the flask_gcs.py script with you, connected to Interop, and the target was successfully received by the server. Here are the results of the submission from the client-end:

screen shot 2018-02-23 at 3 09 31 pm

screen shot 2018-02-23 at 3 09 50 pm

Both target submissions had the same result:

screen shot 2018-02-23 at 3 09 42 pm

DarkmatterVale commented 6 years ago

Completed in #114