RE: [Flightgear-devel] MSVC error - glut32.lib

2005-07-05 Thread Chuck Cole

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:flightgear-devel-
 [EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED]
 Sent: Thursday, June 30, 2005 7:01 PM
 To: flightgear-devel@flightgear.org
 Subject: [Flightgear-devel] MSVC error - glut32.lib
 
 I am trying to compile FG on  MSVC.net (7.0) on a Windows platform.  I
 have
 been sucessful through plib, simgear and now FG is providing me with  a
 fatal
 LNK error 1104: cannot open file 'glut32.lib' .  The  'glut32.lib'  file
 exists in the C:\windows\system32 folder...
 
 Can anyone suggest a solution or path to examine.
 
 Mike
 
 
 
 
 ___

The glut32.lib should be put in the %VCInstallDir%\lib directory.  For
instance, I have MSVC.net 2003, and it is in the C:\Program Files\Microsoft
Visual Studio .NET 2003\Vc7\lib folder.  Make sure it is in that folder and
then recompile.  Hopefully, everything will compile and link correctly.

chuck


___
Flightgear-devel mailing list
Flightgear-devel@flightgear.org
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d


RE: [Flightgear-devel] Re: Development Platform Help Needed

2005-01-06 Thread Chuck Cole








I unfortunately do not have an FTP server
or the like to make my version of the source code available to you. But since
you have some time, I could simply e-mail you the source code that I have built
along with some simple setup instructions. Collectively, the source code
for all of the projects is rather large; however, I believe that they could be
split up sufficiently enough to be e-mailed. We can take the details of
setting up any arrangement off-list.



chuck











From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED]
Sent: Wednesday, January 05, 2005
6:39 PM
To:
flightgear-devel@flightgear.org
Subject: [Flightgear-devel] Re:
Development Platform Help Needed







Thanks Christian and Chuck,











I think Linux would be the most direct
but my comfort level diminishesrapidly. I wouldappreciate an
opportunity to review the MSVC++ path if I can get together with Chuck.











Most of thisdevelopment
willtake placein Suffolk,
andI'm devoting the entire semester to the project... so I'm flexible to
travel if you can affordsome time to help me get this started.











Thanks,











Mike Krizansky








___
Flightgear-devel mailing list
Flightgear-devel@flightgear.org
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d

RE: [Flightgear-devel] Re: Development Platform Help Needed

2005-01-06 Thread Chuck Cole










I know you had mentioned MSVC++ as your
desired path. Im using v.6.0, but I have heard from some that it
is easier to build with Visual C++ .NET (or v.7). There are some threads
in last months mailing list archive that discuss building with the .NET
version along with links to established project files, if that is of any
interest to you. Either way, youll have to upgrade from your
version 4.0 that you mentioned initially to build either one.



chuck








___
Flightgear-devel mailing list
Flightgear-devel@flightgear.org
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d

RE: [Flightgear-devel] Re: Development Platform Help Needed

2005-01-06 Thread Chuck Cole
 I was asking just for a documention how you set up MSVC++ so that it
 compiles FGFS. That would be a nice HOWTO for other developers (we get a
 request for that every few months)

Agreed, I think that would be a nice thing to have.  I know that I would
have liked it when I built it :)

Now, I just have to remember everything that I did!

chuck


___
Flightgear-devel mailing list
Flightgear-devel@flightgear.org
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d


RE: [Flightgear-devel] Getting data out of FlightGear

2004-11-30 Thread Chuck Cole
As promised, I've attached the files that I modified to make FlightGear work
with my client software.  These modifications allow my client software to
receive the correct values out of FlightGear using the native-fdm network
setting.

I started with the FlightGear v0.9.6 release files to make the changes, so
any changes made to these files in CVS since this release have not been
incorporated.  Also, these modifications were developed and tested on a
Windows (WinXP) machine only.  However, I was able to build FlightGear with
both Cygwin and VC++ v6.0 using these modifications and found no difference
in the performance.

Thanks again to all of those who responded to my plea for help!  I hope that
I can repay the help that you have provided me.  I'm a newbie as far as
FlightGear is concerned, but based on my work and my experience with
FlightGear, I hope to try and get more involved with using and
developing/adding on to the software.

chuck


net_fdm.hxx
Description: Binary data


native_fdm.cxx
Description: Binary data
___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d

RE: [Flightgear-devel] Getting data out of FlightGear

2004-11-29 Thread Chuck Cole
First of all, thanks to all for your responses and help with this.

