Re: [Flightgear-devel] Generic Protocol Input - Float weirdness

2011-04-03 Thread Erik Hofman
On Sun, 2011-04-03 at 01:52 +0200, Roberto Inzerillo wrote:

 Well, readme.protocol does not mention a double format, float only; should I 
 think double is anyway, just undocumented? I should really study more C++ and 
 read the code by myself, damn

That's an omission in the documentation, you could define double
instead of float without a problem (in the latest code anyway).
There have been some fixes in that area, which version are you using?

Erik




--
Create and publish websites with WebMatrix
Use the most popular FREE web apps or write code yourself; 
WebMatrix provides all the features you need to develop and 
publish your website. http://p.sf.net/sfu/ms-webmatrix-sf
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] Generic Protocol Input - Float weirdness

2011-04-03 Thread Erik Hofman
On Sun, 2011-04-03 at 01:52 +0200, Roberto Inzerillo wrote:
 Well, readme.protocol does not mention a double format, float only; should I 
 think double is anyway, just undocumented? I should really study more C++ and 
 read the code by myself, damn

Note, you could also define fixed which is a fixed point integer
representation of a float. (It gets converted automatically) back and
forth to a floating point value.

Erik



--
Create and publish websites with WebMatrix
Use the most popular FREE web apps or write code yourself; 
WebMatrix provides all the features you need to develop and 
publish your website. http://p.sf.net/sfu/ms-webmatrix-sf
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] Generic Protocol Input - Float weirdness

2011-04-03 Thread Roberto Inzerillo

 Well, readme.protocol does not mention a double format, float only;
 should I think double is anyway, just undocumented? I should really study 
 more
 C++ and read the code by myself, damn
 
 That's an omission in the documentation, you could define double
 instead of float without a problem (in the latest code anyway).

I'll do that.
Do you think someone will update the protocol definition doc somewhen in the 
near future? You know ... maybe there's more to know.


 There have been some fixes in that area, which version are you using?

Ver.2.0 on Linux.

-- 
Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir
belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de

--
Create and publish websites with WebMatrix
Use the most popular FREE web apps or write code yourself; 
WebMatrix provides all the features you need to develop and 
publish your website. http://p.sf.net/sfu/ms-webmatrix-sf
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] Generic Protocol Input - Float weirdness

2011-04-03 Thread Roberto Inzerillo

 Well, readme.protocol does not mention a double format, float only;
 should I think double is anyway, just undocumented? I should really study 
 more
 C++ and read the code by myself, damn
 
 Note, you could also define fixed which is a fixed point integer
 representation of a float. (It gets converted automatically) back and
 forth to a floating point value.

Tell me more Erik, what's this fixed type syntax, how could I use it? I imagine 
there should be at least a way to define how many decimal digits to use.

I've read about it in the past; my very own Arduino code is making use of 
something like that (first treats every standby-mhz value as an integer and, 
just before sending it to fgfs, translates it into a string representing a 3 
decimal digits number (I made it that way because I see the KX165 Radio uses 
this format to store frequencies in the property tree, there was no need to 
always work on floats/doubles during the process).

But I'm already sending a 3 decimal digit number to fgfs! Still, again fgfs 
stores it into the tree as a double and changes its decimal part, hence loosing 
correctness (since precision might mean something else when talking about 
doubles).


-- 
NEU: FreePhone - kostenlos mobil telefonieren und surfen!   
Jetzt informieren: http://www.gmx.net/de/go/freephone

--
Create and publish websites with WebMatrix
Use the most popular FREE web apps or write code yourself; 
WebMatrix provides all the features you need to develop and 
publish your website. http://p.sf.net/sfu/ms-webmatrix-sf
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] Generic Protocol Input - Float weirdness

2011-04-03 Thread Roberto Inzerillo

 One solution others have used is to express the frequency in kHz instead of 
 MHz so use 131925 instead of 131.925 and some nasal magic to copy your kHz
 value to the MHz value.

 Ron

Others? Who? Where in the code should I look for it? What should I search for?


-- 
GMX DSL Doppel-Flat ab 19,99 Euro/mtl.! Jetzt mit 
gratis Handy-Flat! http://portal.gmx.net/de/go/dsl

