April 15, 200719 yr Hello at all!I have one Question: has anyone figured out or could anyone explain me how to Setup nonlinearity Needles in GDI+ Gauges using C++? My linearity Transformations working fine but i have no Idea how to make this for Nonlineraity. I want to draw a Needle for the Vertical Speed (Values in Range +- 6000ft) similar to the Airbus or Boeing PFD's.Thanks for your Help.RegardsSven
April 15, 200719 yr Author >Hello at all!>>I have one Question: has anyone figured out or could anyone>explain me how to Setup nonlinearity Needles in GDI+ Gauges>using C++? My linearity Transformations working fine but i>have no Idea how to make this for Nonlineraity. I want to draw>a Needle for the Vertical Speed (Values in Range +- 6000ft)>similar to the Airbus or Boeing PFD's.>>Thanks for your Help.>>Regards>SvenIn the easiest case the scale will be split up into linear parts, depends on the type of aircraft you are modelling obviously. That way you could just define an if-construction, like:if VS between -1000 and 1000, move needle at (fictious) speed 3if VS between 1000 and 3000, move needle at speed 2 (same for negative values)if VS between 3000 and 6000, move needle at speed 1Cheers, :-beerchugEtienne :-wave
April 16, 200719 yr Moderator In GDI+ (as well as XML "vector drawing") movement is accomplished by shifting x and/or y coordinate values by some calculated factor.For example, if you need to shift the x coordinate from 0 to 1000, and the total "distance in pixels" between 0 and 1000 is say, 300, then you will need to calculate the appropriate factor by dividing delta-pixels by the delta-value:300pix / 1000ft-min = 0.3 pix per ft-minIf the next range from 1000 to 2000 is only 200 pixels, then the factor becomes:200pix / 1000ft-min = 0.2 pix per ft-minAlternatively, you can use a similar method to calculate a rotational factor based on the degree of rotation needed for each non-linear portion of your scale. Fr. Bill AOPA Member: 07141481 AARP Member: 3209010556 Avsim Board of Directors | Avsim Forums Moderator
April 16, 200719 yr Author Exactly, this is some explanation for my arbitrary "speed" value. :-smooch
Create an account or sign in to comment