-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathDaidalus.h
2963 lines (2465 loc) · 96 KB
/
Daidalus.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/*
* Copyright (c) 2015-2021 United States Government as represented by
* the National Aeronautics and Space Administration. No copyright
* is claimed in the United States under Title 17, U.S.Code. All Other
* Rights Reserved.
*/
#ifndef DAIDALUS_H_
#define DAIDALUS_H_
#include "DaidalusCore.h"
#include "DaidalusAltBands.h"
#include "DaidalusDirBands.h"
#include "DaidalusHsBands.h"
#include "DaidalusVsBands.h"
#include "UrgencyStrategy.h"
#include "Velocity.h"
#include "ErrorLog.h"
#include "ErrorReporter.h"
#include "TrafficState.h"
#include "BandsRegion.h"
#include "Alerter.h"
#include "Detection3D.h"
#include "IndexLevelT.h"
#include "string_util.h"
#include "format.h"
#include <vector>
#include <string>
#include <cmath>
namespace larcfm {
/**
* Objects of class "Daidalus" compute the conflict bands using
* kinematic single-maneuver projections of the ownship and linear preditions
* of (multiple) traffic aircraft positions. The bands consist of ranges of
* guidance maneuvers: direction angles, horizontal speeds, vertical
* speeds, and altitude.<p>
*
* An assumption of the bands information is that the traffic aircraft
* do not maneuver. If the ownship immediately executes a NONE
* guidance maneuver, then the new path is conflict free (within a
* lookahead time of the parameter). If the ownship immediately executes a
* NEAR/MID/FAR guidance maneuver and no traffic aircraft maneuvers, then
* there will corresponding alert within the corresponding alerting level thresholds.<p>
*
* If recovery bands are set and the ownship is in
* a violation path, loss of separation recovery bands and recovery times are
* computed for each type of maneuver. If the ownship immediately executes a
* RECOVERY guidance maneuver, then the new path is conflict-free after the
* recovery time. Furthermore, the recovery time is the minimum time for which
* there exists a kinematic conflict-free maneuver in the future. <p>
*
* Note that in the case of geodetic coordinates this version of bands
* performs an internal projection of the coordinates and velocities
* into the Euclidean frame (see Util/Projection). Accuracy may be
* reduced if the traffic plans involve any segments longer than
* Util.Projection.projectionConflictRange(lat,acc), and an error will
* be logged if the distance between traffic and ownship exceeds
* Util.Projection.projectionMaxRange() at any point in the lookahead
* range.<p>
*
* Disclaimers: The formal proofs of the core algorithms use real numbers,
* however these implementations use floating point
* numbers, so numerical differences could result. In addition, the
* geodetic computations include certain inaccuracies, especially near
* the poles.<p>
*
* The basic usage is
* <pre>
* Daidalus daa = new Daidalus();
* daa.loadFromFile(<configurationfile>);
*
* ...
* daa.setOwnshipState(position of ownship, velocity of ownship);
* daa.addTrafficState(position of (one) traffic aircraft, velocity of traffic);
* daa.addTrafficState(position of (another) traffic aircraft, velocity of traffic);
* ...add other traffic aircraft...
*
* for (int i = 0; i < daa.horizontalDirectionBandsLength(); i++ ) {
* interval = daa.horizontalDirectionIntervalAt(i);
* lower_ang = intrval.low;
* upper_ang = intrval.up;
* regionType = daa.horizontalDirectionRegionAt(i);
* ..do something with this information..
* }
*
* ...similar for horizontal speed and vertical speed...
* </pre>
*
*/
class Daidalus : public ErrorReporter {
private:
mutable ErrorLog error;
DaidalusCore core_;
DaidalusDirBands hdir_band_;
DaidalusHsBands hs_band_;
DaidalusVsBands vs_band_;
DaidalusAltBands alt_band_;
void stale_bands();
public:
/* Constructors */
/**
* Construct an empty Daidalus object.
* NOTE: This object doesn't have any alert configured. Alerters can be
* configured either programmatically, set_DO_365B() or
* via a configuration file with the method loadFromFile(configurationfile)
**/
Daidalus();
/**
* Construct a Daidalus object with initial alerter.
*/
explicit Daidalus(const Alerter& alerter);
/**
* Construct a Daidalus object with the default parameters and one alerter with the
* given detector and T (in seconds) as the alerting time, early alerting time, and lookahead time.
*/
Daidalus(const Detection3D& det, double T);
/* Destructor */
virtual ~Daidalus() {}
/* Setting for WC Definitions RTCA DO-365 */
/*
* Set Daidalus object such that
* - Configure two alerters (Phase I and Phase II) as defined as in RTCA DO-365A
* - Maneuver guidance logic assumes kinematic maneuvers
* - Turn rate is set to 3 deg/s, when type is true, and to 1.5 deg/s
* when type is false.
* - Configure Sensor Uncertainty Migitation (SUM) when sum is true
* - Bands don't saturate until NMAC
*/
void set_DO_365A(bool type=true, bool sum=true);
/*
* Set Daidalus object such that
* - Configure two alerters (Phase I, Phase II, and Non-Cooperative) as defined as in RTCA DO-365B
* - Maneuver guidance logic assumes kinematic maneuvers
* - Turn rate is set to 3 deg/s, when type is true, and to 1.5 deg/s
* when type is false.
* - Configure Sensor Uncertainty Migitation (SUM) when sum is true
* - Bands don't saturate until NMAC
*/
void set_DO_365B(bool type=true, bool sum=true);
/*
* Set DAIDALUS object such that
* - Alerting thresholds are buffered
* - Maneuver guidance logic assumes kinematic maneuvers
* - Turn rate is set to 3 deg/s, when type is true, and to 1.5 deg/s
* when type is false.
* - Bands don't saturate until NMAC
*/
void set_Buffered_WC_DO_365(bool type);
/* Set DAIDALUS object such that alerting logic and maneuver guidance corresponds to
* ACCoRD's CD3D, i.e.,
* - Separation is given by a cylinder of of diameter 5nm and height 1000ft
* - Lookahead time and alerting time is 180s
* - Only 1 alert level
* - Instantaneous maneuvers */
void set_CD3D();
/* Set DAIDALUS object such that alerting logic and maneuver guidance corresponds to
* ideal TCASII */
void set_TCASII();
/**
* Return release version string
*/
static std::string release();
/* Ownship and Traffic Setting */
/**
* Returns state of ownship.
*/
const TrafficState& getOwnshipState() const;
/**
* Returns state of aircraft at index idx
*/
const TrafficState& getAircraftStateAt(int idx) const;
/**
* Set ownship state and current time. Clear all traffic.
* @param id Ownship's identifier
* @param pos Ownship's position
* @param vel Ownship's ground velocity
* @param airvel Ownship's air velocity
* @param time Time stamp of ownship's state
*/
void setOwnshipState(const std::string& id, const Position& pos, const Velocity& vel, const Velocity& airvel, double time);
/**
* Set ownship state and current time. Clear all traffic and assume previous wind.
* @param id Ownship's identifier
* @param pos Ownship's position
* @param vel Ownship's ground velocity
* @param time Time stamp of ownship's state
*/
void setOwnshipState(const std::string& id, const Position& pos, const Velocity& vel, double time);
/**
* Set ownship state at time 0.0. Clear all traffic and assume previous wind.
* @param id Ownship's identifier
* @param pos Ownship's position
* @param vel Ownship's ground velocity
*/
void setOwnshipState(const std::string& id, const Position& pos, const Velocity& vel);
/**
* Add traffic state at given time. Assume previous wind.
* If time is different from current time, traffic state is projected, past or future,
* into current time. If it's the first aircraft, this aircraft is
* set as the ownship. If a traffic state with the same id already exists,
* the traffic state is overwritten. If id is ownship's, nothing is done and
* the value -1 is returned.
* @param id Aircraft's identifier
* @param pos Aircraft's position
* @param vel Aircraft's ground velocity
* @param time Time stamp of aircraft's state
* @return Aircraft's index
*/
int addTrafficState(const std::string& id, const Position& pos, const Velocity& vel, double time);
/**
* Add traffic state at current time. If it's the first aircraft, this aircraft is
* set as the ownship.
* @param id Aircraft's identifier
* @param pos Aircraft's position
* @param vel Aircraft's ground velocity
* @return Aircraft's index
*/
int addTrafficState(const std::string& id, const Position& pos, const Velocity& vel);
/**
* Get index of aircraft with given name. Return -1 if no such index exists
*/
int aircraftIndex(const std::string& name) const;
/**
* Exchange ownship aircraft with aircraft named id.
* EXPERT USE ONLY !!!
*/
void resetOwnship(const std::string& id);
/**
* Remove traffic from the list of aircraft. Returns false if no aircraft was removed.
* Ownship cannot be removed.
* If traffic is at index i, the indices of aircraft at k > i, are shifted to k-1.
* EXPERT USE ONLY !!!
*/
bool removeTrafficAircraft(const std::string& name);
/**
* Project ownship and traffic aircraft offset seconds in the future (if positive) or in the past (if negative)
* EXPERT USE ONLY !!!
*/
void linearProjection(double offset);
/**
* @return true if ownship has been set
*/
bool hasOwnship() const;
/**
* @return true if at least one traffic has been set
*/
bool hasTraffic() const;
/**
* @return number of aircraft, including ownship.
*/
int numberOfAircraft() const;
/**
* @return last traffic index. Every traffic aircraft has an index between 1 and lastTrafficIndex.
* The index 0 is reserved for the ownship. When lastTrafficIndex is 0, the ownship is set but no
* traffic aircraft has been set. When lastTrafficIndex is negative, ownship has not been set.
*/
int lastTrafficIndex() const;
bool isLatLon() const;
/* Current Time */
/**
* Return currrent time in seconds. Current time is the time of the ownship.
*/
double getCurrentTime() const;
/**
* Return currrent time in specified units. Current time is the time of the ownship.
*/
double getCurrentTime(const std::string& u) const;
/* Wind Setting */
/**
* Get ownship's heading in internal units [0-2PI]
*/
double getOwnshipHeading() const;
/**
* Get ownship's heading in given units [0-2PI]
*/
double getOwnshipHeading(const std::string& units) const;
/**
* Get ownship's air speed in internal units [m/s]
*/
double getOwnshipAirSpeed() const;
/**
* Get ownship's air apeed in given units
*/
double getOwnshipAirSpeed(const std::string& units) const;
/**
* Set ownship's air velocity. This method resets the wind setting and the air velocity of all traffic aircraft.
*/
void setOwnshipAirVelocity(double heading, double airspeed);
/**
* Get wind velocity specified in the TO direction
*/
Velocity getWindVelocityTo() const;
/**
* Get wind velocity specified in the From direction
*/
Velocity getWindVelocityFrom() const;
/**
* Set wind velocity specified in the TO direction
* @param windto: Wind velocity specified in TO direction
*/
void setWindVelocityTo(const Velocity& windto);
/**
* Set wind velocity specified in the From direction
* @param windfrom: Wind velocity specified in From direction
*/
void setWindVelocityFrom(const Velocity& windfrom);
/**
* Set no wind velocity
*/
void setNoWind();
/* Alerter Setting */
/**
* Set alerter of the aircraft at ac_idx to alerter_idx
* @param ac_idx: Aircraft index between 0 (ownship) and lastTrafficIndex(), inclusive
* @param alerter_idx: Alerter index starting from 1. The value 0 means none.
*/
void setAlerterIndex(int ac_idx, int alerter_idx);
/**
* Set alerter of the aircraft at ac_idx to alerter
* @param ac_idx: Aircraft index between 0 (ownship) and lastTrafficIndex(), inclusive
* @param alerter: Alerter identifier
*/
void setAlerter(int ac_idx, const std::string& alerter);
/**
* Return alert index used for the traffic aircraft at index ac_idx.
* The alert index depends on alerting logic. If ownship centric, it returns the
* alert index of ownship. Otherwise, it returns the alert index of the traffic aircraft
* at ac_idx.
*/
int alerterIndexBasedOnAlertingLogic(int ac_idx);
/**
* Returns most severe alert level for a given aircraft. Returns 0 if either the aircraft or the alerter is undefined.
*/
int mostSevereAlertLevel(int ac_idx);
/**
* Returns true if ownship is in confict with respect the corrective volume with any traffic aircraft.
*/
bool inCorrectiveConflict();
/* SUM Setting */
/**
* Set horizontal position uncertainty of aircraft at index ac_idx
* s_EW_std: East/West position standard deviation in internal units
* s_NS_std: North/South position standard deviation in internal units
* s_EN_std: East/North position standard deviation in internal units
*/
void setHorizontalPositionUncertainty(int ac_idx, double s_EW_std, double s_NS_std, double s_EN_std);
/**
* Set horizontal position uncertainty of aircraft at index ac_idx
* s_EW_std: East/West position standard deviation in given units
* s_NS_std: North/South position standard deviation in given units
* s_EN_std: East/North position standard deviation in given units
*/
void setHorizontalPositionUncertainty(int ac_idx, double s_EW_std, double s_NS_std, double s_EN_std, const std::string& u);
/**
* Set vertical position uncertainty of aircraft at index ac_idx
* sz_std : Vertical position standard deviation in internal units
*/
void setVerticalPositionUncertainty(int ac_idx, double sz_std);
/**
* Set vertical position uncertainty of aircraft at index ac_idx
* sz_std : Vertical position standard deviation in given units
*/
void setVerticalPositionUncertainty(int ac_idx, double sz_std, const std::string& u);
/**
* Set horizontal velocity uncertainty of aircraft at index ac_idx
* v_EW_std: East/West speed standard deviation in internal units
* v_NS_std: North/South speed standard deviation in internal units
* v_EN_std: East/North speed standard deviation in internal units
*/
void setHorizontalVelocityUncertainty(int ac_idx, double v_EW_std, double v_NS_std, double v_EN_std);
/**
* Set horizontal velocity uncertainty of aircraft at index ac_idx
* v_EW_std: East/West speed standard deviation in given units
* v_NS_std: North/South speed standard deviation in given units
* v_EN_std: East/North speed standard deviation in given units
*/
void setHorizontalVelocityUncertainty(int ac_idx, double v_EW_std, double v_NS_std, double v_EN_std, const std::string& u);
/**
* Set vertical speed uncertainty of aircraft at index ac_idx
* vz_std : Vertical speed standard deviation in internal units
*/
void setVerticalSpeedUncertainty(int ac_idx, double vz_std);
/**
* Set vertical speed uncertainty of aircraft at index ac_idx
* vz_std : Vertical speed standard deviation in given units
*/
void setVerticalSpeedUncertainty(int ac_idx, double vz_std, const std::string& u);
/**
* Reset all uncertainties of aircraft at index ac_idx
*/
void resetUncertainty(int ac_idx);
/* Urgency strategy for implicitly coordinate bands (experimental) */
/**
* @return strategy for computing most urgent aircraft.
*/
const UrgencyStrategy& getUrgencyStrategy() const;
/**
* Set strategy for computing most urgent aircraft.
*/
void setUrgencyStrategy(const UrgencyStrategy& strat);
/**
* @return most urgent aircraft.
*/
TrafficState mostUrgentAircraft();
/* Computation of contours, a.k.a. blobs, and hazard zones */
/**
* Computes horizontal contours contributed by aircraft at index idx, for
* given alert level. A contour is a list of points in counter-clockwise
* direction representing a polygon. Last point should be connected to first one.
* The computed polygon should only be used for display purposes since it's merely an
* approximation of the actual contours defined by the violation and detection methods.
* @param blobs list of horizontal contours returned by reference.
* @param ac_idx is the index of the aircraft used to compute the contours.
* @param alert_level is the alert level used to compute detection. The value 0
* indicate the alert level of the corrective region.
*/
void horizontalContours(std::vector<std::vector<Position> >& blobs, int ac_idx, int alert_level=0);
/**
* Computes horizontal contours contributed by aircraft at index idx, for
* given region. A contour is a list of points in counter-clockwise
* direction representing a polygon. Last point should be connected to first one.
* The computed polygon should only be used for display purposes since it's merely an
* approximation of the actual contours defined by the violation and detection methods.
* @param blobs list of horizontal contours returned by reference.
* @param ac_idx is the index of the aircraft used to compute the contours.
* @param region is the region used to compute detection.
*/
void horizontalContours(std::vector<std::vector<Position> >& blobs, int ac_idx,
BandsRegion::Region region);
/**
* Computes horizontal hazard zone around aircraft at index ac_idx, for given alert level.
* A hazard zone is a list of points in counter-clockwise
* direction representing a polygon. Last point should be connected to first one.
* @param haz hazard zone returned by reference.
* @param ac_idx is the index of the aircraft used to compute the contours.
* @param loss true means that the polygon represents the hazard zone. Otherwise,
* the polygon represents the hazard zone with an alerting time.
* @param from_ownship true means ownship point of view. Otherwise, the hazard zone is computed
* from the intruder's point of view.
* @param alert_level is the alert level used to compute detection. The value 0
* indicate the alert level of the corrective region.
* NOTE: The computed polygon should only be used for display purposes since it's merely an
* approximation of the actual hazard zone defined by the violation and detection methods.
*/
void horizontalHazardZone(std::vector<Position>& haz, int ac_idx, bool loss, bool from_ownship,
int alert_level=0);
/**
* Computes horizontal hazard zone around aircraft at index ac_idx, for given region.
* A hazard zone is a list of points in counter-clockwise
* direction representing a polygon. Last point should be connected to first one.
* @param haz hazard zone returned by reference.
* @param ac_idx is the index of the aircraft used to compute the contours.
* @param loss true means that the polygon represents the hazard zone. Otherwise,
* the polygon represents the hazard zone with an alerting time.
* @param from_ownship true means ownship point of view. Otherwise, the hazard zone is computed
* from the intruder's point of view.
* @param region is the region used to compute detection.
* NOTE: The computed polygon should only be used for display purposes since it's merely an
* approximation of the actual hazard zone defined by the violation and detection methods.
*/
void horizontalHazardZone(std::vector<Position>& haz, int ac_idx, bool loss, bool from_ownship,
BandsRegion::Region region);
/* Setting and getting DaidalusParameters */
/**
* Return number of alerters.
*/
int numberOfAlerters() const;
/**
* Return alerter at index i (starting from 1).
*/
const Alerter& getAlerterAt(int i) const;
/**
* Return index of alerter with a given name. Return 0 if it doesn't exist
*/
int getAlerterIndex(const std::string& id) const;
/**
* Clear all alert thresholds
*/
void clearAlerters();
/**
* Add alerter (if id of alerter already exists, replaces alerter with new one).
* Return index of added alerter
*/
int addAlerter(const Alerter& alerter);
/**
* @return lookahead time in seconds.
*/
double getLookaheadTime() const;
/**
* @return lookahead time in specified units [u].
*/
double getLookaheadTime(const std::string& u) const;
/**
* @return left direction in radians [0 - pi] [rad] from current ownship's direction
*/
double getLeftHorizontalDirection() const;
/**
* @return left direction in specified units [0 - pi] [u] from current ownship's direction
*/
double getLeftHorizontalDirection(const std::string& u) const;
/**
* @return right direction in radians [0 - pi] [rad] from current ownship's direction
*/
double getRightHorizontalDirection() const;
/**
* @return right direction in specified units [0 - pi] [u] from current ownship's direction
*/
double getRightHorizontalDirection(const std::string& u) const;
/**
* @return minimum airspeed speed in internal units [m/s].
*/
double getMinAirSpeed() const;
/**
* @return minimum air speed in specified units [u].
*/
double getMinAirSpeed(const std::string& u) const;
/**
* @return minimum horizontal speed for horizontal speed bands in internal units [m/s].
*/
double getMinHorizontalSpeed() const;
/**
* @return minimum horizontal speed for horizontal speed bands in specified units [u].
*/
double getMinHorizontalSpeed(const std::string& u) const;
/**
* @return maximum horizontal speed for horizontal speed bands in internal units [m/s].
*/
double getMaxHorizontalSpeed() const;
/**
* @return maximum horizontal speed for horizontal speed bands in specified units [u].
*/
double getMaxHorizontalSpeed(const std::string& u) const;
/**
* @return minimum vertical speed for vertical speed bands in internal units [m/s].
*/
double getMinVerticalSpeed() const;
/**
* @return minimum vertical speed for vertical speed bands in specified units [u].
*/
double getMinVerticalSpeed(const std::string& u) const;
/**
* @return maximum vertical speed for vertical speed bands in internal units [m/s].
*/
double getMaxVerticalSpeed() const;
/**
* @return maximum vertical speed for vertical speed bands in specified units [u].
*/
double getMaxVerticalSpeed(const std::string& u) const;
/**
* @return minimum altitude for altitude bands in internal units [m]
*/
double getMinAltitude() const;
/**
* @return minimum altitude for altitude bands in specified units [u].
*/
double getMinAltitude(const std::string& u) const;
/**
* @return maximum altitude for altitude bands in internal units [m]
*/
double getMaxAltitude() const;
/**
* @return maximum altitude for altitude bands in specified units [u].
*/
double getMaxAltitude(const std::string& u) const;
/**
* @return Horizontal speed in internal units (below current value) for the
* computation of relative bands
*/
double getBelowRelativeHorizontalSpeed() const;
/**
* @return Horizontal speed in given units (below current value) for the
* computation of relative bands
*/
double getBelowRelativeHorizontalSpeed(const std::string& u) const;
/**
* @return Horizontal speed in internal units (above current value) for the
* computation of relative bands
*/
double getAboveRelativeHorizontalSpeed() const;
/**
* @return Horizontal speed in given units (above current value) for the
* computation of relative bands
*/
double getAboveRelativeHorizontalSpeed(const std::string& u) const;
/**
* @return Vertical speed in internal units (below current value) for the
* computation of relative bands
*/
double getBelowRelativeVerticalSpeed() const;
/**
* @return Vertical speed in given units (below current value) for the
* computation of relative bands
*/
double getBelowRelativeVerticalSpeed(const std::string& u) const;
/**
* @return Vertical speed in internal units (above current value) for the
* computation of relative bands
*/
double getAboveRelativeVerticalSpeed() const;
/**
* @return Vertical speed in given units (above current value) for the
* computation of relative bands
*/
double getAboveRelativeVerticalSpeed(const std::string& u) const;
/**
* @return Altitude in internal units (below current value) for the
* computation of relative bands
*/
double getBelowRelativeAltitude() const;
/**
* @return Altitude in given units (below current value) for the
* computation of relative bands
*/
double getBelowRelativeAltitude(const std::string& u) const;
/**
* @return Altitude in internal units (above current value) for the
* computation of relative bands
*/
double getAboveRelativeAltitude() const;
/**
* @return Altitude in given units (above current value) for the
* computation of relative bands
*/
double getAboveRelativeAltitude(const std::string& u) const;
/**
* @return step size for direction bands in internal units [rad].
*/
double getHorizontalDirectionStep() const;
/**
* @return step size for direction bands in specified units [u].
*/
double getHorizontalDirectionStep(const std::string& u) const;
/**
* @return step size for horizontal speed bands in internal units [m/s].
*/
double getHorizontalSpeedStep() const;
/**
* @return step size for horizontal speed bands in specified units [u].
*/
double getHorizontalSpeedStep(const std::string& u) const;
/**
* @return step size for vertical speed bands in internal units [m/s].
*/
double getVerticalSpeedStep() const;
/**
* @return step size for vertical speed bands in specified units [u].
*/
double getVerticalSpeedStep(const std::string& u) const;
/**
* @return step size for altitude bands in internal units [m]
*/
double getAltitudeStep() const;
/**
* @return step size for altitude bands in specified units [u].
*/
double getAltitudeStep(const std::string& u) const;
/**
* @return horizontal acceleration for horizontal speed bands to value in internal units [m/s^2].
*/
double getHorizontalAcceleration() const;
/**
* @return horizontal acceleration for horizontal speed bands to value in specified units [u].
*/
double getHorizontalAcceleration(const std::string& u) const;
/**
* @return constant vertical acceleration for vertical speed and altitude bands in internal [m/s^2]
* units
*/
double getVerticalAcceleration() const;
/**
* @return constant vertical acceleration for vertical speed and altitude bands in specified
* units
*/
double getVerticalAcceleration(const std::string& u) const;
/**
* @return turn rate in internal units [rad/s].
*/
double getTurnRate() const;
/**
* @return turn rate in specified units [u].
*/
double getTurnRate(const std::string& u) const;
/**
* @return bank angle in internal units [rad].
*/
double getBankAngle() const;
/**
* @return bank angle in specified units [u].
*/
double getBankAngle(const std::string& u) const;
/**
* @return the vertical climb/descend rate for altitude bands in internal units [m/s]
*/
double getVerticalRate() const;
/**
* @return the vertical climb/descend rate for altitude bands in specified units [u].
*/
double getVerticalRate(const std::string& u) const;
/**
* @return horizontal NMAC distance in internal units [m].
*/
double getHorizontalNMAC() const;
/**
* @return horizontal NMAC distance in specified units [u].
*/
double getHorizontalNMAC(const std::string& u) const;
/**
* @return vertical NMAC distance in internal units [m].
*/
double getVerticalNMAC() const;
/**
* @return vertical NMAC distance in specified units [u].
*/
double getVerticalNMAC(const std::string& u) const;
/**
* @return recovery stability time in seconds. Recovery bands are computed at time of
* first conflict-free region plus this time.
*/
double getRecoveryStabilityTime() const;
/**
* @return recovery stability time in specified Units:: Recovery bands are computed at time of
* first conflict-free region plus this time.
*/
double getRecoveryStabilityTime(const std::string& u) const;
/**
* @return hysteresis time in seconds.
*/
double getHysteresisTime() const;
/**
* @return hysteresis time in specified units [u].
*/
double getHysteresisTime(const std::string& u) const;
/**
* @return alerting persistence time in seconds.
*/
double getPersistenceTime() const;
/**
* @return alerting persistence time in specified units [u].
*/
double getPersistenceTime(const std::string& u) const;
/**
* @return true if guidance persistence is enabled
*/
bool isEnabledBandsPersistence() const;
/**
* Enable/disable bands persistence
*/
void setBandsPersistence(bool flag);
/**
* Enable bands persistence
*/
void enableBandsPersistence();
/**
* Disable bands persistence
*/
void disableBandsPersistence();
/**
* @return persistence for preferred horizontal direction resolution in internal units
*/
double getPersistencePreferredHorizontalDirectionResolution() const;
/**
* @return persistence for preferred horizontal direction resolution in given units
*/
double getPersistencePreferredHorizontalDirectionResolution(const std::string& u) const;
/**
* @return persistence for preferred horizontal speed resolution in internal units
*/
double getPersistencePreferredHorizontalSpeedResolution() const;
/**
* @return persistence for preferred horizontal speed resolution in given units
*/
double getPersistencePreferredHorizontalSpeedResolution(const std::string& u) const;
/**
* @return persistence for preferred vertical speed resolution in internal units
*/
double getPersistencePreferredVerticalSpeedResolution() const;
/**
* @return persistence for preferred vertical speed resolution in given units
*/
double getPersistencePreferredVerticalSpeedResolution(const std::string& u) const;
/**
* @return persistence for preferred altitude resolution in internal units
*/
double getPersistencePreferredAltitudeResolution() const;
/**
* @return persistence for preferred altitude resolution in given units
*/
double getPersistencePreferredAltitudeResolution(const std::string& u) const;
/**
* @return Alerting parameter m of "M of N" strategy
*/
int getAlertingParameterM() const;
/**
* @return Alerting parameter m of "M of N" strategy
*/
int getAlertingParameterN() const;
/**
* @return minimum horizontal separation for recovery bands in internal units [m].
*/
double getMinHorizontalRecovery() const;
/**
* Return minimum horizontal separation for recovery bands in specified units [u]
*/
double getMinHorizontalRecovery(const std::string& u) const;
/**
* @return minimum vertical separation for recovery bands in internal units [m].
*/
double getMinVerticalRecovery() const;
/**
* Return minimum vertical separation for recovery bands in specified units [u].
*/
double getMinVerticalRecovery(const std::string& u) const;
/**
* Sets lookahead time in seconds.
*/
void setLookaheadTime(double t);
/**
* Set lookahead time to value in specified units [u].
*/
void setLookaheadTime(double t, const std::string& u);
/**
* Set left direction to value in internal units [rad]. Value is expected to be in [0 - pi]
*/
void setLeftHorizontalDirection(double val);
/**
* Set left direction to value in specified units [u]. Value is expected to be in [0 - pi]
*/
void setLeftHorizontalDirection(double val, const std::string& u);
/**
* Set right direction to value in internal units [rad]. Value is expected to be in [0 - pi]
*/
void setRightHorizontalDirection(double val);
/**
* Set right direction to value in specified units [u]. Value is expected to be in [0 - pi]
*/
void setRightHorizontalDirection(double val, const std::string& u);