--
Create and publish websites with WebMatrix
Use the most popular FREE web apps or write code yourself; 
WebMatrix provides all the features you need to develop and 
publish your website. http://p.sf.net/sfu/ms-webmatrix-sf
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] Generic Protocol Input - Float weirdness

2011-04-03 Thread Erik Hofman
On Sun, 2011-04-03 at 12:00 +0200, Roberto Inzerillo wrote:
  Well, readme.protocol does not mention a double format, float only;
  should I think double is anyway, just undocumented? I should really study 
  more
  C++ and read the code by myself, damn
  
  Note, you could also define fixed which is a fixed point integer
  representation of a float. (It gets converted automatically) back and
  forth to a floating point value.
 
 Tell me more Erik, what's this fixed type syntax, how could I use it? I 
 imagine there should be at least a way to define how many decimal digits to 
 use.

Looking at the code:
It's a 32-bit integer with 16.16 format meaning (float_val*65535) when
sending and (integer_val/65535.0) when receiving it.

Erik



--
Create and publish websites with WebMatrix
Use the most popular FREE web apps or write code yourself; 
WebMatrix provides all the features you need to develop and 
publish your website. http://p.sf.net/sfu/ms-webmatrix-sf
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] Generic Protocol Input - Float weirdness

2011-04-03 Thread Erik Hofman
On Sun, 2011-04-03 at 12:01 +0200, Roberto Inzerillo wrote:
  One solution others have used is to express the frequency in kHz instead of 
  MHz so use 131925 instead of 131.925 and some nasal magic to copy your kHz
  value to the MHz value.
 
  Ron
 
 Others? Who? Where in the code should I look for it? What should I search 
 for?

The generic protocol code is located in
FlightGear/src/Networking/generic.cxx if that's what you're asking.

Erik


--
Create and publish websites with WebMatrix
Use the most popular FREE web apps or write code yourself; 
WebMatrix provides all the features you need to develop and 
publish your website. http://p.sf.net/sfu/ms-webmatrix-sf
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] KX165 - serially feeding data to increment a property value. How?

2011-04-03 Thread Jon Stockill
On 31/03/11 21:28, Roberto Inzerillo wrote:
 Hallo everybody,
   I purchased a few rotary encoder and a bunch of 7segment displays to build 
 a physical replacement of the Bendix KX165. I'm using Arduino which feeds 
 data to FGFS on a serial connection. I'd like to update 
 instrumentation/comm[0]/frequencies/standby-mhz property using the rotary 
 encoder, I wonder what's the best strategy.

I'm working on something similar too:

http://leeds.hackspace.org.uk/wiki/index.php/Projects/FlightSimHardware

The simplest solution seems to be to simply send the active and standby 
frequencies whenever there's a change (up/down of the standby frequency, 
or swap of active/standby), and define a protocol that expects the two 
frequencies, comma separated from the serial port. It doesn't appear to 
matter that there's not a continuous data stream - the last received 
value is used if there's no new data. I run the incoming protocol at 
10Hz, which seems to give a quick enough response for the on screen 
version of the display.

I'd like to be able to send values from flightgear back to the panel, so 
that updates to the properties are reflected on the radio panel 
hardware, but it appears I've got some bugs in my code at the moment 
(seems like a race condition or memory leak) that cause things to lock 
up or randomly reset. I need to get it hooked up to a JTAGICE to debug it.

Jon

--
Create and publish websites with WebMatrix
Use the most popular FREE web apps or write code yourself; 
WebMatrix provides all the features you need to develop and 
publish your website. http://p.sf.net/sfu/ms-webmatrix-sf
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] Generic Protocol Input - Float weirdness

2011-04-03 Thread Torsten Dreyer
 
 Others? Who? Where in the code should I look for it? What should I search
  for?
 
Me ;-)
But even simpler for the microcontroller: the internal representation neither 
khz nor mhz but channel. For the COMM, channel 0 is 118.000 Mhz and channel 
759 equals 136.975 MHz. The formula to convert from frequency to channel is
Channel = (Frequency_MHz - 118.0) / 0.025
and from channel to frequency:
Frequency_MHz = Channel * 0.025 + 118.0

For the NAV radio, the formula is
Channel = (Frequency_MHz - 108.0)/0.05
and reverse
Frequency_MHz = Channel * 0.05 + 108
resulting in channels from 0 - 199.

You only need a uint8_t (8-bit) variable for the NAV and a uint16_t (16bit) 
variable for the COMM part.

