News:

Precision Simulator update 10.174 (26 April 2024) is now available.
Navburo update 13 (23 November 2022) is now available.
NG FMC and More is released.

Main Menu

Transponder

Started by dhmm, Sat, 22 Oct 2011 17:58

dhmm

Hi,

I just completed a small module which interfaces to the Transponder, using external panels and switches to read and change the squawk code.

Testing with PS1, when I found that if I enter a code like 0444, it will be accepted, and will sent by the broker to my program as 444 instead of 0444.

So my question is:

Is this how it is supposed to work in real life ? Can an aircraft squawk to 0444 (or any 0XXX) ?

Cheers,

:-D

Peter Lang

Hello,

Yes it can squak 04xx, also 00xx is possible.

You must physically enter each of the four digits.


Hope this helps
Peter

dhmm

Thanks Peter,

So, entering 0001, or even 0000, works from ps1, but the Broker / IPC, trims all left zeros, sending 1 for 0001, 0 for 0000, which I guess have to be handled in my code.

:-D

Jeroen Hoppenbrouwers

Correct!

This is what would be expected for most variables. The numerical code transponder is the exception. I believe that headings also come without leading zero, which may or may not be what you expect.

Another reason for this is that in Tcl, every number starting with a zero (not zero + decimal dot, of course) is assumed to be octal. For the transponder this would be OK, but then somewhere else the display would likely revert to decimal. So I strip all leading zeroes off everything to avoid glitches.

Pass around numbers in the most standard format possible, then format them for display when needed.


Jeroen

dhmm

Thanks Jeroen,

I just completed that part of the program, the program handles all numbers for the Transponder, From and To PS1, include 0000.

Starting to work on the communication / radio interface to PS1 and Intercom Systems.

Cheers,

:-D