Rode to work last week in a steady, driving rain for the first time. Had purchased some fenders and clipless pedals over the weekend, and this was a good test of the new gear. Everything worked well, with the exception of some slight rubbing from the front fender when turning and going over bumps. Should be easy to get that adjusted properly. Did find out why everyone seems to have add-on mud flaps though. The spray from the front tire comes off at the perfect height to get all over your shoes. Heard that the way to deal with that is to use the plastic from a cut up water bottle. Will have to try that this weekend.
Also deleted my Twitter account last week. This is the 2nd time I've done that, and this time I think it's final. While I think the idea of sending out frequent status messages is neat, it implies a certain level of ego that I'm not willing to maintain. I'm sure someone out there cares about what I have to say, but I'm not sure I want them to read about it on Twitter. So I'm going to try the "blog thing" and will see how that works instead.
Monday, March 2, 2009
Wednesday, February 25, 2009
Raster masking with gdal_rasterize and PostGIS
Clips an elevation file of Poland to the outlines of the country, plus .12 degrees. Gives a nicely buffered edge.
gdal_rasterize -b 1 -i -burn -9999 PG:'host=localhost dbname='unep'' -sql "SELECT ST_buffer(the_geom, .12) from coastlines where name='Poland'" Poland_elev.tif
gdal_rasterize -b 1 -i -burn -9999 PG:'host=localhost dbname='unep'' -sql "SELECT ST_buffer(the_geom, .12) from coastlines where name='Poland'" Poland_elev.tif
Wednesday, February 18, 2009
Tuesday, February 17, 2009
Mapserver read NetCDF
OUTPUTFORMAT
NAME GEOTIFF_FLOAT
DRIVER "GDAL/GTiff"
MIMETYPE "image/tiff"
IMAGEMODE FLOAT32
EXTENSION "tif"
END
LAYER
NAME "mynetcdf"
STATUS OFF
TYPE RASTER
DUMP TRUE
DATA "mydata.nc"
METADATA
wcs_label "Test netCDF Server"
ows_extent '-0.5625 -89.69761276245117 359.4375 89.69761276245117'
wcs_resolution '1.125 -1.1212201595306397'
ows_srs "EPSG:4326"
wcs_formats "GEOTIFF_FLOAT"
wcs_nativeformat "netCDF"
wcs_bandcount "27"
wcs_rangeset_axes "bands"
wcs_rangeset_label "Atmospheric Levels"
wcs_rangeset_name "bands"
END
END
See also: http://mapserver.org/ogc/wcs_format.html#netcdf
NAME GEOTIFF_FLOAT
DRIVER "GDAL/GTiff"
MIMETYPE "image/tiff"
IMAGEMODE FLOAT32
EXTENSION "tif"
END
LAYER
NAME "mynetcdf"
STATUS OFF
TYPE RASTER
DUMP TRUE
DATA "mydata.nc"
METADATA
wcs_label "Test netCDF Server"
ows_extent '-0.5625 -89.69761276245117 359.4375 89.69761276245117'
wcs_resolution '1.125 -1.1212201595306397'
ows_srs "EPSG:4326"
wcs_formats "GEOTIFF_FLOAT"
wcs_nativeformat "netCDF"
wcs_bandcount "27"
wcs_rangeset_axes "bands"
wcs_rangeset_label "Atmospheric Levels"
wcs_rangeset_name "bands"
END
END
See also: http://mapserver.org/ogc/wcs_format.html#netcdf
Sunday, December 21, 2008
Description of CRRCSIM
A Guided Tour of CRRCsim by Mark Drela 5 Dec 00
------------------------
The CRRCsim Project was kicked off when Jan Kansky announced
on the CRRC Email List that he was working on porting a freeware
flight simulator out of NASA Langley to run on his home computer.
He was looking for a means to generate the aero data for
any arbitrary airplane to plug into the simulator.
Cooincidentally, I had the means to generate such aero data
and was looking for a simulator to plug it into... A flurry
of email code exchanges between me and Jan followed.
The initial CRRCsim version was announced by Jan shortly thereafter.
During the quick development, I discovered that
the "guts" of the Langley simulator code which
computed the aerodynamic forces had serious limitations.
It assumed that the aircraft didn't deviate
very much from a single cruise speed, and performed only
benign maneuvers. If these restrictions were violated,
the computed forces would be seriously in error,
and unrealistic flight behavior might result.
I completely replaced the Langley code with new code
which does not have such restrictions. Even relatively
violent maneuvers can now be simulated with reasonable
accuracy.
The writeup below gives a brief overview of flight simulator
basics. The features specific to CRRCsim are
then described at the end.
Simulators 101
--------------
All flight simulators use the same basic approach
to keep track of the aircraft. At any instant
in time, the simulated aircraft has some location
and some orientation. These are defined by six
numbers: the aircraft's x,y,z coordinates (3 numbers),
and by its heading, elevation, and roll angles (3 more numbers).
These six quantities are used by the graphics routines
of the simulator to display the aircraft at that instant.
As the quantities change in time at some fast rate,
the airplane's position and orientation changes,
so that it appears to fly -- just like in a movie.
The main problem for the simulator program is to rapidly
calculate the correct sequence of the six quantities,
according to the airplane's properties and the pilot's
control inputs. The more accurate this calculation is,
the more realistic the plane's flight behavior appears.
Updating all six quantities requires calculation of the forces
and moments (torques) on the aircraft. Some, like gravity forces
or gyroscopic moments, are easy to compute. They only require
knowledge of the mass and inertias of the aircraft, which are
specified by the user. Other forces, like thrust, are set
directly by the pilot himself. The remaining forces and moments
are aerodynamic in origin, and are the most difficult to compute.
CRRCsim simulator
-----------------
CRRCsim computes aerodynamic forces and moments from data
generated by a "Vortex Lattice" program AVL, which in turn
takes its input from a geometric definition of the aircraft.
The geometric definition consists of chords, dihedral, twists,
airfoils, control surfaces, etc. which are specified by the user.
AVL is in effect a numerical wind tunnel which simulates
the airflow over the specified configuration and computes
the force and moment data. For example, it computes the
CL versus angle-of-attack curve which might otherwise be
measured in a wind tunnel. AVL actually computes about
20 such curves --- 3 forces and 3 moments, versus 2 flow angles
(angle-of-attack and sideslip angle), and 3 rotation rates
(roll, pitch, yaw rates), in appropriate combinations.
The AVL simulation accounts for most of the important aerodynamic
phenomena which might be present, e.g. the wing downwash
effects on the stab, roll moment due to sideslip angle,
adverse yaw moment of ailerons, etc.
Other customizable simulators on the market must use more crude
estimates for these effects, since their simple geometry input
does not allow specification of the necessary geometry details
needed for high-fidelity calculations.
Although AVL's aerodynamic force and moment results are
valid for any airspeed, its accuracy starts to degrade
if the angle of attack or sideslip angles exceed about
+/-20 degrees from straight ahead. This is due to
flow separation, stall, etc. which AVL does not model.
Flow separation occurs quite infrequently even during
violent flight maneuvers, but it's essential that the
computed forces remain at least reasonable for any flow angle.
In a tail slide, for example, the angle of atack is about 180 degrees!
If the resulting computed moments completely unreasonable, then
the tailslide recovery will not be realistic.
For maximum accuracy, CRRCsim itself estimates separation-caused
drag forces and moments, and adds them to what AVL's
output predicts. The overall result is very realistic
behavior of the aircraft in any flight situation.
CRRCSIM working with RC Tx in Ubuntu
Finally got this to work. The key is to right-click on the volume control and crank up the "Capture MUX" setting. Also make sure that the "input source" is set to be the "Front Mic". Once that is done, I actually seem to get pretty smooth control action.
Subscribe to:
Posts (Atom)