Send this as an INT with the generic protocol and use
offsetA/offset
factorB/factor
within your chunk

offset and factor are used like
(output from flightgear): value_on_the_wire = property_value * factor + offset
and
(input to flightgear): property_value = value_on_wire * factor + offset

Torsten

--
Create and publish websites with WebMatrix
Use the most popular FREE web apps or write code yourself; 
WebMatrix provides all the features you need to develop and 
publish your website. http://p.sf.net/sfu/ms-webmatrix-sf
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


[Flightgear-devel] OSG caching (was: Texture cache)

2011-04-03 Thread ThorstenB
 Maybe someone could do some tests when changing the setting
   (SGPagedLOD.hxx:56) from CACHE_NONE to CACHE_IMAGES or even to
   CACHE_ALL (then recompile/install sg+fg). Would be interesting to know
   how this changed loading times, run-time fps and memory consumption.
 After 30 minutes more of testing: It also works in practice. I have seen
 no averse side effects, and the performance drop from loading new clouds
 is now almost completely gone - the framerate drops I still see are mainly
 associated with terrain sampling.

 The actual rendering performance is, as far as I can see, not changed,
 i.e. once everything is there, it is there. But all in all this makes
 things way smoother. It should be most pronounced on single CPU machines.
I've also been using CACHE_ALL since then - not seeing any problems. But 
I haven't checked memory consumption. So, what's the status about the 
OSG caching options, should we enable these? Tim?

cheers,
Thorsten

--
Create and publish websites with WebMatrix
Use the most popular FREE web apps or write code yourself; 
WebMatrix provides all the features you need to develop and 
publish your website. http://p.sf.net/sfu/ms-webmatrix-sf
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] OSG caching (was: Texture cache)

2011-04-03 Thread Torsten Dreyer
 I've also been using CACHE_ALL since then - not seeing any problems. But
 I haven't checked memory consumption. So, what's the status about the
 OSG caching options, should we enable these? Tim?
Me, too. I had a few coredumps with the 4-nvidia-cards, 8 monitors 
(multithreading=automatic) setup since I had that enabled. I was not able to 
backtrace and blame it to the CACHING-Option, however. So this might just be a 
random correlation.

How about checking a /sim/rendering/cache property at startup?

Torsten

--
Create and publish websites with WebMatrix
Use the most popular FREE web apps or write code yourself; 
WebMatrix provides all the features you need to develop and 
publish your website. http://p.sf.net/sfu/ms-webmatrix-sf
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] Generic Protocol Input - Float weirdness

2011-04-03 Thread Roberto Inzerillo
 You only need a uint8_t (8-bit) variable for the NAV and a uint16_t
 (16bit) variable for the COMM part.
 
 Send this as an INT with the generic protocol and use
 offsetA/offset
 factorB/factor
 within your chunk
 
 offset and factor are used like
 (output from flightgear): value_on_the_wire = property_value * factor +
 offset and
 (input to flightgear): property_value = value_on_wire * factor + offset
 
 Torsten

That's finally great news!!! :-)
Thank you Torsten, that's what I was missing, I'm trying that immediately.
-- 
GMX DSL Doppel-Flat ab 19,99 Euro/mtl.! Jetzt mit 
gratis Handy-Flat! http://portal.gmx.net/de/go/dsl

--
Create and publish websites with WebMatrix
Use the most popular FREE web apps or write code yourself; 
WebMatrix provides all the features you need to develop and 
publish your website. http://p.sf.net/sfu/ms-webmatrix-sf
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] OSG caching

2011-04-03 Thread ThorstenB
On 03.04.2011 16:18, Torsten Dreyer wrote:
 Me, too. I had a few coredumps with the 4-nvidia-cards, 8 monitors
 (multithreading=automatic) setup since I had that enabled. I was not able to
 backtrace and blame it to the CACHING-Option, however. So this might just be a
 random correlation.
In fact I haven't seen any crash for a very long time now (yay!). But 
I'm not using multi-threading, as that never worked for me. FG starts, 
but the scenery doesn't look right: the surface is all black and many 
models are only visible partially. Does this work for everyone else - 
maybe depends on newer OSG versions (2.9.x)?

 How about checking a /sim/rendering/cache property at startup?
