3 XCSoar Glide Computer - http://www.xcsoar.org/
4 Copyright (C) 2000-2013 The XCSoar Project
5 A detailed list of copyright holders can be found in the file "AUTHORS".
7 This program is free software; you can redistribute it and/or
8 modify it under the terms of the GNU General Public License
9 as published by the Free Software Foundation; either version 2
10 of the License, or (at your option) any later version.
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software
19 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
23 #include "Formatter/Units.hpp"
24 #include "Units/System.hpp"
25 #include "Units/Units.hpp"
26 #include "Util/Macros.hpp"
27 #include "Util/StringUtil.hpp"
28 #include "Atmosphere/Pressure.hpp"
29 #include "TestUtil.hpp"
36 // Test FormatAltitude()
37 FormatAltitude(buffer
, fixed(1234), Unit::METER
);
38 ok1(StringIsEqual(buffer
, _T("1234 m")));
40 FormatAltitude(buffer
, Units::ToSysUnit(fixed(1234), Unit::FEET
), Unit::FEET
);
41 ok1(StringIsEqual(buffer
, _T("1234 ft")));
43 FormatAltitude(buffer
, fixed(-1234), Unit::METER
);
44 ok1(StringIsEqual(buffer
, _T("-1234 m")));
46 FormatAltitude(buffer
, Units::ToSysUnit(fixed(-1234), Unit::FEET
), Unit::FEET
);
47 ok1(StringIsEqual(buffer
, _T("-1234 ft")));
49 FormatAltitude(buffer
, fixed(1234), Unit::METER
, false);
50 ok1(StringIsEqual(buffer
, _T("1234")));
52 FormatAltitude(buffer
, fixed(-1234), Unit::METER
, false);
53 ok1(StringIsEqual(buffer
, _T("-1234")));
57 TestRelativeAltitude()
61 // Test FormatRelativeAltitude()
62 FormatRelativeAltitude(buffer
, fixed(1234), Unit::METER
);
63 ok1(StringIsEqual(buffer
, _T("+1234 m")));
65 FormatRelativeAltitude(buffer
, Units::ToSysUnit(fixed(1234), Unit::FEET
),
67 ok1(StringIsEqual(buffer
, _T("+1234 ft")));
69 FormatRelativeAltitude(buffer
, fixed(-1234), Unit::METER
);
70 ok1(StringIsEqual(buffer
, _T("-1234 m")));
72 FormatRelativeAltitude(buffer
, Units::ToSysUnit(fixed(-1234), Unit::FEET
),
74 ok1(StringIsEqual(buffer
, _T("-1234 ft")));
76 FormatRelativeAltitude(buffer
, fixed(1234), Unit::METER
, false);
77 ok1(StringIsEqual(buffer
, _T("+1234")));
79 FormatRelativeAltitude(buffer
, fixed(-1234), Unit::METER
, false);
80 ok1(StringIsEqual(buffer
, _T("-1234")));
88 // Test FormatDistance()
89 FormatDistance(buffer
, fixed(123.4), Unit::METER
);
90 ok1(StringIsEqual(buffer
, _T("123 m")));
92 FormatDistance(buffer
, fixed(123.4), Unit::METER
, false);
93 ok1(StringIsEqual(buffer
, _T("123")));
95 FormatDistance(buffer
, fixed(123.4), Unit::METER
, true, 1);
96 ok1(StringIsEqual(buffer
, _T("123.4 m")));
98 FormatDistance(buffer
, fixed(123.4), Unit::METER
, false, 1);
99 ok1(StringIsEqual(buffer
, _T("123.4")));
101 FormatDistance(buffer
, fixed(123.4), Unit::METER
, true, 2);
102 ok1(StringIsEqual(buffer
, _T("123.40 m")));
104 FormatDistance(buffer
, fixed(123.4), Unit::METER
, false, 2);
105 ok1(StringIsEqual(buffer
, _T("123.40")));
107 FormatDistance(buffer
, Units::ToSysUnit(fixed(123.4), Unit::KILOMETER
),
109 ok1(StringIsEqual(buffer
, _T("123 km")));
111 FormatDistance(buffer
, Units::ToSysUnit(fixed(123.4), Unit::KILOMETER
),
112 Unit::KILOMETER
, false);
113 ok1(StringIsEqual(buffer
, _T("123")));
115 FormatDistance(buffer
, Units::ToSysUnit(fixed(123.4), Unit::KILOMETER
),
116 Unit::KILOMETER
, true, 1);
117 ok1(StringIsEqual(buffer
, _T("123.4 km")));
119 FormatDistance(buffer
, Units::ToSysUnit(fixed(123.4), Unit::KILOMETER
),
120 Unit::KILOMETER
, false, 1);
121 ok1(StringIsEqual(buffer
, _T("123.4")));
123 FormatDistance(buffer
, Units::ToSysUnit(fixed(123.4), Unit::NAUTICAL_MILES
),
124 Unit::NAUTICAL_MILES
);
125 ok1(StringIsEqual(buffer
, _T("123 NM")));
127 FormatDistance(buffer
, Units::ToSysUnit(fixed(123.4), Unit::NAUTICAL_MILES
),
128 Unit::NAUTICAL_MILES
, false);
129 ok1(StringIsEqual(buffer
, _T("123")));
131 FormatDistance(buffer
, Units::ToSysUnit(fixed(123.4), Unit::NAUTICAL_MILES
),
132 Unit::NAUTICAL_MILES
, true, 1);
133 ok1(StringIsEqual(buffer
, _T("123.4 NM")));
135 FormatDistance(buffer
, Units::ToSysUnit(fixed(123.4), Unit::NAUTICAL_MILES
),
136 Unit::NAUTICAL_MILES
, false, 1);
137 ok1(StringIsEqual(buffer
, _T("123.4")));
139 FormatDistance(buffer
, Units::ToSysUnit(fixed(123.4), Unit::STATUTE_MILES
),
140 Unit::STATUTE_MILES
);
141 ok1(StringIsEqual(buffer
, _T("123 mi")));
143 FormatDistance(buffer
, Units::ToSysUnit(fixed(123.4), Unit::STATUTE_MILES
),
144 Unit::STATUTE_MILES
, false);
145 ok1(StringIsEqual(buffer
, _T("123")));
147 FormatDistance(buffer
, Units::ToSysUnit(fixed(123.4), Unit::STATUTE_MILES
),
148 Unit::STATUTE_MILES
, true, 1);
149 ok1(StringIsEqual(buffer
, _T("123.4 mi")));
151 FormatDistance(buffer
, Units::ToSysUnit(fixed(123.4), Unit::STATUTE_MILES
),
152 Unit::STATUTE_MILES
, false, 1);
153 ok1(StringIsEqual(buffer
, _T("123.4")));
161 // Test FormatSmallDistance()
162 FormatSmallDistance(buffer
, fixed(123.4), Unit::METER
);
163 ok1(StringIsEqual(buffer
, _T("123 m")));
165 FormatSmallDistance(buffer
, fixed(123.4), Unit::METER
, false);
166 ok1(StringIsEqual(buffer
, _T("123")));
168 FormatSmallDistance(buffer
, fixed(123.4), Unit::METER
, true, 1);
169 ok1(StringIsEqual(buffer
, _T("123.4 m")));
171 FormatSmallDistance(buffer
, fixed(123.4), Unit::METER
, false, 1);
172 ok1(StringIsEqual(buffer
, _T("123.4")));
174 FormatSmallDistance(buffer
, fixed(123.4), Unit::METER
, true, 2);
175 ok1(StringIsEqual(buffer
, _T("123.40 m")));
177 FormatSmallDistance(buffer
, fixed(123.4), Unit::METER
, false, 2);
178 ok1(StringIsEqual(buffer
, _T("123.40")));
180 FormatSmallDistance(buffer
, fixed(123.4), Unit::KILOMETER
);
181 ok1(StringIsEqual(buffer
, _T("123 m")));
183 FormatSmallDistance(buffer
, fixed(123.4), Unit::KILOMETER
, false);
184 ok1(StringIsEqual(buffer
, _T("123")));
186 FormatSmallDistance(buffer
, fixed(123.4), Unit::KILOMETER
, true, 1);
187 ok1(StringIsEqual(buffer
, _T("123.4 m")));
189 FormatSmallDistance(buffer
, fixed(123.4), Unit::KILOMETER
, false, 1);
190 ok1(StringIsEqual(buffer
, _T("123.4")));
192 FormatSmallDistance(buffer
, Units::ToSysUnit(fixed(123.4), Unit::FEET
),
193 Unit::NAUTICAL_MILES
);
194 ok1(StringIsEqual(buffer
, _T("123 ft")));
196 FormatSmallDistance(buffer
, Units::ToSysUnit(fixed(123.4), Unit::FEET
),
197 Unit::NAUTICAL_MILES
, false);
198 ok1(StringIsEqual(buffer
, _T("123")));
200 FormatSmallDistance(buffer
, Units::ToSysUnit(fixed(123.4), Unit::FEET
),
201 Unit::NAUTICAL_MILES
, true, 1);
202 ok1(StringIsEqual(buffer
, _T("123.4 ft")));
204 FormatSmallDistance(buffer
, Units::ToSysUnit(fixed(123.4), Unit::FEET
),
205 Unit::NAUTICAL_MILES
, false, 1);
206 ok1(StringIsEqual(buffer
, _T("123.4")));
208 FormatSmallDistance(buffer
, Units::ToSysUnit(fixed(123.4), Unit::FEET
),
209 Unit::STATUTE_MILES
);
210 ok1(StringIsEqual(buffer
, _T("123 ft")));
212 FormatSmallDistance(buffer
, Units::ToSysUnit(fixed(123.4), Unit::FEET
),
213 Unit::STATUTE_MILES
, false);
214 ok1(StringIsEqual(buffer
, _T("123")));
216 FormatSmallDistance(buffer
, Units::ToSysUnit(fixed(123.4), Unit::FEET
),
217 Unit::STATUTE_MILES
, true, 1);
218 ok1(StringIsEqual(buffer
, _T("123.4 ft")));
220 FormatSmallDistance(buffer
, Units::ToSysUnit(fixed(123.4), Unit::FEET
),
221 Unit::STATUTE_MILES
, false, 1);
222 ok1(StringIsEqual(buffer
, _T("123.4")));
226 TestDistanceSmart(fixed value
, Unit unit
, Unit expected_unit
,
227 const TCHAR
*expected_output_with_unit
,
228 const TCHAR
*expected_output_without_unit
,
229 fixed small_unit_threshold
= fixed(2500),
230 fixed precision_threshold
= fixed(100))
234 ok1(FormatDistanceSmart(buffer
, value
, unit
, true, small_unit_threshold
,
235 precision_threshold
) == expected_unit
);
236 ok1(StringIsEqual(buffer
, expected_output_with_unit
));
238 ok1(FormatDistanceSmart(buffer
, value
, unit
, false, small_unit_threshold
,
239 precision_threshold
) == expected_unit
);
240 ok1(StringIsEqual(buffer
, expected_output_without_unit
));
246 // Test FormatDistanceSmart()
249 TestDistanceSmart(fixed(0.1234), Unit::METER
, Unit::METER
, _T("0.12 m"),
252 TestDistanceSmart(fixed(1.234), Unit::METER
, Unit::METER
, _T("1.23 m"),
255 TestDistanceSmart(fixed(12.34), Unit::METER
, Unit::METER
, _T("12.3 m"),
258 TestDistanceSmart(fixed(123.4), Unit::METER
, Unit::METER
, _T("123 m"),
261 TestDistanceSmart(fixed(1234), Unit::METER
, Unit::METER
, _T("1234 m"),
264 TestDistanceSmart(fixed(12345), Unit::METER
, Unit::METER
, _T("12345 m"),
267 TestDistanceSmart(fixed(123456), Unit::METER
, Unit::METER
, _T("123456 m"),
271 TestDistanceSmart(Units::ToSysUnit(fixed(0.1234), Unit::KILOMETER
),
272 Unit::KILOMETER
, Unit::METER
, _T("123 m"), _T("123"));
274 TestDistanceSmart(Units::ToSysUnit(fixed(1.234), Unit::KILOMETER
),
275 Unit::KILOMETER
, Unit::METER
, _T("1234 m"), _T("1234"));
277 TestDistanceSmart(Units::ToSysUnit(fixed(2.345), Unit::KILOMETER
),
278 Unit::KILOMETER
, Unit::METER
, _T("2345 m"), _T("2345"));
280 TestDistanceSmart(Units::ToSysUnit(fixed(2.634), Unit::KILOMETER
),
281 Unit::KILOMETER
, Unit::KILOMETER
, _T("2.63 km"),
284 TestDistanceSmart(Units::ToSysUnit(fixed(12.34), Unit::KILOMETER
),
285 Unit::KILOMETER
, Unit::KILOMETER
, _T("12.3 km"),
288 TestDistanceSmart(Units::ToSysUnit(fixed(123.4), Unit::KILOMETER
),
289 Unit::KILOMETER
, Unit::KILOMETER
, _T("123 km"), _T("123"));
291 // Test Nautical Miles
292 TestDistanceSmart(Units::ToSysUnit(fixed(123.4), Unit::FEET
),
293 Unit::NAUTICAL_MILES
, Unit::FEET
, _T("123 ft"), _T("123"));
295 TestDistanceSmart(Units::ToSysUnit(fixed(1234), Unit::FEET
),
296 Unit::NAUTICAL_MILES
, Unit::FEET
, _T("1234 ft"),
299 TestDistanceSmart(Units::ToSysUnit(fixed(2345), Unit::FEET
),
300 Unit::NAUTICAL_MILES
, Unit::FEET
, _T("2345 ft"),
303 TestDistanceSmart(Units::ToSysUnit(fixed(0.61), Unit::NAUTICAL_MILES
),
304 Unit::NAUTICAL_MILES
, Unit::NAUTICAL_MILES
, _T("0.61 NM"),
307 TestDistanceSmart(Units::ToSysUnit(fixed(1.234), Unit::NAUTICAL_MILES
),
308 Unit::NAUTICAL_MILES
, Unit::NAUTICAL_MILES
, _T("1.23 NM"),
311 TestDistanceSmart(Units::ToSysUnit(fixed(12.34), Unit::NAUTICAL_MILES
),
312 Unit::NAUTICAL_MILES
, Unit::NAUTICAL_MILES
, _T("12.3 NM"),
315 TestDistanceSmart(Units::ToSysUnit(fixed(123.4), Unit::NAUTICAL_MILES
),
316 Unit::NAUTICAL_MILES
, Unit::NAUTICAL_MILES
, _T("123 NM"),
319 // Test Statute Miles
320 TestDistanceSmart(Units::ToSysUnit(fixed(123.4), Unit::FEET
),
321 Unit::STATUTE_MILES
, Unit::FEET
, _T("123 ft"), _T("123"));
323 TestDistanceSmart(Units::ToSysUnit(fixed(1234), Unit::FEET
),
324 Unit::STATUTE_MILES
, Unit::FEET
, _T("1234 ft"), _T("1234"));
326 TestDistanceSmart(Units::ToSysUnit(fixed(2345), Unit::FEET
),
327 Unit::STATUTE_MILES
, Unit::FEET
, _T("2345 ft"), _T("2345"));
329 TestDistanceSmart(Units::ToSysUnit(fixed(0.71), Unit::STATUTE_MILES
),
330 Unit::STATUTE_MILES
, Unit::STATUTE_MILES
, _T("0.71 mi"),
333 TestDistanceSmart(Units::ToSysUnit(fixed(1.234), Unit::STATUTE_MILES
),
334 Unit::STATUTE_MILES
, Unit::STATUTE_MILES
, _T("1.23 mi"),
337 TestDistanceSmart(Units::ToSysUnit(fixed(12.34), Unit::STATUTE_MILES
),
338 Unit::STATUTE_MILES
, Unit::STATUTE_MILES
, _T("12.3 mi"),
341 TestDistanceSmart(Units::ToSysUnit(fixed(123.4), Unit::STATUTE_MILES
),
342 Unit::STATUTE_MILES
, Unit::STATUTE_MILES
, _T("123 mi"),
346 TestDistanceSmart(Units::ToSysUnit(fixed(0.9), Unit::KILOMETER
),
347 Unit::KILOMETER
, Unit::METER
, _T("900 m"), _T("900"), fixed(1000));
349 TestDistanceSmart(Units::ToSysUnit(fixed(1.1), Unit::KILOMETER
),
350 Unit::KILOMETER
, Unit::KILOMETER
, _T("1.10 km"), _T("1.10"), fixed(1000));
352 TestDistanceSmart(Units::ToSysUnit(fixed(1.1), Unit::KILOMETER
),
353 Unit::KILOMETER
, Unit::KILOMETER
, _T("1.1 km"), _T("1.1"), fixed(1000), fixed(10));
355 TestDistanceSmart(Units::ToSysUnit(fixed(1.1), Unit::KILOMETER
),
356 Unit::KILOMETER
, Unit::KILOMETER
, _T("1 km"), _T("1"), fixed(1000), fixed(1));
365 // Test FormatSpeed()
366 FormatSpeed(buffer
, fixed(23.46), Unit::METER_PER_SECOND
);
367 ok1(StringIsEqual(buffer
, _T("23 m/s")));
369 FormatSpeed(buffer
, fixed(23.46), Unit::METER_PER_SECOND
, true, true);
370 ok1(StringIsEqual(buffer
, _T("23.5 m/s")));
372 FormatSpeed(buffer
, fixed(23.46), Unit::METER_PER_SECOND
, false);
373 ok1(StringIsEqual(buffer
, _T("23")));
375 FormatSpeed(buffer
, fixed(23.46), Unit::METER_PER_SECOND
, false, true);
376 ok1(StringIsEqual(buffer
, _T("23.5")));
378 FormatSpeed(buffer
, Units::ToSysUnit(fixed(123.43), Unit::KILOMETER_PER_HOUR
),
379 Unit::KILOMETER_PER_HOUR
);
380 ok1(StringIsEqual(buffer
, _T("123 km/h")));
382 FormatSpeed(buffer
, Units::ToSysUnit(fixed(123.43), Unit::KILOMETER_PER_HOUR
),
383 Unit::KILOMETER_PER_HOUR
, true, true);
384 ok1(StringIsEqual(buffer
, _T("123 km/h")));
386 FormatSpeed(buffer
, Units::ToSysUnit(fixed(83.43), Unit::KILOMETER_PER_HOUR
),
387 Unit::KILOMETER_PER_HOUR
, true, true);
388 ok1(StringIsEqual(buffer
, _T("83.4 km/h")));
390 FormatSpeed(buffer
, Units::ToSysUnit(fixed(123.43), Unit::KNOTS
),
392 ok1(StringIsEqual(buffer
, _T("123 kt")));
394 FormatSpeed(buffer
, Units::ToSysUnit(fixed(123.43), Unit::KNOTS
), Unit::KNOTS
,
396 ok1(StringIsEqual(buffer
, _T("123 kt")));
398 FormatSpeed(buffer
, Units::ToSysUnit(fixed(83.43), Unit::KNOTS
), Unit::KNOTS
,
400 ok1(StringIsEqual(buffer
, _T("83.4 kt")));
403 Units::ToSysUnit(fixed(123.43), Unit::STATUTE_MILES_PER_HOUR
),
404 Unit::STATUTE_MILES_PER_HOUR
);
405 ok1(StringIsEqual(buffer
, _T("123 mph")));
408 Units::ToSysUnit(fixed(123.43), Unit::STATUTE_MILES_PER_HOUR
),
409 Unit::STATUTE_MILES_PER_HOUR
, true, true);
410 ok1(StringIsEqual(buffer
, _T("123 mph")));
413 Units::ToSysUnit(fixed(83.43), Unit::STATUTE_MILES_PER_HOUR
),
414 Unit::STATUTE_MILES_PER_HOUR
, true, true);
415 ok1(StringIsEqual(buffer
, _T("83.4 mph")));
423 // Test FormatVerticalSpeed()
424 FormatVerticalSpeed(buffer
, fixed(1.42), Unit::METER_PER_SECOND
);
425 ok1(StringIsEqual(buffer
, _T("+1.4 m/s")));
427 FormatVerticalSpeed(buffer
, fixed(1.42), Unit::METER_PER_SECOND
, false);
428 ok1(StringIsEqual(buffer
, _T("+1.4")));
430 FormatVerticalSpeed(buffer
, Units::ToSysUnit(fixed(2.47), Unit::KNOTS
),
432 ok1(StringIsEqual(buffer
, _T("+2.5 kt")));
434 FormatVerticalSpeed(buffer
, Units::ToSysUnit(fixed(2.47), Unit::KNOTS
),
436 ok1(StringIsEqual(buffer
, _T("+2.5")));
438 FormatVerticalSpeed(buffer
,
439 Units::ToSysUnit(fixed(245.4), Unit::FEET_PER_MINUTE
),
440 Unit::FEET_PER_MINUTE
);
441 ok1(StringIsEqual(buffer
, _T("+245 fpm")));
443 FormatVerticalSpeed(buffer
,
444 Units::ToSysUnit(fixed(245.4), Unit::FEET_PER_MINUTE
),
445 Unit::FEET_PER_MINUTE
, false);
446 ok1(StringIsEqual(buffer
, _T("+245")));
454 // Test FormatTemperature()
455 FormatTemperature(buffer
, fixed(293.93), Unit::KELVIN
);
456 ok1(StringIsEqual(buffer
, _T("294 K")));
458 FormatTemperature(buffer
, fixed(293.93), Unit::KELVIN
, false);
459 ok1(StringIsEqual(buffer
, _T("294")));
461 FormatTemperature(buffer
,
462 Units::ToSysUnit(fixed(13.4), Unit::DEGREES_CELCIUS
),
463 Unit::DEGREES_CELCIUS
);
464 ok1(StringIsEqual(buffer
, _T("13 " DEG
"C")));
466 FormatTemperature(buffer
,
467 Units::ToSysUnit(fixed(13.4), Unit::DEGREES_CELCIUS
),
468 Unit::DEGREES_CELCIUS
, false);
469 ok1(StringIsEqual(buffer
, _T("13")));
471 FormatTemperature(buffer
,
472 Units::ToSysUnit(fixed(92.7), Unit::DEGREES_FAHRENHEIT
),
473 Unit::DEGREES_FAHRENHEIT
);
474 ok1(StringIsEqual(buffer
, _T("93 " DEG
"F")));
476 FormatTemperature(buffer
,
477 Units::ToSysUnit(fixed(92.7), Unit::DEGREES_FAHRENHEIT
),
478 Unit::DEGREES_FAHRENHEIT
, false);
479 ok1(StringIsEqual(buffer
, _T("93")));
487 // Test FormatPressure()
488 FormatPressure(buffer
, AtmosphericPressure::HectoPascal(fixed(1013.25)),
490 ok1(StringIsEqual(buffer
, _T("1013 hPa")));
492 FormatPressure(buffer
, AtmosphericPressure::HectoPascal(fixed(1013.25)),
493 Unit::HECTOPASCAL
, false);
494 ok1(StringIsEqual(buffer
, _T("1013")));
496 FormatPressure(buffer
, AtmosphericPressure::HectoPascal(fixed(1013.25)),
498 ok1(StringIsEqual(buffer
, _T("1013 mb")));
500 FormatPressure(buffer
, AtmosphericPressure::HectoPascal(fixed(1013.25)),
501 Unit::MILLIBAR
, false);
502 ok1(StringIsEqual(buffer
, _T("1013")));
504 FormatPressure(buffer
, AtmosphericPressure::HectoPascal(
505 Units::ToSysUnit(fixed(103), Unit::TORR
)), Unit::TORR
);
506 ok1(StringIsEqual(buffer
, _T("103 mmHg")));
508 FormatPressure(buffer
, AtmosphericPressure::HectoPascal(
509 Units::ToSysUnit(fixed(103), Unit::TORR
)), Unit::TORR
, false);
510 ok1(StringIsEqual(buffer
, _T("103")));
512 FormatPressure(buffer
, AtmosphericPressure::HectoPascal(
513 Units::ToSysUnit(fixed(29.92), Unit::INCH_MERCURY
)), Unit::INCH_MERCURY
);
514 ok1(StringIsEqual(buffer
, _T("29.92 inHg")));
516 FormatPressure(buffer
, AtmosphericPressure::HectoPascal(
517 Units::ToSysUnit(fixed(29.92), Unit::INCH_MERCURY
)),
518 Unit::INCH_MERCURY
, false);
519 ok1(StringIsEqual(buffer
, _T("29.92")));
523 main(int argc
, char **argv
)
528 TestRelativeAltitude();
537 return exit_status();