We developed an django based app to help scheduling astronaut sleep and exercise shift as well as nutrition intake based on the shift.
The lack of integrated and individualised solution for sleep, exercise, and nutrition planning makes it difficult to consider the influence of one on another. For instance, an astronaut with longer exercising hours may need more nutrition compare to another astronaut.
The app takes all 3 factors into account to schedule a best possible timetable and guidance based on astronaut conditions.
The app considers exercises planning first carefully following ESA (European Space Agency) guidance for exercising in microgravity environment published in 2006.
There are 4 key variables output from the program including I. types of exercise, II. resistance training duration, III. aerobic training duration, IV. load of training with respect to maximum capacity measured pre-flight. To achieve the desired outputs, the app is split into 2 programs, 1. intensity calculator program and 2. workout suggestion program
The program returns a target workout intensity considering a. previous targeted intensity b. feedback from trainee (easiness) on previous training, and c. NASA targeted intensity.
The main logic of the program adopts PID controller with user feedback to calculate a suitable workout intensity for the astronaut in order to steadily approach appropriate workload.
The targeted intensity is then fed into this program and suggests a suitable training (periodically, to keep astronaut interested), and returning the 4 key variables previously mentioned. The training equipment and suitable training used were selected in regards to ESA guidance.
The app considers sleep and plan a schedule based on 1. objective data scoring program (feedback sensed from sleep biometric device, e.g. fitbit) and 2. subjective data scoring program (Pittsburgh Sleep Quality Index (PSQI) questionnaire filled by astronaut daily).
Objective data are collected via sleep monitoring sensors, where the data used were quantitative sleep data from NASA including the followings:
Sleep time, start and end times, date of data period, sleep onset, sleep latency, sleep efficiency, wake after sleep onset, light (white, blue, red and green) illumination, and sleep phases: light, deep, rapid eye movement, and wake.
From the sensor data, the app would calculate and return a score based on an algorithm similar to current commercial sleep monitoring wearables (e.g. OURA ring and Fitbit).
Subjective data are collected from astronaut filled daily questionnaires, where the questionnaire was designed based on gold standard Pittsburgh Sleep Quality Index (PSQI). From the questionnaire, the app would understand how will did the astronaut sleep based on personal opinion.
Based on the objective and subjective scores the schedule planner app would then suggest actions to be taken. For instance, if the objective score is good (e.g. 80 out of 100), but subjectively astronaut feels tiresome (subjective score), the planar would suggest actions such as mediation (proven to be effective in improving PSQI score; Black et al., 2015). Another example would be advice to take melatonin if sleep latency was too high (may be effective, shown DIJK et al., 2001)
The program then takes the 2 scores, sleep-aiding advices, exercise information, working types and hours, meal time, and leisure time into account to schedule a timetable for the day.
Lastly the app decide a nutrition guidance based on 1. the energy requirement of the scheduled activities in timetable 2. The amount (grams) of nutrition to have on the day.
To calculate the energy requirement for the astronaut we would need to input following data:
gender, weight, age, and hours of each activity on the day. First of all, the app calculate the baseline energy requirement based on astronaut gender, weight and age, where the equation was given in Human energy requirements Report of a Joint FAO/WHO/UNU Expert Consultation, 2001 .
Next, the app correct the energy requirement based on the activities and hours of each activity through identifying the PAR (Physical activity ratio) of activities and calculate PAL (Physical activity level). The corrected energy requirement would be returned.
Inputting the corrected energy required on the day, the program finds how much nutrition to eat on each day, where nutrition include: protein, fat (saturated and unsaturated), carbohydrates, sugar, table salt (sodium chloride), and potassium weight to ingest on the day. The program priorities protein intake to fight muscle degeneration ascribe to mircogravitational environment. After deducting energy supported from protein, the remaining energy requirement is split into 5.7%, 19.9%, 71%, and 3.4% for astronaut to have saturated fat, unsaturated fat, carbohydrate, sugar respectively. Where the ratio is calculated based on WHO and FAO guidance after subtraction of energy supported from protein. The program then returns a individualised guidance to the front end of APP and display to astronaut.
With the app we wish to create a smart, individualised, and integrated timetable planning system to aid astronaut planning out the day while continuously adjusting the timetable, sleeping, exercise and nutrition based on individual conditions automatically.
One of our teammate suffered from occasional insomia so we decided to take on the challenge along with finding him some advices.
We build our project based current solid evidence and gold standard as well as taking in to account the data NASA has. We divided the project into 3 sections, sleep, nutrition and exercise and assign to each of the team member, finally integrate all 3 programs to a user interactive application.
Github was used to share code files among members, coding languages used include python, javascript, and html/css. Hardware used was only laptops. Software used includes visual studio and spyder.
This is our first Hackathon challenge and had no clue how everythings work especially when all communications were moved online. We also had a lot of time pressure, insufficient prior knowledge in all 3 sectors (sleep, nutrition and exercise), and little experiences on front-end applications.
Our greatest achievements of the project were successfully develop algorithms based scientific evidence and a working user interactive application. Also we had a lot of fun!!