The attached files are a first pass at generating A3 sized PDF files from raw CGM files. You will need the PIL modules for this to work. Please get the PIL libraries from sourceforge.net. The files you need are here:
The source code has three files:
- cgm2pdf.py- a CGM parser using Python 2.6
- cgmdesc.py- a CGM code description file.
- pPDFout.py – uses PIL and parsed codes from the CGM parser to write to pdfgen
The program simply scales the input to fit the A3 printer page size, which works with my printer.
The source code is “work in progress”. I have not documented it, but I will, soon. I have to figure out how to print embedded bitmaps to the PDF output.
Also, I have *no* idea how to do multiple pages. Eventually, I will figure it out.
If nothing else, you can use cgm parser for your own nefarious needs.
I used the parser to convert CGM to SVG, but there weren’t any good standalone SVG viewers, so I chose the PDF route. Yes, I know about Inkscape, but I needed something that worked on Linux, etc. Plus, PDF viewers are easier to work with as far as my clients are concerned.
You have to look for the GPGGA string in the lines of text coming in from the GPS device. Each string ends in cr/lf.
The format for the $GPGGA message string is:
hhmmss.ss in UTC (coordinated universal time zone).
ddmm.mmmm,N latitude of the GPS position fix
dddmm.mmmm,W longitude of the GPS position fix
q the quality of the GPS fix (1 = fix, but no differential correction)
ss number of satellites being used
y.y horizontal dillution of precision
a.a,M GPS antenna altitude in meters
g.g,M geoidal separation in meters
t.t age of the deferrential correction data
iii deferential station’s ID
* checksum for the sentence
Use the split() or re module to get what you need.
items = incomingString.split(‘,’)
lattiitude = items
if items == ‘N’: print ” I am in the northern hemisphere “
Very interesting statement without reading anything. She broke her glasses and could not read the statement. 😉
Verbatim from www.whatreallyhappened.com
Over 90% of America did not want to passage of HR3997. The US Congress was held at “Executive Gun Point” and told: “you either pass this bill or we will declare martial law.”
The most painful part of HR3997 is the shift in the final bill. What was the shift? Unbeknownst to the American people, however, is that since September 20th 2008, the $700 billion (TARP) bailout bill signed into law by President Bush Jr., was expanded from its original 3 pages to a 451 page virtual novel of new laws virtually enslaving them to the foreign holders of their debt.
In addition, there are reports circulating in the Kremlin stating that the first deployment of Chinas elite People’s Armed Police (PAP) under an agreement signed between the United States and China, and US Homeowners Soon To Be Evicted By Chinese Police Under New Law HR3997. (Is this option of the bill in practice?)
Even more disturbing, these reports continue, are that these new laws not only give Chinese and European banks control over the mortgage debt of the American people, they now include their credit card balances, and which virtually the entire US populace have indebtedness to.
To how utterly chilling this new US law for the American people, titled the Emergency Economic Stabilization Act of 2008, Russian legal experts point out in these reports that:
Section 101 (a)(1) establishes what is termed the Troubled Asset Relief Program (TARP) to which substantial portions of what the American people currently owe to their banks and financial institutions is to be turned over the US Government for redistribution to foreign banks.
Section 101(c)(3) Designates for the first time in American history these foreign banks as financial agents of Federal Government with full law enforcement authority over the citizens in the US.
Section 3 (b) allows the US Secretary of the Treasury to put any kind of debt, including credit card, home loans, personal loans, automobile loans, etc., into the TARP programme.
Section 112 allows the US Secretary of the Treasury to astoundingly extend financing to foreign banks to purchase the debt of the American people.
Section 112 (1)(a) allows the US Government to hold stocks in companies for the first time in their history and which completely destroys the capitalist economy of their Nation.
Section 119 (2)(a) gives the US Secretary of the Treasury dictatorial powers not reviewable by courts making this position the most powerful one in America.
Section 122 increases the US public debt to the incredible amount of $11,315,000,000,000 (Trillion) – Currenty $13.855 Trillion.
Section 204 puts the United States under emergency economic rule and states, “all provisions of this Act are designated as an emergency requirement and necessary to meet emergency needs.