Hi All!
In view of previous mail about using FlightGear as a GCS, i have started
taking my first steps. I have a few questions and i hope some one here will
be kind enough to answer them and advice.
I divided my work into milestones and have a few doubts towards the strategy
i use to achieve these. Please let me know if i should be rather posting
this mail on the developers mailing list!
1) Write an XML file to use the generic protocol.
As a first step, i would simply like to write an XML file to implement
the
Generic protocol, to output control surface positions and take input of
position and orientation.
The problem i face here is with sending and receiving data in a
particular
format. The control surface data vary from -1 to 1 and throttle varies from
0 to 1. My system would like an input varying from 2000 to 4000 (R/C servo
friendly format). Yes, i can use factor (* 1000) and offset (+3000) and
easily vary the values in this range, but the problem is that i cannot do
it in integer form but only as float. How do i do it integer form. I have
tried declaring as '%d', but this causes multiplication and addition to
also happen in integer form thus causing a step from 2000 to 4000 directly.
Further can i add the trim value to control surface value and then
transmit?
For immediate use, i have worked around this problem by using float and
modifying the way the onboard system interprets the data received by
ignoring all numbers that follow the decimal point.
2) The second task would be to add properties to flightgear. I was just
reading "JSBSim: An Open Source Flight Dynamics Model in C++" by Jon S.
Berndt and was impressed by the flexibility that this system provided. I
also read about the "Property Manager" but was unable to find more
information about it. Can some one guide me here, show me where to look for
more information and how to use it? It seemed like i could add more
properties at run time using XML files!
3) Adding a new protocol to fully support my onboard system.
For this i would use the NMEA protocol as a template. This step may
take a
long time but i was thinking about how i approach it. Any suggestions /
advises? Since this protocol will be interactive, i will need to send
particular types of packets and on demand. May be depending on property
change that could occur from a menu option change, initiated by the user or
a packet received from onboard.
4) Add menu items and windows to interact with the onboard system. Configure
while on ground and control while in air!
5) Customize the HUD to show data necessary. I would here, desire to have a
say, three lines of text scrolling all the commands that are sent to the
aircraft, display warnings, etc..
6) I have some amount of computation running onboard that help control the
aircraft, i would like to run the same within FlightGear, so it would work
like a simulator for any further experiments.
I seek the expert advice of the people developing FlightGear. It could save
much time and energy if some one can point out to me where to look for
information on any of the above and/or which portion of the source requires
to be worked on. This is a little confusing as functionality of FlightGear
has been divided into sub projects like flightgear, fgfsbase, simgear
etc...
While working on it, i do not wish to tweak any of the existing source but
to add a sub folder like say, contrib and add all source files here. but i
guess some amount of tweaking will be inevitable(?)
--
Cheers!
Kitts
_______________________________________________
Flightgear-users mailing list
[email protected]
http://mail.flightgear.org/mailman/listinfo/flightgear-users
2f585eeea02e2c79d7b1d8c4963bae2d