• Pastorale

    Kind of a mellow day: I got up and continued learning GNUCash while sampling some experimental croissants Anne made, got some easy chores done, dishes and laundry and so on, then rode over to volunteer at the Museum for a few hours — I got home just at dark. Finished some more chores, played my cello for a bit, and now I am back at the computer, listening to Polish Prog Rock over the internet. A nice day, a mellow day. It’s the simple things…


  • Updates

    So, remember back in May, when I had that hissy fit over embedded Garmin rides? Well, I happened to be visiting my other blog, where I noticed that a Garmin frame was actually displayed correctly. WTF? I checked some posts here, where I had ride posted, and sure enough, there they were — everything was as it should  be. I’m not sure what happened to make them work, though there have been several updates to Firefox since May, and I also changed my browser’s cookie policy recently. Either of those might have fixed the frame problem, or both working together, or maybe it was even an update by Garmin that did it. However it might have happened, the righteous justification for my most recent GIS project just evaporated. Now I’ll have to continue just because it’s fun…

    Speaking of Python projects, I went back and added a dialog box to my FreeCAD Re-Entrant Throat script, and got it running today. There’s no error checking (yet), but it works. So that’s another project that’s suddenly, perilously, close to ending.

    UPDATE 2018-12-05: I added the input error checking (non-negative values, some constraints on design parameters based on other parameters) bringing up an error alert and looping back to the input dialog until all errors are fixed, before running the calculation code. Works great, and I had a lot of fun playing with it until I realized that RET’s are kinda boring…


  • The Year in Free Fall

    Well look at that, it’s December already!

    Listening: David Bowie’s “Fame” is on Radio Paradise.

    Not much is going on, but I thought I’d check in anyway… It’s been rainy and cold the past few days. We kegged our latest beer today, and we were going to brew today, but since we do our brewing outside these days (where it was, you know, raining), we skipped that part. (By the way, that new Roggenbier has quite a kick: the samples we took while kegging actually left us puzzled.)

    The GPX project is somewhat on hold right now, as I’ve gone into several other obsessions: I ran across some python scripts to build an interface, and I got them working. Excelsior! They were part of that Re-Entrant Throat Calculator port to FreeCAD I was playing with a while back. I may play with that a little more, it was fun to mess with it again.

    I’m also having more fun than seems appropriate, massaging our budgeting and financial data with Postgresql and JasperSoft Studio. I downloaded this past year’s banking transactions (think ATM and debit card purchase records), put them into a table and, deciphering each transaction description, sorted them into various categories. I then put them into a spreadsheet to help with planning next year’s budget, and I also broke them down into various Jasper Reports graphs and charts — I’m not sure JasperSoft Studio is all that great but I do like seeing what I can make of my data.

    By the way, this is what I wrote ten years ago.


  • Pay Dirt

    For the past few weeks, I’ve been in a sort of dry spell when it comes to books; everything I’ve picked lately up has ranged from unsatisfying (Neil Gaiman’s Norse Mythology) to downright unpleasant (The Complete Works of H.P. Lovecraft). That all changed with today’s trip to the library, where I found not one but four intriguing reads:

    Ghost Stories of the Lehigh Valley, by Charles J. Adams III and David J. Seibold. This is probably the only real B-lister in the lot, but it’s still not that bad, and full of local lore.

    Professional WordPress: Design and Development, by Brad Williams, David Damstra, and Hal Stern. I’ve read a bunch of beginner books on using WordPress; this one delves into the WordPress architecture and underlying software.

    Medieval Europe, by Chris Wickham. Medieval history is not new territory for me, but the author here makes it new by looking at it from a “structural,” maybe even a Marxist analytical viewpoint, tracing the economic, social and cultural underpinnings of medieval society, including the world lived in by peasants, and women, and ordinary people as well as the usual knights and kings.

    Weapons of Math Destruction: How Big Data Increases Inequality and Threatens Democracy, by Cathy O’Neil. Written “from the inside” by a mathematician and former Big Data professional, the title basically says it all.

     


  • Back on the Python Train

    I’ve been doing a bit of experimenting with FIT files, and C and ogr2ogr and… I’ve decided to use Python for my latest GIS project.

    I was able to extract some (but not all) of the data I need from the fit file using GPSBabel and, in an unwieldy process, send it as a CSV to PostGIS via ogr2ogr, and do the final processing within the database. What GPSBabel did not get did not get me was the lap info — I’d need to write some kind of program to extract it myself , and any real processing I’d need to do — aggregating my track points into a line for example, or timestamps and GPS positions into average speed — seemed more suitable for doing in a program anyway.

    Meanwhile, I had downloaded the ANT/FIT SDK, and it contained a C library as well as usage examples. These were all written to be a part of some Windows-based IDE’s build process, but they were easy enough to put into Makefile format and get running and, by modifying and re-writing the examples, I managed to extract all the necessary data from the FIT file. The next steps were to process and aggregate the data into summary form, and (using OGR libraries) to add the summarized activity data as a record into my database.

    I did some Googling for advice on how to go about this, but I got few hits for doing it in C and many for Python: basically there’s a library for reading FIT files, and multiple libraries each for processing geometry data and connecting to PostGIS, and the code for my first attempt came to about two dozen lines. It feels slow, but I noticed that my C program also took some time to read and process the points in the file — the Python version isn’t really slower in comparison, and writing the code was soooo easy that using Python was worth it for that reason alone.

    I need to finish my little piece of code, then I can use it on my machine as a standalone program. The next step after that is to find out how to use it from a website — there are several ways, and they all seem easy enough — and build a front end to access my activity data. Knock on wood, but the worst of the learning curve is over.


  • A Story

    We went out yesterday to the Allentown Farmer’s Market, and on the way we stopped at Syb’s Deli for lunch. We sat near the window, and Anne noticed a cute little birdhouse, built to look like the deli, just outside on a telephone pole. (I didn’t see it until she pointed it out.) We asked the waitress about it, and she said they had no idea who put it up — one day it was just there. There were three other little birdhouses that also appeared in the neighborhood at the same time, she said, but these didn’t look like the Syb’s one or any local buildings: they were undecorated, except each of them had “eat the rich” written on it. Here’s a photo of the one outside Syb’s:

    syb's deli birdhouse
    Syb’s Deli Birdhouse

    We got a bunch of other stuff done yesterday, and then met Judy and Erika, at Stoke in Easton, to plan our Thanksgiving dinner. Today I raked the leaves; it’s cold and windy, and it even snowed a bit this morning, so I figured it was the perfect day for it. Later this afternoon Anne’s quartet will be doing a “house concert” at Jeff and Kristen’s, then we might go out for drinks after dinner, to a new place — new to us, anyway — down by Sand Island, called Artisan.


  • Getting The Band Back Together

    Well, I did it — I started taking cello lessons again. I was flirting with this for a while, but only made the decision last week, and I called my old teacher over the weekend. She’s is no longer taking students, but she did have an alternate for me, a woman named Marge who teaches at Twin Rivers Music in Easton. (As a former NJ resident, and former Easton resident, I’m going to cringe every time I hear that name.) Today was my first lesson.

    Despite its unfortunate name, Two – er, Twin Rivers is pretty legit: music and instruments on the sales floor, studios in the back; it was busy, and bigger than I expected, and my new teacher seems really pleasant. We talked a bit about my goals, my reason for wanting to play cello — basically so I can play for fun, with Anne and others — and she explained her teaching approach and how it would address those goals. In terms of playing? I’m not exactly starting over, but the situation is pretty close to that: I picked things up today about halfway through my original first lesson book.


  • Brew Day, Soap Day

    Happy Birthday, Joni Mitchell! Seventy five years old today. WXPN has been playing her albums in full, along with singles and a bunch of covers.

    Meantime, today is brew day. We’re making a Roggenbier, a style of German rye beer that became extinct with the coming of the beer purity laws at the end of the Middle Ages, and has only been resurrected withinin the last few decades; we’re also kegging that Pale Ale we made a few weeks ago. There has been much heating and cooling of liquids, and much cleaning of pots, kegs, glassware and other items and, in the middle of all this, we also made laundry soap — we ran out yesterday.

     


  • New Project: Down the Rabbit Hole and Still Digging

    I started looking into my new project the other day. The first steps will have to be extracting information from GPX or FIT files, and adding the information to a PostGIS database. I managed to do this in several ways, mostly through a combination of GPSBabel and ogr2ogr, though no single way has done exactly what I want yet: ogr2ogr automatically adds GPX data to the tables in a manner similar to what I want, but extension data (heart rate, temperature) is not treated the way I want, while the FIT data needs to be extracted first into a format readable by ogr2ogr, and then put in the right table form after being put in the database, all of which turned out to be surprisingly easy. (Even so, I may just choose to go with adding the data from GPX for now.)

    The biggest problem I’ve run into so far is that GPSBabel does not extract all the data from the FIT file, and FIT is a proprietary, binary file format — I can’t get lap information, for example, just by scanning the file with awk or something. I may have to download and use the (again, proprietary) FIT SDK, in a C or other program I write myself. This may fit in well with what else I have to do, since I can call the parts of ogr2ogr I specifically need, directly from C.

    Before it gets to that point though, I have to decide what I especially want to do with this data, which will tell me what I need to extract, what I need to save, and what I can disregard, or discard after processing. Do I want to build a full-blown replacement for Garmin Connect, where I keep all relevant data? Or do I want to just build something, like a web badge, to show a minimum of data about the ride, data like distance, duration and a map of the ride, with maybe a link to the ride’s Garmin activity page? I am leaning towards the minimalist approach (which would entail just saving one record per activity, with fields containing aggregate data), but I think I want at least some of the individual track point data because I may want to graph things like elevation or heart rate.

    But maybe I don’t need to keep trackpoint data to build my graphs on the fly. Maybe I can make small graphs as PNG’s or GIF’s for the badge, and store those images in the database — hopefully they would be smaller than the trackpoints themselves. Alternately, I could store the entire FIT file (which is actually pretty small) in the database, and extract whatever I need on the fly. (I would still do a one-time analysis to get and store my aggregate data, since this might be a little too slow for on-the-fly data generation.) These choices will depend on the results of all the little coding/database/GIS experiments I’m doing now, extracting, converting and aggregating sample data.

    Ten Years Gone: This is what I wrote on this date in 2008. We voted today, and I remain hopeful, but it is certainly not as happy a day as that one was, and even with good news I don’t think we’ll match that day.

     


  • Back From The Dead

    Yesterday was a completely wasted day — I was tired and headachey from the time I got up until around 9:00. I couldn’t tell if it was a sinus headache, or maybe tension, or dehydration. It felt for all the world like a hangover, but even though we went out Tuesday night I had only one beer; if one beer can knock me out of the game like that, it’s time for me to to hang up my drinking shoes.

    I suspect it was the aftermath of the ride we did Tuesday. Anne and I did a solid 65 miles, through four counties and over two gaps: we rode over Blue Mountain at Little Gap and came home by way of Wind Gap, with a lunch stop at the diner there. Not the most difficult of rides, but my nose was seriously draining and I have not done any rides like that in a while, and maybe that was what beat me down. (Anne of course was fine, the weeks I took off from riding were the weeks she spent riding, over New England mountains on a loaded tour bike.)

    I would show you the ride’s GPS and stats, but well, you know how that has been working out with Garmin, and that gave me the germ of an idea for my next map project: something that can extract and display my ride data in a frame on my blog. I started looking into it yesterday, and promptly fell down the GPX/FIT rabbit hole. I learned a lot though — mostly that this might be more of a PIA than I figured. Oh well, everybody needs a hobby…

    Meantime, Halloween. We had Trick or Treat on Friday, and we had a few friends over to help (they got adult-liquid treats), and then on Sunday the parade came by on Broad Street. Yesterday was pretty subdued, though the library did a cover-to-cover reading of Mary Shelley’s Frankenstein, in honor of the 200th anniversary of its publishing. Anne was there for a big part of the afternoon, and I went for a bit too, listening through several readers before heading back home. I forgot how sad the story really is.

    Here are some pictures from the parade: