Jump to content

MKaprocki

Frozen-Inactivity
  • Content Count

    322
  • Donations

    $0.00 
  • Joined

  • Last visited

Everything posted by MKaprocki

  1. Get the Aircraft SDK from Microsoft. It has most of the parameters that can go in the aircraft.cfg file.Matt
  2. Shoot me an email and I'll send you a copy of where I stand. Still in development, so it's not completely done yet. Yes, I use FSUIPC to get AI traffic info for the radar and hud. ;)Matt
  3. http://forums.avsim.com/dcboard.php?az=sho...d=113532&page=2 ;)Matt
  4. Getting more and more done each day. Hopefully it should be ready for release in another month. ;) Matt
  5. You only need 1 ICON element. ICONs can change what bitmap they are showing. You tell it the first bitmap, such as BMP_STROBE_OFF, and then later tell it how many bitmaps it can switch between (in this case 2). The callback function tells it which bitmap to show. If the strobes are off it returns 0, which shows BMP_STROBE_OFF. If strobes are on it returns 1, which shows BMP_STROBE_ON (the next bitmap, as defined in the header file). You don't always need a callback, only when you need to do this with data before returning it.Matt
  6. I have a variable that stores the new frequency, like 12345, and another that stores the position I'm editing, like 1000 for the 2. When the user pushes, say 3, it multiplies 3 by what position I'm editing. So if I have 12000, it adds to it (3 * 100), so I get 12300. Then dividing the position by 10, so it adds the next one in the correct spot. When they hit enter, it divides by 100 to get 123.45 and then converts it to BCD and sets it. ;-)Pretty simple really.new_value += (DIGIT)*position;position /= 10;Matt
  7. That's exactly what I do with my F-16 panel. The user types in the new frequency, hits enter, and it sets the radios to the new one.Matt
  8. 123.45ABC.DEbcd = (B 8);bcd += (D << 4);bcd += E;trigger_key_event(KEY_COM_RADIO_SET, bcd);That should do it. You just have to use each digit seperatly.Matt
  9. Not sure what the 57 means.To change the number of bitmaps used in an ICON, change the 1 after ICON_SWITCH_TYPE_SET_CUR_ICON to however many are used. Use a callback function to set the index of the one being shown.I'm not sure if the MAKE_ICON macro is different for FS98, but the one shown may need some changes. plist10 should be &plist10. After the "image flags," there should only be a 0...the ",NULL" shouldn't be there. "{247,83}," should be "247,83,". After STROBE_LIGHTS, you'll need to use a callback function to set the image number, such as: "STROBE_LIGHTS, strobe_cb,". If all of this is different for FS98, I'm sorry. ;)MAKE_ICON( icon_strobe,BMP_ICON,&plist10,NULL,IMAGE_USE_ERASE | IMAGE_USE_BRIGHT | IMAGE_USE_TRANSPARENCY | IMAGE_HIDDEN,0,247,83,STROBE_LIGHTS, strobe_cb,ICON_SWITCH_TYPE_SET_CUR_ICON,1,0,0, );I'll be glad to take a look at the gauge. What kind of error messages are you getting?Edit: I made some changes to the gauge, see if it makes any difference. I'm assuming you're trying to make a switch or light or something showing if the Strobe Lights are on or off. You need 2 seperate bitmaps: one if they're on and one if they're off.Matt
  10. Server Gauge:BOOL fcc_pos;In PANEL_SERVICE_PRE_INSTALL: register_var_by_name (&fcc_pos, TYPE_BOOL, "FCC Power On");In PANEL_SERVICE_PRE_KILL: unregister_var_by_name ("FCC Power On");Make sure the server gauge is on the main panel.Client Gauge:MODULE_VAR fcc_pos;BOOL* FCC_On;In PANEL_SERVICE_PRE_UPDATE:if (fcc_pos.var_ptr == NULL){ initialize_var_by_name (&fcc_pos, "FCC Power On"); FCC_On = fcc_pos.var_ptr;}Use FCC_On as normal. ;)Matt
  11. The problem doing it that way is when you want to draw something to a specific point. I can look at an image in Paint Shop Pro and see that a line is supposed to go to a certain point. Using dx and dy, I can just multiply them by the location I want it at. Your way (although this is how I did it at first) you have to manually figure out what percentage of the canvas size it's located at. Instead of just saying 50,50, you would have to take that 50,50 and divide it by the canvas size on a calculator first. Then later when you go back to look at it, you can't really tell where it's located at. ;-)Matt
  12. Vector Gauges use a different graphing system than FS. 100 pixels in FS is not 100 pixels in a vector gauge. Furthermore, something at, say, location 30x30 in a vector gauge at 1024x768 resolution will be in a different position when the resolution is 800x600. I get it around that problem like this:dx = (float)dim.x / X;dy = (float)dim.y / Y;With X and Y equal to the size of the bitmap in normal pixels.Now any time you want to place something on the gauge, just multiply the x and y by dx and dy. To draw a line from 30x30 to 50x50 you would do:MoveToEx (hdc, 30*dx, 30*dy, NULL);LineTo (hdc, 50*dx, 50*dy);To make it even simpler, create functions that do it for you:void DrawLine(int new_x, int new_y){ LineTo (hdc, new_x*dx, new_y*dy);}and just call DrawLine(50,50); ;-)Matt
  13. The system mentioned above is exactly the same as eDimensional. It uses the same drivers to give the 3D effect. Regardless of what glasses are hooked up, it will give the same results. ;-)Matt
  14. >If I knew how to turn these warnings off I'd be a happier>lad!#pragma warning( disable : 4761 )Change 4761 to whatever number that error message is. ;-)Matt
  15. A friend of mine needed a C gauge that would tell all his XML gauges if it was night or day and if the panel lights were on or not. What I ended up doing was using A:GENERAL ENG4 GENERATOR SWITCH in the XML gauge and GENERAL_ENGINE4_GENERATOR_SWITCH along with KEY_TOGGLE_ALTERNATOR4 in the C gauge. Setting the alternator to on or off in the C gauge, I could pass boolean data to the XML gauge. Works good as long as the airplane doesn't have 4 engines. ;) The same thing can be done with engines 2 and 3 if it's a single engine plane.Matt
  16. I use FSUIPC_Open2 with no problems. Did making fsuipcMem an array fix the problem?Matt
  17. http://www1.faa.gov/ATpubs/AIM/Chap1/aim0101.html#1-1-9Just scroll down a bit. ;-)Matt
  18. I live in Deltona. Will probably be busy this weekend, but I may fly on sunday, not sure yet. Shoot me an email if you want to get together some time. mkaprocki@cfl.rr.comMatt
  19. Don't see anything wrong with that, but you do have a blank (really doesn't have to be blank) static image for it to draw over, right? You may also need:SelectObject (hdc, GetStockObject (BLACK_BRUSH));SelectObject (hdc, GetStockObject (BLACK_PEN));before the Rectangle call. This tells Windows to use use a black pen (outline) and black brush (fill). I'm not sure if it defaults to something, so you may need to tell it to load them.A device context (HDC - Handle to a Device Context) basically tells Windows what it is you're outputting to. In this case, we're getting a handle to the DC for a static image we want to draw over.Matt
  20. These gauges use GDI, just like the Flightmap example in the SDK. I started with that as a reference and use the MSDN library when I need to look something up.Matt
  21. DAB. What year are you? Freshman now, just scheduled for next semester. Unfortunatly, AS-345 was full, so I gotta wait for my Multi. :-( Matt
  22. http://home.cfl.rr.com/mkaprocki/F16/Image5.jpgHere's a pic of the F-16 panel I'm working on. Uses vector gauges for the MFDs, which can be made dimmer or brighter. The radar shows actual AI traffic. It will also feature an authentic HSD. Check out this link to see a couple more previews.http://home.cfl.rr.com/mkaprocki/F16/Now, a question. Does anyone know if it is possible to dynamically move gauge elements? Like, using normal elements (ie, not vector gaues), is it possible to move a string or icon? Don't know of any way to do it, but thought I'd get your opinions.Matt
  23. LDA is just as accurate as a Localizer, just not aligned with the runway. Fly it just like you would a localizer, vor, or gps approach. Here's an excerpt from the AIM:c. Localizer Type Directional Aid (LDA) 1. The LDA is of comparable use and accuracy to a localizer but is not part of a complete ILS. The LDA course usually provides a more precise approach course than the similar Simplified Directional Facility (SDF) installation, which may have a course width of 6 or 12 degrees. 2. The LDA is not aligned with the runway. Straight-in minimums may be published where alignment does not exceed 30 degrees between the course and runway. Circling minimums only are published where this alignment exceeds 30 degrees. 3. A very limited number of LDA approaches also incorporate a glideslope. These are annotated in the plan view of the instrument approach chart with a note, "LDA/Glideslope." These procedures fall under a newly defined category of approaches called Approach with Vertical Guidance (APV) described in paragraph 5-4-5, Instrument Approach Procedure Charts, subparagraph a7(:(, Approach with Vertical Guidance (APV). LDA minima for with and without glideslope is provided and annotated on the minima lines of the approach chart as S-LDA/GS and S-LDA. Because the final approach course is not aligned with the runway centerline, additional maneuvering will be required compared to an ILS approach. Matt
  24. http://www.airliners.net/open.file/300899/L/http://www.airliners.net/open.file/321076/L/http://www.airliners.net/open.file/268300/L/There's other there if you search.Matt
  25. With the exception of the bitmaps, compiled gauges cannot be edited. To change the font on a given gauge, you would have to completely re-write that gauge. Compiled gauges cannot be opened in Visual Studio.Matt
×
×
  • Create New...