Good idea. I'll be adding this and enable it by default. Let's see if we 
get any user reports... (of course I'm thinking about the usual 
thank-you-messages from people being extremely happy with the 
improvements :) ).

cheers,
Thorsten

--
Create and publish websites with WebMatrix
Use the most popular FREE web apps or write code yourself; 
WebMatrix provides all the features you need to develop and 
publish your website. http://p.sf.net/sfu/ms-webmatrix-sf
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] Generic Protocol Input - Float weirdness

2011-04-03 Thread Torsten Dreyer
   typeint/type
 
that's the nature of an INT: no fractions at all :-P

Torsten

--
Create and publish websites with WebMatrix
Use the most popular FREE web apps or write code yourself; 
WebMatrix provides all the features you need to develop and 
publish your website. http://p.sf.net/sfu/ms-webmatrix-sf
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] KX165 - serially feeding data to increment a property value. How?

2011-04-03 Thread Jon Stockill
On 03/04/11 15:04, Roberto Inzerillo wrote:

 Good to know Jon, I'll be glad to talk about that with you.
 I like your hardware approach, getting your hands dirty on a naked ATMega16 
 should be fun too :-)

It's interesting, and results in *much* smaller code than you'd get 
using the arduino libraries, and I was reasonably happy with gcc anyway 
which reduced the learning curve. It's nice to be able to just type 
make and have the code compiled and blasted onto the chip via an AVRISP2.

I sort of went about this in the opposite direction to most people - I 
started out with the bare AVR stuff, and got an arduino at a later stage 
just for hacking quick projects with, though it's currently stuck in a 
fairly long term project:

http://leeds.hackspace.org.uk/wiki/index.php/Projects/Nav_Bot_I

 I've settled down on sending the standby-mhz only cause I will send the swap 
 freq-  button state too, that will swap the frequencies inside fgfs 
 property tree itself, without the need to send the active freq too.
 Still I think it's better to make the external hardware send only the rotary 
 encoder's rotations from a design perspective, and not the frequencies at 
 all; I know that's debatable. I'm sending freq now for easy of development 
 only.

 I agree sending only changing values should be more desirable but serially 
 sent data should be sent all together, there's no way to send an input chunk 
 and leaving the others as-is; since my approach aims at integrating several 
 (not thousands but quite a few anyway!) physical input/output devices, I 
 think for simplicity everything should be sent at a constant frequency. And 
 no, I find 10hz is way too low for some other devices (maybe frequency 
 settings updates can tolerate a 10th of a second delay, but it's still 
 noticeable).

 I'm still wondering if you too have noticed that FGFS updates it's property 
 tree with not exact standby-mhz values when using such input devices. Can you 
 confirm? Did you solved this issue?

 I've also noticed you useformat%03.3f/format  in an input chunk ... I did 
 try that too, I hoped that would get me a 3.3 digit format but nothing! It's 
 ignored. How's that at your side?

Actually I wrote that with reference to the protocol documentation, 
because I didn't have the exact file handy - there may be slight 
differences between that and what I actually got working. I'll update it 
when I remember to grab a copy of the original file. I did get my 
prototype working though, so it's definitely possible to format the 
numbers properly.

I need to sort out a git server too so other people can play with the 
code, currently the only access to my git repository is through ssh.

Jon

--
Create and publish websites with WebMatrix
Use the most popular FREE web apps or write code yourself; 
WebMatrix provides all the features you need to develop and 
publish your website. http://p.sf.net/sfu/ms-webmatrix-sf
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] Generic Protocol Input - Float weirdness

2011-04-03 Thread Roberto Inzerillo
Ok Torsten, let's resume.

You suggest:

 Send this as an INT with the generic protocol and use
 offsetA/offset
 factorB/factor
 within your chunk

But then:

 typeint/type
 that's the nature of an INT: no fractions at all :-P

I don't see a way out.
- I send an INT to FGFS, the ((value_on_wire * factor) + offset) calculation 
gets me an INT without decimals.
- I send a DOUBLE/FLOAT to FGFS, the ((value_on_wire * factor) + offset) 
calculation gets me a complete DOUBLE/FLOAT but with far too decimals.


