add function for generating waypoint file
add example for generating waypoint file