- 
                Notifications
    
You must be signed in to change notification settings  - Fork 5
 
Open
Description
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?
Metadata
Metadata
Assignees
Labels
No labels