Beefy Boxes and Bandwidth Generously Provided by pair Networks Russ
laziness, impatience, and hubris
 
PerlMonks  

Perl in space?

by Dr. Zowie (Sexton)
on Aug 26, 2010 at 02:52 UTC ( #857358=perlquestion: print w/ replies, xml ) Need Help??
Dr. Zowie has asked for the wisdom of the Perl Monks concerning the following question:

This may or may not be an appropriate question for the Monks... Has Perl been used before in a mission critical spaceflight application? I am happy to report the successful flight of NASA sounding rocket 36.265, the Rapid Aquisition Imaging Spectrograph Experiment, which used Perl daemons talking over an on-bird LAN to synchronize and control all major instrument functions during the 5.5 minute active phase of the suborbital flight. This may or may not actually be newsworthy to the Perl community, depending on whether anyone has done this sort of thing before. I haven't seen any references online to spaceflight applications of Perl, though I have spent some time googling poking around. Do any of you Monks know of previous use of Perl in space (for nontrivial things -- I assume it has been used in ISS, for example, in astronauts' personal laptops...)?

Comment on Perl in space?
Re: Perl in space?
by Anonymous Monk on Aug 26, 2010 at 03:53 UTC
Re: Perl in space?
by BrowserUk (Pope) on Aug 26, 2010 at 08:37 UTC

    Any chance we could get a flavour of the code? A desensitised sample perhaps.

    If not did it use strict and warnings? Did any other CPAN modules make the grade? Is it OO or procedural, Moose or Modern?

    Which version? Was it a standard interpreter or embedded or otherwise heaviliy customised?

    How many lines of code? What testing regime do you use? Basically anything that gives us a feel for the way perl was used.


    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.
      We used strict and warnings. We did module-level testing and ran several hours of simulated missions in the laboratory before delivery, and during integration at the missile range the software ran through several simulated flights while fully integrated with the host flight stack.

      It was a few hundred lines of not very dense Perl, mostly doing IPC and spawning compiled commands (that did the heavy lifting for individual control functions) under Gentoo Linux. We used it to control three computers that were connected by an on-bird LAN.

