import struct


def read_node(f):
    """
    Function to read in values of nodes

    :param f: variable for open file NTv2 being read as binary
    :return: tuple containing the four ntv2 fields at the grid node.
    """

    # field_1: shift lat / geoid separation (N)
    byte = f.read(4)
    field_1 = struct.unpack('f', byte)[0]
    # field 2: shift lon / deflection in prime meridian value (Xi)
    byte = f.read(4)
    field_2 = struct.unpack('f', byte)[0]
    # field 3: reliability lat / deflection in prime vertical value (Eta)
    byte = f.read(4)
    field_3 = struct.unpack('f', byte)[0]
    # field 4: reliability lon / NA
    byte = f.read(4)
    field_4 = struct.unpack('f', byte)[0]

    return field_1, field_2, field_3, field_4