[Flightgear-devel] Help needed fo write an FG string property
How fo write an FG string property from an indexed string in a structure? Possibly someone can help please , I have tried to find an example with no luck, I am sure i had it working yesterday but now every way i try i end up with it wrong at compile, a seg fault or a property node with an empty string. The basic setup works fine with doubles ect, here i only show the string code. Its wrong, but this is what i want to do, where : index i is declared as an int, path is a node, and path[i] is a string indexed in the structure called buf-node-setStringValue(path,buf-path[i]); ) 1-The stucture called buf with indexed stings in it from the h file enum { FG_MAX_AIRCRAFT = 25 }; uint32_t num_aircraft; string callsign[FG_MAX_AIRCRAFT]; string path[FG_MAX_AIRCRAFT]; 2- I write to the stucture with tempnode = node-getChild(path); if ( tempnode != NULL ) { net-path[i] = tempnode-getStringValue(); } -- Regards Harry -- Stay on top of everything new and different, both inside and around Java (TM) technology - register by April 22, and save $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. 300 plus technical and hands-on sessions. Register today. Use priority code J9JMT32. http://p.sf.net/sfu/p___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
Re: [Flightgear-devel] control an aircraft from a file
John Waget ha scritto: thanks for the quick reply, they are really helpful. About the telnet connection method, I don't know how to send the positions to fg. Can someone explain it to me? Look at the new wiki page: http://wiki.flightgear.org/index.php/Telnet_usage from there you can set any parameter, positions/rotationg etc or pilot the aircraft (changing aileron position, throttle etc...) Francesco -- Brisa Francesco Via Gabelli 16 22077 Olgiate Comasco (CO) http://brisa.homelinux.net france...@brisa.homelinux.net __ / / / / /___ ___ / / __/ / __ / / / __ \/ __ `__ \/ __ \ / /_/ / /___ /_/ / /___/ /_/ / / / / / / /_/ / \/_/\/\/_/ /_/ /_/\/ http://www.gl-como.it My public gpg key: http://minsky.surfnet.nl:11371/pks/lookup?op=getsearch=0xC67DC12DC4361693 -- Stay on top of everything new and different, both inside and around Java (TM) technology - register by April 22, and save $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. 300 plus technical and hands-on sessions. Register today. Use priority code J9JMT32. http://p.sf.net/sfu/p ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
Re: [Flightgear-devel] Cessna 172P crashes FG 1.9.1 on Mac OS X 10.4
Andrew Gillanders wrote: FlightGear 1.9.1 is running very well on my MacBook, running Mac OS X 10.4. The only problem is the Cessna 172P. If I run the model with the 3-d panel, FG crashes when the splash screen is about to disappear and the plane appear. Do you have a command line 'osgviewer' application installed on your machine ? If this is the case, then please, just as a quick test, change into the 'data/Aircraft/c172p/Models/' folder and load the 3D model as: # ~ osgviewer c172p.ac Does this action lead to a crash as well ? Cheers, Martin. -- Unix _IS_ user friendly - it's just selective about who its friends are ! -- -- Stay on top of everything new and different, both inside and around Java (TM) technology - register by April 22, and save $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. 300 plus technical and hands-on sessions. Register today. Use priority code J9JMT32. http://p.sf.net/sfu/p ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
[Flightgear-devel] here, a good bargain :)
Hello, If you love the Corsair , here the opportunity to get one. http://www.provenancefightersales.com/vought_f4u5nl.htm -- Gérard http://pagesperso-orange.fr/GRTux/ J'ai décidé d'être heureux parce que c'est bon pour la santé. Voltaire -- Stay on top of everything new and different, both inside and around Java (TM) technology - register by April 22, and save $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. 300 plus technical and hands-on sessions. Register today. Use priority code J9JMT32. http://p.sf.net/sfu/p ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
Re: [Flightgear-devel] aircraft modeling question
On Tue, Apr 14, 2009 at 12:26 PM, Torsten Dreyer tors...@t3r.de wrote: My questions is this ... from a modeling perspective, can that 2nd aircraft be animated with absolute lon/lat/elev and roll/pitch/yaw degrees? Or would we need to compute an X, Y, Z offset in meters for the second aircraft? It would be a pain to figure out the orientation transform relative to the original aircraft ... can the secondary aircraft be animated with absolute angles relative to the world coordinate frame? (For animating the 2nd aircraft, I imagine we'd create some set of custom property names, and I'd drive them externally via some network/file protocol ... maybe creating a custom configuration for the generic protocol.) Don't know if I understand you right, but if you want to create arbitrary aircraft with independent position and attitude values, you might want to use the multiplayer protocol. If you fake the mp-server, you might inject any number of aircraft into your scene. I was hoping for a reasonably simple solution without needing new external software development, but the idea of leveraging the multiplayer protocol is interesting. I notice that with our existing multiplayer servers, there is at least a many second delay in positioning the MP aircraft. Is that delay imposed by the server side, or is there something built into the protocol that could cause position updates to be delayed before they are drawn? Back to my other idea. It shouldn't be hard to figure out an XYZ offset of a 2nd piggyback model. But in terms of orientation, are there animation primitives that would allow me to specify absolute euler angles for the 2nd model, or would those angle also have to be computed relative to the primary model orientation (that's doable I suppose, but my brain has begun to hurt just at the suggestion of having to do it.) :-) Thanks, Curt. -- Curtis Olson: http://baron.flightgear.org/~curt/ -- Stay on top of everything new and different, both inside and around Java (TM) technology - register by April 22, and save $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. 300 plus technical and hands-on sessions. Register today. Use priority code J9JMT32. http://p.sf.net/sfu/p___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
Re: [Flightgear-devel] Help needed fo write an FG string property
On Thu, Apr 16, 2009 at 1:07 AM, Harry Campigli wrote: How fo write an FG string property from an indexed string in a structure? Possibly someone can help please , I have tried to find an example with no luck, I am sure i had it working yesterday but now every way i try i end up with it wrong at compile, a seg fault or a property node with an empty string. The basic setup works fine with doubles ect, here i only show the string code. Its wrong, but this is what i want to do, where : index i is declared as an int, path is a node, and path[i] is a string indexed in the structure called buf-node-setStringValue(path,buf-path[i]); ) 1-The stucture called buf with indexed stings in it from the h file enum { FG_MAX_AIRCRAFT = 25 }; uint32_t num_aircraft; string callsign[FG_MAX_AIRCRAFT]; string path[FG_MAX_AIRCRAFT]; 2- I write to the stucture with tempnode = node-getChild(path); if ( tempnode != NULL ) { net-path[i] = tempnode-getStringValue(); } At a glance, this looks like it should work. I believe getStringValue() returns a const char * type and you should be able to assign this to a string variable like you show in your example code. If I was going to dig into this, I might start inserting some printf()'s to dump out the value of tempnode-getStringValue() to make sure that is sane. Make sure [i] is a sane index value, etc. Off by one errors are pretty easy to accidentally introduce. Hehe, I still have trouble with those off by an order of magnitude errors ... :-) Without seeing your surrounding code, I think I would be most interested in first checking the value of i. That should remain between 0 and 24 (i=25 would be an array overrun because you'd be referencing the 26th element of the array.) Best regards, Curt. -- Curtis Olson: http://baron.flightgear.org/~curt/ -- Stay on top of everything new and different, both inside and around Java (TM) technology - register by April 22, and save $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. 300 plus technical and hands-on sessions. Register today. Use priority code J9JMT32. http://p.sf.net/sfu/p___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel