Re: [Flightgear-devel] Code Typo?

2005-07-06 Thread Patrick Quirk
Ah, nifty tool that CVS browser, thanks :)  So am I correct in thinking 
that's a typo?  I haven't had time to change it and test it myself, 
thats for tomorrow, though I can't imagine too many bad things could 
happen (its amazing it works with that typo to begin with).



AJ MacLeod (email lists) wrote:


On Wednesday 06 Jul 2005 20:50, Patrick Quirk wrote:
 


In file Main/viewer.cxx, in function MakeVIEW_OFFSET(...), on line ~118
where the third matrix is being made, there is the following line:
tmp = t * axis2[1];
   



It's still in there...  You don't have to do a cvs checkout to view the 
current state of any file, by the way,  there's an interactive browser at


http://cvs.flightgear.org/cgi-bin/viewcvs/viewcvs.cgi/FlightGear/?cvsroot=FlightGear-0.9

Cheers,

AJ

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

begin:vcard
fn:Patrick Quirk
n:Quirk;Patrick
email;internet:[EMAIL PROTECTED]
tel;cell:919-260-9918
x-mozilla-html:FALSE
version:2.1
end:vcard

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

[Flightgear-devel] Code Typo?

2005-07-06 Thread Patrick Quirk
Hopefully I'm not too out of date with this since I'm looking at 0.9.8 
code and am not an active CVS watcher.


In file Main/viewer.cxx, in function MakeVIEW_OFFSET(...), on line ~118 
where the third matrix is being made, there is the following line:


tmp = t * axis2[1];

Since this is making the third matrix from the third angle, shouldn't 
this line be:


tmp = t * axis3[1];

I'd assume this has been fixed on CVS but don't have the time to set it 
up and look, hopefully someone more involved in the dev process could 
check on this one real quick.  Also is there an archive of this list or 
a bug database that allows searching through it?



begin:vcard
fn:Patrick Quirk
n:Quirk;Patrick
email;internet:[EMAIL PROTECTED]
tel;work:919-962-1715
x-mozilla-html:FALSE
version:2.1
end:vcard

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

Re: [Flightgear-devel] Help needed, quick questions

2005-06-21 Thread Patrick Quirk

Curtis L. Olson wrote:

There are a couple examples in the scripts section of the FG source 
code.  There is a chunk of perl (telnet.pl) you can include to make 
access from a perl script mostly trivial.  I think there is a java 
example and perhaps something for python.


Great!  I shamelessly modified one of your scripts to change the view on 
command.



How well is your project funded?


Not big enough :)


I had a thought about the viewer class that Jim Wilson pointed me to.  
Is all the HPR information contained in the VIEW matrix?  Is there 
anything else included in it?  If not, could I not just make a matrix 
from gluLookAt and stick that in for the view matrix instead?  Surely 
there's something wrong with doing it this way, it'd be too easy...


Patrick
begin:vcard
fn:Patrick Quirk
n:Quirk;Patrick
email;internet:[EMAIL PROTECTED]
tel;work:919-962-1715
x-mozilla-html:FALSE
version:2.1
end:vcard

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

Re: [Flightgear-devel] Help needed, quick questions

2005-06-21 Thread Patrick Quirk

Curtis L. Olson wrote:

This sounds like an "interfacing" issue.  If you could convert your 
lookat/up vectors into heading, pitch, roll, FlightGear would be a lot 
happier and all the other FG facilities should fall into place more 
easily.  The matrix math for the lookat/up -> HPR transformation isn't 
exactly trivial (since matrix ops lie outside the bounds of what I'd 
personally consider trivial) :-) but there isn't anything especially 
hard about it either.  Someone more clever than I could probably pump 
the lookat/up vectors into gluLookAt(), read back the resulting view 
transformation matrix, look at the rows/columns and figure out a way 
to extract heading, pitch, roll.  Or you might be able to look at what 
the gluLookAt() routine does and perhaps gain some insight from that, 
or you could just derive your own transformation pipeline.  It's all 
pretty straightforward stuff as far as matrix transformations go. :-)  
There's probably code floating around the FG project to do similar if 
not identical things.


That's what I was afraid of having to do.  Anyone know of this kind of 
code floating around?  I tried adding HPR offsets in the configuration 
files though since the code I added puts a gluLookAt at the end of the 
projection stack, the HPR changes in addition to the lookAt and doesn't 
have the desired effect (the projected images no longer form a 
continuous image).  When the view is changed via the hat on the 
joystick, is that done with HPR calculations? 

Part of the problem I'm having with this is that when I put the LookAt 
in the projection stack, the world (runway, scenery) is rotated, but the 
HUD/panel/cockpit are not.  For now I turn them off but it would be much 
more convincing if they could be rotated too. 


Ok, this is one of the ways FlightGear is incredibly cool.

