All posts by Brian Smigielski

Using Python to Track Amateur Satellites

Introduction

Recently, it’s been difficult for me to find a solid block of time to go down to the shack and operate. I’ve been looking for other things to do, therefore, to stay relevant in the hobby and always keep my learning vectored forward. Since I have an interest in one day building my own satellite station, and I receive the ARRL Keplerian Data emails via AMSAT (which show the latest Two-Line Element (TLE) sets of all the amateur sats), I thought it would be pretty neat as a first step to use Python and code up a predictive tool to plot the and track the location of all the amateur satellites will be given a UTC start and end time.

There are packages which already do this (much better than my own) such as MacDoppler. The perks are it shows coverage (footprints), orbital tracks, and even compensates your radio’s VFO for the satellite’s Doppler. The downside of this package is it costs money ($98 for a license), and it doesn’t make sense for me to pay for it when I don’t have a satellite station to utilize it. The rest of the functionality, though, I could figure out myself if I have enough time to code. And coding, is something I can very easily do on the couch in between changing dirty diapers. 🙂

There are a fair number of dependencies to this codebase which uses Python 2.7. Installed, you must have:

  • Numpy/Scipy: basic and advanced mathematical functionality
  • urllib2: Opens the websites needed to HTML scrape the satellite TLE’s
  • BeautifulSoup: performs the HTML scraping
  • Basemap: This actually plots the map of the world with the satellites across it
  • Tkinter: Creates the GUI windows to ingest data from the user
  • pytz: A package to get local time at your QTH (may already be installed with most distributions)
  • Pyephem: used for validation of my own answers. Really nice library though to do all things astronomical

If you don’t have Python already installed, I recommend using the Anaconda distribution, especially if you don’t have root access on your machine for whatever reason. This is a self-contained Python environment and it is just like installing everything in your /usr/local account.

Once you have Python and all the dependencies successfully installed, you can obtain the code from the link to the GitHub repo.

Basic Operation

The steps to using the software are relatively simple. The user first runs the main executable at a terminal prompt:

python main.py

From there a GUI window pops up displaying checkboxes next to all the satellites, two entry fields for a start and end UTC time (in 24 hour format), and a Run/Quit button.

The main GUI window for the code. The checkboxes appear next to satellites. The UTC start/end times are entry boxes to the user. REMEMBER TO USE 24 HOUR FORMAT!

Once the Run button is pressed, a map will pop up displaying the satellite track across the Earth for the chosen times. Currently, I would only recommend only plotting 1-2 satellites at a time since the map can become quite cluttered with tracks. Also, I would make the stop time only a few hours different from the start time since many of the satellites will have already executed a complete orbit in that timeframe.

Example output map and track of the ISS

Under the hood

First the software opens the URL of where the latest and greatest satellite TLEs are stored and scrapes them for all the user choices. Next, if the user chooses a UTC time before the most current TLE, the program defaults to using the epoch UTC from the TLE. As for the end date, I wouldn’t go any further than a few days out if you want the results to be fairly accurate.

Once the data has been gathered, internal routines convert the information in the TLE into the needed orbital or Keplerian elements to find the orbital path. Those Keplerian elements then undergo further processing to two different reference frames until finally the latitude and longitude can be extracted. I’d be happy to go into significant detail on what these algorithms are, but I’m pretty sure you probably don’t care! 🙂 Besides, you could easily check out the source code.

To-Do

I do plan on updating this a bit, so be sure to pull down new updates from the repo often. But, I’m actually really looking for feedback from one or two people to tell me what functionality they would like to see. For now, however, what I have planned is:

  • Display satellite footprints to better see when the satellite is up relative to the QTH
  • Have the map run in real time thereby eliminating the entered start/stop time
  • Compute satellite Doppler offsets
  • Have a function to show which satellites will be up relative to your QTH within a given 48 hour period
  • Validate results beyond a few sample cases involving the ISS

So there you have it! Hopefully if I get the above to-do incorporated into the code as well as comms with the rig (to update VFO based on Doppler, for instance), then I should be able to mimic the MacDoppler capability by only paying the price of time. I’d really like this to be an open-source substitute for that software. There’s still much to be done for this to be a really useful tool, but it’s coming along. Also please alert me to any bugs found. I know there are a ton probably. Happy tracking!

