code: def write_waypoint(self, **kw):
          
  
          assert 'name' in kw
          assert 'latitude' in kw
          assert 'longitude' in kw
  
          location_kw = {
              'latitude': kw['latitude'],
              'longitude': kw['longitude'],
          }
  
          del kw['latitude']
          del kw['longitude']
  
          with self.write_tag_with_content('Waypoint', **kw):
              self.write_tag('Location', **location_kw)
docs: Write a waypoint to the file::
  
              writer.write_waypoint(
                  name='Meiersberg',
                  latitude=51.4,
                  longitude=7.1
              )
  
              # <Waypoint name="Meiersberg">
              #     <Location latitude="51.4" longitude="7.1"/>
              # </Waypoint>
  
          :param name: name of the waypoint
          :param latitude: latitude of the waypoint (in WGS84)
          :param longitude: longitude of the waypoint (in WGS84)
          :param altitude: altitude of the waypoint (in m, optional)
          :param id: internal id of the waypoint (optional)
          :param comment: extended description of the waypoint (optional)