My custom APRS Web Tracking

silvElise

Adventurer
Hey All,
So I have been nerding out the past few days on developing this webpage/reporting tool. I use to simply embed APRS.fi maps on a page with my call sign to make tracking easy for friends and family. The big issue with this is it only shows data from the past 2 days making longer trips and pulling up trip history not possible! After doing a lot of research I decided to tackle my own system where I can have my server monitor the APRS-IS stream (with proper checks to make sure the script is always running) and soon as data from my callsign comes across save that data to my database.

It was a ton of work, but seems to all be working and now I can url link any date range for sharing trips and save my data points for as long as I want!

v1.0 of the site is done and is currently setup to track some random trucker so I had data being reported while developing this. It will eventually switch over to tracking just me on my next trip, November 22nd.

http://ryanmonday.com/track/

Thought I would share :)

-KF5JSI
 

silvElise

Adventurer
Looks good! I too use my APRS to let family members track my trips.

Thanks! I always find it funny how attached family becomes to it on my trips. I use to do a spot device when I did solo DS trips and sure enough I would have lots of calls worried when the spot didnt get a proper ping for 30mins-1hr. Spot also had the same issue where it would only save about 7 days of data. Was always bummed on longer trips where it only showed 7 days.
 

opg4759

New member
Would you be willing to provide any insight on how others could do this?
I'm personally interested in setting something like this for myself but not sure where to start. I tend to use APRS a lot and it would be nice to understand how to pull my own data from the APRS-IS databases in a similar fashion.

It looks great BTW.
 
Last edited:

silvElise

Adventurer
opg,
Sure!
*Initial warning before going down this road*
First off it requires you to have a server where you can install your own perl modules. Most shared hosting plans do not allow this for security/stability reasons. I happen to have a dedicated server for other sites I started that receive quite a bit of traffic daily (over 100k hits a day). These servers can be quite expensive monthly. The other option would be to setup your own home server but that a whole other bag of worms.

If you have the above you will need to have the APRS-IS, APRS-FAP Date Manip, Mysql DBI, MySQL DBD (some of these may already be installed by default) perl modules installed. The script is pretty process light on my severs and only adds about 2% memory and cpu useage.

