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

Feature/map loc #66

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from
Open

Feature/map loc #66

wants to merge 5 commits into from

Conversation

Kwonadon
Copy link

Completed creating waypoint locations in lat,long coordinates for mapping.

@Kwonadon Kwonadon requested a review from cjhr95 April 20, 2022 00:08
@cjhr95 cjhr95 linked an issue Apr 20, 2022 that may be closed by this pull request
Copy link
Contributor

@cjhr95 cjhr95 left a comment

Choose a reason for hiding this comment

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

Some documentation issues. I think you have the actual docstrings on your personal machine, however they did not transfer into the pushed file, hopefully we can figure that out on Thursday.

Comment on lines +50 to +52
# Takes in tuple(start location, map height), altitude, and focal_length]
# Assumes altitude and focal_length doesn't change
# Returns flight path of drone to snap images of map
Copy link
Contributor

Choose a reason for hiding this comment

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

These few comments aren't needed, as all this information should be in the docstring.

Comment on lines 60 to 61
print("Camera Width:", cam_w)
print("Camera Height:", cam_h)
Copy link
Contributor

Choose a reason for hiding this comment

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

Print statements can be commented out or removed, this information will more likely than not be added into a config file or logging statements in the near future.

Comment on lines 67 to 68
print("Map Width:", map_w)
print("Map Height:", map_h)
Copy link
Contributor

Choose a reason for hiding this comment

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

Same as previous comment; remove/comment print statements

Comment on lines 80 to 81
# Flight path algorithm
pass
Copy link
Contributor

Choose a reason for hiding this comment

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

Import the testing algorithm here or call the function that contains that algorithm


Returns
-------
(cam_w, cam_h): Tuple[float, float]
Copy link
Contributor

Choose a reason for hiding this comment

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

A short note on what this tuple contains and is used for would be appreciated.

center: Tuple[float, float],
map_w: float,
map_h: float,
) -> List[Tuple[float, float]]:
Copy link
Contributor

Choose a reason for hiding this comment

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

This function also needs a formal docstring.



# https://stackoverflow.com/questions/7222382/get-lat-long-given-current-point-distance-and-bearing
def conversion(coord: Tuple[float, float], bearing: float, distance: float) -> Tuple[float, float]:
Copy link
Contributor

Choose a reason for hiding this comment

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

This function also needs a formal docstring.


return (new_lat, new_lon)

def flight_path(points: List[Tuple[float, float]], col: int) -> List[Tuple[float, float]]:
Copy link
Contributor

Choose a reason for hiding this comment

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

This function needs a formal docstring as well.

Comment on lines +176 to +264
new_arr = []
temp = []
Copy link
Contributor

Choose a reason for hiding this comment

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

These two arrays need type annotations.

if i % 2 != 0:
new_arr[i].reverse()

path = []
Copy link
Contributor

Choose a reason for hiding this comment

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

path also needs a type annotation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Mapping Survey Path
2 participants