Saturday, November 28, 2015

GPS using an RTL-SDR stick

Using a $20 RTL-SDR stick with 1ppm TXCO and a simple mod to power an active GPS antenna, it is possible to download and decode GPS signals in real time.

Software

Both packages are Open Source, with a default build target is Windows.
Both packages are Open Source (GPL2 and BSD 2-clause, respectively). The default build target for both packages is Windows, although RTKLIB has been compiled under Linux.

Please note that GNSS-SDRLIB is not to be confused with GNSS-SDR!

Resources
Useful presentation by the author of GNSS-SDRGUI for a summer school course. Also check the manuals included with GNSS-SDRLIB and RTKLIB.

Step-By-Step Implementation
  1. Ensure RTL-SDR stick is working in Windows. If your driver is not working, try using the Zadig driver installation method outlined here.
  2. Install GNSS-SDRLIB and RTKLIB to any convenient directory
  3. Open GNSS-SDRGUI and select the following options
    1. Input Type: RTL-SDR
    2. [x] RTCM MSM, Port 9999
    3. Change "output interval" dropdown to 10 hz
    4. [x] Plot Tracking
    5. [x] All GPS, GLOSNASS, Galileo satellites 
    6. (optional) enter approximate lat/lon into MISC and click the "..." button to get  current satellite locations in relation to your location.
  4. Click "Start", a number of command consoles will open then close for each satellite being tracked.
  5. Click "M" for log
  6. Now, open RTKNAVI
    1. Click on the "I" button
      1. check "rover", type TCP Client, format RTCM3
      2. click OPT button and set address to "localhost" and port to "9999"
      3. click OK
      4. Click OK
    2. Click on the "start" button
    3. Within a few seconds you should see satellites in the Rover:Base SNR pane
    4. Once a solution exists it will update lat/lon in the left pane
    5. Click "Plot" to generate a plot of the random walk of lat/lon over time

This is what your GNSS-SDRGUI should look like:



This is what your RTKNAVI input should look like:


If everything is working you should get a GPS solution, as shown in this video



I was also able to decode a sample recorded by a RTL-SDR stick connected to an Intel Compute Stick which could serve as a portable GPS receiver.

Next Actions
Try using GNSS-SDR and/or GNURadio to decode the GNSS signal; this would provide native, Linux compatible headless execution and a cursory Google suggests this has been done successfully with the RTL-SDR stick. 

Micro FPV Part II

TBD ... updated camera 'backpack', power filtering, etc.

Tuesday, June 9, 2015

Micro FPV


CAMERA - CM205 5.8 GHz Camera (Banggood, $21)

http://www.banggood.com/CM205-5_8G-FPV-Wireless-Mini-CMOS-Camera-p-88782.html


5v nominal voltage but has a regulator in the barrel plug which will accept 1S (3.7v) voltages.

RECEIVER - RC805 5.8 GHz Receiver (Banggood, $19)

http://www.banggood.com/FPV-5_8G-8CH-200mW-AV-Wireless-Receiver-RC805-p-73202.html

Shipping from China took 13 days. It comes with a JST plug, takes 7-12v 

Goggles - Quanum DIY FPV - $30

http://www.hobbyking.com/hobbyking/store/__53706__Quanum_DIY_FPV_Goggle_Set_with_Monitor_KIT_.html

Also takes 7-12v. Also comes with a JST adapter (not shown)

JST Connectors - $3.99

You will need these to make power harnesses 

PUTTING IT ALL TOGETHER

The receiver and the goggles can be powered by a 2S LiPo using a JST Y-harness. For testing I used a 12V 1A wall wart with a JST connector soldered on.

The camera will run off of a 1s LiPo (3.7v) just fine. DO NOT CUT OFF THE BARREL CONNECTOR! Inside the barrel connector housing is a voltage regulator which you need (the LiPo voltage will vary depending on charge level). Instead carefully cut off the black plastic housing, you will find a circuit board embedded in white plastic. Cutting away at the plastic near the tip of the circuit board near the barrel will reveal the solder pads. Desolder the barrel connector, solder on a JST or whatever connector you desire.

Useful thread for the video camera: http://www.rcgroups.com/forums/showthread.php?t=2291466

Then you can make another Y-harness so that a single 1S LiPo can power both the camera and your vehicle.

Here's my assembly video and initial performance:


TOTAL COST
$73 


STATUS

I have all the harnesses built but I haven't assembled the headset - will update when complete. Then the harnesses need to be trimmed and things mounted, etc. etc. etc. 

RESULTS
Here's a preliminary video. Note that I've done nothing to optimize the system - its using the 1/2" antenna stub, the receiver is using the stock antenna (you really want an omnidirectional antenna) and the receiver/transmitter are sitting on my kitchen table while I'm flying in the backyard. After a false start ( dead battery ) you can see flight video starting at 1:38. Note that I crashed in the neighbor's yard on a tin roof which causes loss of signal.






Wednesday, April 9, 2014

"Thus commences the tale of the early life of Drephus Jipebearer"

Stumbled upon this today looking for something completely different. I wrote this short page-and-a-half intro to my character for a D&D campaign in (about) 2001.



