def write_waypoint(
            self, name, shortname, country, latitude, longitude, elevation=u'',
            style=WaypointStyle.NORMAL, runway_direction=u'', runway_length=u'',
            frequency=u'', description=u''):

        """
        Write a waypoint::

            writer.write_waypoint(
                'Meiersberg',
                'MEIER',
                'DE',
                (51 + 7.345 / 60.),
                (6 + 24.765 / 60.),
            )
            # -> "Meiersberg","MEIER",DE,5107.345N,00624.765E,,1,,,,

        :param name: name of the waypoint (must not be empty)
        :param shortname: short name for depending GPS devices
        :param country: IANA top level domain country code (see
            http://www.iana.org/cctld/cctld-whois.htm)
        :param latitude: latitude of the point (between -90 and 90 degrees)
        :param longitude: longitude of the point (between -180 and 180 degrees)
        :param elevation: elevation of the waypoint in meters or as
            ``(elevation, unit)`` tuple
        :param style: the waypoint type (see official specification for the
            list of valid styles, defaults to "Normal")
        :param runway_direction: heading of the runway in degrees if the
            waypoint is landable
        :param runway_length: length of the runway in meters or as ``(length,
            unit)`` tuple if the waypoint is landable
        :param frequency: radio frequency of the airport
        :param description: optional description of the waypoint (no length
            limit)
        """

        if self.in_task_section:
            raise RuntimeError(u'Waypoints must be written before any tasks')

        if not name:
            raise ValueError(u'Waypoint name must not be empty')

        fields = [
            self.escape(name),
            self.escape(shortname),
            country,
            self.format_latitude(latitude),
            self.format_longitude(longitude),
            self.format_distance(elevation),
            str(style),
            str(runway_direction),
            self.format_distance(runway_length),
            self.escape(frequency),
            self.escape(description),
        ]

        self.write_fields(fields)

        self.wps.add(name)