Andy

Processing satellite data – now anyone can do it!

I saw this post on the Amazon Web Services weblog (via Stephen Downes) about Amazon offering ground station services for people operating micro-satellites – amazing! Processing satellite data is now just another web service….

A long time ago, I was a volunteer for the Lunar Prospector mission (before it became a NASA Discovery Program), and I was in contact with John Champa (K8OCL, SK) about setting up a ground station network using ham radio operators to collect data from the Lunar Prospector satellite. We did not get far with the volunteer effort, and it ground to a halt. I did attend the NASA launch (fun!) and followed the mission from afar. Boy, if this Amazon service existed back then, it would have been cool!

References:

Lunar Prospector archive page from NASA (original site http://lunar.arc.nasa.gov/ does not seem to exist at NASA or Internet Archive

Lunar Prospector book summary written by project scientist Alan Binder

Went out for dinner this weekend, and stopped by a local Sears store to see if there were any bankruptcy bargains (there were…). The signs outside said “Store Closing”. The signs inside reminded me of the Radio Shack bankruptcy…”10% – 50% Off Everything!”…”All Sales Final”…

My rivers of news

Following up on my post yesterday, here are a list of rivers of news that I have created:

  • FullBlastNews.com – An app I put together to display multiple rivers using tabs. Unfortunately, the theme has stopped working in some ways (it won’t jump to sections within the site), but is still a nice app.
  • ReadingList – My main list of sites I follow
  • OpenSourceBridge – A river I built for the 2017 Open Source Bridge conference (article on how I built the site)
  • 1999 Bloggers – A river of people using the 1999 blogging tool by Dave Winer

 

Creating and Displaying Rivers of News

I wrote a post several years ago on this topic, but decided to refresh it since some of the links don’t work any more…and also because I am setting up a new river for Ron Chester….

In the same vein as “own your data” or “supporting the open web”, it’s important for users to be able to set up their own tools for collecting/reading information on the Web, and not be dependent on other people’s tools. Having said that, I have been happy to provide a river resource for the 1999er community (http://1999bloggers.andysylvester.com/). This post will help you to do the same for any blogs/feeds that you are interested in following.

There are two pieces to the river resource given above:

1. A installation of the River5 RSS aggregator running on a server

2. An HTML page that displays a river or rivers created by River5

At the River5 Github site (https://github.com/scripting/river5), there are several tutorials in the site wiki on installing River5:

Another option is to buy my book on setting up an Ubuntu server on Amazon Web Services (the last chapter shows how to set up River5)….

Once you have River5 set up on a public server and creating river files (Javascript files that can be read/displayed by other applications (for example, 1999bloggers.js)), you have some options for being able to display those files. When River5 is running, you can direct people to the public display of the rivers being created. An example can be seen at http://fedwiki.andysylvester.com:1337, which is my main River5 installation. This install is creating multiple rivers, which are displayed in multiple tabs. If you only had one river, you would see only one tab.

Another option for making your river public without pointing to the River5 app display is to use a separate HTML page that accesses the river files. Dave Winer has created a toolkit for display of River5 river files (https://github.com/scripting/riverBrowser). To test the app, copy two files from the repo (frozenriver.js and riverbrowserdemo.html) to a directory on a web server. You should then see the contents of the frozen river file as shown in Dave Winer’s demo app.

To set up your own public display of a River5 river, make a copy of the riverbrowserdemo.html file. Next, edit the file and find the line with the phrase “httpGetRiver”. It should look like this:

httpGetRiver(“frozenriver.js”, “idRiverDisplay”, function (){

Next, you will be replacing the text “frozenriver.js” with a URL to a list in your River5 installation. For example, I have a file called readinglist.txt, which contains a list of over 40 RSS feeds that I follow. When your River5 installation is running, you can feed a URL corresponding to a River5 list of feeds that you have created. The following is the line of Javascript from above with the URL for readinglist.txt from my server:

httpGetRiver (“http://fedwiki.andysylvester.com:1337/getoneriver?fname=readinglist.txt”, “idRiverDisplay”, function (){

For your setup, replace the URL part (http://fedwiki.andysylvester.com:1337) with the URL  for your River5 server, and replace the text following “fname=” (readinglist.txt) with the name of your file in the lists folder within your River5 installation.  Finally, upload the HTML file to a server. As long as the River5 server is running, your HTML page will display the latest version of the river. An example is available at https://andysylvester.com/files/riverbrowserdemo.html.

OK – now get started making rivers!

I don’t know about the “data transmission” item as one of the top items needed for space exploration, but I would agree with space medicine and STEM education…

@Ron @JohnPhilpin this is a test status post from my WordPress blog, see if you can reply to this post in micro.blog, thanks.

Working with callbacks in Javascript

I am playing with the sample code for Dave Winer’s feedRead Github repo, and wanted to refactor one of the examples. I have seen multiple examples of a callback function source code included in a call to another function, but I wanted to have it be a separate function. Here is the example code:
[cc lang=”javascript”]
feedRead.parseUrl (urlTestFeed, timeOutSecs, function (err, theFeed) {
if (err) {
console.log (err.message);
}
else {
console.log (“It took ” + utils.secondsSince (whenstart) + ” seconds to read and parse the feed.”);
console.log (“theFeed.head == ” + utils.jsonStringify (theFeed.head));
console.log (“theFeed.items [0] == ” + utils.jsonStringify (theFeed.items [0]));
for (var i = 0; i < theFeed.items.length; i++) {
console.log (“Item #” + utils.padWithZeros (i, 2) + “: ” + theFeed.items [i].title + “.”);
}
}
});
[/cc]
After some experimenting, I figured out that all I needed in the feedRead.parseUrl call was the function name (with no parameters, even though it had parameters), and then the function could be factored out:

[cc lang=”javascript”]
feedRead.parseUrl (urlTestFeed, timeOutSecs, myparser);

function myparser (err, theFeed) {
if (err) {
console.log (err.message);
}
else {
console.log (“It took ” + utils.secondsSince (whenstart) + ” seconds to read and parse the feed.”);
console.log (“theFeed.head == ” + utils.jsonStringify (theFeed.head));
console.log (“theFeed.items [0] == ” + utils.jsonStringify (theFeed.items [0]));
for (var i = 0; i < theFeed.items.length; i++) {
console.log (“Item #” + utils.padWithZeros (i, 2) + “: ” + theFeed.items [i].title + “.”);
}
}
}
[/cc]

Note that the function does not have a semicolon at the end, but the call to feedRead.parseUrl does…

References:

https://codeburst.io/javascript-what-the-heck-is-a-callback-aba4da2deced

https://javascriptissexy.com/understand-javascript-callback-functions-and-use-them/