Thus commences the tale of the early life of Drephus Jipebearer. He was born to two Tiefling parents whose keep was earned by farming on the Plateau of Thay. His lineage is curious, and being a family of Tieflings they survive only due to the fact that they farm well and pay their dues. Thay, being a cultural melting pot, also allows them to hide with an ease not found in the west. Tam, his father, farms grain and milks several beasts for milk to make cheese. Its little things like cheese that keep people alive in Thay, which is hard ruled by the Red Wizards. His mother, Kait, also works the farm and helps nurse the young children – Human, gnoll, orc, Halfling or otherwise - in the area. I have no siblings, for while my mother loves children she could not bear to bring up another in this world of pain.

Young Thayan children are tested at an early age for magical aptitude by the Red Wizards. When my time came at the age of four, I showed aptitude in the necromantic arts, but before I could be taken my parents hid me. I never quite understood, being four, but I always recount being swept away by my parents and hid for a time. Upon recounting these repressed memories to my parents, they at first disavowed any knowledge, telling me it was but a dream. But I knew better. Upon the age of seven, persisting in these thoughts, they decided I was of an age to understand and the whole tale to me was recounted. From that moment on I resented my parents. I had always had a aptitude to magic and felt betrayed. They had their reasons but it was of no justification to me. From that point on I longed the day of my escape.

One day I was working the fields and saw passing through a tall man with a skeleton for a face in dark garments. His hands were like claws, shriveled. I was scared, but had to look on. I knew he had to be magical and mystical. He only reaffirmed my desire to leave this farm and learn the arcane arts.

I had few friends, being a Tiefling I wasn’t always openly hated but I feel my friends’ parents advised them not to play with me. However Yom, a young elven slave girl always seemed to befriend me. She worked a farm not far from my parents as a slave. Her brother was chosen by the Red Wizards as a student, and at times he would come to visit her. Once she brought him to meet me. The thought and image of the dark specter I saw years earlier was heavy on my mind and I recounted it to him. He told me of the zulkir of the school of Necromancy, and how his mirror images often traveled the land scouting for him. I was filled with wonder, having seen a master Necromancer, and knew this is the path I wanted to take. I begged him to tell me more of wizardry and of necromancy, and he recounted several stories of him and his friends and the magic they would craft but did not share with me the secrets of the arcane or spellcasting, which I resented. However he reaffirmed my every desire to leave this place.  He came back on occasion and shared with us knowledge on many things. Once he told me of gods, supernatural creatures that care for people in this forsaken world. My favorite one was Ishtishia, because she represented the sea, something I had never seen before. Maybe I will see it someday.

I started collecting things to aid me in my release. This isn’t easy, being a Tiefling any time I went to town people knew there was only one family of Tieflings in the plateau. However over time, doing chores for my parents and nearby farms I acquired several gold pieces. As soon as I had enough, Yom and I purchased a chest from a local merchant. No small feat! At the age of 10 lugging a 25 pound chest several miles from market. We dragged it to the edge of my father’s fields and buried it. Over time I collected things to aid me in my escape, including a crossbow and bolts, ink, a pen, paper and a paper tube, several days worth of rations, some cheese that would remind me of home, and some leather straps to help me lug the chest. Yom would always help me but she always had a sad look in her eyes as yet another item was added to the chest. Part of me wanted to bring her with, but I knew I couldn’t take care of myself, much less her. Besides, when her brother was released from the academy, surely he would be more suitable to care for Yom.

My opportunity arose when I was 14, perhaps a bit young but I could no longer stand the farm and my lack of the arcane. My father was harvesting in the field and I was sick with a flu. I was sick for days. However upon the upswing of my illness a young Halfling child was being born on the other side of the plateau, which my mother assisted. So while my father was in the field and my mother several miles away, I decided now as my time. I took off my farmer’s hat and set it on the table, along with my boots. This would be sign enough of my intentions. I ran to the end of the field, which fortunately my father wasn’t working. I dug up the box, affixed leather straps to help me lug it. I wandered over to where Yom usually works to say goodbye, she saw me and my box and knew in her heart, even from a distance what was about to happen. She ran to me and gave me a hug, and something I had never felt before, a kiss. (Tieflings aren’t the emotional type) She took a piece of silk out of her skirt and gave it to me to remember her by. Out of my mouth then came words that had no pretense but I now feel bound by – I will come back for you.

And so I headed west.
Interesting side note: I invested a lot of time into drawing up the character, using my influences from Everquest and reading D&D manuals. This was the first character I played with a backstory. He also died around level 2. Crit arrow shot from an orc, or was it a goblin? I could tell the GM didn't want me dead, but there I was, dead. He gave me a chance, though, I heard the voice of God was was told my time on earth was too short and that there were things I had left to do, etc. etc. and that He would give me a second chance if I took on a different role.

See, that was a problem. I was a necromancer. I was always a necromancer. Everquest, D&D, the name Drephus was analgous with "the friendly Necromancer".

I stumbled "but God maybe..."

GM: "DEAD!"

 ...and that was the end.

Good times.