<p>This is very similar to a project I had in mind, also using an SDR for radio spectrum mapping.</p>
<p>Unfortunately there is no ready-made solution to your exact problem, and specifically there are no entirely Pi-based drones that I know of. But we can get pretty close by releasing the constraints a bit.</p>
<p>The simplest build would be an autopilot-equipped copter with an offboard SBC (e.g. the Pi) and an SDR dongle. The SBC would be linked to the flight controller via MAVLink or similar over UART, which would allow it to receive real-time position data and optionally send commands to the FC. The autopilot will then perform a waypoint mission uploaded either through the autopilot's ground station software or directly from the onboard Pi, sweeping around the antenna in a tight pattern, and the Pi will record and location-stamp the data. When the drone returns you could use some script of your own design to interpolate that log into a continuous spatial intensity map.</p>
<p>This kind of solution is great in that you could use any waypoint-capable drone, as it only serves as a carrier for the mapping package, and the only integration you need is receiving GPS. You could even use a second GPS receiver in order to fully decouple the drone from the SDR package. Or you could go the other way and fully control the drone's behavior from the Pi via the link, the FC only providing the basics of flight and leaving the flightpath up to the Pi.</p>
<p>For the hardware, use any copter capable of carrying a Pi, dongle and antenna. Fully equipped ardupilot-ready kits capable of carrying a camera can be had for around $200, for which you only need to supply your own battery (and, if you wish, a 2.4G RC control link, which I'd recommend, but you can make do with just the 433MHz groundstation link if you're so inclined).</p>
<p>If you want the Pi to be integrated more closely into the drone, there are several Pi-specific solutions that I know of, but they all involve an external microcontroller-based flight controller board. For instance, there's the Navio by Emlid, which is an Ardupilot-equipped flight controller made in the form factor of a Pi HAT. Then there used to be the Outcast Droneworks MicroHawk, a micro-drone that uses a Pi Zero as part of its body. The page for it is now unavailable, however, so I don't know the current status of the project. In any case, this is in essence the same as sticking a regular FC board and a Pi on the same frame and connecting them together, the only difference is the form factor.</p>
<p>For the autopilot package, Ardupilot, PX4 and INAV are the most popular. All three support MAVLink, and Ardupilot <a href="https://drones.stackexchange.com/a/894/272">supports onboard Lua scripting</a> in addition to that. There are others as well which you might want to research, but I'd suggest sticking with one of these.</p>
<p>Some parting notes:</p>
<p>I think it would be very beneficial to browse the forums of all of those autopilot packages for threads on mapping missions. Most of the information will likely be about photographic mapping in particular, and thus discuss way sparser patterns and bigger altitudes than what you need, but the principles are exactly the same.</p>
<p>Considering the required spatial resolution of your measurements, especially at shorter wavelengths, you should probably look into DGPS and RTK and maybe set up a local reference station of your own, which would allow you to improve the positioning accuracy dramatically (from ±5m to single centimeters or less).</p>
<p>Also you should mind the polarization of your receiving antenna, otherwise your resulting radiation map may be altered significantly by cross-polarization attenuation. Maybe you could use a circular-polarized antenna, set up several linear antennae on the same drone, or make several passes with the receiving antenna in different orientations relative to the transmitting antenna under test to account for that.</p>