I have made some progress with this and just wanted to report back for those
interested.  I went through the net_fdm.hxx and native_fdm.cxx files and set
all variables to either long or double, as appropriate.  I also made sure
that there was no casting involved in setting those values (at least no
casting within the native_fdm.cxx code).  In doing so, I was able to receive
more appropriate values out of FlightGear; however, it did appear that some
of the values got shifted.  For example, the left and right aileron
positions were being reported in the right aileron and rudder variables (but
at least they were the correct values) -- the rudder variable comes
immediately after the right aileron in the variable declaration sequence.

Also, I uncommented out a line in the code in the process() method to print
out the size of the buffer that is being sent.  According to this statement,
the size of the buffer (or the class structure in this case) is 640 bytes.
However, when I do the same thing on my side to print out the size of the
structure I should be receiving, I get 632 bytes.  If I manually calculate
what the size should be, giving 4 bytes for longs, 8 bytes for doubles, I
get 632.  I don't know where the extra 8 bytes come from.

Anyway, I'm real interested in getting this to work.  As you may have
noticed by my e-mail address, I work at NASA Langley.  I'm working on a
project that will allow pilots and researchers to fly and evaluate scale
model planes (in particular, a 757).  The plane will obviously be flown
remotely.  We will eventually be using a Matlab (Simulink) model as the
flight model, but until the model is complete, FlightGear is a very nice
substitute -- and we need something to help build other software components.
But in addition to having a flight model (whether it's Simulink or
FlightGear), we also need various displays to show the health and control
responses of the model.  I'm currently trying to build the displays to show
the control responses, and to support this, I need the data out of
FlightGear.
 
BTW - I am compiling the code using Cygwin.  My code is built using VC++
6.0.

chuck


___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d


RE: [Flightgear-devel] Getting data out of FlightGear

2004-11-29 Thread Chuck Cole
This was exactly what was happening.  I used the #pragma pack(4) directive
and this fixed the problem.  I'm now able to receive all of the data
correctly.  I was also able to receive the correct data by moving the
variable declarations around as well, but this didn't allow for common
variables to be grouped.  I understand that there may be a performance hit
with the use of the pragma pack statement, but I don't know if it will
make any difference in my case.

I will post the affected files once I get them cleaned up for those
interested.

Thanks to all that helped.

chuck

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Erik Hofman
Sent: Monday, November 29, 2004 1:41 PM
To: FlightGear developers discussions
Subject: Re: [Flightgear-devel] Getting data out of FlightGear

Chuck Cole wrote:

 Also, I uncommented out a line in the code in the process() method to
print
 out the size of the buffer that is being sent.  According to this
statement,
 the size of the buffer (or the class structure in this case) is 640 bytes.
 However, when I do the same thing on my side to print out the size of the
 structure I should be receiving, I get 632 bytes.  If I manually calculate
 what the size should be, giving 4 bytes for longs, 8 bytes for doubles, I
 get 632.  I don't know where the extra 8 bytes come from.

632 bytes us called a packed structure. Unpacked structures are aligned 
to the platform (64-bit or 32-bit aligned, often leaving holes in the 
structure to align them properly.

Erik

-- 
We have offshored my rockband Void,
and we are highly popular in India.

___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d


___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d


[Flightgear-devel] Getting data out of FlightGear

2004-11-22 Thread Chuck Cole








Has anyone tried to use the output of FlightGear
(v.0.9.6)? Ive seen in the archives where people have tried to
drive the flight model (i.e., as input), but I havent been able to find
any posts regarding getting data from the model.



Specifically, Im trying to get the surface position output
(e.g., flap positions, elevator positions, etc.). I have set up the native-fdm
output setting, but when I look at the values that are sent, they are typically
very large numbers. I have a feeling that there may be a type mismatch problem
in that the values are set as float in the net_fdm.hxx, but the
values are retrieved as double. I havent been able
to build all of the projects using either Visual C++ 6.0 or using cygwin, so Im
unable to see if this is actually the problem or investigate other problems.



Any help would be greatly appreciated. If someone
could give me some instructions on building the projects myself, I should be
able to debug myself, but again, Ive been unable to do so (Ive already
gone through the Getting Started documents on the website, but
nothing has worked).



Chuck










___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d

RE: [Flightgear-devel] Getting data out of FlightGear

2004-11-22 Thread Chuck Cole
Thanks.  I suppose since the other software that I'm using is built with
VC++ 6.0, then I'll need to learn how to build FlightGear with that.  If
there is someone reading this that can help me with that, I'd appreciate it.

I would note that other values seem to come out fine, such as those defined
as float and int.

chuck

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Erik Hofman
Sent: Monday, November 22, 2004 3:11 PM
To: FlightGear developers discussions
Subject: Re: [Flightgear-devel] Getting data out of FlightGear

Chuck Cole wrote:
 Has anyone tried to use the output of FlightGear (v.0.9.6)?  I've seen 
 in the archives where people have tried to drive the flight model (i.e., 
 as input), but I haven't been able to find any posts regarding getting 
 data from the model.
 
  
 
 Specifically, I'm trying to get the surface position output (e.g., flap 
 positions, elevator positions, etc.).  I have set up the native-fdm 
 output setting, but when I look at the values that are sent, they are 
 typically very large numbers.  I have a feeling that there may be a type 
 mismatch problem in that the values are set as float in the 
 net_fdm.hxx, but the values are retrieved as double.  I haven't been 
 able to build all of the projects using either Visual C++ 6.0 or using 
 cygwin, so I'm unable to see if this is actually the problem or 
 investigate other problems.
  
 
 Any help would be greatly appreciated.  If someone could give me some 
 instructions on building the projects myself, I should be able to debug 
 myself, but again, I've been unable to do so (I've already gone through 
 the Getting Started documents on the website, but nothing has worked).