Re: Perl in space?
by dHarry (Monsignor) on Aug 26, 2010 at 10:10 UTC

    No!

    First of all let me clarify I cannot speak for NASA, I've been involved in several European mission and one Indian mission.

    You have to draw a line between Ground Segment and Space Segment. This is a strict separation. In the Ground Segment you can basically use anything because it's not critical and processing power or available memory is hardly ever an issue. There is typically software to do operations, science planning, data processing etc. Perl can be used anywhere in the Ground Segment. So to answer your question, yes, but only in the Ground Segment, e.g. in Galileo, Venus Express, Mars Express Smart-1, Rosetta and Chandrayaan-1 missions. Some examples were I used Perl:

    • processing RINEX date from Galileo receivers
    • processing telemetry from payloads and satellites, e.g. health check
    • preparing datasets for archiving
    • integration of SW and scripts (Perl is exceptionally good for glueing things together!)

    The Space segment is treated completely different. We use the ECSS standards, onboard SW would typically be "Category A" meaning it could have "catastrophic consequences" like losing the mission. Perl is not used for that. This however is not the major reason for not using Perl. All hardware used in space has to be "space certified", this also implies constraints for the SW. The available memory and processing power is very limited compared to the HW on earth. So most often (if not always) the SW is typically written in C and/or assembler. A minimal footprint, maximum performance and last but not least reuse are the main drivers. So to get back to your post: no, Perl would not be used * in * space.

    A sounding rocket doesn't "sound" like a critical mission to me:P How do you define critical? You would have to explain what you mean with synchronizing and controlling major instrument functions. I could see myself preparing a command file with Perl to command a payload onboard a spacecraft (e.g. switch-on, heat-up, calibrate, take image/spectrum, cool-down, switch-off). I would send the file to the Mission Operation Centre and they have the last word. For verifying the file, sending it to the spacecraft and handling it onboard Perl would not be used.

    Cheers

    Harry

      NASA has this concept of "Tech Readiness Level", where you basically have to go through various levels of testing before use in flight. As I understand it, TRL applies to all technology (hardware, software, specific materials, etc.) There's then the "Software Safety Guidebook", which doesn't even mention Perl. (yet, they mention VisualBasic). ... but based on the criteria they use (strongly typed, compiled, etc), Perl is going to be a problem.

      There are specific requirements for assessments of systems in the Software Assurance Standard, based on the classification of the systems:

      • Class A : Human Rated Software Systems
      • Class B : Non-Human Space Rated
      • Class C : Mission Support Software
      • Class D : Analysis and Distribution Software
      • Class E : Development Support Software:
      • Class F : General Purpose Computing Software (Multi-Center or Multi-Program/Project)
      • Class G : General Purpose Computing Software (Single Center or Project)
      • Class H : General Purpose Desktop Software

      Class D and below are where you get descriptions qualified with :

      A defect in Class D software may cause rework but has no direct impact on mission objectives or system safety

      I know there's Class D software written in Perl. (I've written some of it.) It's likely that Perl will *never* be in use in Class A or B. I also know of some Class C software out there that's written in Perl (stuff to retrieve and merge various documents for mission planners, and some client/socket software to obtain a secondary science product from ground stations and process them), but I don't know how common it is, as I don't work in mission operations or science operations; I fall under science analysis.

      ...

      Now, this sounding rocket ... I'm guessing it'd be either Class B or C (depending if it was being used for a primary or secondary mission objective), but as it's not a long-lived mission, doesn't need to be a high TRL; this could've just been considered a prototype.

        Thanks for your response, very interesting. Let's compare a little bit. (Taken from a PA document, a possible SW criticality categorization is... (our standards can be tailored in most cases).

        Category Definition --------------------------------------------------------------------- A Software that if not executed, or if not correctly executed, or whose anomalous behaviour can cause or contribute to a system failure resulting in: -> Catastrophic consequences --------------------------------------------------------------------- B Software that if not executed, or if not correctly executed, or whose anomalous behaviour can cause or contribute to a system failure resulting in: -> Critical consequences --------------------------------------------------------------------- C Software that if not executed, or if not correctly executed, or whose anomalous behaviour can cause or contribute to a system failure resulting in: -> Major consequences --------------------------------------------------------------------- D Software that if not executed, or if not correctly executed, or whose anomalous behaviour can cause or contribute to a system failure resulting in: -> Minor or Negligible consequences ---------------------------------------------------------------------

        I have written Perl for category D. I'm sure there is Perl category C around as well.

        Cheers

        Harry

        The software was a Class B application.

        We used about 200-500 lines of not particularly dense Perl (with "use strict" and "use warnings" of course) to handle command inputs (limited to bits set and cleared in a single command word -- this is, after all, a sounding rocket) and change instrument mode. Primary functionality was handled with code written in "C" to acquire data from the onboard cameras, control the mechanisms, and display telemetry over a realtime video feed. Individual functions were accessed from the UNIX command line interface.

        RAISE included three separate computers handling different aspects of the flight.

        The Perl daemons' role was to control instrument mode and process uplink commands, by monitoring running processes and launching new tasks as necessary. Pretty vanilla IPC and task management stuff, except that it was being used in a mission critical context (admittedly, in a sounding rocket rather than a deep space mission). This is important because it might be seen as advancing Perl to NASA's TRL 8 or 9 for certain applications.

        I can remember a data conversion from 64-bit floating point value to 16-bit signed integer... See software bug...

        DISCLAIMER it wasn't me and it wasn't Perl!

      Well, what I meant by "mission critical" is that a bug in the software would result in the loss of primary mission functionality. We used several daemons written in Perl, running onboard the instrument in flight, to control data acquisition and instrument configuration. I'll send more in another reply shortly.
Re: Perl in space?
by zentara (Archbishop) on Aug 26, 2010 at 11:30 UTC
Re: Perl in space?
by ctilmes (Priest) on Aug 26, 2010 at 14:53 UTC
    Doesn't address your specific question, and I'm not aware of any direct spaceflight applications, but I will note that several monks work in space related fields.

    For example, TimToady used to work at JPL.

Re: Perl in space?
by pemungkah (Priest) on Aug 26, 2010 at 18:10 UTC
    I worked on a big (200K+ line) CGI application for EOSDIS back when (around 1997) - wow, it's still in service! Essentially it was a search engine for earth science data. Not mission critical, but pretty critical to the scientists finding the data they needed.

    A lot of fun, that project. If you want a peek at it (it's open to the public), it's called WIST (the Warehouse Inventory Search Tool). The one thing which is pretty cool there is the notification calendar on the front page, which is essentially a wiki that displays data based on the time range you assign to it.

    That was code of my own that I gave to NASA for the project; I probably should see about redoing it with the benefit of another 10 years of experience.

Re: Perl in space?
by merlyn (Sage) on Aug 28, 2010 at 19:34 UTC
    As I found out during my FLOSS Weekly interview with the Mars Rover Drivers, a giant Perl script validates every rover command uplink, to verify that they don't attempt known bad behavior. And as they find new bad things to do, they add it to the script.

    Yes, it's on the ground, but it's absolutely mission critical.

    -- Randal L. Schwartz, Perl hacker

    The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119.

      In think PDL could fit indirectly in this category also

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://857358]
Approved by ikegami
Front-paged by ikegami
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (11)
As of 2014-04-23 10:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (541 votes), past polls