This is a much longer, more detailed version of an article that appeared in the January 2020 edition of Sky at Night Magazine. It owes a great deal to the Global Meteor Network wiki.
What is RMS?
RMS is the software of the Global Meteor Network (GMN). It runs on a Raspberry Pi and uses a cheap but sensitive IP Camera to detect meteors, analyse their tracks, and upload the results to servers in the cloud for detailed scientific analysis.
RMS captures high quality scientific data that for doing real science. The GMN is run by academics at the University of Western Ontario, and is based on analytical models developed by the world’s leading meteor researchers. The data are used to analyse the orbits and characteristics of meteors, asteroids and comets, and amongst other things help us understand the danger to spacecraft, astronauts, weather satellites and the Earth itself from interplanetary debris which bombards us every day.
It can also help us track down ‘falls’ which occur when meteors are large enough to survive their fiery passage through the atmosphere, hit the ground and become meteorites.
RMS can also upload data to the UK Meteor Network. If you’re interested in contributing to this too, pleased contact the UKMeteorNetwork team.
So if you want to contribute to the defence of the Earth, help do real science, and perhaps help in the recovery of a meteorite fall, read on!
What you will need
These instructions assume you are going to buy and build your own kit. However, you can also buy pre-built kits from the UK Meteor Network and from the Croatian Meteor Network.
Apart from the camera module all the parts can be bought from Amazon, Ebay or similar online retailer.
- Raspberry Pi 4b 2GB model, with power supply.
- Pi 4b case with fan.
- 128GB microSD card.
- IMX291 IP Camera module and network cable, with 4mm F0.95 lens (from AliExpress). Do not buy a USB model, they will not work.
- 12v power supply for the camera.
- one set of Power over Ethernet cables.
- A standard network cable long enough to reach from where you will site the camera to where you will keep the Pi.
- A security camera enclosure (ideally metal, but plastic will do). If it has a built in dew heater thats even better.
The parts will cost about £150-£200 in total.
You will also temporarily need a USB keyboard and HDMI capable monitor or TV that you can connect to the Pi. The latest generation of Pi4s have a micro-HDMI port so you may need an micro-to-standard HDMI adapter which costs about £5.
It will also help if you have some basic familiarity with the Raspberry Pi, though this isn’t essential.
Before you start
In order to add your camera to the network you will need a Camera ID. To get an ID, please email firstname.lastname@example.org and I will arrange for one to be sent to you.
Additionally you need to know your location and altitude above sea level. Its important to know this quite accurately so use a GPS if possible – the one in your phone should do it – otherwise measure it from a map as closely as you can. Get the latitude and longitude in degrees and altitude in metres above mean sea level. For example, if you lived at the top of the Eiffel tower, your location would be longitude 48.8584, latitude 2.2945, altitude 360.
Setting up your Windows, Mac or Linux PC
Although the RMS software is fully automatic, you will need some software on your PC to keep an eye on it.
Firstly we need to be able to manage the Pi without keeping a keyboard and mouse attached. We do with with remote management software called “VNC”, available free from here.
We will also need another piece of software, “VLC”, so we can test the camera and get it initially focused. VLC is a free media player that can connect to network devices like the camera we use here. You can download it from here.
Camera Hardware Configuration
For simplicity, we’re going to connect the camera directly to the Pi’s network port using a long network cable. The RMS software comes preconfigured to operate in this mode so it’s easier for a beginner to get it working.
Alternatively you can connect it to your home router or to a network switch on your home network. To use this mode, you will need to slightly reconfigure the Pi and RMS software. If you prefer to use this approach, drop me a mail at email@example.com and I can explain the required changes. Or you can read the RMS wiki linked earlier.
Test the Camera
The camera modules arrive set to an IP address of 192.168.1.10 and configured for general purpose day and night operation. This is no good for meteor hunting but it will allow us to connect the camera to your home network so you can configure it.
Plug the camera connector cable into the camera, and then connect it to one of the power-over-ethernet (PoE) connectors. It will be obvious which cable is required. Connect a short network cable to the PoE connector, and plug the other end of the cable into the other PoE connector and connect this to your router. Plug the camera power supply into the power connector on this PoE cable.
Your camera should now power on. The lights on the PoE cable will flash and after a few seconds the camera will be available on your home network.
To test the camera out, start up VLC and select “Open Network Stream” from the Media menu. In the network URL box type
Then click Play and after a moment you should be connected to the camera. If you get an error, check you have typed the string exactly as above, and that the camera is powered on and connected.
While you have the camera working, you can check focus by pointing it at a distant object (at least 500 metres away) and adjusting the lens till the focus is good. You will probably need to adjust it later but its worth doing this now so you are familiar with it.
Setting up the Raspberry Pi
Next, we will configure the Pi.
Download the SD card image from here.
Burn the image to the SD card using suitable software as recommended by the Raspberry Pi Foundation. I used BalenaEtcher which is a free download for Windows. If you have a Mac you can use Raspberry Pi Imager. If you’re a linux user there are equivalent tools.
Connect the Pi to a monitor and keyboard, insert the SD card and power it on. The system will boot up, and you should be presented with the Pi Desktop.
After a few seconds a Terminal window will appear and you should see a message
“Hey, welcome to the Raspberry Pi Meteor Station (RMS) project!”
Ignore this window for now. First, we’re going to configure a few other things
Interfaces and Memory
At the top left corner of the screen, you will see the Raspberry icon. Click on this and select Preferences / Raspberry Pi Configuration.
Click on the Interfaces tab and enable SSH and VNC.
Next, click on the Performance tab, and make sure the GPU memory is to 256.
Finally, click on the localisation tab and set the Wifi Country to your location.
Now Close the configuration tool.
Your pi probably isn’t connected to your wifi at this stage. Look for an icon on the taskbar with two red X’s on it. There will be two icons, the left one is usually the wifi. Click on the icon, select your home wifi, and enter the wifi password into the box labelled Pre Shared Key. Click ok, and the Pi should connect to the network.
Filesystem, password and SSH key
Return to the terminal window with the “Hello” message and read through the instructions.
First we are going to expand the file system to use the whole of the SD card. Press Q to continue then press Enter to open the configuration tool. Use the arrow keys on your keyboard to select Advanced, press Enter and then select A1 Expand File System and press Enter again.
Once this process finishes, a message will appear explaining that you need to reboot the pi. Press Ok, use the Tab key to select Finish then press Enter twice to reboot.
After the pi reboots, you will get back to the same Welcome message. This time, press Q to skip the filesystem expansion. The system will now check if you have an internet connection, which should be ok since we already set up WiFi.
Next you will be asked to set a new password. NB: the current password is “rmsraspberry”.
After that we’re going to create an SSH key. This is a security key which is used to upload data to the GMN servers and you will need it later. Follow the on-screen instructions to create this, and then as instructed, email it to Denis Vida. Denis will install it on the RMS servers.
The system will now automatically update itself to the latest version of RMS. This process happens every day and is an essential part of RMS.
It will take a few minutes so this is a good time to test VNC.
VNC is free remote-desktop software which we’re going to use to manage the Pi.
We need the Pi’s ip address for this. Open the Terminal application on the Pi and type “ifconfig wlan0” (thats wlan zero). Look for the line starting “inet” followed by a dotted number such as 192.168.1.11. Make a note of this address. Terminal can be found under accessories on the raspberry pi menu.
Open the VNC client on your PC, and in the address box at the top, enter the name or IP Address of your Pi. A login dialog will appear. Login as user “pi” using the password you set earlier, and the Pi desktop should appear in a window.
Once this is working, you don’t need to keep the Pi plugged into a keyboard and monitor. In the main VNC window you will see a connection icon labelled with your Pi’s IP address. Any time you want to login to the Pi just double click on this icon and the Pi desktop will appear. You can right click and select properties to give it a friendly name.
For now though close this down again.
Now return to the Terminal window where the update was going on. It should have finished by now.
Read the instructions then press enter when ready. This will open the RMS configuration file in a text editor for you to update the StationID, latitude, longitude and altitude. Follow the convention used by the examples – don’t include the N,S,E or W, remember that longitudes west of Greenwich and latitudes south of the Equator are negative and make sure you leave a space between the numbers and the semicolon. Be sure you get lat and long the right way round!
Now scroll down and find the line that starts reboot_after_processing. Set this to true if it’s not already set. This will ensure that the Pi reboots every day which is important to keep it running properly.
Now scroll down a bit further, till you find a the [Capture] section.
Find the line that starts “device”. In the middle of this you will see a section that starts location=”rtsp://, followed by an IP address, probably 192.168.42.10. For now, change this to the same as your camera (eg 192.168.1.10).
Now look further along this line for the word “omxh264dec”. If it is present, replace it with “v4l2h264dec”. This changes the video decoder to one that works better on the Pi4. Save and exit from the editor.
At this point we can test that we can communicate with the camera. To do this, make sure the camera is plugged into your router and powered on, then open Terminal again and type
ping -c 2 192.168.1.10
You should get something like
PING 192.168.1.10 (192.168.1.10) 56(84) bytes of data. 64 bytes from 192.168.1.10: icmp_seq=1 ttl=64 time=14.8 ms
This means the connection is working. If you get a timeout message, check the network cables and power.
Update the Pi Operating System
While we have a Terminal window open, we should update the Pi software. This is a bit like Windows update, but more controllable. In the Terminal window type the following:
sudo apt-get update && sudo apt-get upgrade -y
This will download all the latest versions and updates and apply them and it may take a few minutes the first time. You should do this every month or so, to make sure your Pi stays up to date.
Camera Device Configuration
For meteor hunting we need to update the camera configuration to put it into a low-light sensitive mode and set its network connection correctly. Back in the Terminal window, type the following:
This will change the camera sensitivity, video mode and network settings.
Now you need to change the camera’s IP address so it can be connected directly to the Pi. To do this type the following in the terminal window:
python -m Utils.SetCameraAddress 192.168.1.10 192.168.42.10
You will lose connection to the camera. Don’t worry, this is normal.
Once you’ve run the script, unplug the camera PoE cable from your router and plug it into the Pi’s network port. Wait a minute or so, and then try the communications test again, but this time using its new address
ping -c 2 192.168.42.10
If this works, you can try another test. Login to the Pi desktop and locate the Icon
Double-click on it and select “Execute in Terminal”. A new window should open showing you the view from your camera.
The Pi is now ready to capture data, and we’re nearly there.
Installing the Camera
The final step is to install the camera outside and connect up the cables.
Fix the camera inside the camera enclosure with the PoE cable attached then push one end of your very long network cable through one of the cable glands and connect it to the PoE cable. Seal up both glands with bathroom sealant to keep water and insects out but don’t close up the camera housing yet.
Before fixing the camera to the wall, consult with me or the GMN team to see if there’s an ideal direction for you to point in. We can do much more science when two cameras have overlapping fields of view, but don’t worry if this isn’t possible – more and more cameras are being set up and so even if you don’t overlap today, its likely that you will soon.
Once you’ve decided on the location screw the camera to the wall high enough up that it won’t get knocked but not so high you can’t get to it easily for maintenance. I have mine mounted on the outside of our garden observatory shed.
Angle the camera up at about 30 degrees so that it is clear of any nearby obstructions. Your camera is sensitive enough to pick up meteors as far away as 200km (yes really!) and since meteors are detected at an altitude of 70-100km above ground level, and the camera has a field of view which is about 60 degrees high and 90 degrees wide, aiming about 30 degrees up should give you the best view.
Run the network cable indoors to wherever you will keep the Pi, and plug it back into the other PoE Connector and then plug that into Pi’s network port. Now recheck focus by running RMS_ShowLiveStream.sh on the Pi. You will need help with this, so get someone to watch the screen and let you know when focus is good.
When you are satisfied, close up the camera housing. Now you need to hope for a clear night so we can calibrate the field of view!
Copying data off the Pi
Before we look at that however, you will probably be wondering how you can copy the data off your meteor station to take a look at it.
The Pi is configured to appear as a Windows network drive that you can connect to from Windows File Explorer or the Mac or Linux equivalents. It should appear under Network, but it you can’t see it there, click on the address bar and type in \\ followed by your Pi’s ip address. You should see something like this:
Double click on RMS_Share, where you will see three folders, ArchivedFiles, CapturedFiles and logs.
- CapturedFiles contains the ‘raw’ data captured each night. This folder can get enormous – often 20GB a night. You can mostly ignore this folder.
- ArchivedFiles contains the results of the initial analysis process (see below). This is the most interesting one.
- logs contains the RMS logs.
Fortunately there’s no need to keep an eye on how big these folders are getting. RMS automatically clears out older data to make space. In fact, if you want to keep the data for your own research, you will need to periodically copy new folders from ArchivedFiles to your PC. I have some powershell scripts to do that for me which i can share.
RMS is designed to capture scientific data so the images are stored in a version of FITS, the astronomical image data format. You can view the data using the CMN_BinViewer tool that is installed on the Pi and can also be installed on your Pc or Mac (Windows version available here).
However, RMS also has a ‘hook’ in the configuration file to allow you to run a Python script of your own after the main processing has completed. This hook can be used to convert the data to JPG image and MPG movie format that you can view and share on social media. If you’d like to do this, drop me a mail and I will send you a script and instructions.
First Night’s Run
The RMS software will automatically start capturing data from dusk till dawn. After capturing data all night, it will run a process to identify meteors and do some analysis on them. This normally takes an hour or so. After that the Pi will reboot and be ready to start the next night.
Calibrating the Field of View
Before the data can be used, we need to calibrate the camera’s field of view against the star field. You can do this yourself as explained in this video, but if you get stuck you can you email us some sample data and we can email back the calibrated file and instructions.
To calibrate your data we’ll need the .config file and at two or three FITS files from the ArchivedFiles folder. Copy them to your PC, zip them up and email them to us with the approximate direction in which the camera is pointing. We’ll generate the calibration file, known as a platepar file and email it back to you.
Creating a Mask
If you have any terrestrial objects in the field of view such as houses, trees or parts of the camera housing, light reflecting off them or movements in the wind will create false detections. So we need to mask these areas off.
The system comes with a blank mask in /home/pi/source/RMS that you can edit. Download this to your PC and use a photo editor of your choice to black out the areas you want to mask. Be careful not to leave any gaps. You can use CMN_BinViewer to create a JPG of one of your camera’s images which you can compare to the mask, to help you get it right. Be careful to save the mask in Windows BMP format.
Installing the Calibration and Mask files
Open a VNC session, then move the mouse to the top of the window to reveal the VNC menu. Select the Transfer Files icon (with two arrows), and then select Send Files. Locate the platepar and mask files and upload to /home/pi/source/RMS, overwriting any existing files.
Everything should now be set up. Your RMS station will automatically scan the sky every night, capture any events it sees, and upload the data to the Global Meteor network.