I repeat myself, maybe I was not clear:
- FGFS stores correctly 3 decimal digits double values in the property tree 
when changing the standby-mhz value pushing the mouse button on the 3d elements 
in the simulator window (it never stores more then 3 decimals!); it does that 
right. The action in kx165-1.xml does a simple step-up/down but gives always 3 
decimals, never more than that.
- It does that wrong only when I update the value sending it with the generic 
protocol, even though on the wire I send precisely 7 digit numbers: 3 digits 
followed by a dot and 3 decimal digits); that num,ber gets almost always 
changed to a longer number, with more decimals (not zeroes).

Hence no way to make it work as It should :-(

It seems there's no way out.

-

I hope I did not confuse you all with my use of the term Decimal which 
probably was not appropriate. I realize now english people say fractional.
I'm Italian, to us a number is made of an integral part and a decimal part. A 
number like 137.750 is made of: 137 = integral part, 750 = decimal part.
I'm not used to use the term fractional part.

I realize now only that me talking about the decimal part of the frequency 
value may have mislead quite a bit. I'm apologize about that.
-- 
Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir
belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de

--
Create and publish websites with WebMatrix
Use the most popular FREE web apps or write code yourself; 
WebMatrix provides all the features you need to develop and 
publish your website. http://p.sf.net/sfu/ms-webmatrix-sf
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] Generic Protocol Input - Float weirdness

2011-04-03 Thread ThorstenB
Roberto,

 though on the wire I send precisely 7 digit numbers: 3 digits
 followed by a dot and 3 decimal digits);
As you describe correctly, you're transmitting strings (= series of
ASCII characters).

 typeint/type
For an input protocol this is the _target_ type. With int your
_string_ is parsed and converted to an _integer_. No fractions.

Keep sending strings representing integers (no dot . characters in
the string) but specify the _target_ typedouble/type, using
offset/factors as described by Torsten. FlightGear will then parse
your string, convert it to double precision floating point, and apply
factors and offset.

Make sure you're using FlightGear 2.2-pre-release or the current GIT
version to achieve double precision. FG2.0/1,9.x only supported single
precision with the generic protocol, so there was no difference
between float and double.

This is the commit which made double precision work for the generic
protocol, and it was not part of FG2.0 yet:
http://www.gitorious.org/fg/flightgear/commit/d0f6f748ed7a2ad34159e18d352e4df6c11e2cde

cheers,
Thorsten

--
Create and publish websites with WebMatrix
Use the most popular FREE web apps or write code yourself; 
WebMatrix provides all the features you need to develop and 
publish your website. http://p.sf.net/sfu/ms-webmatrix-sf
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] KX165 - serially feeding data to increment a property value. How?

2011-04-03 Thread castle
I think you're really beating yourself up the hard way. ;-)

My suggestion:

get a board from

http://www.diolan.com/i2c/u2c12_doc/u2c_spi_config_ss_fun.html

and 7-segment driver chips from Maxim (7219) with an SPI interface (drives
8 alpha-numeric per chip) or a Maxim 6954 that drives 16 alpha-numerics or
any combination of discrete LEds. Run the chips as slaves on your SPI bus
and the diolan board as a master.

ATM my 747 sim has over 37 discrete alpha-numerics (MCP, nav/radio panels,
digital clocks, etc)- one master, (1) 6954 and (3) 7219s.The 737 that
was delivered to NASA/Ames two years ago had a comparable number plus 54
discrete LEDs for warning lights, annunciators, etc

Use the Network code in FG as examples on writing a socket connection and
write a small program to run your hardware and connect to FG over a LAN. 
If you can program a micro-processor sounds like you're more than capable
of handling some higher level coding

If you get your present design approach to work, great; if not, and want
to try my scheme. glad to help with design and code, your call

Just my $0.02

John

  I purchased a few rotary encoder and a bunch of 7segment displays to
 build a physical replacement of the Bendix KX165. I'm using Arduino which
 feeds data to FGFS on a serial connection. I'd like to update
 instrumentation/comm[0]/frequencies/standby-mhz property using the
rotary
 encoder, I wonder what's the best strategy.

 I'm working on something similar too:
 http://leeds.hackspace.org.uk/wiki/index.php/Projects/FlightSimHardware

 Good to know Jon, I'll be glad to talk about that with you.
 I like your hardware approach, getting your hands dirty on a naked
ATMega16 should be fun too :-)

 The simplest solution seems to be to simply send the active and standby
frequencies whenever there's a change (up/down of the standby
frequency,
 or swap of active/standby), and define a protocol that expects the two