Currently there is a problem where different platforms, different OS's 
or even different compilers can get different output due to the fact 
that structs are used to send data across the network. This can create 
endian-problems as well as packed/unpacked struct problems.

So to be safe you will need to use the same OS, and same compiler for 
both ends of the connection.

Erik

___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d


___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d


RE: [Flightgear-devel] Getting data out of FlightGear

2004-11-22 Thread Chuck Cole
Thanks.  I will look at the code again in those files.

I noted in my earlier response though that other values seem to be read
correctly.  But those values are not casted like the surface position
variables are in the native_fdm.cxx file (variables are declared as float
but values retrieved are double).  That's what leads me to believe that it
might be a data type issue.  However, I will investigate the issues that you
and others have suggested.

Thanks again.

chuck

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Curtis L.
Olson
Sent: Monday, November 22, 2004 3:49 PM
To: FlightGear developers discussions
Subject: Re: [Flightgear-devel] Getting data out of FlightGear

Chuck Cole wrote:

 Has anyone tried to use the output of FlightGear (v.0.9.6)? I've seen 
 in the archives where people have tried to drive the flight model 
 (i.e., as input), but I haven't been able to find any posts regarding 
 getting data from the model.

 Specifically, I'm trying to get the surface position output (e.g., 
 flap positions, elevator positions, etc.). I have set up the 
 native-fdm output setting, but when I look at the values that are 
 sent, they are typically very large numbers. I have a feeling that 
 there may be a type mismatch problem in that the values are set as 
 float in the net_fdm.hxx, but the values are retrieved as double. 
 I haven't been able to build all of the projects using either Visual 
 C++ 6.0 or using cygwin, so I'm unable to see if this is actually the 
 problem or investigate other problems.

 Any help would be greatly appreciated. If someone could give me some 
 instructions on building the projects myself, I should be able to 
 debug myself, but again, I've been unable to do so (I've already gone 
 through the Getting Started documents on the website, but nothing 
 has worked).


Hi Chuck,

There should be no reason why you couldn't send the native-fdm structure 
out of FlightGear to any other application.

The control surface values in the native-fdm should be normalized in the 
range of -1 to 1 (or 0 to 1) depending on the control surface (i.e. 
ailerons, elevator, rudder, etc.) are -1 to 1, flaps, spoilers, etc. are 
in the range of 0 - 1. If you aren't seeing values in that range, then 
you probably aren't reading/interpreting the structure correctly on the 
remote end.

The structure itself is defined in src/Network/net_fdm.hxx, but the 
wrapper code to send it out or read it in is located in 
src/Network/native_fdm.[ch]xx. You might notice that the native_fdm code 
can optionally convert the data to network byte order (which is a 
standard platform independent byte ordering scheme.) The only issue is 
that you need to convert from network byte order back to your platform's 
native order on the receiving end before you try to read the data. You 
can look in the native_fdm.cxx file to see exactly how this is done ... 
it's very straightforward.

You might also notice that the license terms on the net_fdm.hxx 
structure is public domain, so you can include this file in your remote 
application ... that way you can refer directly to the structure 
elements and it should all work out as it's supposed to. (That's not an 
option I suppose if your remote end isn't C/C++, in that case you are on 
your own.) Typically floats are 4 bytes and doubles are 8 bytes so you 
do need to be careful with that or you will get garbage.

It should all be very doable, it's just a matter of getting all the 
connections mapped correctly.

Regards,

Curt.

-- 
Curtis Olsonhttp://www.flightgear.org/~curt
HumanFIRST Program  http://www.humanfirst.umn.edu/
FlightGear Project  http://www.flightgear.org
Unique text:2f585eeea02e2c79d7b1d8c4963bae2d


___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d


___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d