Jump to content
The simFlight Network Forums


  • Content Count

  • Joined

  • Last visited

Posts posted by JohnS737

  1. Mike

    I have developed and published an application that may be able to help you here. You should be able to get it from http://www.schiratti.com/starkie.

    It is a programming environment based on a subset of C, with extensions that allow you to define FSUIPC variables. e.g. You define a variable such as "int altitude at $4000", taking the figures from Pete's documentation.

    It will generate diagnostic output that you can control using printf. The output goes to a tabbed page in the same program.

    If you have any questions, please post an answer to this board.

    p.s. I have been working on enhancements to this program, but have been busy at work. The (as yet unreleased) new version supports plug-in DLLs. I will include a few DLLs before releasing, and tidy up the user interface.

  2. On a related topic, according to popular legend, when Shell found oil in the UK North Sea, they named their first field AUK, and where planning to name subsequent fields, BUK, CUK etc..

    However, in an amazing lack of foresight, nobody thought they'd get as far as F, and by that time it was too late, so since AUK was a seabird, and the oilfields were at sea, they decided to name the fields after birds (e.g. Brent, Cormorant, etc...)

  3. Here's a way to do it using my FSUIPC compiler/interpreter

    This will work if you hit control X. Assume you want to pause 10,000 metres before you get to waypoint 7.

    Wait until you've crossed waypoint 6.

    Wait until you're within 10,000 metres of the next waypoint


    Coded as follows:

    int current_waypoint at 0x616C;

    int pause_control at 0x0262;

    int wp_distance at 0x60EC;


    while(current_waypoint < 6)


    while(wp_distance < 10000)


    pause_control = 1;


    I now have this application ready for release, but do not have access to a website. If anyone wants to host it, please let me know.


  4. Pete,

    Apologies for any confusion.

    600C is seconds since midnight.

    6190 is the time at which the waypoint was crossed (zulu time, in seconds since midnight)

    61B8 is the number of seconds since some arbitary starting point, divided by 5

    61B0 is the time at which 61B8 was last updated (zulu time, in seconds since midnight)

    I'm confident that when 61B8 is incremented, some other variables are also adjusted, I just haven't yet found out which ones they are.



  5. Pete

    int GPS_6190 at $6190; // Time when waypoint was crossed,

    int GPS_61B0 at $61B0; // Time of last update, see 61B8

    int GPS_61B8 at $61B8; // Counter, incremented once every five seconds

    6168 is a counter, it is incremented by one every five seconds. From what I remember, it starts at zero. When the counter is incremented, the time is copied into 61B0 (seconds since midnight).

    6190 is the time the last waypoint was crossed. I don't know if this is set when 61B8 is updated or at the exact second.

    I've sent a copy of the program to jon@scruffyduck.co.uk, and am aiming for a full release by early next week. I wanted to include versioning (which I have now done) and #defines. At present the keywords Control and Alt are defined in the language definition. I want to change them to integers so that we can add new definitions later via #defines (I believe you have added the Window and Menu keys lately), and ensure that all releases are backward compatible with my first release, so that no one is forced to change code when the compiler gets updated.


  6. Pete,

    Here are some FSUIPC variables in the GPS area

    int GPS_600C at $600C; // Zulu time in seconds since midnight

    float GPS_6068 at $6068; // Track Error (TKE), in radians

    float GPS_60EC at $60EC; // Distance to next waypoint, in metres

    float GPS_60F4 at $60F4; // Distance between previous and next waypoint, in metres

    float GPS_610C at $610C; // Course to Set (CTS), in radians

    char GPS_6137[5] at $6137; // Flightplan destination airport

    char GPS_6140[8] at $6140; // Approach name

    char GPS_6154[8] at $6154; // Approach transition name

    int GPS_6190 at $6190; // Time when waypoint was crossed,

    float GPS_61A0 at $61A0; // Route total distance, in metres

    float GPS_61A8 at $61A8; // Estimated fuel burn, in gallons

    int GPS_61B0 at $61B0; // Time of last update, see 61B8

    int GPS_61B8 at $61B8; // Counter, incremented once every five seconds

    Also, there are three floating point variables at 6178, 6180 and 6188. I haven't found out what they do yet, but when flying between waypoints A and B they have values of X, Y and Z for example. On the return journey, between C and B they have values -X, -Y and -Z.

    Also, 6008 starts a flight plan as 12, and is incremented when the approach is loaded, not not incremented when the approach is activated, and incremented when VTF is activated. If you then select another flightplan, it gets incremented by six.


  7. Pete

    I don't want to release this for use on unregistered copies of FSUIPC to protect you. It could act as a back door to FSUIPC, especially if I implement the interpreter as a DLL (which I'm planning to do). That way, you pass the compiled code to the DLL, which drives FSUIPC and provides text feedback via callbacks.

    The program is in a workable state now. It doesn't have a full C implementation yet, but I'm working on it. It supports mixed integer/floating point arithmetic, printf (%s, %x, %f and %d only), if, else, while, pointers, arrays, functions (with parameters), returns, #include etc., but not much else.

    One thing I have been doing with this is finding new GPS variables in the 0x6000 area. I have about eight so far. I'm updating your 'FSUIPC for programmers', and will release it when I've done sufficient changes.

    I don't have access to a website because I am working in Kenya (as an IT contractor. I live in the UK). I have a UK website provided by my ISP but haven't used it and can't access it from here. Email works OK, but internet access is so unreliable that even the posts I put on here often fail. I'll be in the UK over Easter.


  8. I am working on a compiler/interpreter that will execute FSUIPC commands. The language is based on C with a few extensions.

    Here is an example

    int Gear_Control at 0x0BE8; // See Pete's Programming Guide


    Gear_Control = 0; // Raise landing gear



    // The 'Key' function is a built in language extension that

    // allows us to respond to FS input. In this case, it executes

    // when it receives a Control G from FS





    So far, the language has functions, parameters, mixed integer and floating point arithmetic, program control (if then else). I'm adding more daily, and would like a full C implementation.

    I have compiled and run a program that will fly a 737 (on autopilot) without touching FS at all except to type Control A to start. It takes off the brakes, runs up the engines, takes off and sets the autopilot parameters all the way up to finding the approach (it will do this if you set an approach in the GPS).

    I intend to release this as freeware but at the moment do not have a website as I am working away from home.

    Any questions?

    Any interest?

    If anything positive, I will tidy up the user documentation and release it.

  • 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.