SquawkBox 3 User Manual
Home  |   Getting Started  |   Features  |   SDK  |   FAQ  |   Appendix
 
 

SquawkBox FSUIPC Offsets

Introduction

The Flight Simulator community owes a debt to FSUIPC and its creator, Pete Dowson. This little module acts as a comprehensive SDK for Flight Simulator, giving seamless and version-independent access to all manner of variables in the running simulator. SquawkBox would scarcely be possible without it. As such, SquawkBox uses FSUIPC a great deal. This can be further extended to enhance the interaction between SquawkBox and other 3rd party applications.


Ways that SquawkBox uses FSUIPC

There are several ways that SquawkBox uses FSUIPC. First, it reads the values in various offsets to determine what is happening with the current aircraft. It reads the aircraft position and orientation as well as the state of the radios in the cockpit.

Second, SquawkBox 3 uses an area of offsets that is specially reserved for it in order to communicate back and forth with the default cockpit transponder gauge. This allows the user to control squawk mode and squawk ident, as well as view the state of voice channels from within Flight Simulator.

Last, SquawkBox populates the FSUIPC TCAS tables with planes that are nearby. This allows 3rd party applications to view the current collection of planes in the vicinity.


Maximizing Compatibility with SquawkBox

In order to ensure that your software will work well with SquawkBox, ensure you integrate well with FSUIPC. FSUIPC is the de facto standard Flight Simulator SDK, and provides an excellent means for various 3rd party Flight Simulator add-on applications to intercommunicate. Ensure you read the FSUIPC SDK documentation thoroughly. This principle applies to writing values to offsets that SquawkBox reads, and reading values from offsets that SquawkBox writes.


Building Transponder Gauges

SquawkBox requires that the user is able to set transponder mode as well as squawk ident. However, the default aircraft panels in Flight Simulator do not provide this functionality. In previous versions of SquawkBox, this functionality was added to the main SquawkBox interface. This was problematic because if SquawkBox and Flight Simulator were running on separate computers, this functionality was not available in the user's cockpit.

SquawkBox 3 solves this problem by providing a Flight Simulator module that presents a small transponder gauge within Flight Simulator. This gauge allows the user to switch squawk modes and squawk ident. It flashes the ident light to indicate ATC radar activity in the vicinity. Additionally it has lights which indicate the status of the two voice channels associated with each radio. This data is communicated between SquawkBox and the transponder via FSUIPC offsets.

You can replace or compliment this default transponder gauge. Simply have your gauge read and write the appropriate FSUIPC offsets listed below under SquawkBox Specific Offsets. Ensure you follow all the guidelines listed in the table.


Offset Descriptions

This section lists the FSUIPC offsets that SquawkBox uses. It is split into two sections: the standard offsets that SquawkBox uses, and the offsets that are reserved for exclusive SquawkBox 3 use. For the first section, more details can be found in the FSUIPC SDK documentation.

Standard Offsets
Offset Size (in bytes) Description SquawkBox reads? SquawkBox writes?
0x02b4 4 Ground speed of aircraft YES NO
0x034e 4 COM1 frequency YES NO
0x0354 4 Transponder code YES NO
0x0366 2 Aircraft on ground flag YES NO
0x0560 8 Latitude of aircraft YES NO
0x0568 8 Longitude of aircraft YES NO
0x0570 8 Altitude of aircraft YES NO
0x0578 4 Pitch of aircraft YES NO
0x057c 4 Bank of aircraft YES NO
0x0580 4 Heading of aircraft YES NO
0x3118 4 COM2 frequency YES NO
0x3122 4 Radio flags (which radios are turned on, which is transmitting) YES NO
0x3d00 256 Title of current aircraft YES NO

