redux/track/type.ts

mail@pastecode.io avatar
unknown
plain_text
7 months ago
851 B
1
Indexable
Never
export interface TrackState {
  absoluteStartTrackDistanceMiles: number;
  trackStation: Station[];
  trackSpeedLimit: SpeedLimit[];
  trackGroupData: {
    [key: string]: {
      key: string;
      order: number;
      data: {
        absoluteStartTrackDistanceMiles?: number;
        corridors?: any[];
        trackStation?: Station[];
        trackSpeedLimit?: SpeedLimit[];
      };
    };
  };
  stopStations: any;
  trackLoading: boolean;
  trackTotalLength: number;
  nearestTrack: any;
}

export interface SpeedLimit {
  endMile: number;
  startMile: number;
  startDistanceMiles: number;
  endDistanceMiles: number;
  value: number;
}

export interface Station {
  corridor: string;
  gpsCoordinates?: GpsCoordinates;
  id: string;
  name: string;
  type: string;
}

interface GpsCoordinates {
  alt: number;
  lat: number;
  lng: number;
}