1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
use crateRocheError;
///
/// vtrans computes two velocity transforms, (1) a straight transform
/// from rotating to inertial frame and (2) an inertial frame velocity
/// in the disc.
///
/// When translating to inertial, the accretor velocity is added.
/// If you want the velocity relative to this you must add
/// mu = q/(1+q) to tvy before using it.
///
/// Arguments:
///
/// * `q`: mass ratio M2/M1
/// * `transform_type`: integer representing velocity transform.
/// 1: rotating frame -> inertial frame
/// 2: rotating frame to inertial frame velocity of disc
/// 3: rotating frame (i.e. gived out what you entered)
/// * `x`: x-coordinate where transform is performed for
/// * `y`: y-coordinate where transform is performed for
/// * `vx`: velocity in x-axis in the rotating frame to transform
/// * `vy`: velocity in y-axis in the rotating frame to transform
///
/// Returns:
///
/// * `vx`: velocity in x-axis transformed to the chosen frame
/// * `vy`: velocity in y-axis tranformed to the chosen frame
///