GPS.LSP

March 30, 2008 - Leave a Response

Well, I think it is about time for my second post here.  I really enjoy the outdoors, and have been doing quite a bit of hiking with a GPS I got a couple years ago.  I have been using some software with detailed topo maps for plotting courses and uploading them to the GPS for most of the hikes, but have found some limitations with this.  First of all, while the maps are highly detailed in respect to terrain, they are in some cases decades old and the backroads have changed considerably since they were printed.  This can make road navigation difficult and at best a guessing game.

There are all kinds of other maps available, some of which show excellent backroad detail, but they are not available in electronic format compatible with any GPS software that I have been able to find yet.  This is where GPS.lsp comes in.

In order to make the most out of these maps with a GPS, I wrote a routine that when a electronic map (whether scanned or other) is imported into AutoCAD and scaled and stretched accordingly to calibrate it, you can draw a polyline on the route you wish to take and run GPS.lsp to export that route as either a CSV or GPX type file that is compatible with may GPS interface pieces of software.

First a suitable map must be found, and scanned to an image file.  You may then insert this into AutoCAD as a raster image.  It is important that the map has a lat/long grid so that you can use it as a reference when calibrating the map.  You have to scale and stretch the map so that your crosshair position corresponds to the exact lat/long shown on the map.  Sometimes this may also require a rotation so that lines of longitude run straight up and down.  You can see a typical map here I am using as an example.   Notice in the bottom left the cursor position is showing as a lat/long value.

screenshot1.jpg  screenshot2.jpg

Now you can see in the second screenshot that I have drawn a green polyline over a section of the Island Highway to use as an example of a route.  It is simply a case now of running GPS.lsp, specifiying a file type and location, and clicking the polyline.  The file it askes you to save is a text file that comprises a list of points that make up your polyline route.  The GPX or CSV file will be saved in the same directory you specify for the text file.

The last screenshot here is the GPX output loaded into Google Earth.

screenshot3.jpg

AIRFOIL.LSP

March 18, 2008 - Leave a Response

I am still new to the autoLISP language, but have been teaching myself quite a bit, and have had help from fellow co-workers who have been using autoLISP for years.  AIRFOIL.LSP is the first program with any significance to the general public that I have written.  It will plot the outline of an airfoil with the airfoil’s name, from a .DAT type file which are readily available on-line.  There may be some variations in the format, I am not sure.  I have ~2400 of these files, and they all are tab delimited, with the airfoil description on the first line, and with x-y points that start at 1,0 and end at 1,0.  This is the format I have assumed in my program.

There sometimes arises a need for a very torsionally rigid wing.  This can be accomplished by laying out the ribs so that they are not perpendicular to the main spar, and form a truss like structure.  There are many variations on this theme, but they all share angled ribs.  When a rib is angled in relation to the airflow, you do not necessarily get the airfoil profile your are expecting parallel to the direction of the airflow as you can imagine.  I have never been able to find a program capable of modifying an airfoil profile such that when a rib is cut and placed at an angle, the actual section through the chord of the wing will be the desired profile.  AIRFOIL.LSP will correct for this, if you specify the acute angle between the spar and the rib, and it will stretch the airfoil in the x direction accordingly.  If you were then to cut a section through your wing, you will end up with the profile you intended.

I know for a fact that this program is compatible with AUTOCAD 2006 and 2007 and very likely more recent versions.  I also know it is NOT compatible with AUTOCAD 2000, as the pedit command has changed since then.  Those are the only platforms I have at my disposal to test it on.  If you are running something different and AIRFOIL.LSP is not working, please don’t hesitate to let me know the nature of the problem, and I can attempt to modify it to work for you.

Because of limitations in the file type that wordpress lets you upload, I have had to change the file extension to .JPG.  To use this program, just download it and change the extension back to .LSP   You can download it from here:  AIRFOIL.LSP  I have also uploaded an example airfoil .DAT file here: BE6407E.DAT  Same problem with file extensions applies here, just change it to .DAT

Example

This is an example of what you can expect.  These are both the same profile and chord, but the lower profile has been angled at 60 deg. to direction of airflow.

Follow

Get every new post delivered to your Inbox.