Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes issue #69 (adds path and next waypoint tracking on map) #155

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from

Conversation

IshanA2007
Copy link

Previous path is purple and target waypoint is white.

Copy link
Member

@krishnans2006 krishnans2006 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work! I've noticed an error that happens after a few minutes of use (seems like an edge case). Here it is:

image
image

Finally, you should try not to include formatting changes in this PR. Useful tools for this are VSCode's commit diffs and git add -p on command line.

Keep it up!

firstPoint: firstPoint
firstPoint: firstPoint,
planePoints: planePoints,
Awaypoint: Awaypoint
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better name? What's the purpose?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work with these getters and setters. However, I'd call Awaypoint something different - maybe toNextWaypoint?

client/src/components/FlightMap.js Outdated Show resolved Hide resolved
@@ -508,6 +520,22 @@ const FlightPlanMap = props => {
})}
</LayerGroup>
</LayersControl.Overlay>
<LayersControl.Overlay checked name="test">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use a name that isn't test, so it's easier to identify layers in the overlay

<LayerGroup>
<Polyline positions={props.getters.planePoints.slice(-20)} color="#8a2be2" weight={3} />
{props.getters.planePoints.map((marker, index) => {
return popup(marker, index, "uavPath")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should make and use custom datatypes - see how airdropBoundary is defined above. Also, note the name={props.display.airdropBoundary[1]} which solves the previous comment.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

props.display gets you the display name of a certain property. With this comment, I didn't want you to use the airdrop boundary display name for the uav path - I wanted you to create a custom property. You did this, but never gave it a display name and never used it in the name= field. So close!

@@ -107,6 +113,7 @@ const FlightData = () => {
time: ["Time Loiter", "Time Loiter"],
jump: ["Jump", "Jump"],
uav: ["UAV", "UAV Location"],
uavPath: ["UAV Path", "UAV Path"],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again, you should use custom datatypes to populate this

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You did in fact implement custom datatypes above (great job!), you just never added display attributes for them. This is what I'm looking for in FlightMap.js.

@krishnans2006 krishnans2006 added type/feat A new feature/enhancement area/frontend Design and JS/React labels Jan 6, 2024
@krishnans2006 krishnans2006 linked an issue Jan 6, 2024 that may be closed by this pull request
Copy link
Member

@krishnans2006 krishnans2006 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Almost there! I've left a few (hopefully final) comments to get the code to fit in properly with how flight map logic is implemented in other map elements. Great work!

I'm also still facing the Cannot read properties of undefined error. Here's my output:
image

<LayerGroup>
<Polyline positions={props.getters.planePoints.slice(-20)} color="#8a2be2" weight={3} />
{props.getters.planePoints.map((marker, index) => {
return popup(marker, index, "uavPath")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

props.display gets you the display name of a certain property. With this comment, I didn't want you to use the airdrop boundary display name for the uav path - I wanted you to create a custom property. You did this, but never gave it a display name and never used it in the name= field. So close!

firstPoint: firstPoint
firstPoint: firstPoint,
planePoints: planePoints,
Awaypoint: Awaypoint
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work with these getters and setters. However, I'd call Awaypoint something different - maybe toNextWaypoint?

@@ -107,6 +113,7 @@ const FlightData = () => {
time: ["Time Loiter", "Time Loiter"],
jump: ["Jump", "Jump"],
uav: ["UAV", "UAV Location"],
uavPath: ["UAV Path", "UAV Path"],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You did in fact implement custom datatypes above (great job!), you just never added display attributes for them. This is what I'm looking for in FlightMap.js.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/frontend Design and JS/React type/feat A new feature/enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add UAV path trail + target path
2 participants