Syrus Alerting Drivers Carrying Heavy Loads
This application deployment is intended for vehicles in the mining operations where they have to carry a lot of weight up and down the mines.
In these scenarios there are no posted speed limits so the drivers have to be notified how fast they can travel. To achieve this we use the Syrus + Bluetooth Speaker.
A list of the things that this solution requires
- Connect
- Bluetooth Accessories - for the bluetooth speaker
- ECU - for the connection to the engine data (Weights, RPMs, Speed)
- Manage
- Syrus Cloud
- Applications - to upload the configuration on the Syrus
- ECU - to configure the device to read the engine data
- Syrus Cloud
- Develop
- Syruslang
- Geofences - used for determining if vehicle is inside a specific or group of geofences
- Geofences Speed Limit - used for determining whether the vehicle is traveling uphill or downhill
- Speak - command to speak through bluetooth speaker
- Variables - used to store and retrieve values
- Syruslang
# This script snippet uses ECU data and geofence information to send an audio message to the driver
# with recommended speed and RPMs depending on how much weight the vehicle is carrying
# It is intended for mining operations where the vehicle is carrying a lot of weight up and down the mines
# In these scenarios there are no posted speed limits so the drivers have to be notified how fast they can travel
# So we use the Syrus + Bluetooth Speaker to notify the driver
# The result of the snippet is a voice that alerts the driver, like so:
# "The next 3 kilometers have a positive inclination with curves, it's recommended to maintain below the speed of 50 kilometers per hour and 1600 RPMs"
# The ECU values that are used are the speed, rpms and weights:
# speed: fef1_2-3: 28.02
# rpms: f004_4-5: 602
# weights: fe70_3-4: 38620
# The geofences have 2 groups
# 1. for the geofences that have curves (with a speed limit that indicates if it's traveling uphill or downhill)
# 2. for the geofenecs that are plain (without a speed limit)
# This script snippet is shown as a proof of concept for the capabilities of Syrusjs and is not intended to be used yet in a real-life scenario
define group tracking
# For debugging purposes we could define CV## counters and assign the variables
define fieldset default fields=$io,$gnss,$net,$ecu
# initialize the weight
# Since the ecu weights varies a lot depending on the road conditions, it's recommended to capture this value while the vehicle is standing still
# We may want to also consider outside specific geofences when the truck is not being loaded for example
# For now we will define a duration while the Engine Speed reads 0km/h for at least 10 seconds
set variable var_weight 0
define signal sg_idle min_duration=10sec $ecu.fef1_2-3 = 0
define action ac_set_weight trigger=sg_idle
set variable var_weight $ecu.fe70_3-4
# Signal with ECU value > 3500.0kg
define signal sg_high_weight $variables.var_weight > 35000
# Default allowed_rpms & allowed_speed
set variable var_allowed_rpms 2000
set variable var_allowed_speed 60
# if the high weight signal is fired then set the rpms and speed allowed
define action ac_high_weight_set trigger=sg_high_weight
set variable var_allowed_rpms 1600
set variable var_allowed_speed 50
# define geofence with a low speed limit to determine if uphill or downhill
# added the group=curves and the speed_limit with angles
define geofence curved_zone_112777 group=curves speed_limits="uphill,10,271,89 downhill,10,91,269" -69.07372,-24.28229 -69.07387,-24.28239 -69.07269,-24.28377 -69.07171,-24.28432 -69.07164,-24.2842 -69.07372,-24.28229
define geofence plain_zone_112810 group=plain -69.06338,-24.28559 -69.06005,-24.28205 -69.06092,-24.28146 -69.06439,-24.2849 -69.06338,-24.28559
# road_conditions & inclination
set variable var_road_condition "--"
set variable var_inclination "--"
set variable var_geo_dist 0
# If entered group with plain conditions set inclination and road_condition
define signal sg_entered_plain min_duration=2sec $geofences.$groups.plain.inside
define action ac_road_condition trigger=sg_entered_plain
set variable var_road_condition "without curves"
set variable var_inclination "plain"
set variable var_allowed_rpms 2000
set variable var_allowed_speed 50
# If entered group then set the road condition
define signal sg_entered_curves min_duration=2sec $geofences.$groups.curves.inside
define action ac_road_condition trigger=sg_entered_curves
set variable var_road_condition "with curves"
# If entered geofence at a low speed then based on the angle we determine if it's uphill or downhill
define action ac_entered_positive trigger=@geofences.*.*.uphill.speeding
set variable var_inclination "positive"
define action ac_entered_negative trigger=@geofences.*.*.downhill.speeding
set variable var_inclination "negative"
# If entered specific geofence set the distance
# We can also consider setting the allowed speed and rpms in the scenario that the vehicle enters a specific geofence
define signal sg_entered_zone_112777 min_duration=2sec $geofences.curved_zone_112777.inside
set variable var_geo_dist 3
define signal sg_entered_zone_112810 min_duration=2sec $geofences.plain_zone_112810.inside
set variable var_geo_dist 5
# Any speeding with uphill or downhill inclination
define action ac_weighted_speed_in_curve trigger=@geofences.*.*.*.speeding
send event ev_message
speak "The next {{$variable.var_geo_dist}} kilometers have a {{$variable.var_inclination}} inclination {{$variables.var_road_condition}}, it's recommended to maintain below the speed of {{$variables.var_allowed_speed}} kilometers per hour and {{$variables.var_allowed_rpms}} R.P.Ms.."
# Entered plain zone
define action ac_weighted_speed_in_plain trigger=sg_entered_plain
send event ev_message
speak "The next {{$variable.var_geo_dist}} kilometers are {{$variable.var_inclination}} {{$variables.var_road_condition}}, it's recommended to maintain below the speed of {{$variables.var_allowed_speed}} kilometers per hour and {{$variables.var_allowed_rpms}} R.P.Ms.."
# Speed > allowed_value
define signal sg_speeding $ecu.fef1_2-3 > $variables.var_allowed_speed
send event ev_speeding
speak "It is recommended to reduce the speed to less than {{$variables.var_allowed_speed}} kilometers per hour."
# RPMs > allowed_value
define signal sg_overrpm $ecu.f004_4-5 > $variables.var_allowed_rpms
send event ev_overrpm
speak "It is recommended to reduce the R.P.Ms. to less than {{$variables.var_allowed_rpms}}."
define event ev_message group=tracking fieldset=default ack=seq label=message
define event ev_speeding group=tracking fieldset=default ack=seq label=spd
define event ev_overrpm group=tracking fieldset=default ack=seq label=overrpm
Updated 6 months ago