1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 <2012> 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 | Index | 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 <2012> 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 |
<== Date ==> | <== Thread ==> |
---|
Subject: | Re: aiRecord conversion |
From: | Eric Norum <[email protected]> |
To: | Ralph Lange <[email protected]> |
Cc: | [email protected] |
Date: | Tue, 28 Aug 2012 09:12:29 -0700 |
On Aug 28, 2012, at 8:55 AM, Ralph Lange <[email protected]> wrote:
Let's have a look at the R3.13.10 code: static void convert(aiRecord *pai) { double val; val = (double)pai->rval + (double)pai->roff; /* adjust slope and offset */ if(pai->aslo!=0.0) val*=pai->aslo; val+=pai->aoff; /* convert raw to engineering units and signal units */ if(pai->linr == menuConvertNO_CONVERSION) { ; /* do nothing*/ } else if(pai->linr == menuConvertLINEAR) { val = (val * pai->eslo) + pai->eoff; } Looks just like the R3.14 (and R3.15 code)…… *However* -- the R3.12 code does use EGUL -- but this is over 15 years old.
Proof by example -- it's clearly already tripped up one new developer. I really (note, no yelling this time :-) ) think that the ancient documentation should be expunged. |