MySQL and AI for Orbiter and Celestia

Get in touch with the author clicking here
Pablo Edronkin

Suggested Readings

Towards Interstellar Exploration

Related Products And Services

Cosmic Cat - A cosmic, free game

Green Energy

Free games

Sports info and betting

Independent funding for a free lifestyle

Space has been dubbed sometimes as 'the last frontier,' but it is a rather large one, unfortunately - or not. It is indeed hard to reach outer space but it isn't so to explore it right from home.

Since the advent of personal computers some things have become easier; among these we should count the use of simulators and image processing systems. This, added to the huge number of research devices located now in orbit around Earth as well as other planets, moons and even deep space, make it possible for anyone with a modest PC to see what lies beyond our atmosphere without much hassle, and even to create one's own inventions and make new discoveries. Astronomy is a science where there is still some room for the amateur observer or researcher. Exploring space is not just a matter of curiosity but necessity: We cannot remain tied to our home planet forever and even only if for survival reasons, we will have to go for the stars one day. But first things first, before attempting to reach warp speed we actually have to get to know where we will be going to. Thus, we need first to learn a little bit about outer space.

And one of the best ways to start learning about this exciting activity is by using some software, so here we recommend you a couple of programs that aside from being of excellent quality, are completely free and can be easily downloaded from the Web. If you are a newcomer, we recommend that you get both of them:



Reading Celestia, at last

According to my latest tests, the program that I have been developing can read all Celestia's files satisfactorily.

This makes it possible to generate Orbiter scenarios by using indirectly Celestia's data contained in .dat, .dsc, .stc and .ssc files. As a by product of the translation process, this program creates .stc files that contain the information of .dat files, so it could eventually be useful for some Celestia users as well. In order to avoid confusion, I programmed the thin in such a way as to call these files .stg instead of .stc.

I should try to improve the code as to make the program a little bit faster; in its present incarnation it takes a few hours to process all that data, put it in a "normal form" - meaning in database jargon that it needs to be rearranged following certain database design parameters in order to store it efficiently - and populate the database. However, it will never be a fast process because there are lots and lots of records to take into account: Currently, the catalogue that I came up with holds the information of about 109.000 different solar systems, meaning that a similar number of scenarios for Orbiter could be built.

I will probably release the software so that other may download and use it when it becomes a little bit more mature. One thing is developing something that you will alone use, and quite another to create something to be released to the public. In this case, the fact that the program requires a functional installation of MySQL 5.1 (or newer) and some degree of dexterity handling databases could represent a problem for some people. Hopefully, as the code evolves, the necessity to interact with an SQL database will become more doable for all sorts of users. My past experience is that MySQL or any other SQL database management system (DMBS) is overkill in many cases and represents too much of a complication for some users. However, the volume of the information that should be handled to manipulate using a cockpit simulator what is virtually a new astronomical catalogue surpasses by far the capabilities of lesser and easier DBMS products such as Access or dBASE.

As I mentioned earlier, this development is a necessity for the overall project because I don't intend to do all the work implied in building a cockpit just to stay orbiting around the planets of our solar system. The construction of hardware components depends to a good deal on this requirement, so it makes sense - in my opinion - to stay developing both the hardware and software at the same time because one thing might change the other. I have also programmed a couple of MFDs that already sport MySQL access capability.

And speaking about hardware, I spent the week testing the ventilation system; specifically, the fans that have the task of keeping the container where the emulation cards and the main 12V transformer are installed.

From Simulation To Reality: Let's Hurry A Little Bit More

It is a well known fact that experimental aviation and the simulation hobby have made concrete and significant contributions to aeronautical science; it would be terrific that something similar really happens in the case of space navigation, not only for purely altruistic reasons, but as a future safeguard for our world.

This week three event took place, and all of them made me thing a little bit about this space business of ours: The 40th anniversary of the Apollo 11 moon landing, the unexpected hit of some sort of large object in Jupiter, detected just by chance by an Australian amateur astronomer, and a powerful cold front that invaded the skies over Argentina from the far south up to the tropic.

It was the cold weather that got me thinking, because I found it very difficult to work on the sim this week, being it in my garage where there is no heating. Temperatures got down to -5 consistently during the night and I had to use my sim time to actually restore an old wood stove of the kind used when this house was built, about 140 years ago. Low temperatures are not new in Argentina, but -21 in parts of Buenos Aires were unheard of before this week. We are experiencing extreme weather situations here: Tornadoes were rather rare, now they are not. Hurricanes were thought impossible in the southern hemisphere, but Brazil got one a couple of years ago. New infections and maladies from other areas of the planet now are feasting here and we get colder winters with more snow falling.

