A blog mainly about astronomy, astrophotography, computers, computer programming, and amateur radio. Any general questions or comments regarding the contents of this blog may be directed to me at jon@wt5l.com. For specific questions related to a particular post, please leave a comment.
Thursday, October 6, 2011
Comet Garradd - Sept. 29, 2011
Monday, September 5, 2011
Sending Text Messages with Python
The key to sending text messages is contained in this List of SMS Gateways that contains e-mail addresses for each of the major cell phone carriers. Basically, all you need to do is send an e-mail message to the domain that applies to your cell phone carrier with your phone's ten-digit number as the address. As the Wikipedia page explains, you can only send simple text messages to the SMS gateway. The following Python code listing shows how to send the e-mail message programmatically. Obviously, you will need to know the outgoing e-mail domain, your user name and password for accessing your personal e-mail service provider to make the code work.
The listing shown below is coded for my particular service carrier (AT&T Wireless). To personalize the code for your particular setup, just modify the five constants defined prior to the class declaration. The source file corresponding to this listing can be downloaded from cTexting.zip.
from smtplib import SMTP
import datetime
import socket
import traceback
SMTP_DOMAIN = r'<OUTGOING EMAIL DOMAIN>'
SMTP_USER = r'<USER NAME>'
SMTP_PASS = r'<PASSWORD>'
FROM_ADDR = r'AstroPhoto Update <anyone@gmail.com>'
TO_ADDR = r'<TEN-DIGIT CELL NUMBER>@txt.att.net'
socket.setdefaulttimeout(10)
##--------------------------------------------------------------------------------
## Class: cTextMsg
##------------------------------------------------------------------------------
class cTextMsg:
__objectName = ''
def __init__(self):
pass
def set_objectName(self, value):
self.__objectName = value
return
def get_objectName(self):
return self.__objectName
def sendSMSMessage(self,message):
smtp = SMTP()
smtp.set_debuglevel(0)
subject = self.get_objectName()
date = datetime.datetime.now().strftime('%d/%m/%Y %H:%M')
msg = 'From: %s\nTo: %s\nSubject: %s\nDate: %s\n\n%s' % \
(FROM_ADDR,TO_ADDR,subject,date,message)
try:
smtp.connect(SMTP_DOMAIN,0)
smtp.login(SMTP_USER,SMTP_PASS)
smtp.sendmail(FROM_ADDR,TO_ADDR,msg)
print "SMS Message Sent Successfully"
smtp.quit()
except socket.timeout:
print "ERROR: Timeout sending SMS Message"
except:
print "ERROR: Unable to send SMS Message"
print '!'*60
print traceback.format_exc()
##
## END OF 'cTextMsg' Class
##
if __name__ == '__main__':
email_msg = cTextMsg()
email_msg.set_objectName('M31')
print 'Object Name: ' + email_msg.get_objectName()
email_msg.sendSMSMessage('This is a sample message from an imaging session.')
Saturday, September 3, 2011
Vertical Antenna Tilt Mount
Due to the obvious deterioration of the antenna from lack of maintenance and from this area's highly corrosive seaside location, I've decided to remove the antenna from its second floor mount and to re-mount it in a more convenient location in my back yard. A main requirement of the this new mount was to provide a means to easily raise and lower the antenna when needed for maintenance and when adverse weather conditions threaten. Below is a photo of the new tilt ground-mount base for the GAP antenna that I've come up with.
The base is made up of two 8-foot long treated 2"x4"s that are sunk 3 feet into the ground. A 42" deep by 18" diameter hole was dug out, filled with 6" of rock then poured with concrete around the 2"x4"s. Three sets of 6" long carriage bolts were installed between the 2"x4"s below ground level to give the concrete something to grab onto other than the treated wood.
Above the ground, the 2"x4" were joined with a 4-foot piece of treated 2"x6". A 6-foot piece of schedule-40 1" galvanized water pipe (1.32" OD) is mounted inside the channel formed by the 2"x4"s and 2"x6" (backside of photo on the left).
The pivot-point for the tilt mechanism is drilled through the galvanized pipe near the top end of the pipe. The pipe swings on a piece of 3/32" stainless steel threaded rod secured with two nuts of the outside of the 2"x4"s. Another set of nuts is installed on either side of the pipe to prevent the pipe from wobbling when it swings in and out of the channel between the 2"x4"s. Refer to the photo to the right.
In the normal, upright position, the galvanized pipe is secured to the base mount using 3 stainless steel 1/4" U-bolts pushed through holes in the 2"x6". Two of the three U-bolts are visible in the photo to the left.
For the antenna to be lowered, the three U-bolts are removed and the antenna will be either walked or winched down to a horizontal position. (I'm considering installation of a hand-winching mechanism.) The top of the 2"x6" will prevent the antenna from swinging lower than a nearly-horizontal position. Refer to the photo of the unloaded swing pipe in the photo to the right.
The antenna will be mounted onto the top portion of the 1" galvanized pipe using a stainless steel mounting plate and U-bolts provided with the GAP antenna. The 5'x5' wire hoop at the base of the antenna will be installed after the antenna is raised into its vertical position. Likewise, the hoop will have to be removed prior to lowering the antenna into its horizontal position. By elevating the base of the antenna about 6' off the ground, the hoop will be positioned approximately 8' off the the ground and well above the heads of anyone walking in the yard.
Tuesday, August 30, 2011
LoTW Application Complete!
My latest Logbook of the World (LoTW) application was submitted on July 19, 2011 and completed on August 29, 2011. In this application, I applied for 93 LoTW QSO credits, 20 paper QSO credits, and one DXCC award (10M). The following table contains my current DXCC status. Complete details regarding all confirmed DXCC entities and additional information regarding the DXCC awards program can be found by clicking here.
| Mixed | 157 Confirmed | 157 Awarded | 0 Pending | (0 LotW, 0 Paper) |
| CW | 127 Confirmed | 127 Awarded | 0 Pending | (0 LotW, 0 Paper) |
| Phone | 131 Confirmed | 131 Awarded | 0 Pending | (0 LotW, 0 Paper) |
| Digital | 78 Confirmed | 78 Awarded | 0 Pending | (0 LotW, 0 Paper) |
| 80m | 20 Confirmed | 20 Awarded | 0 Pending | (0 LotW, 0 Paper) |
| 40m | 92 Confirmed | 92 Awarded | 0 Pending | (0 LotW, 0 Paper) |
| 30m | 5 Confirmed | 5 Awarded | 0 Pending | (0 LotW, 0 Paper) |
| 20m | 117 Confirmed | 117 Awarded | 0 Pending | (0 LotW, 0 Paper) |
| 17m | 3 Confirmed | 3 Awarded | 0 Pending | (0 LotW, 0 Paper) |
| 15m | 129 Confirmed | 129 Awarded | 0 Pending | (0 LotW, 0 Paper) |
| 12m | 6 Confirmed | 6 Awarded | 0 Pending | (0 LotW, 0 Paper) |
| 10m | 104 Confirmed | 104 Awarded | 0 Pending | (0 LotW, 0 Paper) |
Friday, August 12, 2011
Starts With A Bang! and Messier 29
One of my favorite science blogs is Starts With A Bang! by Ethan Siegel. Ethan is a theoretical astrophysicist at the Lewis and Clark College in Portland, Oregon. I hadn't checked in on his blog in a few weeks so I spent some time today reading through recent postings and ran across a post from August 2nd entitled "If I had a Telescope this Summer...". Reading through the excellent post on summer objects to view, I was pleasantly surprised to see he used my photo from last fall of the open cluster Messier 29 in Cygnus (see below). Now it really is my favorite blog! (Click here for a larger version of the photo.)