Tachometer pict needed
Page 1 of 2 12 LastLast
Results 1 to 25 of 30

Thread: Tachometer pict needed

  1. #1

    Tachometer pict needed

    Hello WWI old crates fans
    I'm in research for a new WWI project, does someone has a detailed pict for this lovely RPM Tachometer, showing what is written on

    Thanks and a happy new year

    Cheers
    Martin Klein
    Attached Thumbnails Attached Thumbnails tachometer.jpg  

  2. #2
    Could you tell us what aeroplane this is?

  3. #3
    Hello Ivan
    Thanks for your answer, it's from a Re8 panel, and I already saw a pict with this peculiar RPM on a Sopwith Triplane panel.
    I found interesting to reproduce this one cause of the excentered offset.
    I work on C gauges from about two years, I'm not a programmer, but with many experiments I succeed on some results, I noticed you work on gauges too, Ivan, and would have some questions on points where I don't succeed, if I don't bother you course

    Cheers
    Martin

  4. #4
    Hello Klein,

    What simulator are you programming gauges for?
    I actually don't have much more experience with gauge programming than you do but I will help if I can.....
    On the condition that YOU help me if you can. There are a few things I still don't know how to do.

    If you have been working on gauges for a couple years, then you already have a working development environment.
    You probably also figured out that knowing C programming doesn't really help all that much.

    Good Luck!
    - Ivan.

  5. #5
    Hello Ivan

    I'm happy to have some exchanges with somebody making gauges, I'll feel less alone.
    I make gauges for CFS2, and fitted several Stephan Scholz's WWI planes, between others, with their instruments, some adapted from FS2004 XML gauges, or completely made from scratch.
    I use Visual C++ express SP1 to compile, with the windows SDK's setted up, and Microsoft Flight Simulator 2K2 SDKs.
    VC++ express don't permit to compile gauges with the use of the windowed interface, but using the DOS prompter, it works fine for me both on a laptop with windows XP and on the family computer with Windows 8.5.
    If the tiny knowlege I got can be usefull, Yes I'll be happy to help.
    Actually, I don't succeed on setting up a mouse drag (moving a knob or a needle by dragging it with the mouse, as on some throttles), and I don't suceed too to fit a multi-engine plane with a fuel selector per engine (but wonder if it's possible?)
    I strongly recommend Dai Griffith's tutorial on C gauges, that helped me a lot (and I didn't still succeeded to send him a thanks message). The relevant tutorial for FS2K is SD2gau12,available at SimViation, with later versions the gauges don't show.

    Best regards
    Martin

  6. #6
    Hello Klein,

    Other than a few details, it sounds like we are pretty similar in experience level.
    You use the FS2K2 SDK for CFS2, I use the FS2000 SDK for CFS1 and we use different compilers and that is about it for differences. The compiler I use is Visual Studio 2005. Its output can be run on anything from Windows 98 through Windows 8.1. Later compilers often can't compile programs that will run on the older systems. I test most things on Windows 98 and Windows 2000. I don't have a simulator installed on my Windows 8.1 laptop. My background is as a Unix/C programmer, so I don't really like IDEs and am pretty comfortable with Makefiles and the command line interface.

    I have just started working with Fuel Selectors and am pretty sure that I can build a multi engine setup, but since I have not done it, I can't really tell you how.
    I currently have no trouble programming the mouse clickable gauges such as a Magneto or similar but haven't gotten to throttles yet.
    I believe I have looked through the same tutorials that you have though I seldom am able to find exactly what I am looking for.

    - Ivan.

  7. #7
    Hello Ivan
    Oooops, I use FS2K SDK's (FS2000, cause FS2002 gauges don't show in CFS2, I'd better to read again before posting, shame on me)
    May be if you agree the first who find a way for multi engines fuel selectors show to the second, I tested the token variables "RECIP_ENGINEx_TANK_SELECTOR", but each time the second selector can't be moved with the mouse and move at the same time than the first one.
    Good luck
    Martin

  8. #8
    It seems to me that there are really two problems here.

    The first is getting the Gauges to react properly to the mouse.
    I haven't even gotten to that stage yet because I haven't constructed the bitmaps I will need for the Gauge Pair for my Mitchell bomber and P-38 Lightnings.
    My intention is to use global variables for the two gauges to communicate status with each other.
    What is your target aircraft? I am only dealing with two engines at the moment, how many are you working with?

    The features I will want on my gauges are control over Left Main, Right Main, Left Aux, and Right Aux and crossfeed.

    It doesn't sound like you have the mouse situation resolved yet much less control over the actual tank.

    As for my situation, the multi-engine Fuel Selector isn't quite as high a priority because the default situation WITHOUT a selector is to feed from Left Aux and Right Aux first and then feed from Left Main and Right Main.
    In other words, the default situation is the recommended usage pattern anyway.
    At the moment, I need other gauges much worse than I need these Fuel Selectors which is why I had not been working on them. I don't have a set of Fuel Quantity Gauges for either aircraft yet.

    Now that we know we are both using the FS2000 SDK, I am fairly certain you can use gauges that I compile. Unfortunately I don't believe I can use gauges that you compile with your newer compiler.

    - Ivan.

  9. #9
    I tried to fit Stephan Scholz Gotha serie (CFS2 World War one planes in the SOH library), all two engined, with a fuel selector by engine, on the Gotha GIV, there was three fuel tanks, one under the left engine, the second under the right engine, and the third on the middle of the upper wing, used to start, no pump was needed to feed the engines with the center one, and once the engines were started, the fuel pumps could flow the fuel to left and right tank. Each engine had a fuel selector and there was a third one for an eventual fuel transfer.
    The problem is from the keys trigged to switch the fuel selectors, the serie 419 to 426 "KEY_FUEL_SELECTOR_..." switch all the fuel selectors indifferently. May be a flag must be defined, to tell on what selector you want to act, but I don't know how to code it.
    About the compiler environement, are you sure than gauges compiled on a later version won't work for you? I can if you want send you a gauge for testing, or you can find several in the SOH library.

    And what problems do you encounter on your works in progress, if I can help

    All the best
    Martin

  10. #10
    Hello Klein,

    Seems like what you want is both engines to feed from 531 Center1 to start.
    Left Engine has a choice of 531 Center1 or 525 LMain.
    Right Engine has a choice of 531 Center1 or 526 RMain.

    It isn't that different from what I am trying to build. I have no idea what your numbers 419 to 426 mean.
    Is that how they are encoded in the header file? I almost never look there unless I have a reason.
    Offhand, I do not have a solution for you (or for me) at this time. I simply haven't gotten to this problem yet.

    Problem with the gauge I was working on turned out to be pretty simple.
    I had simply converted the Pointer to RGB format for editing and forgotten to convert it back to Palette / Indexed format when I was done. I figured this out when I was running errands today but didn't have a chance to confirm until I got home in the evening. I fixed it and recompiled but have not tested it yet.

    I am pretty certain that later compilers will not generate a DLL/Gauge/EXE that can be run on a Windows 98 system.
    The program does not crash the game. The Gauge simply does not display.
    A friend and I were trying to share programs a couple years ago and that is what we found. He eventually went to a MS C compiler from the late 1990's and at that point, we had no trouble sharing programs.

    This is why I have this wacky cross-compiler setup. Visual Studio 2005 is too large to fit on my Windows 98 machine that I use for other development. There are certain utilities I use that will not run on later Operating Systems.
    I use GNU C (Delorie) for programming on the W98 machine but it is a straight ANSI C compiler without Windows extensions and ITS object code is not runnable on the later Operating Systems!

    - Ivan.

  11. #11
    Hello Ivan
    The numbers for the keys are those given in the Gauges header, I suppose, but never tested it, that one can replace the key trigged names by these numbers in the C files. For multi engines fuel selectors, there is perhaps a possibility I didn't still tested, with the fifth parameter in the panel.cfg, the last number following the gauges names, where some instructions can be passed, let's see. If that don't give results, I'm afraid there is no solution, on a left fuel selector , setting up the left tank won't cause problem if the right is set up on the right one, but the center won't be shared by both, only the first will switch it, and switching fuel_selector_off will cut both fuelflow.
    I'll test it later when I'll have more time, I work on an other project now, so keep on your way, and good luck for what stay to do for you, I'll tell you if I see a light at the tunnel's end

    Martin

  12. #12
    Hello Klein,

    Yesterday, I was looking at what I already had for the P-38 Fuel Selectors.
    Turns out, the images are pretty good, but beyond that, the coding is exactly the same as I have for the P-40 Fuel Selector with Center1, Center2, and Center3. In other words, there isn't really any logic to anything yet.
    After finding that, I just worked on a pair of Fuel Gauges for the P-38 but all I really got was a fairly good start to a background for each meter.

    With the P-38 Fuel Selectors, I need at least a first try for a working copy before I can figure out what is not working.

    I am not convinced there is any advantage to bypassing the codes used by the SDK Macros.

    - Ivan.

  13. #13
    Hello Ivan
    Good luck for it

    best regards
    Martin

  14. #14
    Hello Klein,

    I haven't started working on it yet, but I was wondering: You work with CFS2 and the P-38 Lightning is a stock aircraft in that simulator.

    How do THEY handle fuel switching for the two engines?
    I was fairly certain that CFS2 gauges would not work with CFS1, but it sounds like CFS1 gauges work with CFS2?

    - Ivan.

  15. #15
    Quote Originally Posted by Ivan View Post
    Hello Klein,

    I haven't started working on it yet, but I was wondering: You work with CFS2 and the P-38 Lightning is a stock aircraft in that simulator.

    How do THEY handle fuel switching for the two engines?
    I was fairly certain that CFS2 gauges would not work with CFS1, but it sounds like CFS1 gauges work with CFS2?

    - Ivan.
    Hello Ivan
    Thanks for your interest.
    I just checked how it works on the lightning, there is only one fuel selector with six positions: left, right, both, reserve, drop tank and off. No problem for me to code such a fuel selector, the problem is to set up two Fuel selectors, to apply the procedure in case of engine fire, cut the burning one and keep on to fly with the safe engine, I confess I've a bit given up the idea to try to solve it. I downloaded several two engine planes to check if somebody succeeded in this adventure, I saw several generic fuel quantity, pressure,... where the fifth parameter on the panel.cfg permits to tell to which tank you want to have indications, but nothing on fuel selectors, I believe cause the fuel selectors are trigged by keys and fuel quantity and pressure only needs to be read by the sim.

    I hope a solution exist, good luck.
    Martin

  16. #16
    Hello Klein,

    If the tanks on the CFS2 Lightning are arranged the way they are on the actual aircraft, I am not sure the single Fuel Selector would be that easy to program.

    The P-38 (Unmodified) two 93 Gallon Main Tanks and two 60 Gallon Reserve Tanks.

    Left - Easy to do
    Right - Easy to do
    Both - Just select "All"
    Reserve - I have not figured out how to select BOTH reserve tanks at once
    Drop Tank - You have those, I do not.
    Off - Easy to do.

    This is on the assumption that the Left and Right Aux tanks are the 93 Gallon Mains and the actual Left and Right Mains are he 60 Gallon Reserve tanks.
    If the Main and Aux tanks are switched in the AIR file, then the problem becomes selecting Both 93 Gallon Mains instead of selecting both 60 Gallon Reserve tanks.
    The problem doesn't really go away.

    For a Modified P-38 such as the late J models and L models, you would also need to use the Tip Tanks and that might be a bit more difficult.... It could also be done with Center1 and Center2 instead, but that is kind of ugly and only makes the fuel switching more complicated.

    - Ivan.

  17. #17
    Hello Ivan
    I had a look at the P38 air file, the plane is fitted with left main tank, left right, and center1, I'm not too much clever with air files, but I didn't found any other tank, so may be the drop one is only there to be pretty? the FS2K SDK don't contains any external tank, there are eight values for fuel tank selector, and FUEL_TANK_SELECTOR_EXTERNAL1 & 2 came with FS2K2. CFS and CFS2, that came after FS2K perhaps could take in count those tanks?
    All that follow is hypothetic, and I didn't check anything, and generally 90% of experimented hypotheses don't work.
    So may be one can try to replace with the FS2K2 fuel tanks enum values the ones in the Gauges header, and experiment, in the worst case it won't work and might not crash the sim.
    In retrospect, the P38 fuel selector is a needle, with a linearity table with six values, so you could test in the draw part:
    case FUEL_TANK_SELECTOR_EXTERNAL1, return x; //x is the number you assigned in the non_linearity_table to this point
    and in the mouse part:
    trigger_key_event( KEY_FUEL_SELECTOR_SET, FUEL_TANK_SELECTOR_EXTERNAL1 );
    if the needle don't want to go there, it is the sim don't take care of this tank.
    I dream, I dream, but sometimes such silly idea works and at this time, you are very happy with what you discovered

    Cheers
    Martin

  18. #18
    Hello Klein,

    The arrangement of Left-Main, Right-Main, and Center1 makes the Fuel Selector with the settings you described quite easy.
    There is only one tank that needs to be selected for each position and an off position.
    Microsoft apparently chose to compromise authenticity in the interest of simplicity; The actual P-38 has either 4 or 6 internal Wing Tanks.

    CFS1 is actually a 1999 product so it came before FS2000. From what I can tell, it is basically an enhanced version of FS98 with some better graphics and better flight modelling features but not as good as FS2000 or CFS2. It does NOT even implement all the Token Variables in FS2000 even though it is mostly compatible with the FS2000 SDK for Gauges.
    If you use a compiler that is too advanced for the Operating System you are running the Simulator on, the Gauge simply will not display. If you use a Token Variable that is not implemented in the Simulator, it crashes to the desktop.

    I don't believe your approach to the six position Fuel Selector is an ideal one.
    A Dial Gauge with a non-linearity table is really intended for variable scale Dial Gauges such as the typical Airspeed Indicator or the Fuel Gauge for the Corsair in the image I have attached. The "Needle" moves smoothly but just not at the same rate between tick marks which is why it needs the non-linearity table to make sure it is accurate at specific marks and only interpolates over small distances.

    Here is a code example from a P-51D style Magneto:

    MAKE_ICON
    (
    engine1_icon,
    BMP_MAGNETO1_OFF,
    NULL,
    NULL,
    IMAGE_USE_ERASE | IMAGE_USE_TRANSPARENCY,
    0,
    0,0,

    RECIP_ENGINE1_STARTER,engine1_icon_cb,
    ICON_SWITCH_TYPE_STEP_TO,
    4,
    0,
    0
    )


    The RECIP_ENGINE1_STARTER Token Variable that is passed to the Callback isn't actually used.
    I thought it would be when I first wrote this code.
    The BMP_MAGNETO1_OFF is the first bitmap in the sequence of overlays over the background (Your Fuel Selector Pointer).
    You only need to specify the first bitmap but they need to be defined in the order they will be used.
    The ICON_SWITCH_TYPE_STEP_TO tells how to transition between the overlays.
    The 4 below it indicates how many overlays for the Magneto Pointer: Off, Left, Right, Both.
    You will need 6 instead of 4 of course.

    My callback function looks like this:

    FLOAT64 FSAPI engine1_icon_cb( PELEMENT_ICON pelement )
    {
    int mstatus;

    mstatus = engine1_magneto_status ();
    switch (mstatus)
    {
    case 0: // Magneto OFF
    return 0;

    case 1: // Magneto RIGHT
    return 1;

    case 2: // Magneto LEFT
    return 2;

    case 3: // Magneto BOTH
    return 3;

    default:
    return 0;
    }
    }


    There is a function which determines which magnetos are on for Engine1 and gives an integer from 0-3 which determines which bitmap in the overlay sequence to use.
    C Programmers may notice there is no "break;" statement at the end of each case but it isn't necessary considering the only statement being executed blows out of the function immediately.

    This should give you enough to work with. I know this Magneto Gauge set works.

    - Ivan.

    Attached Thumbnails Attached Thumbnails Vought-F4U-Corsair.jpg  
    Last edited by Ivan; February 3rd, 2021 at 13:18. Reason: Attach Image

  19. #19
    By the way, there are a bunch of strange things.
    The formatting is this way because this started as a modified SDK example.
    Sometimes they put multiple parameters on a single line and sometimes they don't.
    I left parameters in even when they aren't necessary because I tend to copy old Gauge code to create new ones and the presence of a parameter is a reminder of what is supposed to go there.

    Note that the Callback is returning a Double Precision Floating point when in reality, the data being transferred is a single Integer.

    The way I do the Needle/Pointer is to draw one very nice one as a template and then rotate it to each position and save it as an overlay. For me, the bitmaps are the hardest part.

    - Ivan.

  20. #20
    Hello Ivan
    Well, one can notice you are familiar with programation coding, you would perhaps laugh at the sight of a code I set up Mines are a bit more "exoticals", but sometimes work after a lot of experiments.
    The CFS2 stock P38 fuel selector gauge is set up with a "needle", that's why I defined it as it.





    But an icon macro works as well, you just don't have the benefit to see the knob turning, and don't notice the needle has sometimes a strange logical to go from a position to an other.

    All the best
    Martin
    Attached Thumbnails Attached Thumbnails 2549.bmp   2550.bmp  

  21. #21
    Hello Klein,

    I do see what you mean about the different effect with a Dial Gauge and a non-linearity table.
    Perhaps I will try that at some point.

    You give me way too much credit for the programming of Gauges.
    I basically took the SDK examples and modified them until they suited me.
    The formatting was changed where it did not suit my habits and I left many parts as they were where they had no real effect.
    As an example, the sub-directories for bitmaps and rc file seemed to be too cumbersome, so I took them out.

    In the last few days, I have probably created a new Gauge about every two or three days.
    Between new Gauges, I have figured out how to improve most of the older Gauges and make a lot of corrections with data from research.
    Normally I would post about them, but I don't want to take the time and am not convinced there is an audience.

    - Ivan.

  22. #22
    Hello Klein,

    My first try at the P-38 Fuel Selectors did not work.
    There were multiple failures along with a minor logic problem.

    - Ivan.

  23. #23
    Hello Klein,

    After consulting some fairly knowledgeable developers, the general conclusion is that selecting tanks for a particular engine simply is not possible.

    My intention is to mimic the effect with some fancy and weird logic, so from a technical standpoint, I can't offer you any advice and you are as well equipped as I am to address the issue.

    Most of the code for the pair of P-38 Fuel Selectors just became garbage and I pretty much have to start over at least on the coding side.

    - Ivan.

  24. #24
    Hello Ivan
    Many thanks to have tried, so I know I don't have to search again and again, a bit frustrating, but we must compose with the possible

    Good work

    Cheers
    Martin

  25. #25
    Hello Klein,

    Don't misunderstand me. I haven't given up on working on a Fuel Selector combination for the P-38.
    What I wanted to tell you was that the original idea of selecting an engine directly is probably not going to work.

    I believe the solution will be a set of Gauges that switch rapidly back and forth between what is selected for the engine on each side. The number of features implemented will depend on how complicated you want the Gauge programming to get and I believe from the experience level, that you are as equipped as I am to handle that.
    I know that my initial attempt will have pretty minimal features.

    - Ivan.

Members who have read this thread: 51

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •