Unverified Commit c2817912 authored by Birte Kristina Friesel's avatar Birte Kristina Friesel
Browse files

Journey->route: add platform data

parent 78e08b04
Loading
Loading
Loading
Loading
+35 −17
Original line number Diff line number Diff line
@@ -97,6 +97,12 @@ sub new {
		my $sched_dep = $stop->{dTimeS};
		my $rt_dep    = $stop->{dTimeR};

		# dIn. / aOut. -> may passengers enter / exit the train?

		my $sched_platform   = $stop->{aPlatfS}  // $stop->{dPlatfS};
		my $rt_platform      = $stop->{aPlatfR}  // $stop->{dPlatfR};
		my $changed_platform = $stop->{aPlatfCh} // $stop->{dPlatfCh};

		for my $timestr ( $sched_arr, $rt_arr, $sched_dep, $rt_dep ) {
			if ( not defined $timestr ) {
				next;
@@ -149,6 +155,10 @@ sub new {
				dep_cancelled       => $dep_cancelled,
				delay               => $dep_delay // $arr_delay,
				direction           => $stop->{dDirTxt},
				sched_platform      => $sched_platform,
				rt_platform         => $rt_platform,
				is_changed_platform => $changed_platform,
				platform            => $rt_platform // $sched_platform,
				load                => $tco,
			}
		);
@@ -621,6 +631,14 @@ entire route. Each hash contains the following keys:

=item * direction (direction signage from this stop on, undef if unchanged)

=item * rt_platform (actual platform)

=item * sched_platform (scheduled platform)

=item * platform (actual or scheduled platform)

=item * is_changed_platform (true if real-time and scheduled platform disagree)

=item * load (expected utilization / passenger load from this stop on)

=back