CC BY-SA 4.0
2021-06-10T12:04:21.193Z
2021-06-11T13:53:31.817Z
2021-06-11T13:53:31.817Z
FlashCactus
<p>I know this is a couple years old, but I wanted to contribute my two cents worth here.</p>
<p>You are completely reinventing the wheel here and also turning it inside out. I know you don't mean to. You are probably just unaware of what other people are doing, but it is at least two orders of magnitude simpler to put a transmitter on the drone instead of a receiver. You just put a simple beacon on the drone that transmits your call sign so it's legal. There are a bunch of really simple beacons very light and they don't require any computer, or Linux operating system, an SDR or anything else. Just a couple aaa's and a circuit board smaller than the batteries. All together the beacon apparatus including harness to hang it from comes in less than 23g that way your drone can still enjoy a reasonable range with performance with marginal burden. It depends on what drone you are going to use but the more payload capability you have the more antenna I would use. You can adjust the matching network to use a 1/4 wavelength, 1/2 wavelength, 5/8 or whatever but I plan to go big even on 80m and just feeding it at the 50 ohm point, a long antenna is probably not necessary, I just really like working with resonant dipoles, and a longer antenna can help dampen the drone.</p>
<p>Basically just fly a mission on the drone which is a perfect circle or as close as you can get to it stopping about 36 times around the circle and you don't take your measurements from the drone as it's the transmitter.  You take your measurements back at the antenna, as you presumably already have a really nice receiver on the antenna in the form of presumably an HF radio. You just record the parameters of the beacon received from each of the 36 points, being that will work out to every 10°. From that you can extrapolate to a Smith chart.</p>
<p>If you want to put a receiver and an operating system on a drone, then more power to you, and if you're just looking for a really difficult project to do for fun, then yeah go for it but if you're just looking to measure the performance of an antenna and accurately chart it's pattern then back up and start in the other direction.</p>
<p>As far as your results, it doesn't make any difference what direction you take them in, as it is an established principle of antennas that the receiving pattern, (the sensitivity pattern) of an antenna when receiving is identical to the far-field pattern of the antenna when transmitting.</p>
<p>I'm actually working on the same project you are thinking of. My plan is to measure the pattern relatively close in and then at 10 points all the way out to several kilometers. The reason I'm going to make more than one circle is I want to measure it from different distances on different days to try and average out the inaccuracies from interferences, things like flagpoles and passing cars or somebody using their improperly designed Chinese radio. Those kind of things can all create interference that could artificially skew the results, but measuring from different distances and different directions on different days will mitigate all of that interference. I think the best practice will be to start each circle from a different bearing on that circle so your 36 measurement points aren't all from the same direction from your antenna bearing. This will really develop a good picture of where the shadows are and perhaps things you can mitigate closer in to the antenna.</p>
<p>Here's the plan I'm going to use, just straight up copying this dude's transmitter...
<a href="https://youtu.be/EGAIrhGG51Y" rel="nofollow noreferrer">https://youtu.be/EGAIrhGG51Y</a></p>
<p>If you're not up for soldering the board yourself, you can pay a little extra when you have pcbway or whoever make the circuit board go ahead and populate it for you. Just depends on which one you have more of, time or money... hope that helps.</p>