frequencies, comma separated from the serial port. It doesn't appear to
matter that there's not a continuous data stream - the last received
value is used if there's no new data. I run the incoming protocol at
10Hz, which seems to give a quick enough response for the on screen
version of the display.

 I've settled down on sending the standby-mhz only cause I will send the
swap freq - button state too, that will swap the frequencies inside
fgfs
 property tree itself, without the need to send the active freq too.
Still I think it's better to make the external hardware send only the
rotary encoder's rotations from a design perspective, and not the
frequencies at all; I know that's debatable. I'm sending freq now for
easy
 of development only.

 I agree sending only changing values should be more desirable but
serially
 sent data should be sent all together, there's no way to send an input
chunk and leaving the others as-is; since my approach aims at
integrating
 several (not thousands but quite a few anyway!) physical input/output
devices, I think for simplicity everything should be sent at a constant
frequency. And no, I find 10hz is way too low for some other devices
(maybe frequency settings updates can tolerate a 10th of a second delay,
but it's still noticeable).

 I'm still wondering if you too have noticed that FGFS updates it's
property tree with not exact standby-mhz values when using such input
devices. Can you confirm? Did you solved this issue?

 I've also noticed you use format%03.3f/format in an input chunk ...
I
 did try that too, I hoped that would get me a 3.3 digit format but
nothing! It's ignored. How's that at your side?







 I'd like to be able to send values from flightgear back to the panel,
so
 that updates to the properties are reflected on the radio panel
hardware, but it appears I've got some bugs in my code at the moment
(seems like a race condition or memory leak) that cause things to lock
up or randomly reset. I need to get it hooked up to a JTAGICE to debug
it.
 Jon
 --
Create and publish websites with WebMatrix
 Use the most popular FREE web apps or write code yourself;
 WebMatrix provides all the features you need to develop and
 publish your website. http://p.sf.net/sfu/ms-webmatrix-sf
 ___
 Flightgear-devel mailing list
 Flightgear-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/flightgear-devel

 --
 NEU: FreePhone - kostenlos mobil telefonieren und surfen!
 Jetzt informieren: http://www.gmx.net/de/go/freephone

 --
Create and publish websites with WebMatrix
 Use the most popular FREE web apps or write code yourself;
 WebMatrix provides all the features you need to develop and
 publish your website. http://p.sf.net/sfu/ms-webmatrix-sf
 ___
 Flightgear-devel mailing list
 

Re: [Flightgear-devel] SimGear Compiler Question in VS 2008 Express

2011-04-03 Thread Arnt Karlsen
On Sun, 3 Apr 2011 23:21:08 +0800, Chengde wrote in message 
395281372DA944E98255F70369FF0429@b9b11736cd184f3:

 1-- Build started: Project: SimGear, Configuration: Debug Win32
 1--
 
 1Generation of simgear_config.h
 
 1系统找不到指定的文件。

..System can not find the file specified.???  
(from KDE's translatoid.)

 1Project : error PRJ0019: A tool returned an error code from
 1Generation of
 simgear_config.h

..you found it?

 1Creating browse information file...
 
 1Microsoft Browse Information Maintenance Utility Version 9.00.30729
 
 1Copyright (C) Microsoft Corporation. All rights reserved.
 
 1BSCMAKE: error BK1506 : cannot open file
 1'.\Win32\Debug\logstream.sbr': No
 such file or directory
 
 1Build log was saved at
 file://c:\FlightGear\SimGear\projects\VC90\Win32\Debug\BuildLog.htm
 
 1SimGear - 2 error(s), 0 warning(s)
 
 == Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped
 ==
 


-- 
..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.

--
Create and publish websites with WebMatrix
Use the most popular FREE web apps or write code yourself; 
WebMatrix provides all the features you need to develop and 
publish your website. http://p.sf.net/sfu/ms-webmatrix-sf
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] OSG caching (was: Texture cache)

2011-04-03 Thread Tim Moore
On Sun, Apr 3, 2011 at 3:41 PM, ThorstenB bre...@gmail.com wrote:
 Maybe someone could do some tests when changing the setting
   (SGPagedLOD.hxx:56) from CACHE_NONE to CACHE_IMAGES or even to
   CACHE_ALL (then recompile/install sg+fg). Would be interesting to 
  know
   how this changed loading times, run-time fps and memory consumption.
 After 30 minutes more of testing: It also works in practice. I have seen
 no averse side effects, and the performance drop from loading new clouds
 is now almost completely gone - the framerate drops I still see are mainly
 associated with terrain sampling.

 The actual rendering performance is, as far as I can see, not changed,
 i.e. once everything is there, it is there. But all in all this makes
 things way smoother. It should be most pronounced on single CPU machines.
 I've also been using CACHE_ALL since then - not seeing any problems. But
 I haven't checked memory consumption. So, what's the status about the
 OSG caching options, should we enable these? Tim?
There are two issues I can think of. One is that animations might not
work correctly with caching enabled, but I think the copying we do
elsewhere should take care of that. The other is that memory usage
will be higher with caching enabled.

Tim

 cheers,
 Thorsten

 --
 Create and publish websites with WebMatrix
 Use the most popular FREE web apps or write code yourself;
 WebMatrix provides all the features you need to develop and
 publish your website. http://p.sf.net/sfu/ms-webmatrix-sf
 ___
 Flightgear-devel mailing list
 Flightgear-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/flightgear-devel


--
Create and publish websites with WebMatrix
Use the most popular FREE web apps or write code yourself; 
WebMatrix provides all the features you need to develop and 
publish your website. http://p.sf.net/sfu/ms-webmatrix-sf
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] 737-100: Fuselagereflect in /Generic ?

