We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
def gps_to_decimal(coord, ref): """ Converts GPS coordinates to decimal degrees. Args: coord (tuple): A tuple containing the GPS coordinates. ref (str): The reference direction (e.g., N, S, E, W). Returns: float: The GPS coordinates in decimal degrees. """ decimal = coord[0][0] / coord[0][1] + coord[1][0] / (60 * coord[1][1]) + coord[2][0] / (3600 * coord[2][1]) if ref in ['S', 'W']: decimal *= -1 return decimal
If I change S to N and W to E the results are the same, positive Coords rather than negative for N or E.
I added gps lat lon ref to see if it was reading, it returns b'N' and b'W'
'gps_latitude': gps_latitude_decimal, 'gps_latitude_ref': gps_latitude_ref, 'gps_longitude': gps_longitude_decimal, 'gps_longitude_ref': gps_longitude_ref,
Are you seeing same behavior?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
If I change S to N and W to E the results are the same, positive Coords rather than negative for N or E.
I added gps lat lon ref to see if it was reading, it returns b'N' and b'W'
Are you seeing same behavior?
The text was updated successfully, but these errors were encountered: