RE: Re: Discrete interpolation attribute (was New version of DAVEfunc DTD 1.9b3)

2007-06-19 Thread Curtin, Robert (Contractor)

The discrete option, as we originally intended it, was a nearest grid-point 
option. The relevant code snippet from the Janus interpreter:

 * allow for order 0 linear interpolation, i.e. take nearest discrete
 * value on the grid.
 */
if ( 0 == functionIndependentVariableOrder_[ index ][ i ] ) {
  if ( 0.5 = frac[ i ] ) {
frac[ i ] = 0.0;
  } else {
frac[ i ] = 1.0;
  }
}

We only use discrete where the inputs are meant to be one of the breakpoints. 
The nearest interpretation ensures we get the right answer if there is some 
issue with a data precision-related error (though we would normally use integer 
inputs anyway). However, I can also see the utility of a threshhold approach 
as you have described (eg, ISA properties as a function of pressure altitude). 
You could always shift the breakpoints to achieve the same thing, or use 
MathML. I agree it needs to be clearly documented.

Regards, Rob
 

Rob Curtin
Ball Solutions Group
on contract to Air Vehicles Division,
Defence Science  Technology Organisation
Tel: +61 (0)3 9626 7730
Fax: +61 (0)3 9626 7705
[EMAIL PROTECTED]



-Original Message-
From: Giovanni A. Cignoni [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, 19 June 2007 10:17 PM
To: simstds@larc.nasa.gov
Subject: Re: Re: Discrete interpolation attribute (was New version of DAVEfunc 
DTD 1.9b3)

 so the independent values state where the function changes value.
 
 Nearest-neighbor would put the transitions exactly between the 
 independent break points.

So at the end is just truncation vs approximation, but being in sync with names 
is anyway important :)

Ciao,
Giovanni.



IMPORTANT: This email remains the property of the Australian Defence 
Organisation and is subject to the jurisdiction of section 70 of the CRIMES ACT 
1914.  If you have received this email in error, you are requested to contact 
the sender and delete the email.




New version of DAVEfunc DTD 1.9b3

2007-06-18 Thread Bruce Jackson
I have just uploaded a new version of the DAVEfunc DTD to the DAVE-ML  
website, version 1.9b3, which adds a DSTO-suggested improvement. In  
addition to the DTD, the reference manual has an example of how to  
invoke the 'atan2' function and fixes documentation links.


   http://daveml.larc.nasa.gov/DTDs.html

The main change to the DTD is addition of 'discrete' as a supported  
interpolation method for tabular data, yielding a stair-step response  
from such a function. This came from a suggestion from Geoff Brian of  
Australia's DSTO.


The manual also contains an example of how to encode the 'atan2' four- 
quadrant arctangent function, which is not directly supported in  
MathML2 grammar.


-- Bruce


Bruce Jackson [EMAIL PROTECTED] Dynamic Systems  Control Branch
8 Langley Boulevard, MS 308   Research  Technology Directorate
NASA Langley Research CenterHampton, Virginia 23681
More info about DAVE-ML:   http://daveml.nasa.gov
Simulation standards discussion listserv mailto:simstds@larc.nasa.gov





Re: [fs] New version of DAVEfunc DTD 1.9b3

2007-06-18 Thread Giovanni A. Cignoni
The main change to the DTD is addition of 'discrete' as a supported  
interpolation method for tabular data, yielding a stair-step response  
from such a function. This came from a suggestion from Geoff Brian of  
Australia's DSTO.


Discrete interpolation is the method also known as nearest neighbor?
Being x in [a, b], f(x) is f(a) or f(b) depending on x being nearer 
to a or b. Correct?


Thanks in advance, ciao,
Giovanni Cignoni.