73,

Brian, AB1ZO

Reginald Fessenden Makes Christmas History

For our October 2017 meeting, we had Professor Donna Halper speak about the history of amateur radio and its heroes. Having heard her speak at Boxboro 2016, I knew our members were in for a treat. So in keeping with this theme, I searched for some interesting nugget, some salient morsel about the history of amateur radio that was somehow linked to Christmas time. I struck gold when I came across Reginald Fessenden.

A brief segue into the life of Reginald Fessenden

Reginald Fessenden, looking dapper and scholarly.

Reginald Fessenden was born in 1866 in Quebec and showed an aptitude and high interest in mathematics / engineering from a young age. Though he did not have a degree, he desired to work in the field of electricity, and so he went to the Mecca of electrical work in the U.S., namely NYC in 1886 to work with Thomas Edison. He personally wrote Edison saying “Do not know anything about electricity, but can learn pretty quick,” to which Edison replied “Have enough men now who do not know about electricity.” Luck had different plans, however, and he ended up obtaining a job with Edison and rose through his company quickly to even work directly with Edison at his new laboratory in NJ. He was laid off in 1890, however, due to financial problems Edison encountered, and so Fessenden searched for additional opportunities.

In 1900, Fessenden went to work for the U.S. Weather Bureau with the goal of “proving the practicality of using a network of coastal radio stations to transmit weather information, thereby avoiding the expense of the existing telegraph lines.”  The Bureau would have access to any devices he created but he could retain the rights to ownership. He quickly advanced receiver design with one notable achievement being the development of the heterodyne principle among other advancements such as the invention of a barretter detector and electrolytic detector.

After his time with the weather bureau was up, Fessenden was able to secure funding for his research that led to the design and implementation of a rotary-spark transmitter (continuous wave phenomena was not thought to produce wireless communications and it was in fact Fessenden himself who championed the theory and practice of CW signals as understood by Hertz) and the world’s first trans-atlantic transmission — that of Morse code. Unfortunately, at the time, the destruction of one of the radio towers led to the end of the project.

Fessenden soon became obsessed with audio radio transmissions as opposed to his colleagues of the day (Marconi included) that advocated Morse code transmissions. He in fact applied for and was awarded a patent in 1901 for essentially inventing a CW transmitter! The man was unstoppable. Soon after he learned how to modulate speech on his CW waves to create Amplitude Modulated (AM) radio waves.

Upon reading more about Fessenden, his career seems to have comprised breakthrough after breakthrough in the field of radio engineering. I could go on and on regarding all his accomplishments, but if I did, I still would have not arrived at the point about what any of this has to do with the holidays.

The connection to Christmas Eve

Until the early 1930’s, it was widely believed that a gentlemen by the name of Lee de Forest was the first person to transmit music and speech by radio in February 1907. Fessenden, however, challenged this notion when it was advertised by other scholars that Fessenden had in fact accomplished the pioneering benchmark by broadcasting on Christmas Eve 1906. Specifically, he claimed that he played a phonograph of Handel’s Ombra mai fu (Largo) and then he himself played a violin rendition of O Holy Night and also sang Adore and be Still by Gounod. Furthermore, he also stated he broadcasted on December 31st of the same year and that his transmissions were heard as far as Norfolk, VA on Christmas Eve and  the West Indies for his New Year’s Eve transmission.

Now the interesting bits are that in 2006 (the centennial of the broadcast) renewed interest was sparked into Fessenden’s groundbreaking feat. But, surprisingly, questions were raised. Some of these were that there seemed to not exist any independent corroborations that the transmissions were heard. It is widely believed Fessenden had the technical means to make the transmissions, in the first place, but that it was uber QRP and so may not have been heard by many. Additionally, it was uncovered, that in 1956 more detective work went into verifying the Dec 24th transmissions but again, it failed to uncover any evidence.