Server Side:
I then wrote a perl script to run and constantly monitor the APRS-IS stream. If it happens to find my call-sign in the stream then it grabs the relevant APRS data and saves the information to a MySQL table I have setup. Because the APRS-IS information is only streamed this program has to be running at ALL times or it will miss the incoming information! To ensure it is running I have a cron job run a shell script every minute to verify the perl script is running, if it is not then it will launch a new instance. I also have a cron job setup to close the program every day at 12am. This was mainly done as I noticed it would stop reporting after 3-4 days of constantly running the same instance (hack around a bug I don't feel like tracking down). Then the first cron job will make sure a new instance is launched a minute later.

Client Side: (webpage)
Once I had above setup I had information logging and reporting correctly into a mysql database table that can then be parsed and used to make a webpage.

When someone loads the page it queries the database for the date range in the url (or a week if there is none) to compile the information. Here are the different segments:

Map:
Built off the Google Maps API:https://developers.google.com/maps/web/
Then heavily coded to allow for a nice gradient line, rotating final car, etc.

Date Picker:
Started off using this API: https://github.com/dangrossman/bootstrap-daterangepicker
Then heavily modified for the sites needs.

Graphs:
Used the google charts api: https://developers.google.com/chart/
Not much editing here other then creating the arrays it needs for the chart data and some custom css styling

Raw Packets:
Just css styling and php to out put the table from the MySQL features.

Extras:
Just some extra features like checking to see if there is data in range when the dates are entered. Making sure repeated locations at 0mph arent reported ina row (dont want my data saturated with useless information while I take a 2 hour break for lunch and radio is left on. Plus lots of other little hacks to get PHP, JAVA and MYSQL playing nicely with the API. Make sure layout/code is all mobile/tablet friendly. Hack reloading the page someone is viewing every 4 minutes while someone has it opened so they can see updated information (need to not do this and use ajax in the future).

I will be the first to admit the client side not nearly as optimized as it should be. However it works for my needs and the little amount of people that will want to use it. The server side of things is all working solid and that is the important part as data is getting saved and archived. Since I have the proper data I can change the client side without any impact to data at anytime (i.e. add features or optimizations down the road).

If you have any questions please let me know!
 

cruiseroutfit

Supporting Sponsor: Cruiser Outfitters
Very cool. Fwiw we used to be able to get APRS.FI to catalog and show tracks up to 7 days but it doesn't seem so willing now?
 

silvElise

Adventurer
Very cool. Fwiw we used to be able to get APRS.FI to catalog and show tracks up to 7 days but it doesn't seem so willing now?

Seems finicky raw packets are only stored for 2 days now it seems.. Even at 7 days and didnt like how I could never link back to a certain full trip or day months later
 

cruiseroutfit

Supporting Sponsor: Cruiser Outfitters
Seems finicky raw packets are only stored for 2 days now it seems.. Even at 7 days and didnt like how I could never link back to a certain full trip or day months later

Agreed. Perhaps it got popular enough that they had to start dumping data sooner with their limited bandwith/storage?
 

silvElise

Adventurer
Agreed. Perhaps it got popular enough that they had to start dumping data sooner with their limited bandwith/storage?

To give you perspective I messed up on my filtering at one point and left it running for a day it ended up tracking all stations not just aprs. My Database had over 5 million entries. It is simply too much information without a substantial investment, one I doubt they could ever afford nor have the following to make money off of. I am surprised they don't keep data forever for monthly subscribers. Not that I would do that now that I have this working.
 

cruiseroutfit

Supporting Sponsor: Cruiser Outfitters
To give you perspective I messed up on my filtering at one point and left it running for a day it ended up tracking all stations not just aprs. My Database had over 5 million entries. It is simply too much information without a substantial investment, one I doubt they could ever afford nor have the following to make money off of. I am surprised they don't keep data forever for monthly subscribers. Not that I would do that now that I have this working.

Agreed though there are places online storing more information for free and the HAM world has always been a community of sharing. Really neat setup you created, you ought to sell it as a product offering. I'd pay $20-50/year for a subscription that I could email family & friends, perhaps something that catalogs, allows search parameters, etc.
 

silvElise

Adventurer
Agreed though there are places online storing more information for free and the HAM world has always been a community of sharing. Really neat setup you created, you ought to sell it as a product offering. I'd pay $20-50/year for a subscription that I could email family & friends, perhaps something that catalogs, allows search parameters, etc.
Will have to think about the subscription thing can most likely open it up with specific urls for a few more people who are willing to help on server costs or barters ;)

As for sharing, some of the basics are already there! If you change the date range in the picker it changes the URL. You can send that URL to anyone and those ranges will show automatically (great for interactive trip reports).

I planned on adding a drop down menu that will show memorable trips as they are done. What kind of other search parameters were you thinking? Again only really thought about my need case and ways that would be cool to display the data and share.
 

spressomon

Expedition Leader
silvElies,

After tiring of Spot use (batteries for long trips, wasted annual cost for short trip years, another device on the dash, another device to turn on/off...) my family also likes to see my whereabouts via my APRS pings.

Your idea and execution are brilliant and solves a real world issue with APRS in this specific application.

Kudos!
 

silvElise

Adventurer
silvElies,

After tiring of Spot use (batteries for long trips, wasted annual cost for short trip years, another device on the dash, another device to turn on/off...) my family also likes to see my whereabouts via my APRS pings.

Your idea and execution are brilliant and solves a real world issue with APRS in this specific application.

Kudos!
Thank you for the kind words!

I use to have spot too and had the same exact issue with tracking info only lasting 7 days.

Like you, on my latest rig I have been trying to cut down on mounted gadgets that serve one purpose while out and about. My old D1 was covered with cb, spot, ham, tablet for GPS, you name it.

Taking a look at the G I installed a Kenwood dnx7100hd which handles my nav (with custom routes and maps), Bluetooth, and music.

Then a vx-8dr for ham with all the goodies for aprs tracking. Best part is I can unhook the vx-8dr antenna on the G and put on a mobile antenna for camp ground\hiking needs. Eventually I will get a better mobile ham setup fully wired to the rig and use it for more range and relaying the ht while camping/hiking. However for now the vx-8dr seems to perform really well.

Cheers!
 

Forum statistics

Threads
185,424
Messages
2,874,292
Members
224,720
Latest member
Bad Taste
Top