Propagate LOS frequency data and clamp bounds
This commit is contained in:
1 parent
c8ff0cc943
commit
16b2c24983
3 files changed
+54
-3
No files matched your search
@@ -1021,10 +1021,20 @@ class _LosProfilePainter extends CustomPainter {
|
||||
if (samples.length < 2) return;
|
||||
|
||||
final minY = samples
|
||||
.map((s) => math.min(s.terrainMeters, s.lineHeightMeters))
|
||||
.map(
|
||||
(s) => math.min(
|
||||
math.min(s.terrainMeters, s.lineHeightMeters),
|
||||
s.refractedHeightMeters,
|
||||
),
|
||||
)
|
||||
.reduce(math.min);
|
||||
final maxY = samples
|
||||
.map((s) => math.max(s.terrainMeters, s.lineHeightMeters))
|
||||
.map(
|
||||
(s) => math.max(
|
||||
math.max(s.terrainMeters, s.lineHeightMeters),
|
||||
s.refractedHeightMeters,
|
||||
),
|
||||
)
|
||||
.reduce(math.max);
|
||||
final ySpan = math.max(1.0, maxY - minY);
|
||||
final maxDist = math.max(1.0, samples.last.distanceMeters);
|
||||
|
||||
@@ -212,6 +212,7 @@ class LineOfSightService {
|
||||
startAntennaHeightMeters: startAntennaHeightMeters,
|
||||
endAntennaHeightMeters: endAntennaHeightMeters,
|
||||
kFactor: kFactor,
|
||||
frequencyMHz: frequencyMHz,
|
||||
obstructionToleranceMeters: obstructionToleranceMeters,
|
||||
);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user