nfc: add Caltrain zones for Clipper (#3969)

Co-authored-by: tomholford <tomholford@users.noreply.github.com>
Co-authored-by: あく <alleteam@gmail.com>
This commit is contained in:
tomholford 2024-10-30 21:27:04 -07:00 committed by GitHub
parent cb8c1e3364
commit 55d1588356
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -139,6 +139,19 @@ static const IdMapping actransit_zones[] = {
};
static const size_t kNumACTransitZones = COUNT(actransit_zones);
// Instead of persisting individual Station IDs, Caltrain saves Zone numbers.
// https://www.caltrain.com/stations-zones
static const IdMapping caltrain_zones[] = {
{.id = 0x0001, .name = "Zone 1"},
{.id = 0x0002, .name = "Zone 2"},
{.id = 0x0003, .name = "Zone 3"},
{.id = 0x0004, .name = "Zone 4"},
{.id = 0x0005, .name = "Zone 5"},
{.id = 0x0006, .name = "Zone 6"},
};
static const size_t kNumCaltrainZones = COUNT(caltrain_zones);
//
// Full agency+zone mapping.
//
@ -149,6 +162,7 @@ static const struct {
} agency_zone_map[] = {
{.agency_id = 0x0001, .zone_map = actransit_zones, .zone_count = kNumACTransitZones},
{.agency_id = 0x0004, .zone_map = bart_zones, .zone_count = kNumBARTZones},
{.agency_id = 0x0006, .zone_map = caltrain_zones, .zone_count = kNumCaltrainZones},
{.agency_id = 0x0012, .zone_map = muni_zones, .zone_count = kNumMUNIZones}};
static const size_t kNumAgencyZoneMaps = COUNT(agency_zone_map);