Re: [Flightgear-devel] FlightGear Inputs
On Mon, 8 Aug 2011 09:11:18 -0400, Derrick wrote in message : > On Mon, Aug 8, 2011 at 7:58 AM, Erik Hofman wrote: > > > On Mon, 2011-08-08 at 07:20 -0400, Derrick Washington wrote: > > > Hi Erik > > > > > > Thanks for the input, by the way I thought that bidirectional > > > transmission was unsupported. I tried to put both my input and > > > outputs in the same xml file and choose bi directional support > > > but I keeping getting an error message saying that bidirectional > > > support is not supported, I have included the .xml file I've been > > > using so you can take a look is there something that I'm doing > > > wrong? > > > > Checking the code .. you seem to be right. > > I'm not sure if it's just a matter of no one tried it yet and hence > > the protective code. > > > > You might want to try to comment out the lines starting at line 66 > > of FlightGear/src/Network/generic.cxx en see if it works anyhow. > > Erik > >I don't have source code so I can't alter anything, I just > downloaded the exe from the site, I'm not a software guy by trade so > I didn't want to take the chance of being tempted to touch something > and screw it up, ..if you do, you get to keep all the pieces. ;o) To screw FG up, you need git commit rights, me, I don't have them and I don't want them yet, and I've been here for a decade. ;o) ..making the change is simply putting a comment character ("#", "//" or some such) at the start of said line 66, and recompile and see what it does this time. > can you make the change and send me a new exe? Has > anyone ever check serial transmission of data on windows(vista)? > Beause I can't see to get FG to transmit and receive at the same time > serially no matter what I do. Even if I specify two generic > protocols one for input and one for output (both using serial > transfer method) to the same port, I get an error saying can't open > COM port. FG will send and receive but not at the sametime, and I'm > wondering why? ..one way of diagnosing this is get a LiveUSB, e.g. Knoppix, install the same version FG on that and try do exactly the same thing to see if it does get the same error as on Wintendo, if it does, it leaves the blame in our yard. -- ..med vennlig hilsen = with Kind Regards from Arnt Karlsen ...with a number of polar bear hunters in his ancestry... Scenarios always come in sets of three: best case, worst case, and just in case. -- uberSVN's rich system and user administration capabilities and model configuration take the hassle out of deploying and managing Subversion and the tools developers use with it. Learn more about uberSVN and get a free download at: http://p.sf.net/sfu/wandisco-dev2dev ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
Re: [Flightgear-devel] FlightGear Inputs
Erik I don't have source code so I can't alter anything, I just downloaded the exe from the site, I'm not a software guy by trade so I didn't want to take the chance of being tempted to touch something and screw it up, can you make the change and send me a new exe? Has anyone ever check serial transmission of data on windows(vista)? Beause I can't see to get FG to transmit and receive at the same time serially no matter what I do. Even if I specify two generic protocols one for input and one for output (both using serial transfer method) to the same port, I get an error saying can't open COM port. FG will send and receive but not at the sametime, and I'm wondering why? Melchoir I can't seem to go to the website you pasted in as a hyperlink, not sure why not but it doesn't seem if its a normal internet address, perhaps you pasted it in incorrectly? On Mon, Aug 8, 2011 at 7:58 AM, Erik Hofman wrote: > On Mon, 2011-08-08 at 07:20 -0400, Derrick Washington wrote: > > Hi Erik > > > > Thanks for the input, by the way I thought that bidirectional > > transmission was unsupported. I tried to put both my input and > > outputs in the same xml file and choose bi directional support but I > > keeping getting an error message saying that bidirectional support is > > not supported, I have included the .xml file I've been using so you > > can take a look is there something that I'm doing wrong? > > Checking the code .. you seem to be right. > I'm not sure if it's just a matter of no one tried it yet and hence the > protective code. > > You might want to try to comment out the lines starting at line 66 of > FlightGear/src/Network/generic.cxx en see if it works anyhow. > > Erik > > > > > -- > BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA > The must-attend event for mobile developers. Connect with experts. > Get tools for creating Super Apps. See the latest technologies. > Sessions, hands-on labs, demos & much more. Register early & save! > http://p.sf.net/sfu/rim-blackberry-1 > ___ > Flightgear-devel mailing list > Flightgear-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/flightgear-devel > -- BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA The must-attend event for mobile developers. Connect with experts. Get tools for creating Super Apps. See the latest technologies. Sessions, hands-on labs, demos & much more. Register early & save! http://p.sf.net/sfu/rim-blackberry-1___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
Re: [Flightgear-devel] FlightGear Inputs
On Mon, 2011-08-08 at 07:20 -0400, Derrick Washington wrote: > Hi Erik > > Thanks for the input, by the way I thought that bidirectional > transmission was unsupported. I tried to put both my input and > outputs in the same xml file and choose bi directional support but I > keeping getting an error message saying that bidirectional support is > not supported, I have included the .xml file I've been using so you > can take a look is there something that I'm doing wrong? Checking the code .. you seem to be right. I'm not sure if it's just a matter of no one tried it yet and hence the protective code. You might want to try to comment out the lines starting at line 66 of FlightGear/src/Network/generic.cxx en see if it works anyhow. Erik -- BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA The must-attend event for mobile developers. Connect with experts. Get tools for creating Super Apps. See the latest technologies. Sessions, hands-on labs, demos & much more. Register early & save! http://p.sf.net/sfu/rim-blackberry-1 ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
Re: [Flightgear-devel] FlightGear Inputs
Hi Erik Thanks for the input, by the way I thought that bidirectional transmission was unsupported. I tried to put both my input and outputs in the same xml file and choose bi directional support but I keeping getting an error message saying that bidirectional support is not supported, I have included the .xml file I've been using so you can take a look is there something that I'm doing wrong? On Mon, Aug 8, 2011 at 3:19 AM, Erik Hofman wrote: > On Sun, 2011-08-07 at 20:33 -0400, Derrick Washington wrote: > > Hi > > > >I need to know if the inputs coming from FG, while using a generic > > protocol having binary mode set to true, are coming in as integers > > that need to be converted to floating point or is FG actually sending > > in a floating point word, a byte at a time? So my code to receive FG > > data looks something like this > > > > > > for ( int i = 0; i <= 3; i++ ) { dummy_var = (dummy_var << 8) | > > rs232_uart1; } > > > > return ( (float) dummy_var); > > > > What I am wondering is, is the " return ( (float) dummy_var); " cast > > to a float necessary, or is the number already in floating point > > format, if so then I need to instruct my hardware to retrieve a full > > word at a time. I've included the xml file just in case you guys have > > any questions about what data I am asking FG to transmit. > > Floats are sent as floats and (depending on which version of FlightGear > you're using, doubles as doubles but they where added in a later > version). > > BTW you can (and have to) specify a separate section for input and for > output in the same protocol configuration file if you want > bi-directional communication. > > Erik > > > > > -- > BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA > The must-attend event for mobile developers. Connect with experts. > Get tools for creating Super Apps. See the latest technologies. > Sessions, hands-on labs, demos & much more. Register early & save! > http://p.sf.net/sfu/rim-blackberry-1 > ___ > Flightgear-devel mailing list > Flightgear-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/flightgear-devel > \n , Throttle (rad) integer /controls/engines/engine[0]/throttle Throttle (rad) integer /controls/engines/engine[1]/throttle Aileron (rad) float /controls/flight/aileron Elevator (rad) float /controls/flight/elevator rudder (rad) float /controls/flight/rudder Steering float /controls/gear/steering true Speed /velocities/airspeed-kt Altitude /position/altitude-ft Latitude-deg /position/latitude-deg Longitude-deg (rad) /position/longitude-deg Pitch rate (deg per sec) /orientation/pitch-rate-degps Roll rate (deg per sec) /orientation/roll-rate-degps Yaw Rate (deg per sec ) /orientation/yaw-rate-degps Accelerometer X (ft per sec) /accelerations/x-accel-fps_sec Accelerometer Y (ft per sec) /accelerations/y-accel-fps_sec Accelerometer Z (ft per sec) /accelerations/z-accel-fps_sec -- BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA The must-attend event for mobile developers. Connect with experts. Get tools for creating Super Apps. See the latest technologies. Sessions, hands-on labs, demos & much more. Register early & save! http://p.sf.net/sfu/rim-blackberry-1___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
Re: [Flightgear-devel] FlightGear Inputs
On Sun, 7 Aug 2011, Derrick Washington wrote: > Hi > > I need to know if the inputs coming from FG, while using a generic > protocol having binary mode set to true, are coming in as integers that need > to be converted to floating point or is FG actually sending in a floating > point word, a byte at a time? So my code to receive FG data looks something > like this > > > for ( int i = 0; i <= 3; i++ ) { dummy_var = (dummy_var << 8) | > rs232_uart1; } > > > > return ( (float) dummy_var); > > What I am wondering is, is the " return ( (float) dummy_var); " cast to a > float necessary, or is the number already in floating point format, if so > then I need to instruct my hardware to retrieve a full word at a time. I've > included the xml file just in case you guys have any questions about what > data I am asking FG to transmit. FlightGear sends the float value one byte at the time, so the cast to float is not correct since that will convert the int value in dummy_var to a float rather than accepting the bit pattern it contains as a float value. One way to do the latter is this: return *(float *)&dummy_var; C++ may have nicer ways. Cheers, Anders -- --- Anders Gidenstam WWW: http://www.gidenstam.org/FlightGear/ -- BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA The must-attend event for mobile developers. Connect with experts. Get tools for creating Super Apps. See the latest technologies. Sessions, hands-on labs, demos & much more. Register early & save! http://p.sf.net/sfu/rim-blackberry-1 ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
Re: [Flightgear-devel] FlightGear Inputs
On Sun, 2011-08-07 at 20:33 -0400, Derrick Washington wrote: > Hi > >I need to know if the inputs coming from FG, while using a generic > protocol having binary mode set to true, are coming in as integers > that need to be converted to floating point or is FG actually sending > in a floating point word, a byte at a time? So my code to receive FG > data looks something like this > > > for ( int i = 0; i <= 3; i++ ) { dummy_var = (dummy_var << 8) | > rs232_uart1; } > > > > return ( (float) dummy_var); > > What I am wondering is, is the " return ( (float) dummy_var); " cast > to a float necessary, or is the number already in floating point > format, if so then I need to instruct my hardware to retrieve a full > word at a time. I've included the xml file just in case you guys have > any questions about what data I am asking FG to transmit. Floats are sent as floats and (depending on which version of FlightGear you're using, doubles as doubles but they where added in a later version). BTW you can (and have to) specify a separate section for input and for output in the same protocol configuration file if you want bi-directional communication. Erik -- BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA The must-attend event for mobile developers. Connect with experts. Get tools for creating Super Apps. See the latest technologies. Sessions, hands-on labs, demos & much more. Register early & save! http://p.sf.net/sfu/rim-blackberry-1 ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
[Flightgear-devel] FlightGear Inputs
Hi I need to know if the inputs coming from FG, while using a generic protocol having binary mode set to true, are coming in as integers that need to be converted to floating point or is FG actually sending in a floating point word, a byte at a time? So my code to receive FG data looks something like this for ( int i = 0; i <= 3; i++ ) { dummy_var = (dummy_var << 8) | rs232_uart1; } return ( (float) dummy_var); What I am wondering is, is the " return ( (float) dummy_var); " cast to a float necessary, or is the number already in floating point format, if so then I need to instruct my hardware to retrieve a full word at a time. I've included the xml file just in case you guys have any questions about what data I am asking FG to transmit. \n , Throttle (rad) integer /controls/engines/engine[0]/throttle Aileron (rad) float /controls/flight/aileron Elevator (rad) float /controls/flight/elevator rudder (rad) float /controls/flight/rudder Gears float /controls/gear/gear-down Steering float /controls/gear/steering -- BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA The must-attend event for mobile developers. Connect with experts. Get tools for creating Super Apps. See the latest technologies. Sessions, hands-on labs, demos & much more. Register early & save! http://p.sf.net/sfu/rim-blackberry-1___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel