Image::Flight::Suborbital - draw diagram of suborbital rocket flight profile
$ifs = Image::Flight::Suborbital->new(
"height" => 800,
"width" => 250,
"title_text" => "120 km suborbital space flight",
"altitude_value" => 120,
"altitude_units" => "km",
# draw a PNG image and print it on the standard output
Image::Flight::Suborbital uses Perl's GD graphics library to draw a diagram of a suborbital space flight.
The following methods are available.
$obj = Image::Flight::Suborbital->new( attribute => value, ... )
This instantiates an Image::Flight::Suborbital object and initializes its parameters. The following parameters are recognized. Unrecognized parameters are silently ignored - but should be avoided to prevent conflicts with future versions of the module.
Set the height of the image.
The default is 800.
Set the width of the image.
The default is 250.
Set the value of the altitude in either miles, kilometers or feet as specified by the altitude_units attribute.
The default is 120.
The units used by the altitude_value parameter.
This may only be one of the strings "km", "mi", "miles", "ft" or "feet". The default is "km".
Set the image background color.
This may be any color string recognized by the Graphics::ColorNames module. The default is "white".
If present, this turns the background to a grandient of colors. The gradient starts at the bottom of the image with the bg_color attribute and blending in 100 steps to the bg_top_gradient_color at the top of the image. The colors make the steepest transition toward the bottom of the image in order to look like the transition from low-altitude sky to space.
This may be any color string recognized by the Graphics::ColorNames module. If omitted, the bg_color is used as a solid background. The default is not to use a gradient.
Set the color of the flight path arc.
This may be any color string recognized by the Graphics::ColorNames module. The default is "black".
Set the color of the altitude labels.
This is currently unused but reserved for a future version.
This method outputs the PNG image of the suborbital rocket flight to the standard output.
The following example will output a PNG image of the CSXT Space Shot 2004 which reached an apogee of 72 miles (116 km) on May 17, 2004.
my $ifs = Image::Flight::Suborbital->new(
"bg_color" => "skyblue",
"bg_top_gradient_color" => black,
"flight_path_color" => "yellow",
"alt_label_color" => "white",
"altitude_value" => 116,
"altitude_units" => "km" );
Image::Flight::Suborbital was written by Ian Kluft for Masten Space Systems ( http://www.masten-space.com/ ) for use in documentation of suborbital flights. Thought the original idea was inspired for use by the Stratofox Aerospace Tracking Team ( http://www.stratofox.org/ ), in order to draw images for the web site about space launches which Stratofox has participated in.
The module was "inspired" by an adjustment of the estimate of the altitude of the CSXT Space Shot 2004, the first amateur space launch. ( http://www.civilianspace.com/ and http://www.stratofox.org/pics/csxt-spaceshot-2004/ ) Upon inspection of the data from the flight computers, CSXT made an initial altitude estimate of 77 miles (about 123 km or 400,000ft). After further study, the official altitude was adjusted to a more conservative 72 miles (about 113km or 380,000ft). But that was after Stratofox had drawn diagrams manually. It had been a lot of work to draw the diagram and the scales in miles and kilometers. An automated method was preferred before a need came up to draw more. This module was written to solve that problem.
The amateur space launch which made this module necessary took place at the Black Rock Desert in Nevada. See Ian Kluft's Black Rock Page ( http://ian.kluft.com/blackrock/ ) for more information about rocketry at the Black Rock Desert.
More information about rocketry can be found at the Tripoli Rocketry Association ( http://www.tripoli.org/ ) or the National Association of Rocketry ( http://www.nar.org/ ).
Ian Kluft, <email@example.com>, http://ian.kluft.com/
Copyright (C) 2006 by Ian Kluft
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.6 or, at your option, any later version of Perl 5 you may have available.
To install Image::Flight::Suborbital, copy and paste the appropriate command in to your terminal.
perl -MCPAN -e shell
For more information on module installation, please visit the detailed CPAN module installation guide.