Skip to content
This repository has been archived by the owner on May 18, 2021. It is now read-only.

REBASE: Re-structure user configuration and add more dashboards based on #69 #75

Merged
merged 8 commits into from
Mar 11, 2021
2 changes: 1 addition & 1 deletion src/components/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
useUserConfig
} from '@wuespace/telestion-client-common';

import { userConfig } from '../model/sample-user-config';
import { userConfig } from '../model/user-config';
import { projectWidgets } from '../widgets';

import { Header } from './header';
Expand Down
4 changes: 4 additions & 0 deletions src/model/dashboards/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export * from './overview';
export * from './system-state';
export * from './recovery';
export * from './sounding-rocket';
116 changes: 116 additions & 0 deletions src/model/dashboards/overview.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
import { Dashboard } from '@wuespace/telestion-client-types';
import {
accLineGraph,
altitudeGraph,
amplitudeGraph,
gyroLineGraph,
magLineGraph,
pressureGraph,
temperatureGraph
} from './widget-props';

export const overviewDashboard: Dashboard = {
title: 'Overview',
columns: 12,
rows: 12,
widgets: [
{
widgetName: 'stateWidget',
width: 2,
height: 4,
title: 'stateWidget'
},
{
widgetName: 'graphWidget',
width: 2,
height: 4,
title: 'Altitude',
initialProps: {
...altitudeGraph,
maxDataSamples: 30,
isCartesianGrid: true
}
},
{
widgetName: 'graphWidget',
width: 2,
height: 4,
title: 'Pressure',
initialProps: {
...pressureGraph,
maxDataSamples: 30,
isCartesianGrid: true
}
},
{
widgetName: 'graphWidget',
width: 2,
height: 4,
title: 'Temperature',
initialProps: {
...temperatureGraph,
maxDataSamples: 30,
isCartesianGrid: true
}
},
{
widgetName: 'mapWidget',
width: 4,
height: 8,
title: 'GPS Data'
},
{
widgetName: 'graphWidget',
width: 4,
height: 4,
title: 'Amplitude',
initialProps: {
...amplitudeGraph,
maxDataSamples: 60,
isCartesianGrid: true
}
},
{
widgetName: 'spectrogramWidget',
width: 4,
height: 4,
title: 'Spectrogram Widget'
},
{
widgetName: '9dof-widget',
width: 3,
height: 4,
title: 'Current values'
},
{
widgetName: 'graphWidget',
width: 3,
height: 4,
title: 'Accelerometer',
initialProps: {
...accLineGraph,
maxDataSamples: 20
}
},
{
widgetName: 'graphWidget',
width: 3,
height: 4,
title: 'Gyroscope',
initialProps: {
...gyroLineGraph,
maxDataSamples: 20
}
},
{
widgetName: 'graphWidget',
width: 3,
height: 4,
title: 'Magnetometer',
initialProps: {
...magLineGraph,
maxDataSamples: 20
}
}
]
};
27 changes: 27 additions & 0 deletions src/model/dashboards/recovery.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import { Dashboard } from '@wuespace/telestion-client-types';

export const recoveryDashboard: Dashboard = {
title: 'Recovery',
columns: 12,
rows: 12,
widgets: [
{
widgetName: 'stateWidget',
width: 2,
height: 4,
title: 'stateWidget'
},
{
widgetName: 'mapWidget',
width: 10,
height: 12,
title: 'GPS Position'
},
{
widgetName: 'gpsDetailsWidget',
width: 2,
height: 5,
title: 'GPS Details'
}
]
};
50 changes: 50 additions & 0 deletions src/model/dashboards/sounding-rocket.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
import { Dashboard } from '@wuespace/telestion-client-types';
import { amplitudeGraph, velocityGraph } from './widget-props';