2011-04-03 Thread Vivian Meazza
Emilian
 
 On Thursday 31 March 2011 12:03:50 Vivian Meazza wrote:
 
  
   Happens here if I disable and then reenable the shaders with the view-
 
   rendering options.
 
  What happens?
 
 The render bin error.
 
   Also most of the no image file, .. errors go away if I specify paths
 to
   them
   in the effect that inherits the one from Effects/reflect*
   (inheritance problem ?).
 
  No, it's not inheritance problems. It's people using unchanged copies of
  code which is meant to be an example. But I think I can fix it. In any
  case, the warnings shouldn't affect the functioning of the shader.
 
  Vivian
 
 
 Ok.. so the reflect.eff in $FG_ROOT/Effects is only meant as an example ?
 It should say so. Instead it says it can be inherited.

That's not what I meant. It was the use of
Aircraft/737-300/Models/Effects/733LH.ReflectionMap3 when it is not
appropriate. Reflect.eff can and should be inherited.

 Nevermind that, if I inherit it in an .eff, shouldn't the unchanged
 elements be
 passed to the other .eff ?
 
 
Yes, and as AFAIKS that works correctly.

I have amended data/Effects/reflect.eff so that it uses a generic example
reflect map, which needs replacing for individual aircraft.

There is one remaining error message which can be generated:

failed to load effect texture file D:/path/to/your/data/

This slightly misleading error message is generated when the object that has
the reflection effect applied has no base texture. The effect still works as
expected though. The fix is obviously to apply a base texture.

Vivian 

 



--
Create and publish websites with WebMatrix
Use the most popular FREE web apps or write code yourself; 
WebMatrix provides all the features you need to develop and 
publish your website. http://p.sf.net/sfu/ms-webmatrix-sf
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] 737-100: Fuselagereflect in /Generic ?

2011-04-03 Thread Emilian Huminiuc
On Monday 04 April 2011 01:00:36 Vivian Meazza wrote:
 Emilian
 
  On Thursday 31 March 2011 12:03:50 Vivian Meazza wrote:
Happens here if I disable and then reenable the shaders with the
view-

rendering options.
   
   What happens?
  
  The render bin error.
  
Also most of the no image file, .. errors go away if I specify
paths
  
  to
  
them
in the effect that inherits the one from Effects/reflect*
(inheritance problem ?).
   
   No, it's not inheritance problems. It's people using unchanged copies
   of code which is meant to be an example. But I think I can fix it. In
   any case, the warnings shouldn't affect the functioning of the shader.
   
   Vivian
  
  Ok.. so the reflect.eff in $FG_ROOT/Effects is only meant as an example ?
  It should say so. Instead it says it can be inherited.
 
 That's not what I meant. It was the use of
 Aircraft/737-300/Models/Effects/733LH.ReflectionMap3 when it is not
 appropriate. Reflect.eff can and should be inherited.