SquawkBox Specific Offsets
Offset Size (in bytes) Description SquawkBox reads? SquawkBox writes?
0x7b80 1 Indicates if SquawkBox is running.
0 = not running
1 = running as an external app
2 = running as a Flight Simulator module
YES YES
0x7b81 1 Indicates whether SquawkBox is successfully connected to a FSD server.
0 = not connected
1 = connected
NO YES
0x7b82 14 Reserved NO NO
0x7b90 1 This offset is deprecated and should not be used. NO NO
0x7b91 1 Transponder mode
0 = normal
1 = standby
SquawkBox reads this value to determine which transponder mode to send to the network. Your transponder gauge should set this offset when the user changes modes with your gauge.
YES NO
0x7b92 1 ATC activity indicator. This value is normally set to 0. When SquawkBox receives a ping from a nearby ATC, it sets this value to 1. If you want your gauge control to flash your ident light you should check this value periodically. As soon as you notice the value is set to 1, you must reset it to 0. NO YES
0x7b93 1 Transponder Ident pressed. When the user presses the ident button on your transponder gauge, you should set this value to 1. When SquawkBox notices it is set to 1, it will transmit an ident on the network and reset the value to 0. YES YES
0x7b94 1 COM1 voice active. If non-zero, the user's COM1 radio is currently tuned to a frequency that has caused them to join a voice room. NO YES
0x7b95 1 COM1 voice receive. If non-zero, audio is currently being received on the COM1 frequency. NO YES
0x7b96 1 COM1 voice transmit. If non-zero, the user is currently transmitting audio to the COM1 frequency. NO YES
0x7b97 1 Reserved NO NO
0x7b98 1 COM2 voice active. If non-zero, the user's COM2 radio is currently tuned to a frequency that has caused them to join a voice room. NO YES
0x7b99 1 COM2 voice receive. If non-zero, audio is currently being received on the COM2 frequency. NO YES
0x7b9a 1 COM2 voice transmit. If non-zero, the user is currently transmitting audio to the COM2 frequency. NO YES
0x7b9b 1 ATC activity level. This offset provides an alternative to reading offset 0x7b92. It effectively gives the same data, but in a different way. The value here is how many ATC transponder pings were received in the last 15 seconds. A third party transponder gauge could read this and then blink the light somewhat randomly but at a frequency determined by this value. This would approximate the flashing due to increased ATC radio activity. NO YES
0x7b9c 1 Message received. This offset is set to one of the values below when a message arrives for the SquawkBox user. The value indicates the type of message received. Applications should reset this value to zero after reading it.
0 = None
1 = Normal COM1 message
2 = Normal COM1 message that appears to be for the user
3 = Normal COM2 message
4 = Normal COM2 message that appears to be for the user
5 = Private message that was displayed in the main window
6 = Private message that was displayed in a chat box
7 = System message (info)
8 = System message (warning)
9 = System message (error)
NO YES
0x7b9d 1 Indicates that SquawkBox has received a SELCAL notification that matches the current pilot's SELCAL code. The value is set to non-zero when the SELCAL match occurs. Applications should reset this value to zero after reading it. NO YES
0x7b9c 2 Reserved NO NO
0x7ba0 1 Text type. This value indicates the meaning of what is stored in the text string area at offset 0x7ba1. The values are as follows:
0 = None
1 = Set by an external application to tell SB3 to join the private voice room indicated in the text area.
2 = Set by SB3 to indicate the private voice room was successfully joined.
3 = Set by SB3 to indicate the join to the private voice room failed.
4 = Set by an external application to tell SB3 to leave the current private voice room.
5 = Set by SB3 to indicate that leaving the private voice room has been completed.
So to use the text string area at 0x7ba1 an application would add a voice room address in the form "<server>/<room>" and then set the value at 0x7ba0 to 1. It would then poll the value at 0x7ba0 to see if SB3 sets it to a 2 or a 3. Other uses for this text area may be added in the future.
YES YES
0x7ba1 65 Text area. Used to pass text strings to SB3. For usage, see offset 0x7ba0. YES NO
0x7be2 30 Reserved NO NO


Need Help?

Are there parts of this document that are unclear? Do you have questions? Are you having trouble getting your transponder gauge to work properly? For help use the SquawkBox Forum. The forum entitled "SquawkBox Plug-ins" is the best place for these types of questions.










Copyright 2005 Joel M. DeYoung
All Rights Reserved