2 * \file beacon.hxx -- Provides marker beacon audio generation.
5 // Written by Curtis Olson, started March 2001.
7 // Copyright (C) 2001 Curtis L. Olson - http://www.flightgear.org/~curt
9 // This program is free software; you can redistribute it and/or
10 // modify it under the terms of the GNU General Public License as
11 // published by the Free Software Foundation; either version 2 of the
12 // License, or (at your option) any later version.
14 // This program is distributed in the hope that it will be useful, but
15 // WITHOUT ANY WARRANTY; without even the implied warranty of
16 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 // General Public License for more details.
19 // You should have received a copy of the GNU General Public License
20 // along with this program; if not, write to the Free Software
21 // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
33 #include <simgear/compiler.h>
34 #include <simgear/sound/soundmgr_openal.hxx>
39 // Quoting from http://www.smartregs.com/data/sa326.htm
40 // Smart REGS Glossary - marker beacon
42 // An electronic navigation facility transmitting a 75 MHz vertical fan
43 // or boneshaped radiation pattern. Marker beacons are identified by
44 // their modulation frequency and keying code, and when received by
45 // compatible airborne equipment, indicate to the pilot, both aurally
46 // and visually, that he is passing over the facility.
47 // (See outer marker middle marker inner marker.)
49 // Smart REGS Glossary - outer marker
51 // A marker beacon at or near the glideslope intercept altitude of an
52 // ILS approach. It is keyed to transmit two dashes per second on a
53 // 400 Hz tone, which is received aurally and visually by compatible
54 // airborne equipment. The OM is normally located four to seven miles from
55 // the runway threshold on the extended centerline of the runway.
57 // Smart REGS Glossary - middle marker
59 // A marker beacon that defines a point along the glideslope of an
60 // ILS normally located at or near the point of decision height
61 // (ILS Category I). It is keyed to transmit alternate dots and dashes,
62 // with the alternate dots and dashes keyed at the rate of 95 dot/dash
63 // combinations per minute on a 1300 Hz tone, which is received
64 // aurally and visually by compatible airborne equipment.
66 // Smart REGS Glossary - inner marker
68 // A marker beacon used with an ILS (CAT II) precision approach located
69 // between the middle marker and the end of the ILS runway,
70 // transmitting a radiation pattern keyed at six dots per second and
71 // indicating to the pilot, both aurally and visually, that he is at
72 // the designated decision height (DH), normally 100 feet above the
73 // touchdown zone elevation, on the ILS CAT II approach. It also marks
74 // progress during a CAT III approach.
75 // (See instrument landing system) (Refer to AIM.)
78 static const int INNER_FREQ = 3000;
79 static const int MIDDLE_FREQ = 1300;
80 static const int OUTER_FREQ = 400;
82 static const int INNER_SIZE = BYTES_PER_SECOND;
83 static const int MIDDLE_SIZE = (int)(BYTES_PER_SECOND * 60 / 95 );
84 static const int OUTER_SIZE = BYTES_PER_SECOND;
86 static const int INNER_DIT_LEN = (int)(BYTES_PER_SECOND / 6.0);
87 static const int MIDDLE_DIT_LEN = (int)(MIDDLE_SIZE / 3.0);
88 static const int MIDDLE_DAH_LEN = (int)(MIDDLE_SIZE * 2 / 3.0);
89 static const int OUTER_DAH_LEN = (int)(BYTES_PER_SECOND / 2.0);
91 // manages everything we need to know for an individual sound sample
97 SGSoundSample *middle;
105 // allocate and initialize sound samples
108 SGSoundSample *get_inner() { return inner; }
109 SGSoundSample *get_middle() { return middle; }
110 SGSoundSample *get_outer() { return outer; }
116 #endif // _BEACON_HXX