This paper presents a method for planning trajectories which exploit atmospheric energy to enable long distance, long duration flights by small and micro unmanned aerial vehicles. It introduces the energy map, which computes the minimum total energy required to reach the goal from an arbitrary starting point while accounting for the effect of arbitrary wind fields. The energy map provides the path to the goal as a sequence of way points, the optimal speeds to fly for each segment between way points and the heading required to fly along a segment. Since the energy map is based on the minimum total energy required to reach the goal it immediately answers the question of existence of a feasible solution for a particular starting point and initial total energy. The energy map can also be used in conjunction with other components of a cost function (e.g. time to reach the goal) for use in generic trajectory planners.