Jump to content
The simFlight Network Forums

rickalty

Members
  • Posts

    163
  • Joined

  • Last visited

Posts posted by rickalty

  1. Trig function look pretty easy to understand.... So basically, I would need to set DIM statement,CALL or IF FSUIPC with values, offset, and etc first before implement trig function. And thats it? did I get my thought right?

    That's right. First you'd dim OilPress as a variable to hold the actual value for the Oil Pressure, and OilPressAngle as a variable to hold the angle you want the needle to point to. Then CALL FSUIPC_Read to actually get the value to go into OilPress.

    Next you use OilPress to calculate the value for OilPressAngle. In this example, the actual gauge needle is horizontal if the Oil Presure is 60 psi, so a value greater than 60 needs to be a positive angle, a value less than 60 needs to be a negative angle.

    Now, to work out what angles you need, look at the gauge. In this case, there's a value of 100psi 30 degrees up from horizontal. Thus, a 40psi difference is a 30 degree angle, so I multiply the difference between the actual oil pressure and 60 (Because 60 is a zero angle) by 30/40, or 0.75. This gives me the actual angle in degrees that I need the needle to be deflected by. I convert that to Radians (In the code example the comment said to convert from Radians - that was wrong) and use that value in the trig function.

    The Oil Pressure gauge is one of those with a disk in the center that the needle sticks out from under, so there's actually two trig functions - one calculates the position where the needle appears from under the disk, one calculates the position of the end of the needle. If you have a gauge where the whole needle is visible, you only need to calculate the end of the needle.

    Richard

  2. I'm actually quite proud of my talents and after all I'm helping Pete by exposing flaws in FSUPIC's registration/security.

    quote]

    Equine waste material.

    If you wanted to help Pete you'd have emailed him the flaw, not put up a post offering to share it with anyone else who wanted to save money by not registering.

    And anyway, what's to be proud of in being a thieving script kiddie who can use commercial hacking tools?

    Richard

  3. The way I implemented needles on the gauges on my FSPanel app was to draw them using Trig functions.

    Assuming you've no problem getting the data out from FSUIPC in the first place, here's how I draw the needle for an oil pressure gauge....

    
    If OilPress < 60 Then
    
        OilPressAngle = 0 - ((60 - OilPress) * 0.75)
    
    Else
    
        OilPressAngle = ((OilPress - 60) * 0.75)
    
    End If
    
    ' On the gauge, 60 psi is a needle angle of zero, or horizontal. The 0.75
    ' is a factor to make the angle of the needle match the markings on the
    ' gauge face. This will be different for every gauge.
    
    OilPressAngle = OilPressAngle * (3.1412 / 180)   
    ' Converts the angle from Radians to Degrees
    picOil.CurrentX = 1500
    picOil.CurrentY = 750
    ' Sets the center of the needle to the center of the gauge.' picOil is
    ' the picturebox that has the image of the gauge as its background
    
    picOil.Line Step(0 - (500 * Cos(OilPressAngle)), (0 - (500 * Sin(OilPressAngle))))-Step(0 - (250 * Cos(OilPressAngle)), (0 - (250 * Sin(OilPressAngle))))
    ' Uses trig to calculate the start and end points of a line at an angle of
    ' OilPressAngle from 250 twips from the center of the gauge to 500 
    ' twips from the center of the gauge.
    
    

    I hope this helps.

    Richard

  4. To reiterate, yes, Pete Dowson essensially pirated the work of Adam Zsofren for his own personal gain and profit. Dowson did so WITHOUT the express permission of Mr. Zsofren and is therefore committing a criminal act as Adam Zsofren's work was fully copyrighted Dowson is a thief. It's time for him to be exposed once and for all for what he truly is.

    What goes around comes around.

    EVEN if it were true that Pete didn't have Adams approval to continue with FSUIPC development after Adam dropped it (and I very much doubt it is true, or why would he give credit to Adam's earlier work?) you'd STILL be wrong about the "for his own personal gain and profit".

    ALL the functions that Adams old FS6IPC offered are part of the free functions of FSUIPC. The payware functions are all additional functionality that Pete has written entirely on his own.

    To see a little sneak thief like yourself bragging about stealing from a developer and trying to someow "justify" it by saying that Pete's work was based on another developers earlier work is sickening.

    Richard

  5. Of course it's piracy. you're offering to tell people how to get payware functions for free. Using those payware functions without paying is piracy.

    There's no grey area at all, it's open and shut. You don't even try to hide it - in your first post you boast about the money you can steal from developers with your "saves us hackers lots of money" crack.

    Richard

  6. We'll see if Microsoft (parent company of Hotmail) agrees with your opinion, as I forwarded your post with the info that you're using a hotmail email address to promote piracy to both the abuse@hotmail.com and piracy@microsoft.com email addresses to see if they agree with you.

    Everything that is only available to registered users of FSUIPC is Pete's wn work, not the orld contribution of Adam - not to mention that it's Pete who's done all the offset tracking for every new version of MSFS.

    If, as you say, he packs up shop and doesn't release an FSUIPC for the next version of MSFS, then none of these fancy add-ons will work with that version - or are you offereing to do the work involved in tracking down all the offsets in the next version?

    Richard

  7. Goodness sakes people, it's really not that difficult. Hex editors and decompilers, as well as the ever faithful CPU registry scanner BlackIce are generally all the tool(s) you need to render your unregistered copy of FSUIPC fully functional. If you need the specifics email me at Pchin@hotmail.com and I'll be more than happy to help you out.

    Doing this for personal use is not piracy of course but who the heck is going to know you even did it in any event.

    of course it's piracy you halfwit. Hacking a commercial product to use it for free is piracy, just as if you were hacking FS itself to give away copies of it to your friends.

    Saves a lot of money for the tenacious hackers out there amongst us.

    Robbing banks saves money for the bank robbers, but it's still a criminal act.

    Also, giving away your registration info publicly does not constitute piracy either. Maybe unethical but that is life, deal with it.

    No, it's not just unethical, it's criminal, and of course it's piracy.

    Richard

  8. Is the D:\ drive physically on the Server PC or the Client PC?

    It looks like both WideServer and WideClient are trying to run FSGarmin. You should realy only be trying to run it from the client. I would suggest putting it into a drive on the client PC (If it isn't already) rather than have the client run it across the network from a drive on the server PC.

    Richard

  9. Hi there, Danny.

    Yes, the FSUIPC SDK includes a VB specific section - two actually, one for VB.NET and one for Legacy VB. There's a Word document called "FSUIPC for programmers" which has a lot of usefull info, and a sample application in VB to show how it works.

    VB's native support for the serial port isn't the best, though, but there are several good add on controls available.

    Richard

  10. Many warning lights can be determined from gauge values, or clculated from logic.

    Those that have direct flags you can find using FSInterrogate's 'three way scan' function. Scan with the light off, force it to go on, scan again, make it go off, do the third scan. FSInterrogate will show the values that are the same in scan 1 and 3 but different in scan 2.

    Richard

  11. This stuff's all in the SDK Patrik. If you look there first you'll save yourself the time of aiting for a reply.

    Latitude of aircraft in FS units.

    To convert to Degrees:

    If your compiler supports long long (64-bit) integers then use such a variable to simply copy this 64-bit value into a double floating point variable and multiply by 90.0/(10001750.0 * 65536.0 * 65536.0).

    Otherwise you will have to handle the high 32-bits and the low 32-bits separately, combining them into one double floating point value (say dHi). To do, copy the high part (the 32-bit int at 0564) to one double and the low part (the 32-bit unsigned int at 0560) to another (say dLo). Remember that the low part is only part of a bigger number, so doesn’t have a sign of its own. Divide dLo by (65536.0 * 65536.0) to give it its proper magnitude compared to the high part, then either add it to or subtract it from dHi according to whether dHi is positive or negative. This preserves the integrity of the original positive or negative number. Finally multiply the result by 90.0/10001750.0 to get degrees.

    Either way, a negative result is South, positive North.

    Richard

  12. Easiest place to put the DIM statements is in the Form_Open sub.

    Yes, you can do that with the 1 / 0 value for a label caption, but a better looking way is to make the label, say, dark green with a gray caption if the value is 0, and bright green with a black caption if it's 1. If you look at, say, the gear lights on my FSEicas app, that's how I implemented them.

    Richard

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.