store lat/lon along with route

This increases resilience against EVA ID reuse
This commit is contained in:
Birte Kristina Friesel 2024-07-08 21:05:21 +02:00
parent 9e4a6e5ce6
commit 07ab3f4e9b
No known key found for this signature in database
GPG key ID: 19E6E524EBB177BA
3 changed files with 11 additions and 3 deletions

View file

@ -1427,6 +1427,8 @@ sub startup {
isAdditional => $new_entry->{isAdditional}, isAdditional => $new_entry->{isAdditional},
isCancelled => $new_entry->{isCancelled}, isCancelled => $new_entry->{isCancelled},
load => $new_entry->{load}, load => $new_entry->{load},
lat => $new_entry->{lat},
lon => $new_entry->{lon},
} }
] ]
); );

View file

@ -233,7 +233,9 @@ sub get_route_p {
rt_dep => _epoch( $stop->rt_dep ), rt_dep => _epoch( $stop->rt_dep ),
arr_delay => $stop->arr_delay, arr_delay => $stop->arr_delay,
dep_delay => $stop->dep_delay, dep_delay => $stop->dep_delay,
load => $stop->load load => $stop->load,
lat => $stop->loc->lat,
lon => $stop->loc->lon,
}; };
if ( $stop->tz_offset ) { if ( $stop->tz_offset ) {
$entry->{tz_offset} = $stop->tz_offset; $entry->{tz_offset} = $stop->tz_offset;

View file

@ -160,7 +160,9 @@ sub add {
rt_dep => _epoch( $j_stop->rt_dep ), rt_dep => _epoch( $j_stop->rt_dep ),
arr_delay => $j_stop->arr_delay, arr_delay => $j_stop->arr_delay,
dep_delay => $j_stop->dep_delay, dep_delay => $j_stop->dep_delay,
load => $j_stop->load load => $j_stop->load,
lat => $j_stop->loc->lat,
lon => $j_stop->loc->lon,
} }
] ]
); );
@ -832,7 +834,9 @@ sub update_arrival_hafas {
rt_dep => _epoch( $j_stop->rt_dep ), rt_dep => _epoch( $j_stop->rt_dep ),
arr_delay => $j_stop->arr_delay, arr_delay => $j_stop->arr_delay,
dep_delay => $j_stop->dep_delay, dep_delay => $j_stop->dep_delay,
load => $j_stop->load load => $j_stop->load,
lat => $j_stop->loc->lat,
lon => $j_stop->loc->lon,
} }
] ]
); );