Jump to content

Check out our Community Blogs


Member Since 23 Jul 2011
Offline Last Active Aug 04 2011 05:03 PM

Topics I've Started

What would be the best way to make this program

04 August 2011 - 03:36 PM

Currently, I have a function that takes a flight plan report, and turns it into a list, such that each line of the report is an item in the list. Now, each report contains flight "legs". In most reports there are 20 or so legs. What I need to do is create a function that sorts each "leg" into its own list. Each leg begins with a header that says the leg number (for example, "Leg 1", "Leg 14", etc.), and each leg has 10 or 20 lines of data associated with it. I need to sort each leg into its own list, using the list containing the entire report.

The difficult part, I've found, is making the program create lists ONLY for the number of legs in the report. How would I automate this?


Python help please!?

26 July 2011 - 07:17 AM

I have a huge project coming up for python, and I basically have to crunch a bunch of numbers and then output them into an organized text file. The text file will contain several columns, such as time, latitude/longitude, and elevation (its for a plane), and the problem is I don't know how to come up with a python program that does this, or even one that outputs a text file...


Converting IDL Syntax to Python?

23 July 2011 - 08:30 PM

I have some IDL code that I have been converting into Python, because the rest of my program is python. Anyways, I've been having issues with a couple lines of code:

neg = where(ra LT 0.0d0, Nneg)
if Nneg GT 0 then ra[neg] = ra[neg] + 2.0d*!DPI

Okay so this code is from a program that outputs the position of the sun in celestial coordinates. "ra" is "right ascension" (basically longitude for space), and in the context of the program, it is a variable defined previously.

Also, the !DPI, i'm assuming, is pi.

Anyways, I was having trouble with the "LT" and "GT", but I'm pretty sure those mean Less than and greater than. My issue is with the "Nneg". I'ts not a variable, so I have no idea what it does. Also, I have no idea how to interpret these lines. I don't know what it is trying to accomplish basically.

If you can help in any way that'd be great. thanks

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download