export const soundingRocketDashboard: Dashboard = {
title: 'Sounding Rocket',
columns: 12,
rows: 12,
widgets: [
{
widgetName: 'stateWidget',
width: 2,
height: 4,
title: 'stateWidget'
},
{
widgetName: 'graphWidget',
width: 10,
height: 4,
title: 'Amplitude',
initialProps: {
...amplitudeGraph,
maxDataSamples: 100,
isCartesianGrid: true
}
},
{
widgetName: 'placeholderWidget',
width: 2,
height: 8,
title: 'Placeholder'
},
{
widgetName: 'spectrogramWidget',
width: 10,
height: 4,
title: 'Spectrogram Widget'
},
{
widgetName: 'graphWidget',
width: 10,
height: 4,
title: 'Velocity',
initialProps: {
...velocityGraph,
maxDataSamples: 100,
isCartesianGrid: true
}
}
]
};
62 changes: 62 additions & 0 deletions src/model/dashboards/system-state.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
import { Dashboard } from '@wuespace/telestion-client-types';
import { altitudeGraph, pressureGraph, temperatureGraph } from './widget-props';

export const systemStateDashboard: Dashboard = {
title: 'System State',
columns: 12,
rows: 12,
widgets: [
{
widgetName: 'stateWidget',
width: 4,
height: 3,
title: 'stateWidget'
},
{
widgetName: 'graphWidget',
width: 4,
height: 6,
title: 'Pressure',
initialProps: {
...pressureGraph,
maxDataSamples: 60,
isCartesianGrid: true
}
},
{
widgetName: 'mapWidget',
width: 4,
height: 12,
title: 'GPS Data'
},
{
widgetName: '9dof-widget',
width: 4,
height: 3,
title: 'Current values'
},

{
widgetName: 'graphWidget',
width: 4,
height: 6,
title: 'Altitude',
initialProps: {
...altitudeGraph,
maxDataSamples: 60,
isCartesianGrid: true
}
},
{
widgetName: 'graphWidget',
width: 4,
height: 6,
title: 'Temperature',
initialProps: {
...temperatureGraph,
maxDataSamples: 60,
isCartesianGrid: true
}
}
]
};
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { GraphWidgetProps } from '../widgets/graph-widget';
import { Amplitude, BaroData, NineDOF } from './channels';
import { GraphWidgetProps } from '../../../widgets/graph-widget';
import { Amplitude, BaroData, NineDOF, Velocity } from '../../channels';

export const accLineGraph: GraphWidgetProps = {
connections: [
Expand Down Expand Up @@ -102,8 +102,7 @@ export const altitudeGraph: GraphWidgetProps = {
]
}
],
maxDataSamples: 60,
isCartesianGrid: true
maxDataSamples: 20
};

export const pressureGraph: GraphWidgetProps = {
Expand All @@ -120,8 +119,7 @@ export const pressureGraph: GraphWidgetProps = {
]
}
],
maxDataSamples: 60,
isCartesianGrid: true
maxDataSamples: 20
};

export const temperatureGraph: GraphWidgetProps = {
Expand All @@ -138,8 +136,7 @@ export const temperatureGraph: GraphWidgetProps = {
]
}
],
maxDataSamples: 60,
isCartesianGrid: true
maxDataSamples: 20
};

export const amplitudeGraph: GraphWidgetProps = {
Expand Down Expand Up @@ -169,8 +166,31 @@ export const amplitudeGraph: GraphWidgetProps = {
]
}
],
maxDataSamples: 60,
isArea: false,
isCartesianGrid: true,
maxDataSamples: 20,
scale: 'log'
};

export const velocityGraph: GraphWidgetProps = {
connections: [
{
channel: Velocity,
descriptors: [
{
key: 'result[0].estimated',
title: 'Estimated',
unit: 'm/s',
color: 'indigo-500',
isDashed: true,
strokeWidth: 2
},
{
key: 'result[0].measured',
title: 'Measured',
unit: 'm/s',
color: 'orange-500'
}
]
}
],
maxDataSamples: 20
};
1 change: 1 addition & 0 deletions src/model/dashboards/widget-props/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './graph-widget-props';
Loading