50 lines
930 B
TypeScript
50 lines
930 B
TypeScript
import { IsNotEmpty, IsInt, Min, Max } from 'class-validator';
|
|
import { ApiProperty } from '@nestjs/swagger';
|
|
import { CoordinateDto } from '../../generic/dto/coordinate.dto';
|
|
|
|
export class FlightStateDto {
|
|
@IsNotEmpty()
|
|
@ApiProperty({
|
|
description: 'The current position',
|
|
})
|
|
position: CoordinateDto;
|
|
|
|
@IsNotEmpty()
|
|
@ApiProperty({
|
|
description: 'The reported ground speed',
|
|
example: 400,
|
|
})
|
|
@IsInt()
|
|
@Min(0)
|
|
@Max(700)
|
|
groundSpeed: number;
|
|
|
|
@IsNotEmpty()
|
|
@ApiProperty({
|
|
description: 'The reported ground track',
|
|
example: 400,
|
|
})
|
|
@IsInt()
|
|
@Min(0)
|
|
@Max(360)
|
|
groundTrack: number;
|
|
|
|
@IsNotEmpty()
|
|
@ApiProperty({
|
|
description: 'The reported altitude',
|
|
example: 30000,
|
|
})
|
|
@IsInt()
|
|
@Min(0)
|
|
@Max(60000)
|
|
altitude: number;
|
|
|
|
@IsNotEmpty()
|
|
@ApiProperty({
|
|
description: 'The reported vertical speed',
|
|
example: 400,
|
|
})
|
|
@IsInt()
|
|
verticalSpeed: number;
|
|
}
|