-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathutils_vel.py
More file actions
51 lines (30 loc) · 1.13 KB
/
utils_vel.py
File metadata and controls
51 lines (30 loc) · 1.13 KB
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
51
#utils_vel.py
'''In this script I am trying to make utility functions
that will help calculate relative velocities.
I also want to place other velocity related calculations in this script'''
from typing import Self, AnyStr
# what i want to do in this utils file is
# create a simple utility so that i can perform velocity/relative velocity calculation with utmost ease
# in any dynamic system
# 1.
class Vel:
def __init__(self,
vel_item:str,
vx,
vy,
vz=0,
# rename to ref_frame
rel2str = 'E'): # rel2str = 'E' means relative to Earth
'''Initiate velocity type object.
Provide objects name, and x,y,z velocity coordinate values,
and reference frame string.'''
self.vel_item = vel_item
self.vx = vx
self.vy = vy
self.vz = vz
self.rel2str = rel2str
self.rel_vel_tag = self.vel_item + self.rel2str
def update_vel(self, other_ref:Self) -> None:
return None
def rel_vel_str(self, other_ref):
pass