First, pop open the property browser in a live running copy of 
FlightGear (it's a menu choice someplace.)  Browse around to see the 
different data fields that are available.  Just about everything 
interesting/useful is published in the property system.  The browser 
allows you to inspect and even change values in the live running copy 
of FG.


Now, start up FlightGear with the following option: --telnet=5401 (or 
pick your favorite port number.)  Once FlightGear is up and running, 
go to an xterm/shell on the same machine running flightgear and type 
"telnet localhost 5401".  You could do this from any machine on the 
net by substituting the appropriate machine name/ip-address.  From the 
telnet session hit enter or type "help" to get a list of available 
commands.  You can now remotely navigate through the property 
structure and examine and change values in the live running copy of 
FlightGear.  This is very powerful (although low bandwidth) and allows 
you to set and change a huge range of values in FlightGear.


Even better, it's pretty easy to automate a remote telnet session so 
you can write scripts or code that can remotely control FlightGear in 
various ways.  I've written a commercial operator GUI that interfaces 
to FlightGear in this way.  I've scripted (perl) out all the FAA Level 
3 FTD certification tests in this way (setting up initial conditions, 
reseting the FDM, enabling/adjusting autopilot modes, and even 
remotely manipulating control surfaces when needed.)


And you can use the same mechanism to adjust view parameters, 
configure weather settings, time of day, etc.


The only draw back is that it's low bandwidth. It's good for setting a 
few parameters at a relatively low rate, it's good for interactive 
use, it's good for many remote scripting tasks, but you don't want to 
use it to try to blast a bunch of position/orientation data in real 
time.  We have other interfaces better suited for that.


I should also point out that we have an html version of the telnet 
interface "--httpd=5400" that allows you to connect up to a live copy 
of FlightGear from any web browser and interact with the sim.  Just 
type in a url like this: "http://localhost:5401/";


That is pretty cool.  I couldn't get the scripting to work off the top 
of my head but can't see why it wouldn't work.  That did help change the 
views, among a few other things, thanks :)  You've been extremely 
helpful Curtis, I really appreciate it.


Patrick
begin:vcard
fn:Patrick Quirk
n:Quirk;Patrick
email;internet:[EMAIL PROTECTED]
tel;work:919-962-1715
x-mozilla-html:FALSE
version:2.1
end:vcard

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

Re: [Flightgear-devel] Help needed, quick questions

2005-06-21 Thread Patrick Quirk

Curtis L. Olson wrote:

Have you played around with these properties (setable from the command 
line, or ~/.fgfsrc file.)


--fov=35
--prop:/sim/view/config/heading-offset-deg=42
--prop:/sim/view/config/pitch-offset-deg=3

I *think* you can adjust these properties in real time if you need to, 
but typically you set these once for a particular monitor 
configuration and you simply send over the position and orientation to 
the slave machines and everything happens automatically.  The 
configurable numbers are offsets from straight ahead.


If you need to model your view point changing relative to your 
monitors (head tracker?) and need to fiddle with your frustums and 
view direction offsets in real time, then that's a bit more 
difficult.  I'm not aware of anyone doing this, but it shouldn't be 
all that much additional effort to add support for this sort of thing.


Yeah I saw those, and those could probably work for now, though I'm 
really looking for a more exact way since I already have a look vector.


Most of these things (view parameters, weather, time of day, etc.) are 
configurable via the property system.  For things like weather and 
view selection which don't change rapidly, you can send over new 
property values using the "telnet" interface.  For things that could 
change rapidly (like view position/orientation) you probably want to 
blast over udp packets at 60hz or whatever your screen refresh rate is.


Could you perhaps elaborate on what you mean by telnet interface?  Are 
you saying it's inside of FlightGear?  Also how would I set the view 
property (as in cockpit, tower, chase...)?   Please forgive my 
rudimentary questions, my working knowledge of the fgfs code structure 
is not terribly deep.


Patrick

begin:vcard
fn:Patrick Quirk
n:Quirk;Patrick
email;internet:[EMAIL PROTECTED]
tel;work:919-962-1715
x-mozilla-html:FALSE
version:2.1
end:vcard

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

[Flightgear-devel] Help needed, quick questions

2005-06-21 Thread Patrick Quirk
I'm currently a computer science researcher at UNC-Chapel Hill and we're 
using Flightgear as a proof of concept application in our project 
(website:  http://www.cs.unc.edu/Research/ootf/Projects/wav.html ).  The 
short version is that we have a master fgfs node and 4 slaves which 
drive projectors.  These projectors produce a large panoramic display 
that looks great in the cockpit view.  I have two questions that someone 
here could probably answer in a few minutes and save me hours of time. 

1.  In the cockpit view, we need to change the view according to our own 
usual positition, look at, and up vector specification which works fine 
now in terms of matching up what is drawn on the projectors.  However to 
do this we modified the OpenGL projection stack directly and bypassed 
any SSG stuff, which is a big nasty hack.  This makes FlightGear think 
that each of the slave nodes is looking straight ahead when we're 
actually looking off to the left or right or whatever.  Consequentially 
there is a large amount of clipping in the nodes that aren't looking 
close to straight ahead.  How can I use SSG to do this instead?  Or even 
just rotate the SSG frustum approximately?


2.  It would be really nice if we could change the view (cockpit, chase, 
etc) of the slave nodes using the master node, or even in the 
preferences files.  Is there a way to do this without using the keyboard 
of the slave computer? 

Hopefully that was halfway coherent, and I look forward to any help I 
can get.


Thanks,
Patrick
begin:vcard
fn:Patrick Quirk
n:Quirk;Patrick
email;internet:[EMAIL PROTECTED]
tel;work:919-962-1715
x-mozilla-html:FALSE
version:2.1
end:vcard

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