aircraft-schedule

1.1.4 • Public • Published

SIMPLE AIRCRAFT SCHEDULE

I created this plane control schedule for fun.

GitHub Logo

REACT USE

import ScheduleComponent from 'aircraft-schedule'
 
<ScheduleComponent data={data} />

OTHER FRAMEWORKS USE

import { render } from 'aircraft-schedule'
 
// js side, only one time on screen started
render(data)
 
// html side
<div id="schedule_canvas"></div>

CONFIG

Is very simple and bindable with back, using unix time for time slice.

const data = {
  day: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday'],
  num: [4, 5, 6, 7, 8],
  times: [
    [ [1588334400005, 1588356000005, 'normal'], [1588399200005, 1588420800005, 'normal'], [1588464000005, 1588485600005, 'normal'], ],
    [ [1588334400005, 1588356000005, 'empty'], [1588420800005, 1588485600005, 'normal'], [1588528800005, 1588550400005, 'empty'], [1588593600005, 1588636800005, 'normal'], ],
    [ [1588312800005, 1588334400005, 'normal'], [1588507200005, 1588572000005, 'normal'], ],
    [ [1588464000005, 1588485600005, 'normal'], [1588420800005, 1588442400005, 'empty'], [1588528800005, 1588550400005, 'empty'], [1588680000005, 1588701600005, 'empty'], ],
    [ [1588291200005, 1588377600005, 'out'], [1588377600005, 1588399200005, 'normal'], [1588399200005, 1588723200005, 'out'], ],
  ],
  schedule_start: 1588291200005,
  schedule_end: 1588723200005,
}

EXPLAINING TIME SLICE

const times = [
  airCraftLine1, // first line
  airCraftLine1, // second line
  airCraftLine1, // etc
]
 
//          first box [start fly time, end fly time, fly type], second box [start fly time, end fly time, fly type]
const airCraftLine1 = [ [1588312800005, 1588334400005, 'normal'],          [1588507200005, 1588572000005, 'normal'], ],
 
// types
'normal' -> normal fly
'empty' -> empty leg fly
'out' -> aircraft out off service

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.1.41latest

Version History

VersionDownloads (Last 7 Days)Published
1.1.41
1.1.30
1.1.20
1.1.10
1.1.00
1.0.00

Package Sidebar

Install

npm i aircraft-schedule

Weekly Downloads

0

Version

1.1.4

License

MIT

Unpacked Size

184 kB

Total Files

23

Last publish

Collaborators

  • heyderpd