FERS 1.0.0
The Flexible Extensible Radar Simulator
Loading...
Searching...
No Matches
defaults.ts
Go to the documentation of this file.
1// SPDX-License-Identifier: GPL-2.0-only
2// Copyright (c) 2025-present FERS Contributors (see AUTHORS.md).
3
4import { generateSimId } from './idUtils';
5import { Antenna, GlobalParameters, Platform, Timing, Waveform } from './types';
6
7export const defaultGlobalParameters: GlobalParameters = {
8 id: 'global-parameters',
9 type: 'GlobalParameters',
10 rotationAngleUnit: 'deg',
11 simulation_name: 'FERS Simulation',
12 start: 0.0,
13 end: 10.0,
14 rate: 10000.0,
15 simSamplingRate: null,
16 c: 299792458.0,
17 random_seed: null,
18 adc_bits: 12,
19 oversample_ratio: 1,
20 // Default: UCT, South Africa
21 origin: {
22 latitude: -33.957652,
23 longitude: 18.4611991,
24 altitude: 111.01,
25 },
26 coordinateSystem: {
27 frame: 'ENU',
28 },
29};
30
31export const defaultWaveform: Omit<Waveform, 'id' | 'name'> = {
32 type: 'Waveform',
33 waveformType: 'pulsed_from_file',
34 power: 1000,
35 carrier_frequency: 1e9,
36 filename: '',
37};
38
39export const defaultTiming: Omit<Timing, 'id' | 'name'> = {
40 type: 'Timing',
41 frequency: 10e6,
42 freqOffset: null,
43 randomFreqOffsetStdev: null,
44 phaseOffset: null,
45 randomPhaseOffsetStdev: null,
46 noiseEntries: [],
47};
48
49export const defaultAntenna: Omit<
50 Extract<Antenna, { pattern: 'isotropic' }>,
51 'id' | 'name'
52> = {
53 type: 'Antenna',
54 pattern: 'isotropic',
55 efficiency: 1.0,
56 meshScale: 1.0,
57 design_frequency: null,
58};
59
60export const createDefaultPlatform = (): Omit<Platform, 'id' | 'name'> => ({
61 type: 'Platform',
62 motionPath: {
63 interpolation: 'static',
64 waypoints: [
65 { id: generateSimId('Platform'), x: 0, y: 0, altitude: 0, time: 0 },
66 ],
67 },
68 rotation: {
69 type: 'fixed',
70 startAzimuth: 0,
71 startElevation: 0,
72 azimuthRate: 0,
73 elevationRate: 0,
74 },
75 components: [],
76});