If one continues to read about this intriguing individual, you will even learn that Donna Halper (the same one I mentioned at the beginning of this post) and Christoper Sterling  argued “that debating the existence of the holiday broadcasts was ignoring the fact that, in their opinion, the December 21 demonstration, which included the playing of a phonograph record, in itself qualified to be considered an entertainment broadcast”. (I think instead of Dec 21, they meant Dec 24) And other scholars argued there is no reason to discount or doubt Fessenden’s account since it was not challenged immediately following an article, in 1932, originally detailing Fessenden’s story.

So, where do things lie now? Well, the IEEE recognizes this event to be a IEEE Milestone. And, from the little investigative work I did for this post, it seems his account is widely believed. But, even if it weren’t true, it’s pretty dang cool that Fessenden gets to share his achievement with St. Nick’s biggest work day of the year.

Hope you all enjoyed the history lesson and Happy Holidays everyone!

Brian, AB1ZO

 

 

 

Homebrew an Antenna Analyzer

If you’re like me, then you try to be judicious with your $$$. Ideally, it would be great to spend $ and get the highest quality in return. But, the world does not work this way. So, if I am going to spend $$$ (on a scale of $, $$, and $$$), I want to make sure not only am I obtaining quality, but also multi-functionality. In other words, it’s easier for me to spend more money when I feel like my purchase is not exactly a swiss-army knife but also not a one-trick pony.

I could be wrong, but antenna analyzers kind of feel like a one-trick pony to me. When I first strung up my Buckmaster 7-band OCF dipole, I borrowed the RigExpert AA-30 from Greg W1TEN, in order to measure the VSWR,  since I wasn’t thrilled about spending $200 for the analyzer. Especially because I would rather put that money towards a Heil headset and foot pedal (to be ordered for Xmas 2017).

At the October Board of Directors (BoD) meeting, Fred AB1OC mentioned that in the Nov 2017 issue of QST, there was an article entitled “Build Your Own Arduino-Based Antenna Analyzer” by Jack Purdum W8EEE and Farrukh Zia K2ZIA. The attractive thing about this design is the authors quote a price point of $50. The major components are comprised of an Arduino, AD9850 Direct-Digital Synthesizer (DDS) board, and TFT display. Additionally, on the main website, one can also download the associated software to load on the Arduino. So, this leaves the user with the experience and satisfaction of homebrewing a really useful component for the shack. There seems to be a lot of documentation on the assembly, parts, etc. so this makes it relatively easy for the user.

Homebrew Antenna Analyzer
Completed assembly of analyzer
Homebrew Antenna Analyzer
View of Arduino, PCB, and components for analyzer

A downside is that the number of components required seems to be somewhat large as seen from Farrukh’s website which could potentially be overwhelming if you are just beginning. The authors also quote that one helpful component is purchasing their own custom PCB for the job itself. Though this is not essential, it may aid in the build.

Having not built this yet, I would say this would be an intriguing build for someone. I would certainly like to tackle it and have added it near the top of my to-do list since it seems like it can be accomplished within a weekend.

A Cheaper Alternative?

After I read the article, I emailed Mike AB1YK to let him know about it. He replied with yet another option in the form of a PDF by K6BEZ who claims to accomplish the same feat in < $50. Definitely attractive! It’s built on the same premise: AD9850 DDS board, Arduino, etc., but seems to use fewer components. Instructions also seem to be located here. 

Some pitfalls of the build from the PDF link provided above:

  • I located some Yahoo forums discussing that the analyzer as spec’d out did not seem to work for some builders. It’s unclear if the schematics were incomplete or if it’s due to another reason entirely.
  • The build does not seem to be that much cheaper. For instance, the PDF lists the AD9850 DDS as being $4 on eBay. Having looked there myself, as well as on Amazon, the going rate seems to be in the neighborhood of $18-$19. Given this, along with looking up some of the other items in the bill of materials, the price point seems to approach $50 pretty quickly.

If I endeavor upon this, I will be sure to document and write another article about it. If someone attempts the “cheaper option”, I would be interested to hear how well it works.

Happy building!

Brian AB1ZO

A New Summer Camping Tradition

