Monday, 21 September 2015 18:18

New Project: Server Script for checking status of Amateur Radio (Oscar) Satellites

Written by 
Rate this item
(1 Vote)

Checking in on the status of active amateur radio satellites automatically (work in progress)

I wanted a way to see if there was away to automatically check the current status of amateur radio satellites.

There are websites currently that have some information, but I wanted a way to possibly check the status on particular satellites, and maybe even have it email me, send me an APRS message, or update my website automatically.

I will be updating and changing this page as I continue work on this project

Last Updated: 2015/09/21

 

This is the first step in getting that done. My plan is first to locate a source, or multiple reliable sources, in where I can get my data for particular satellites.  The data not only has to be reliable, but formatted in such a way that it stays consistent over time.  Find the status if the satellites are currently active, temporally inactive, or down for the count.  The next step is to write a small script, that can run on a server and either periodically, or when called upon, do something with the data.  To get it started, I think the easiest for me will be to have the script email me on a daily basis, and then I will work on incorporating other possible ways to send out the data.  (I'm thinking I would like to be able to link it to my website at the least, and then possible create an APRS service somehow).

I only play with satellites from time to time, so keeping up with all of the data, status of new and old satellites, naming conventions, etc. can be a little bit daunting.

 

First step, find some data sources that show the status of amateur radio satellites

There are a few sources I found over some time that seem to be reliable, how reliable I will see once I get this script running, but for now I need to find the source and begin my testing.  These are a good reference if you are looking to  find the current status of the oscar satellites.

KD5QGR put together this site.  This is usually the site I start with first when I begin searching for satellites.  It seems to be pretty reliable as it depends on user feedback to get its data.  The data on the other hand is not very script friendly to be able to download and parse the information that I am looking for.  Well at least not for me.

KA7FV also has some good info and appears to be pretty up to date.  Unfortunately this site also is not formatted in a way I can grab the status.

I have used this site to gather some information from time to time as well.  It won't work with my project.

Not so easy on the eyes, but this is perfect for automatically retrieving the data I am looking for.

DK3WN seems to be the master when it comes to up to date satellite info.  I have come across his site numerous times, and it appears he knows his stuff!

So I think I will use one of the last two sources on the list.  Between all of the links I should be able to gather the information I need to see what satellites I want to look for in my script.

 

Deciding on what satellites and information I want to parse out

I am not interested in telemetry only satellites, nor satellites that are permanently disabled.  I'm looking for satelites that have some sort of uplink (voice/data) that I can experiment with.  The fact I am not very active in following the satellites also brings on several disadvantages even when it comes to naming conventions.  Different sites refer to a particular satellite by different names, I don't fully undertand all of the names but for example, CUTE-1 listed on site A is, while site B lists it as CO-55 (project name vs oscar name I guess).  There are also many of these cube sats going up that may only last for weeks, so by the time i Iook up info on satellites again, some of the smaller ones could have come and gone.

Here's my list of satellites so far I will be parsing (as of 2015/09/21)

I may change this list as I find out more about these and other satellites that seem interesting.

ISS

SO-50 (SaudiSat-1c)

FO-29 (JAS-2)

OSCAR 7 (AO-7)

FUNcube-1 (AO-73)

UKube-1

Qb50p2 (EO-80)

Qb50p1 (EO-79)

Sprout

CAS-3 (XW-2)

Fox-1A (soon to be launched)

NO-44 (PCsat 1)

NO-84 (ParkinsonSat)

 

Writing a script that will parse out the info I want

Jack of all trades master of none, holds very true to my coding skills.  I decided to use perl for writing the script, for many reasons.  I know it's "dated" but it works for me.  I started the code and so far it's working as planned.  I need to figure out a good way to parse out only the satellites I'm interested in, and then do something with that data.  Many chuckles could be had with my coding abilities, and most of the reasons for why I choose to do it a certain way (fetch vs curl, split vs Text::CSV, etc) made sense to me at the time...

It's not complete and is a work in progress and I will be updating this page frequenctly as I continue this project

Last Updated: 2015/09/21

 

#!/usr/bin/perl
use strict;
use warnings;
use Storable;  
use File::Fetch;

######################################################################################################
#    # beta version to parse information about amateur radio satellites
#    # using a specific csv file located at http://www.ne.jp/asahi/hamradio/je9pel/satslist.csv
#    # it's extra bloated for doing more custom changes as I test, and see what I want
#    # to do with the data, and more importantly, I'm no expert in Perl, use at your own risk
#    # Algis Salys - algissalys.com
######################################################################################################
    
    # satellites to parse
    my @items = ('ISS', 'NO-44 (PCsat1)', 'SO-50 (SaudiSat-1c)');
    # url location of file (currently not used)
    my $url = 'http://www.ne.jp/asahi/hamradio/je9pel/satslist.csv';
    # file name to parse
    my $file = 'satslist.csv';

######################################################################################################
# downloads file and save to current working directory
# for testing, download once, and comment out 2 lines below (my $ff, my $where)
# no need to keep pulling file down
######################################################################################################

#    my $ff = File::Fetch->new(uri => $url);
#    my $where = $ff->fetch() or die $ff->error;

    # open file and parse and store all data into an emulated multi dimensional array $table[][]
    open(my $data, '<', $file) or die "Could not open '$file' $!\n";
    
    my @table;
    while (my $line = <$data>) {
            $line =~ s/\r?\n$//;
        my @row    = split /;/, $line;    
        push @table, \@row;
    }

# for debug/reference to view @table
#    my $count;
#    foreach my $line (@table) {
#        print $table[$count][7];
#        $count++;
#        foreach my $element (@$line)    {
#            #print $element, "\n";
#        }
#    }


# "$table[x][y]" array has stored all of the data from the file, x = line, y = elements
    # y=0 satellite name
    # y=1 norad  id
    # y=2 uplink frequency
    # y=3 downlink frequency
    # y=4 beacon frequency
    # y=5 mode/s
    # y=6 callsign
    # y=7 status

# create new table with only active and inactive satellites (as inactive maybe temporary)
    my @activetable;
    foreach my $line (@table) {
        if(defined @$line[7]) {
            if((@$line[7] eq "active") || (@$line[7] eq "inactive"))    {
                my @row = @$line;
                push @activetable, \@row;
                # now we can see all active/inactive, can either print, save to file, etc
                #print "@row\n";
            }
        }
    }

# for debug/reference to view @activetable
#    my $count;
#    foreach my $line (@activetable) {
#        print $activetable[$count][0];
#        $count++;
#        foreach my $element (@$line)    {
#            #print $element, "\n";
#        }
#    }

####################################################################################################################
#
# everything above here is somewhat working, below needs work....
#
####################################################################################################################
    # create new table with only user specified defined satellites from the filtered active/inactive table above
#    my @definedtable;
#    foreach my $line (@activetable) {
#        if(defined @$line[0]) {
#            foreach (@items)    {
#                print "@items\n";
#            }
#
#            if((@$line[0] eq "ISS") || (@$line[0] eq "NO-44"))    {
#                my @row = @$line;
#                push @definedtable, \@row;
#                # now we can see all user defined sat info, can either print, save to file, etc
#                #print "@row\n";
#            }
#
#        }
#    }
#
exit 0;

 

 

Finding a location and setting up the script to run everyday

...to do

 

Email me the results of the satellites I'm interested

...to do

 

Incorporating more information from other sources

I'm not very sure what if anything I will do about this one.  For instance the list I am using does have uplink/downlink frequencies, but may not have pl tones etc, which would be nice to add to this.  But then you start talking about something a little more than a perl script due to several reasons.  I'm intending this to be a short project, so I'll leave it at that.

 

Incorporating website pull of data

...to do

 

APRS

APRS already has a SatSRV, APRS services and I've always thought about creating something that would be similar or tie along with it somehow.  We'll see where my time and energy go once I get the email portion on this project working, I may pronounce it complete.

 

Any input, comments (good or bad), suggestions, or general feedback is always very welcome..

 

Read 5052 times Last modified on Thursday, 24 September 2015 03:16
Algis Salys

Creator and owner of algissalys.com.  Linux enthusiast, electronics tinkerer, and likes to spend time in the workshop building and creating new projects.