What happened in Jupiter should not be overlooked for several reasons: About fifteen years ago another great impact was observed in that planet. Comet Shoemaker-Levy 9 hit the gas giant leaving scars that were the size of Earth. This last impact, discovered by Anthony Wesley and confirmed by NASA was similarly powerful. Two big impacts took place there in a lapse of fifteen years, while we consider with statistic certainty that every seventy million years or so, Earth is hit by meteors capable of causing planetary devastation and mass extinctions. Jupiter indeed absorbs most of the "dust" in space due to its gravitational field, and we should thank this giant vacuum cleaner for its job, but such a chain of events and two, almost immediate impacts capable of wiping out Earth in Jupiter seems like too much. Our planet is highly vulnerable to threats from outer space; we are not talking about an UFO attack, but natural disasters that we now are aware of, and should treat them with as much attention and respects as we give to volcanic eruptions, tsunamis and forest fires.

The memories of Apollo 11 and the current situation regarding space exploration that, save perhaps for the construction of the ISS, are stuck with no long-range, long-reaching ideas is appalling and should get us thinking. We need to master space navigation techniques in order to make it feasible to reach with human crews the planets of our solar system and in the future the stars, because our planet is sick, we cannot detect every threat from space, and because a second home for survival of our species and every other in our planet will hurt no one in the long run.

If we were unwise or ignorant enough to have come to this point in which global warming seems almost inevitable and that will be our legacy for future generations, let's just do something to help them solve the problems that we caused by advancing space science and technology, if not by repentance, perhaps with the hope of not being judged more harshly than necessary, like people accused of some crime in front of a court that decide to help justice expecting leniency. Let's do a better and bigger effort to promote and advance space-related sciences and technologies, even without help from governments, and even in chilling garages.

BRL-CAD: From Weaponry To Your Home Cockpit

BRL-CAD is a computer aided design system developed in some U.S. Army lab but today is distributed as free software and could be indeed a very handy tool for sim cockpit design.

This system was deployed in its earlies incarnation back in 1979; it was then a classified software application but today, in 2009 it has become open source software that is freely distributable (nevertheless, see the applicable licenses.)

This is excellent for serious hobby applications such as simpit design and construction because commercial CAD systems are not exactly cheap and the expense is not justifiable just for a hobby in most cases. Perhaps if you already own a license of such a software you could use it to design you cockpit, but most people would miss the opportunity to use such advanced tools, or not, because despite that BRL-CAD has some limitations in terms of its graphical interface (it was designed in another era, remember,) being open source and multi platform turns it into a pretty viable choice for most hobbists.

So, I downloaded a copy and spent a couple of weeks learning to use it; it comes with very good tutorials and it is not hard to grasp the ideas behind its paradigm. A more modern GUI would be better to handle some tasks, but as it is presented today, both in a semi-GUI and a console way at the same time it gives you the choice of using both kinds of presentation metaphor, and if you are good with forms and shapes, very much to your advantage, especially considering that this software has been programmed in C and being open source, allows you to make your own modifications.

As of this day I am designing the cockpit sing this CAD software. My goal is to have a well-developed graphical and conceptual model of a robust, yet inexpensive, structure before starting to cut the first wood or metal pieces.


Artificial Intelligence For Your Spaceship Using Perceptrons

A perceptron is essentially the logical concept of a neuron, the kind of cell that forms part of our nervous system; while this concept might seem far-fetched, it is really possible to use perceptrons in simulation environments to design intelligent vehicles.

Flying thorough space is a rather complicated endeavour, even if your space is simulated in a computer. Such a thing demands a lot of work and in the event of a mistake, rapid action to correct it. Those corrective courses require also precise calculations and everything done in a rush and with a lot, really a lot of precision. That's not exactly what you can do by flying by the seat of your pants, neither by applying the relatively tranquil pace of decision-making applied under normal circumstances when you have to ponder your next move or orbital alignment.

In order to avoid such dangerous situations, several developers have come with different sorts of add-ons, algorithms and controls designed to assist any sort of pilot to fly efficiently and safely. In the case of the Orbiter flight simulator, those addons, written in C++, usually take the form of an MFD, the generic class of instruments portrayed in any ship's panel or simulation screen.

Many of these MFD gadgets are good, some are complicated to learn, while others could evolve a little bit more. But in all cases they are so far limited to doing what they were originally designed to do. The use of perceptron networks, more commonly known as neural networks, could change all that.

The topic of perceptrons is not new; in the realm of AI or Artificial Intelligence, perceptrons have been known for quite a while, and there are several C and C++ libraries (there are, indeed, in other programming languages too) around for free use, plus some complete SDK offers, also free or for a fee.

It would be very interesting to develop addons for Orbiter using perceptron technology, but since all this is probably totally new to yo, I would like to recommend you this tutorial to start with. It is relatively short and does not cover all aspects of this concept, but it will probably be a good way to start the lineage of development of a ship's computer that will eventually remind you of Eddie, the one that made Arthur Dent mad.

What About Zero Gravity?

From a strictly aeronautical position, an authentic flight simulator is a device that reproduces with some reasonable degree of faithfulness the physical sensations that affect the pilot during flight; if the machine that reproduces flight conditions cannot do that then, what you have is not a flight simulator but a flight trainer or flight training device.

In other words, if it doesn't move it ain't a simulator but a trainer. But before demoting our home cockpit we have to take into account that representing zero gravity or microgravity in our planet with our current levels of technology would require mounting the cockpit inside an aircraft prepared to perform a feat colloquially known as "the vomit curve". This is a maneuvre consisting in a rather pronounced fall in which positive gravity is effectively neutralised for periods of about one minute. Such a condition cannot be currently reproduced in a static environment eve if you provide your home cockpit with all sorts of sophisticated hydraulic actuators.

So, while in this strict sense it might seem that demotion to the level of a plain flight training device or FTD is inevitable, it is philosophically wrong to assume responsibility for what you cannot control, especially if what you intend to build is destined in part to advance knowledge in that very same area. In other words, while medical doctors of ancient Greece might not be considered doctors according to our present day standards, they are doctors in their own time context because they were contributing to the advancement of medicine as we know it to day and use it to qualify doctors' diplomas, right?

Something of the level of a plain FTD is essentially the utmost that you can get regarding space flight simulation if you take the representation of microgravity into account. Then, there are no international conventions ruling or describing space flight simulators. So, in a way similar to that in which we see those Greek doctors, we can say that a space flight home cockpit should be considered not just a trainer but a full-fledged simulator to the possible extent of today's technological limitations.

Sleeping inside the cockpit?

Flying in space takes significantly more time than similar - if analogies are possible - manoeuvres in an atmospheric vehicle; this means that pilots or orbinauts should spend hours during any standard simulation.

Initiating an approach and landing procedure in a light airplane usually takes a few minutes; in a heavy commercial transport perhaps half an hour, but in the case of a spaceship, the crew confronts several hours of work: once the reentry starts on Earth orbit, you will be flying about an hour until you land, but you will spend several hours accommodating the ship into the right orbit and... waiting. If you have any experience with real or simulated spacecraft you already knew that between manoeuvres there is a lot of time to spend doing whatever you have to do, except actually fly the thing.

Indeed, if you are simulating a fly thorough space you can accelerate the sim clock and move quickly thorough time and space until you reach the spot where the next flying procedure begins, or if you are a purist, chronologically speaking, you can just leave your computer for a while and go have supper in the meantime. However, in my subjective experience, I saw that the best results in any simulations session are obtained whenever the pilot does things in real time, spending all the necessary minutes or hours inside the cockpit until the declared goals are achieved. Using the LV-MLF simulator to train actual pilots, I always do things a little bit differently: Instead of just practising specific procedures such as arrivals, departures, landings and emergencies, I prefer to sit pilots inside the cockpit for as long as it takes to perform an actual flight. That is, I make them fly from point A to point B in exactly the same way as they would do in real life; so, if it takes two hours to fly between A and B, I sit with them there and virtually fly, in real time, from A to B in the sim. The procedures practised are those of the actual flight, including things not normally simulated like pre-flight calculations and checks. If any emergency or problem is to be simulated, it takes place during the flight, like in real life. In this manner, everything is mentally integrated within a context, and that works better and makes the sim session more entertaining.

