Magnetic measurements with an unmanned aerial vehicle (UAV) are ideal for filling the gap between ground and airborne magnetic surveying. However, to obtain accurate aeromagnetic data, the compensation of magnetic effects of the UAV is a challenge. Typically, scalar magnetometers are towed several metres under the UAV to minimize its magnetic field. In this study, a fluxgate three-component magnetometer is attached 42 cm in front of the UAV at the tip of a composite pipe. Using a scalar calibration, the sensor can be calibrated, and the permanent and induced magnetic fields of the UAV can be compensated. The contributions of the magnetic measurements at different altitudes to the UAV results were tested over an area of 1 km² in the Northern Vosges Mountains. The area is located in a hamlet surrounded by a forest where few geological outcrops are observed. Three magnetic surveys of the same area are obtained at different altitudes: 100, 30 and 1 m above the ground (AGL). The UAV magnetic data are compared to a helicopter aeromagnetic survey at 300 m AGL and a ground magnetic survey using upward continuations of the maps to compare the results. The magnetic maps (300, 100, 30 and 1 m AGL) show very different magnetic anomaly patterns (e.g., amplitude, shape, wavelength and orientation). The magnetic data at different altitudes improve the understanding of the geology from the local to more general scales.