aboutsummaryrefslogtreecommitdiff
path: root/src/Enmarcha.Backend
diff options
context:
space:
mode:
Diffstat (limited to 'src/Enmarcha.Backend')
-rw-r--r--src/Enmarcha.Backend/Services/Processors/CtagShuttleRealTimeProcessor.cs4
-rw-r--r--src/Enmarcha.Backend/Services/Processors/RenfeRealTimeProcessor.cs2
-rw-r--r--src/Enmarcha.Backend/Services/ShapeTraversalService.cs2
-rw-r--r--src/Enmarcha.Backend/Types/ConsolidatedCirculation.cs2
4 files changed, 5 insertions, 5 deletions
diff --git a/src/Enmarcha.Backend/Services/Processors/CtagShuttleRealTimeProcessor.cs b/src/Enmarcha.Backend/Services/Processors/CtagShuttleRealTimeProcessor.cs
index 8f3e6db..ce2651f 100644
--- a/src/Enmarcha.Backend/Services/Processors/CtagShuttleRealTimeProcessor.cs
+++ b/src/Enmarcha.Backend/Services/Processors/CtagShuttleRealTimeProcessor.cs
@@ -209,7 +209,7 @@ public class CtagShuttleRealTimeProcessor : AbstractRealTimeProcessor
var dy = nextPoint.Y - currentPoint.Y;
var bearing = Math.Atan2(dx, dy) * 180.0 / Math.PI;
if (bearing < 0) bearing += 360.0;
- shuttleWgs84.OrientationDegrees = (int)Math.Round(bearing);
+ shuttleWgs84.Bearing = (int)Math.Round(bearing);
}
activeArrival.CurrentPosition = shuttleWgs84;
@@ -220,7 +220,7 @@ public class CtagShuttleRealTimeProcessor : AbstractRealTimeProcessor
_logger.LogInformation(
"Shuttle position set: Lat={Lat}, Lon={Lon}, Bearing={Bearing}°",
- shuttleWgs84.Latitude, shuttleWgs84.Longitude, shuttleWgs84.OrientationDegrees);
+ shuttleWgs84.Latitude, shuttleWgs84.Longitude, shuttleWgs84.Bearing);
}
else
{
diff --git a/src/Enmarcha.Backend/Services/Processors/RenfeRealTimeProcessor.cs b/src/Enmarcha.Backend/Services/Processors/RenfeRealTimeProcessor.cs
index 750cb2d..2f23237 100644
--- a/src/Enmarcha.Backend/Services/Processors/RenfeRealTimeProcessor.cs
+++ b/src/Enmarcha.Backend/Services/Processors/RenfeRealTimeProcessor.cs
@@ -64,7 +64,7 @@ public class RenfeRealTimeProcessor : AbstractRealTimeProcessor
{
Latitude = position.Latitude,
Longitude = position.Longitude,
- OrientationDegrees = 0 // TODO: Set the proper degrees
+ Bearing = 0 // TODO: Set the proper degrees
};
}
}
diff --git a/src/Enmarcha.Backend/Services/ShapeTraversalService.cs b/src/Enmarcha.Backend/Services/ShapeTraversalService.cs
index 10de3e0..b89af1f 100644
--- a/src/Enmarcha.Backend/Services/ShapeTraversalService.cs
+++ b/src/Enmarcha.Backend/Services/ShapeTraversalService.cs
@@ -115,7 +115,7 @@ public class ShapeTraversalService
// Transform from EPSG:25829 (meters) to EPSG:4326 (lat/lng)
var pos = TransformToLatLng(busPoint);
- pos.OrientationDegrees = (int)Math.Round(bearing);
+ pos.Bearing = (int)Math.Round(bearing);
pos.ShapeIndex = forwardIndex;
return (pos, closestPointIndex);
}
diff --git a/src/Enmarcha.Backend/Types/ConsolidatedCirculation.cs b/src/Enmarcha.Backend/Types/ConsolidatedCirculation.cs
index 3f5b61a..75db225 100644
--- a/src/Enmarcha.Backend/Types/ConsolidatedCirculation.cs
+++ b/src/Enmarcha.Backend/Types/ConsolidatedCirculation.cs
@@ -33,7 +33,7 @@ public class Position
{
public required double Latitude { get; set; }
public required double Longitude { get; set; }
- public int OrientationDegrees { get; set; }
+ public int? Bearing { get; set; }
public int ShapeIndex { get; set; }
}