CC BY-SA 4.0
2023-11-26T02:02:44.673Z
Great idea. Yes, often it's good to take an opposite approach of what initially comes to mind.
Gunther Schadow
CC BY-SA 4.0
2023-11-25T19:21:50.003Z
2023-11-25T19:21:50.003Z
Rowe
<p>You might check out this video on using a <a href="https://www.youtube.com/watch?v=kB9YyG2V-nA" rel="nofollow noreferrer">Pixhawk and a rPi with Python</a>.  The video just walks you through the serial connection and some Python code for basic control.  The Pixhawk is doing all the real time control (Linux isn't good for that part) and the rPi is talking to it over a serial port.</p>
<p>You might also look at the MicroHawk reference in:  <a href="https://drones.stackexchange.com/questions/1251/do-drones-with-inflight-api-access-for-control-inputs-exist">Do drones with inflight API access for control inputs exist?</a> (although the link seems to be broken at the moment).</p>

CC BY-SA 4.0
2021-02-09T19:58:49.353Z
Perhaps you could summarise the main points from the video in your answer.  Link-only answers tend to be frowned upon on SE sites.
sempaiscuba
CC BY-SA 4.0
2021-02-10T15:40:00.207Z
yeah, I had already mentioned this in my comment to the discussion. but I guess I upvoted the answer even if late ... hey, why not upvote my question also? I guess voting someone up costs very little.
Gunther Schadow
CC BY-SA 4.0
2021-02-09T19:22:01.453Z
2021-02-11T03:40:39.050Z
2021-02-11T03:40:39.050Z
Dan Christian
<p>I have very little time until I get to the USA to buy the material to put together a drone which I want to use to measure antenna gain patterns for HF radio. Example, a 20m band half-wavelength dipole antenna is 10 m wide and should be mounted 10 m above ground, probably it will have to be less. Additional parasitic elements of about 10 m wide spans are added around the main driven element to achieve directional gain.</p>
<p>The issue is measuring this gain for which one needs to get two wave lengths away and up all around the antenna assembly, which is easily 100 m all around. And for 40m, 80m, 160m band antennas it would scale accordingly.</p>
<p>The measurement device we would need to lift up is an SDR (software defined radio) device, which can be as small as a USB dongle, along with some small receiving antenna. The drone would fly around the transmitting antenna and would measure the antenna's gain pattern on a set of chosen frequencies and transmit power while we would be intermittently transmitting our call sign in Morse code like a beacon. Given the fact that it's an experimental antenna assembly, the drone should re-take the same flight path several times as we adjust the setup.</p>
<p>Since an SDR dongle needs to be plugged into a USB port of a computer running some Linux, the Raspberry PI comes to mind. And to avoid having to carry that as extra payload, I want to have a drone which has a PI as its main control and communication module.</p>
<p>I have seen several PI drone projects, dating as far back as 2016, but even after all that time I have not seen an affordable kit. It should be around $200, as even in 2016 a ZDnet article talked about a DIY PI drone in that budget. Since I have very little time to get the parts together while on a short visit to the USA before returning to South America where everything is twice as expensive, I would like to find something that I can just buy. Do you know of a kit or a state of the art shopping list that is based on a generic drone kit?</p>
<p>[Hey Stack-Exchange police: this is not just a shopping question, it is a state of the art question.]</p>
<p>What is the state of the art in Raspberry Pi drones now? Much has happened since 2016.</p>
<p>How can I tell from looking at drone kits on Amazon for example, how much payload they are able to carry? This is not reported in the specs that I can see.</p>
<p>I would like to avoid the RC gear and just use WiFi to control the drone and receive the telemetry data.</p>

CC BY-SA 4.0
2021-01-02T05:14:06.440Z
I'd assume that if I needed to clarify with a note why my question isn't too broad or off-topic, it probably is in some way. I'm having a hard time understanding what the crux of the question is, so I think it's probably too broad; try narrowing the scope.
ifconfig
CC BY-SA 4.0
2021-01-02T05:15:06.853Z
I'd recommend trying to strip superfluous narrative structure and add diagrams if possible, to start.
ifconfig
CC BY-SA 4.0
2021-01-02T11:07:21.093Z
There's quite a few reasons why a RPi isn't really an ideal platform for the real-time control of a drone so I'm guessing outside the odd DIY project every commercial project has used something more suitable. You're probably best focusing on the payload weight issue and treating taking the measurement as a separate  issue, even if you did find a RPi based drone it wouldn't be safe to assume the SDR and navigation would work well at the same time.
PeterJ
CC BY-SA 4.0
2021-01-02T15:52:47.597Z
@PeterJ, do you have information that the Raspb. PI does not support the real-time responsiveness to manage flight control while doing other measurements and video streaming at the same time? The setups I have seen were using a separate flight control model, like that PX thing, so I think the RPI would be a very nice control and communications unit while the details of the flight control is offloaded to another circuit.
Gunther Schadow
CC BY-SA 4.0
2021-01-02T22:56:56.870Z
I don't and I'm not saying it won't work, just that you'd only know for sure by testing it.
PeterJ
CC BY-SA 4.0
2021-01-03T04:25:12.927Z
AFAIK there aren't very many RTOSs for the Raspberry Pi, which is what you'd want for a closed-loop controller.
ifconfig
CC BY-SA 4.0
2021-01-04T00:34:46.363Z
@ifconfig I think the deal is to use the flight controller, like a Pixhawk separately, and use the RPI to pass commands to it, such as passing manual RC inputs though that were received via WiFi. I thought I had seen this in out of the box drones: Drone + Camera + Computer --- Cellphone using WiFi (as hotspot or connecting to drone being the AP), and RC joystick connected via bluetooth or USB plugged to phone. I think that exists. The flight controller like Pixhawk would be separate.
Gunther Schadow
CC BY-SA 4.0
2021-01-04T00:58:03.787Z
I think you'd still want an RTOS to handle generating control inputs with regular frequency, but yeah.
ifconfig
<raspberry-pi><telemetry>
Drone with SDR for HF antenna field strength measurements, I need a Raspberry Pi based drone kit that I can just buy
Gunther Schadow
# Drone with SDR for HF antenna field strength measurements, I need a Raspberry Pi based drone kit that I can just buy

(Asked by: username_0 on 2021-01-02)

I have very little time until I get to the USA to buy the material to put together a drone which I want to use to measure antenna gain patterns for HF radio. Example, a 20m band half-wavelength dipole antenna is 10 m wide and should be mounted 10 m above ground, probably it will have to be less. Additional parasitic elements of about 10 m wide spans are added around the main driven element to achieve directional gain.

The issue is measuring this gain for which one needs to get two wave lengths away and up all around the antenna assembly, which is easily 100 m all around. And for 40m, 80m, 160m band antennas it would scale accordingly.

The measurement device we would need to lift up is an SDR (software defined radio) device, which can be as small as a USB dongle, along with some small receiving antenna. The drone would fly around the transmitting antenna and would measure the antenna's gain pattern on a set of chosen frequencies and transmit power while we would be intermittently transmitting our call sign in Morse code like a beacon. Given the fact that it's an experimental antenna assembly, the drone should re-take the same flight path several times as we adjust the setup.

Since an SDR dongle needs to be plugged into a USB port of a computer running some Linux, the Raspberry PI comes to mind. And to avoid having to carry that as extra payload, I want to have a drone which has a PI as its main control and communication module.

I have seen several PI drone projects, dating as far back as 2016, but even after all that time I have not seen an affordable kit. It should be around $200, as even in 2016 a ZDnet article talked about a DIY PI drone in that budget. Since I have very little time to get the parts together while on a short visit to the USA before returning to South America where everything is twice as expensive, I would like to find something that I can just buy. Do you know of a kit or a state of the art shopping list that is based on a generic drone kit?

[Hey Stack-Exchange police: this is not just a shopping question, it is a state of the art question.]

What is the state of the art in Raspberry Pi drones now? Much has happened since 2016.

How can I tell from looking at drone kits on Amazon for example, how much payload they are able to carry? This is not reported in the specs that I can see.

I would like to avoid the RC gear and just use WiFi to control the drone and receive the telemetry data.

**Tags:** raspberry-pi, telemetry

> **Comments:**
> **username_1**: I'd assume that if I needed to clarify with a note why my question isn't too broad or off-topic, it probably is in some way. I'm having a hard time understanding what the crux of the question is, so I think it's probably too broad; try narrowing the scope.  
> **username_1**: I'd recommend trying to strip superfluous narrative structure and add diagrams if possible, to start.  
> **username_2**: There's quite a few reasons why a RPi isn't really an ideal platform for the real-time control of a drone so I'm guessing outside the odd DIY project every commercial project has used something more suitable. You're probably best focusing on the payload weight issue and treating taking the measurement as a separate  issue, even if you did find a RPi based drone it wouldn't be safe to assume the SDR and navigation would work well at the same time.  
> **username_0**: @username_2, do you have information that the Raspb. PI does not support the real-time responsiveness to manage flight control while doing other measurements and video streaming at the same time? The setups I have seen were using a separate flight control model, like that PX thing, so I think the RPI would be a very nice control and communications unit while the details of the flight control is offloaded to another circuit.  
> **username_2**: I don't and I'm not saying it won't work, just that you'd only know for sure by testing it.  
> **username_1**: AFAIK there aren't very many RTOSs for the Raspberry Pi, which is what you'd want for a closed-loop controller.  
> **username_0**: @username_1 I think the deal is to use the flight controller, like a Pixhawk separately, and use the RPI to pass commands to it, such as passing manual RC inputs though that were received via WiFi. I thought I had seen this in out of the box drones: Drone + Camera + Computer --- Cellphone using WiFi (as hotspot or connecting to drone being the AP), and RC joystick connected via bluetooth or USB plugged to phone. I think that exists. The flight controller like Pixhawk would be separate.  
> **username_1**: I think you'd still want an RTOS to handle generating control inputs with regular frequency, but yeah.  

---

## 3 answers

### Answer by username_3 on 2021-06-10. Score: 3

This is very similar to a project I had in mind, also using an SDR for radio spectrum mapping.

Unfortunately there is no ready-made solution to your exact problem, and specifically there are no entirely Pi-based drones that I know of. But we can get pretty close by releasing the constraints a bit.

The simplest build would be an autopilot-equipped copter with an offboard SBC (e.g. the Pi) and an SDR dongle. The SBC would be linked to the flight controller via MAVLink or similar over UART, which would allow it to receive real-time position data and optionally send commands to the FC. The autopilot will then perform a waypoint mission uploaded either through the autopilot's ground station software or directly from the onboard Pi, sweeping around the antenna in a tight pattern, and the Pi will record and location-stamp the data. When the drone returns you could use some script of your own design to interpolate that log into a continuous spatial intensity map.

This kind of solution is great in that you could use any waypoint-capable drone, as it only serves as a carrier for the mapping package, and the only integration you need is receiving GPS. You could even use a second GPS receiver in order to fully decouple the drone from the SDR package. Or you could go the other way and fully control the drone's behavior from the Pi via the link, the FC only providing the basics of flight and leaving the flightpath up to the Pi.

For the hardware, use any copter capable of carrying a Pi, dongle and antenna. Fully equipped ardupilot-ready kits capable of carrying a camera can be had for around $200, for which you only need to supply your own battery (and, if you wish, a 2.4G RC control link, which I'd recommend, but you can make do with just the 433MHz groundstation link if you're so inclined).

If you want the Pi to be integrated more closely into the drone, there are several Pi-specific solutions that I know of, but they all involve an external microcontroller-based flight controller board. For instance, there's the Navio by Emlid, which is an Ardupilot-equipped flight controller made in the form factor of a Pi HAT. Then there used to be the Outcast Droneworks MicroHawk, a micro-drone that uses a Pi Zero as part of its body. The page for it is now unavailable, however, so I don't know the current status of the project. In any case, this is in essence the same as sticking a regular FC board and a Pi on the same frame and connecting them together, the only difference is the form factor.

For the autopilot package, Ardupilot, PX4 and INAV are the most popular. All three support MAVLink, and Ardupilot [supports onboard Lua scripting](https://drones.stackexchange.com/a/894/272) in addition to that. There are others as well which you might want to research, but I'd suggest sticking with one of these.

Some parting notes:

I think it would be very beneficial to browse the forums of all of those autopilot packages for threads on mapping missions. Most of the information will likely be about photographic mapping in particular, and thus discuss way sparser patterns and bigger altitudes than what you need, but the principles are exactly the same.

Considering the required spatial resolution of your measurements, especially at shorter wavelengths, you should probably look into DGPS and RTK and maybe set up a local reference station of your own, which would allow you to improve the positioning accuracy dramatically (from ±5m to single centimeters or less).

Also you should mind the polarization of your receiving antenna, otherwise your resulting radiation map may be altered significantly by cross-polarization attenuation. Maybe you could use a circular-polarized antenna, set up several linear antennae on the same drone, or make several passes with the receiving antenna in different orientations relative to the transmitting antenna under test to account for that.


---

### Answer by username_4 on 2023-11-25. Score: 1

I know this is a couple years old, but I wanted to contribute my two cents worth here.

You are completely reinventing the wheel here and also turning it inside out. I know you don't mean to. You are probably just unaware of what other people are doing, but it is at least two orders of magnitude simpler to put a transmitter on the drone instead of a receiver. You just put a simple beacon on the drone that transmits your call sign so it's legal. There are a bunch of really simple beacons very light and they don't require any computer, or Linux operating system, an SDR or anything else. Just a couple aaa's and a circuit board smaller than the batteries. All together the beacon apparatus including harness to hang it from comes in less than 23g that way your drone can still enjoy a reasonable range with performance with marginal burden. It depends on what drone you are going to use but the more payload capability you have the more antenna I would use. You can adjust the matching network to use a 1/4 wavelength, 1/2 wavelength, 5/8 or whatever but I plan to go big even on 80m and just feeding it at the 50 ohm point, a long antenna is probably not necessary, I just really like working with resonant dipoles, and a longer antenna can help dampen the drone.

Basically just fly a mission on the drone which is a perfect circle or as close as you can get to it stopping about 36 times around the circle and you don't take your measurements from the drone as it's the transmitter. You take your measurements back at the antenna, as you presumably already have a really nice receiver on the antenna in the form of presumably an HF radio. You just record the parameters of the beacon received from each of the 36 points, being that will work out to every 10°. From that you can extrapolate to a Smith chart.

If you want to put a receiver and an operating system on a drone, then more power to you, and if you're just looking for a really difficult project to do for fun, then yeah go for it but if you're just looking to measure the performance of an antenna and accurately chart it's pattern then back up and start in the other direction.

As far as your results, it doesn't make any difference what direction you take them in, as it is an established principle of antennas that the receiving pattern, (the sensitivity pattern) of an antenna when receiving is identical to the far-field pattern of the antenna when transmitting.

I'm actually working on the same project you are thinking of. My plan is to measure the pattern relatively close in and then at 10 points all the way out to several kilometers. The reason I'm going to make more than one circle is I want to measure it from different distances on different days to try and average out the inaccuracies from interferences, things like flagpoles and passing cars or somebody using their improperly designed Chinese radio. Those kind of things can all create interference that could artificially skew the results, but measuring from different distances and different directions on different days will mitigate all of that interference. I think the best practice will be to start each circle from a different bearing on that circle so your 36 measurement points aren't all from the same direction from your antenna bearing. This will really develop a good picture of where the shadows are and perhaps things you can mitigate closer in to the antenna.

Here's the plan I'm going to use, just straight up copying this dude's transmitter...
<https://youtu.be/EGAIrhGG51Y>

If you're not up for soldering the board yourself, you can pay a little extra when you have pcbway or whoever make the circuit board go ahead and populate it for you. Just depends on which one you have more of, time or money... hope that helps.

> **Comments:**
> **username_0**: Great idea. Yes, often it's good to take an opposite approach of what initially comes to mind.  

---

### Answer by username_5 on 2021-02-09. Score: 1

You might check out this video on using a [Pixhawk and a rPi with Python](https://www.youtube.com/watch?v=kB9YyG2V-nA). The video just walks you through the serial connection and some Python code for basic control. The Pixhawk is doing all the real time control (Linux isn't good for that part) and the rPi is talking to it over a serial port.

You might also look at the MicroHawk reference in: [Do drones with inflight API access for control inputs exist?](https://drones.stackexchange.com/questions/1251/do-drones-with-inflight-api-access-for-control-inputs-exist) (although the link seems to be broken at the moment).

> **Comments:**
> **username_6**: Perhaps you could summarise the main points from the video in your answer.  Link-only answers tend to be frowned upon on SE sites.  
> **username_0**: yeah, I had already mentioned this in my comment to the discussion. but I guess I upvoted the answer even if late ... hey, why not upvote my question also? I guess voting someone up costs very little.  

---

