I came up with an answer to my own challenge:

In the real world there are two types of encoding altimeters:

  I) The so-called blind encoders are basically just encoders.
   Their *only* output is digital and quantized.  These can be
   made non-blind by wiring them to a display, but the display
   will necessarily exhibit quantization steps.

  II) There is a second type of instrument that is primarily a
   plain old steam-gauge type altimeter, producing a fully
   analog non-quantized display in the time-honored way ...
   plus an encoder disk attached to the mechanism.  The analog
   display is unquantized, while the digital output is quantized.

Therefore the <quantum> configuration option in my altimeter.cxx
is ambiguous.  In case (I) the quantization should affect the
indicated output, while in case (II) it shouldn't.

1a) Arguments as to which behavior should be preferred should not
  be based on what the autopilot needs.   The autopilot is already
  so complicated that adding the one line needed to perform the
  quantization within the autopilot -- not within the altimeter --
  is IMHO clearly the right way to go.  Code is incomparably more
  expressive than xml, and can easily resolve the ambiguity whichever
  way is desired.

1b) I would also point out that writing a stepless indicated output
  to the property tree and then writing a stepped pressure output
  to the property tree makes it impossible to calculate the Kollsman
  shift by subtraction.  So this -- in combination with autopilot code
  that does not do its own Kollsman calculation -- is a self-inconsistent
  combination.

2) So the discussion comes down to ultra-simple xml-only instruments.
  We already have a way of producing a stepless indicated altitude
  output (i.e. the ordinary altimeter object with no quantization).
  Therefore if the quantization feature is to have any nontrivial
  value, it should produce stepwise indicated altitude outputs, such
  as would be seen in certain "backup altimeter" displays.



This sounds to me like two solid arguments why if the encoder
writes an indicated altitude at all, it should be based on the
pressure altitude (quantization and all) plus a simple Kollsman
shift.  That's how I originally coded it.  Now I know why I coded
it that way :-).


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to