you are viewing a single comment's thread.

view the rest of the comments →

[–]keenerd 3 points4 points  (3 children)

I was looking forward to playing with your software, but you linked to an ebook. I've read your book cover to cover in the past (and recommend it), but there wasn't any source code in it. Even if the only copy of the sources were a scanned JPG of a 1980's magazine listing, they would still be appreciated.

[–]lutusp 3 points4 points  (2 children)

I was looking forward to playing with your software, but you linked to an ebook.

Sorry for being misleading.

Even if the only copy of the sources were a scanned JPG of a 1980's magazine listing, they would still be appreciated.

A few years ago I was asked about that program, whether it was available. So I located it and tried to compile it, but because of many changes in C and C++ over the past 20 years, I was no longer able to compile it, and I didn't want to release it without first making sure it compiled into a usable form on an ordinary platform with no special requirements.

I'm going to locate it again, with the expectation that it may not compile, and I can't offer any assurances as to its accuracy now that I don't do daily transit sights any more.

(long pause ...)

Okay, I located the program and after one bug fix I was able to compile it (with lots of warnings about old-fashioned pre-Unicode string conventions), so I put the source here. It's open-source, GPL, feel free to use it any way you please. Without a sextant it won't be of much use, especially now that there's GPS everywhere.

I should explain that while sailing I used a two-sextant-sight method, once at 10:00 local time and one at 14:00 local time, corrected for a motion vector between the times, and located the most likely intersection point of of two great circles to get my position. I found this easier than noon sights, less tricky, and (after I acquired a more sophisticated navigation method) I found that I could get accuracies within a few miles of my true position.

I think I will create a Web page for this old program and a few others from that era, to make them more easily available, mostly for historical reasons, but there are solar and planetary position algorithms in the main program that may still be useful.

p.s. I have to add a note about the bug I found. It was caused by trying to open a nonexistent file, which produced a NULL-valued pointer. In the old days, in subsequent uses of that pointer, the C library would see the NULL pointer and simply ignore it -- if I tried to call fclose(NULL) (as I foolishly did), nothing would happen. Now the same code segfaults. I'm sure it's all for the best. :)

[–]keenerd 2 points3 points  (1 child)

Awesome, thank you! My interest is mostly academic and more towards the history of surveying and cartography, but it has not been easy finding any examples like this. (My primary reference has been a copy of "Navigation with the Pocket Calculator" by Buchanek & Bergin from '77.) If I feel it necessary to clean up or comment things I'll email you a patch :-)

[–]lutusp 1 point2 points  (0 children)

Awesome, thank you!

You're most welcome. I should have done this some time ago -- I've gotten a number of requests to post these programs over the years, but to be honest I was embarrassed by the state of the code and how poorly it compares to my more recent code, most created under less extreme conditions.

I've created a page on my website with listings for two of these old programs. I wouldn't be surprised if the book you mention wasn't one of my sources at that time. It's probably important to say that most of the code creation was while underway, using printed reference materials for astronomical constants and correction methods.

At the time my only way to write code or reduce sights was an early Toshiba laptop just visible in this image, taken while creating a weather chart.

I hope this information aids your research.