From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,cc4f25d878383cc X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-12-11 19:29:48 PST Path: archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!news.tele.dk!small.news.tele.dk!130.133.1.3!fu-berlin.de!uni-berlin.de!ppp-1-15.cvx2.telinco.NET!not-for-mail From: "Nick Roberts" Newsgroups: comp.lang.ada Subject: Re: Dimensionality Checking (Ada 20XX) Date: Wed, 12 Dec 2001 02:21:47 -0000 Message-ID: <9v6iv7$dcrbf$2@ID-25716.news.dfncis.de> References: <11bf7180.0112070815.2625851b@posting.google.com> <9v0crt$bo2bi$1@ID-25716.news.dfncis.de> <9v37rs$cdmva$1@ID-25716.news.dfncis.de> <9v5loh$d5aki$1@ID-25716.news.dfncis.de> NNTP-Posting-Host: ppp-1-15.cvx2.telinco.net (212.1.140.15) X-Trace: fu-berlin.de 1008127783 14052719 212.1.140.15 (16 [25716]) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Xref: archiver1.google.com comp.lang.ada:17810 Date: 2001-12-12T02:21:47+00:00 List-Id: "Stephen Leake" wrote in message news:u7krtl5u8.fsf@gsfc.nasa.gov... > > My point is that, because dimension checking could not be performed > > statically inside the function F, and it would probably be unacceptably slow > > to implement it dynamically, you lose nothing by not having the dimension > > checking. > > Well, I would do unit testing of F with dimension checking "turned > on". The equations in F are dimensionally correct, just complex. > > > Since you use radians throughout inside the function F, internal > > unit conversion (scaling) is also not required. > > Not true; lengths of the robot arm parts in F are in meters, the > result position vector is meters. I'll want to investigate this, but it sounds like you have a fair point, then. > F returns a position vector (x, y, z), in meters. So I'm not clear > what this should be. Something like: V := F(...); A := ( Joint_Angle(V.X), Joint_Angle(V.Y), Joint_Angle(V.Z) ); That's all. > as someone else pointed out, these three > choices are orthogonal. I'm not arguing about that. It would be nice to provide the facility for floating point numbers, I don't deny it. I just think it would be hard, that's all. But if it's needed, then it's needed. > I still think you'll get an explosion of types, like > Meters, Meters_Squared, Meters_Per_Second, Meters_Per_Second_Squared. > How else do you specify the dimensions? This is correct (you'll get a lot of types, one for each unit, which encompases a dimensionality and a scaling factor). > So you'll still have to define > all the inter-type operations. I suppose you define some sort of > automatic operator generation for this, but that's an even bigger change. Many (most?) of the required inter-type operations will be provided as predefined operations. This in itself is not a big change, since Ada 95 already provides it! > > Angles are dimensionless, as you correctly point out, but so is X (it is a > > ratio). > > Well, you said you would convince me of that, but I don't see any > argument for making X a ratio. I defined it as meters. I could pick > some arbitrary length (say the length of the robot forearm), and > define all other lengths in terms of that. But that would be horribly > confusing! What's wrong with meters for X? See other posts in this thread. X must be 'dimensionless' in the sense of having dimensions of all 0. -- Best wishes, Nick Roberts