I see, thanks for clearing that out :).

 
  Nevermind that, if I inherit it in an .eff, shouldn't the unchanged
  elements be
  passed to the other .eff ?
 
 Yes, and as AFAIKS that works correctly.
 
 I have amended data/Effects/reflect.eff so that it uses a generic example
 reflect map, which needs replacing for individual aircraft.
 
 There is one remaining error message which can be generated:
 
 failed to load effect texture file D:/path/to/your/data/
 
 This slightly misleading error message is generated when the object that
 has the reflection effect applied has no base texture. The effect still
 works as expected though. The fix is obviously to apply a base texture.
 
 Vivian
I see, I think i've got a couple of those in the IAR cockpit that might give 
me that error  : 

If it's not too much to ask will you take a look at this:
http://code.google.com/p/flightgear-bugs/issues/detail?id=262
It's very visible in the IAR cokpit. Might be a mistake on my part, but I 
haven't got any feedback watsoever :(.
--
Create and publish websites with WebMatrix
Use the most popular FREE web apps or write code yourself; 
WebMatrix provides all the features you need to develop and 
publish your website. http://p.sf.net/sfu/ms-webmatrix-sf
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] Calculating free stick position and forces

2011-04-03 Thread Leonardo Fabian Grodek
On Fri, Apr 1, 2011 at 12:38 AM, Jon S. Berndt jonsber...@comcast.netwrote:

 Actually, Alan is correct, as Ron also mentioned in the JSBSim-devel list,
 where this topic is cross-posted. I think it is quite possible that we can
 already do this using function definitions in the aerodynamics section
 of an aircraft spec. file. There is no perceptible performance hit to using
 function definitions. The functions are implemented in C++, are fairly
 efficient, and calculations are cached per-frame. I'd prefer not to see
 possibly type-specific hard-coded calculations going into the codebase - I
 think we can implement this in the current codebase using existing
 capabilities.

 Jon


I agree, there are already enough tools in the config file for defining the
stick force. But how can we trim the stick force? Would it be possible to
use the autopilot functions? or a new trim mode is needed in the code?

Fabián
--
Create and publish websites with WebMatrix
Use the most popular FREE web apps or write code yourself; 
WebMatrix provides all the features you need to develop and 
publish your website. http://p.sf.net/sfu/ms-webmatrix-sf
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


[Flightgear-devel] 答复: SimGear Compiler Question in VS 2008 Express

2011-04-03 Thread Chengde Jin
So I don't know where is the simgear_config.h file?
Maybe that is generation by compiler.
Does any relation with the VS 2008 config?

-邮件原件-
发件人: Arnt Karlsen [mailto:a...@c2i.net] 
发送时间: 2011年4月4日 4:00
收件人: flightgear-devel@lists.sourceforge.net
主题: Re: [Flightgear-devel] SimGear Compiler Question in VS 2008 Express

On Sun, 3 Apr 2011 23:21:08 +0800, Chengde wrote in message 
395281372DA944E98255F70369FF0429@b9b11736cd184f3:

 1-- Build started: Project: SimGear, Configuration: Debug Win32
 1--
 
 1Generation of simgear_config.h
 
 1系统找不到指定的文件。

..System can not find the file specified.???  
(from KDE's translatoid.)

 1Project : error PRJ0019: A tool returned an error code from
 1Generation of
 simgear_config.h

..you found it?

 1Creating browse information file...
 
 1Microsoft Browse Information Maintenance Utility Version 9.00.30729
 
 1Copyright (C) Microsoft Corporation. All rights reserved.
 
 1BSCMAKE: error BK1506 : cannot open file
 1'.\Win32\Debug\logstream.sbr': No
 such file or directory
 
 1Build log was saved at
 file://c:\FlightGear\SimGear\projects\VC90\Win32\Debug\BuildLog.htm
 
 1SimGear - 2 error(s), 0 warning(s)
 
 == Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped
 ==
 


-- 
..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.


--
Create and publish websites with WebMatrix
Use the most popular FREE web apps or write code yourself; 
WebMatrix provides all the features you need to develop and 
publish your website. http://p.sf.net/sfu/ms-webmatrix-sf
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


--
Create and publish websites with WebMatrix
Use the most popular FREE web apps or write code yourself; 
WebMatrix provides all the features you need to develop and 
publish your website. http://p.sf.net/sfu/ms-webmatrix-sf
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel