Kitts wrote:
I am looking forward to something and would want input from all you
Flightgear users and developers.
If i have not mentioned before, I am a mechanical engineer and an
aero-modeler. I have also been a electronics hobbyist since my childhood. I
set out to combine my abilities in these areas.
Apart from just plain simple model flying i decided to do something more and
built some avionics with sensors to put onto my model aircrafts. The
embedded software is nearing completion and i am currently working to the
communication part of it. Now what follows is the interesting part to me...
Hi Kitts,
I think there are at least a few others involved in FlightGear that are
doing or have plans of doing similar things ... myself included. I
actually have two projects in the works. One through the University of
Minnesta where I assembled the airframe and am now the chief test pilot
(http://www.flightgear.org/~curt/Models/Construction/Rascal110/) and the
second is my home project where I have to figure out everything myself
(http://www.flightgear.org/~curt/Models/Current/EGN-1/)
Do you have any sort of web site for your project or pictures or details
of exactly what you are doing? As my own projects progress, I'm
becoming increasingly interested in this stuff.
I would like to use FLightGear as the Ground Control System (GCS) for my
aircraft thus throwing it into the class of mini UAV's. My current thoughts
supports an ASCII mode and a binary mode of communication. The ASCII mode
is much like NMEA protocol. This is the part that i have finished
developing (ASCII is easy for debugging ;-)). I am yet to implement the
binary mode of communication.
I think this sort of thing is very doable. If you have a gps onboard
and can transmit that data to your ground station, that get's you pretty
far. You can compute estimates for a lot of the parameters that aren't
available directly from the gps. If you pass this data to FlightGear,
then you immediately have a system that provides a live synthetic view
from the perspective of your UAV. You can also adapt or create a 2d
panel which would give you a set of live gauges ... heading, altitude,
velocity, rate of climb (est), attitude (est). You could do this as old
style steam gauges, you could do it as a hud, or even possibly a modern
looking glass cockpit, or all of the above.
In using FlightGear as a GCS, i would like to receive any inputs from fellow
users and developers. How complicated would it be to do this. My current
thoughts are as follows;
I start flightgear with --fdm=external (or NULL; What is the difference?)
--fdm=null is the proper form, --fdm=external is the same thing and is
there for historical reasons.
and set it to receive a generic protocol over the serial port and at say,
4Hz. The generic protocol is suitably written to accept 6 degree of freedom
information from my device.
Simultaneously, i would like to transmit control surface information which
my device will receive and accordingly control the servos onboard.
Ahh, ok, so you want to live dangerously! This I think is doable,
although I'd be a bit worried about latencies and lags and the PIO's
that might result if you aren't careful. If it was me, I'd at least
make the system self stable (IR co-pilot, or something gyro based) so
that I wouldn't have to manually keep the wings level or hold a
particular pitch or speed. The ground station could send higher level
commands like fly to such and such waypoint, or hold such and such
heading and altitude ...
While this just might work, i want to do better than this and hence plan
accordingly. I would like to extend the protocol to be more configurable,
and interactive.
There has been discussion of implimenting an xml configurable binary
format. That doesn't help you if you want to adjust the fields in real
time, but I'm not sure you want to add that kind of complexity to a
system where a very small bug can ruin your day/week/month.
Further, I have video being streamed from onboard the
aircraft in an analog form. To convert this i use a TV tuner and interface
it with the computer. I got myself an external Pinnacle PCTV USB2 tuner so
i can use with a laptop, but unfortunately cant get it to work on linux
where i do my development. Anyway, assuming that i get the drivers
configured right, i would like to get the video too into FlightGear be it
running on any platform.
Someone mentioned that they were working on integrating a live video
stream into FlightGear. Perhaps you can search the archives, or perhaps
they will speak up. I got the impression that they managed to get
something working, but that it might have been kind of a hack job
specific to their particular needs. No code was submitted to the
project that I'm aware of.
Here is my estimate of what needs to be done to achieve all of this through
FlightGear.
1) Add another protocol under Network which can communicate with my hardware
and read/modify internal properties appropriately. I will have to add more
property values for this device.
Adding a protocol is pretty straight forward, but you may want to double
check if you can use or adapt an existing protocol.
2) Add menu items that provide user interface with the hardware. This may
not be very difficult as from what i recollect reading, FlightGear provides
facility for adding menus etc.?
Adding menus to adjust property values is pretty straight forward and
all xml configurable. If you need to put function call backs behind
your menus, that would be some additional effort.
3) Add parameters to the Headsup Display. This again i remember reading as
configurable?
The HUD is xml configurable, although I've never dug into it to see what
the limits are.
4) Embed a small window where live video is displayed. Preferably it should
be possible toggle full screen live Video and embed FlightGears native
Scenery display. I should also be able to save the video synchronized with
all other property values.
I suppose the major challenge is with the 4th point while the rest are
relatively easy. Correct me if i am wrong.
Yes, I think #4 presents the most technical challenges, but it shouldn't
at all be insurmountable. Let us know how you do. :-)
Another important thing is the FDM. What should i use? I am unable to send
all data set in the --native protocol from onboard. Is there a possibility
that i fly with the FDM running locally and i only update values that i
can?
That won't work ... I would just run with --fdm=null and pass in the
data that you do have. Optionally you can compute estimates for things
you don't have just to make the display prettier.
I am not a C++ programmer but a C programmer in the embedded world. I am
just stepping into C++ with FlightGear. Any advise,suggestions or guidance
that helps is most welcome.
C++ knowledge comes in handy when you are writing a lot of new code, but
if you are just modifying or adapting existing code, I'm pretty sure
that a reasonable amount of "C" knowledge will allow you to bluff your
way through. I started out mostly just knowing "C", even today I
sometimes wonder if I might still code/think more like a "C" programmer
than a "C++" programmer. I certainly tend to avoid the fancier and more
obscure C++ constructs in my own code. I like to keep things readable,
at least for myself, it's hard to say if any one else can read my code.
But I will tend to [try to] err on the side of readabity over
performance in most cases.
FlightGear is truly an amazing piece of work with huge potential. I just
want to add one more possibility. Does anybody already use it for such a
purpose?
You aren't the first to have this thought cross your mind, but certainly
there is a lot of room to advance the state of the art here (at least as
far as flight gear is concerned) and make FlightGear much more conducive
towards this sort of thing.
What are you using for your wireless data link? I need to come up with
some sort of cheap wireless modem for my hobby project. The most
important feature for me will need to be "cheap". :-)
Regards,
Curt.
--
Curtis Olson http://www.flightgear.org/~curt
HumanFIRST Program http://www.humanfirst.umn.edu/
FlightGear Project http://www.flightgear.org
Unique text: 2f585eeea02e2c79d7b1d8c4963bae2d
_______________________________________________
Flightgear-users mailing list
Flightgear-users@flightgear.org
http://mail.flightgear.org/mailman/listinfo/flightgear-users
2f585eeea02e2c79d7b1d8c4963bae2d