Every year (for me it’s 4-5 years, but for my XYL it’s about 33 years) in July, my XYL and I go camping for a week at Papoose Pond in North Waterford, Maine. It’s not the camping I’m used to from my younger, more ruggedly handsome days. Some will, in fact, call it a shade of glamping. For those of you who aren’t hip, that stands for glamorous camping. You will not have the opportunity to don your newest compact North Face tent or showcase your portable propane stove. Instead, you’ll find families with RV’s, large tents housing inflatable mattresses, a spigot, electrical outlet, and pretty much whatever other comforts of home that you wish to lug up with you. It’s family camping at a family campground. There are activities galore, especially for kids. So why not indulge, and bring a radio?

I have wanted to try out a Buddipole for a long while now. As I don’t own one, I asked Fred AB1OC and Anita AB1QB if I could borrow theirs. After explaining I wanted to work 40 and 20m, they hooked me up with the proper accouterments, a copy of Scott Anderson’s NE1RD book, and well-wishes for a fun trip.

The plan was simple. Bring up an IC-7300, Buddipole, analyzer, power supply (since I would have electricity), and a paper log book that my XYL got me for Xmas this past year. She started laughing when I told her the plan and was excited for me to have some fun and make some QSOs.

The Buddipole went up lickety-split fast. In fact, here is one artistic (if I do say so myself) photo of it deployed in the field.

Deployed Buddipole
Deployed Buddipole

It looks pretty sick being on the water with my neon green kayaks lingering in the picturesque background, eh?

Cue the antenna analyzer. I started out trying to work 40m and my SWR…well…it sucked. There really is no better way of saying it. And it kept getting worse no matter what I tried. I know that Scott’s book was dropping knowledge bombs on me, but it wasn’t coming together for me. (Clarification: It is no fault of Scott’s, but of the author of this post) At many points, the analyzer was saturated at 10:1. If the analyzer could have spoken, I imagined it would choose to sound like a snarky Brit, politely but decidedly insulting my intelligence. AB1ZO’s patience was running thin.

And then…I literally hear someone say “knock, knock” and a fellow I did not recognize emerged on my camp site. He said to me, “Hey, I’m Mike, NU1H” and mentioned he saw me setting up the Buddipole from the beach and it was like a beacon (perhaps more like a siren’s sweet, sweet call), beckoning him over to my location. He brought a 7300 and Buddipole too, which he just set up over at his site a few hours earlier and wanted to give me a hand! Alleluia, Sweet Jesus, Amen — I found religion for a moment.

Mike worked with me for what I think was close to two hours giving me lots of helpful tips and showing me checks I could perform to make sure I had everything tuned up properly. (He must have had the magic touch because his very presence lessened the SWR on 40/20 m to under 1.5:1.) For instance, he recommended that to ensure I found the right tap point on the coils, get the rig powered up and centered on a loud station. Then, one-by-one, change the tap point to see what happens to the quality of the sound. If you hear it rise and then fall, then you know you passed the sweet-spot.

We exchanged stories about our HAM adventures, the equipment we purchased (some pics below), and I told him about the Nashua ARC and my own station at my QTH. We just had a great time.

Recommended LDG Antenna Tuner; ad in June issue of QST
Recommended LDG Antenna Tuner; ad in June issue of QST
Alternative to guying Buddipole; Mike (NU1H) uses an angle clamp hammered into the ground with some U-bolts attached to the base.
An alternative to guying Buddipole; Mike (NU1H) uses an angle clamp hammered into the ground with some U-bolts attached to the base.
Mike (NU1H) has handles for his 7300 which makes travel much easier, and conveniently fits into his pelican case.
Mike (NU1H) has handles for his 7300 which makes travel much easier, and conveniently fits into his Pelican case.

Finally, once everything was up and running, I snapped a quick pic of my portable station.

Portable station at the camp site
Portable station at the camp site

During my camping trip, in between kayaking, catching up on some reading, and honestly — being able to take a nap at 1 pm, I made 3 QSOs. I was in a bit of a valley and when I did receive a few signal reports, they informed me that my signal was a bit weak. That coupled to the QRN due to thunderstorms on the horizon, I’m not too surprised I wasn’t getting picked out of the noise.

Some people would call my QSO count a fail. I don’t. It was the experience. I was able to make a new friend and learn a ton of things. Indeed, a very valuable lesson is that I will be doing this again the next year — and the next, and the next…

Brian, AB1ZO