In other words, I think that it is better to strive to provide the pilot with the feeling that he or she is really flying and in order to achieve that it is necessary to reproduce a whole flight instead of bits of it. Of course, there are exceptions at times and specific procedures need to be practised without losing time in other chores, but that's easy in "navigational" simulator. That is, in a sim cockpit designed and built to provide for long-haul, full-flight simulation sessions. In a navigational simulator, if you want to practice specific procedures, you just do that instead of reproducing a whole flight. However, the contrary might not always hold true: A simulator designed just to practice procedures will not provide with the same environmental characteristics even if technically the software could handle long-haul simulations. This has a lot to do with the way in which the actual cockpit is constructed: In a navigational simulator a full cockpit and not just a part of it is simulated. When you enter the cockpit you are enclosed and isolated by it; the time you spend flying such a simulator puts you apart from other people, but cheaper or simpler simulations just provide with a more loose feeling: If you keep looking forward to the instrument panel and the eventual exterior view, you will feel like flying, but if you turn your head to either side, you will see that you are in a room, perhaps with people staring at you. That destroys the effect of any good simulation in an instant. So, a navigational simulator cockpit should be designed in order to isolate the pilot from the external, "real" environment and provides him or her with everything needed during a normal flight, just like in a real airplane. While you fly, you don't just open the plane's door to go to the WC or get yourself a cup of coffee. So if you want those things in a sim cockpit, you have to put them inside yourself.

The question is how to achieve something similar in a spaceflight simulator. Naturally, it would be a compromise solution since effects such as those caused by acceleration, gravity, microgravity and so on would be extremely expensive to reproduce, but other aspects of a log flight are within reach with reasonable expenses. The fact is that assuming those limitations, what would be needed is to provide the pilot with accommodations to spend some hours inside the cockpit. A toilette could be provided, but that would be rather complicated so for the time being I assume that the related physiological issues would pose a limit to the simulation process. Perhaps I would later put a WC inside the cockpit in some way or another, but not for the moment. However, sleeping facilities are easy to provide. Such a thing, a couchette inside the fuselage would of course, lengthen it a little bit, but space in my case is not a problem.

I have already considered the possibility of using the pilot's seat to sleep, but that implies two problems: One is that a seat is not as comfortable as a bed or couchette with a sleeping bag on top. Secondly, a sleeping pilot that moves during the night could easily actuate or just hit a component, damaging it. Thus, it would be better to put the couchette behind the seat; that would elongate the cockpit, which would reach now three and ha half metres. It would also be about 1,2 m wide and should be 1,6 m tall, minimum. I still have to decide whether to build such a long fuselage, a simple, one-seat cockpit or something in-between, perhaps modular for easy, future expansion. The idea of actually going to sleep inside a cockpit after initiating a flight, to wake up a few hours later in order to perform some task seems a little bit nerdy, but at the same time, with quite a potential for realism.

Who said that life is the only thing that evolves?

I was about to write something else but suddenly I got this thought: The universe is really complex - just read a little about M theory and you will get the idea - but it seems that it was a simpler thing in the very distant past, in the beginning of everything. So, despite that as far as we know it is not alive but could it be evolving like a living thing?

Indeed, the apparent past simplicity of the universe is a relative concept, because even then it was a convoluted affair, filled with very minute details that made the difference between the distant futures - now possible parallel realities - to come. So, the future of the past is the present of the present thanks to those details where the Devil lurks. But the same could be said about the now known living forms and their evolutionary paths along millions of years. The butterfly effect is truly omnipresent.

Conventionally we have been assuming that the concepts that we today have about the evolution of life, that we owe to people like Darwin and Galton, should be applied "just" to "conventionally alive" beings like biological entities

Suppose that some micro-organism is intelligent, just a little person much like us. What would happen if that microscopic person build a telescope to watch our "macro world"? Would he understand it or would our scale and structural organisation keep it away from his capacity for comprehension, much like what lies beyond the horizon?

In terms of perception, "smallness" and "greatness" are not tangible; the "proper" dimension of things is given by the observer, who sees things according to the filters of proportions and scale that he has in his mind. Now, could we assume that the scale of the universe or any other macro or micro environment that we may observe is in absolute terms equal in size to ours but that we only manage to see it bigger or smaller just because of perception? Perhaps we are just deluding ourselves about size - and thus the synergy of things - much like thinking that in a sphere the shortest way is a "straight line" along its surface between two points, which in reality is an arc over the sphere's surface instead of digging a tunnel, a "truly straight" and shorter line between them.

And what if there was something else aside from perceptive delusion, like a true, physical phenomenon that like an optical device distorts the way in which we see things or impedes us from seeing farther. Is an event horizon such a perception obstacle for us?

The Moon and space instalaltions.

Quick Search


Related Web Pages

Andinia's Forum

Reprint and linking guidelines


Articles Directory Shop Forum

Outdoor sports, adventure, nature and exploration at