From 1c6878e39b9a125ba70acf3860e749c5d6e2e8ac Mon Sep 17 00:00:00 2001 From: itdominator <1itdominator@gmail.com> Date: Sun, 15 Nov 2026 00:29:26 -0600 Subject: [PATCH] Cleaned up notes; restructured test scene plus cpu controller script; added WIP action stack logic --- Notes/README.md | 59 ++------- scenes/jet.gd | 3 + .../cpu_system/actions/action_base.gd | 4 +- .../cpu_system/actions/move_towards.gd | 7 +- .../cpu_system/actions/roll_left.gd | 7 ++ .../cpu_system/actions/roll_left.gd.uid | 1 + .../cpu_system/actions/roll_left_side_up.gd | 12 ++ .../actions/roll_left_side_up.gd.uid | 1 + .../cpu_system/actions/roll_right.gd | 7 ++ .../cpu_system/actions/roll_right.gd.uid | 1 + .../cpu_system/actions/roll_right_side_up.gd | 12 ++ .../actions/roll_right_side_up.gd.uid | 1 + .../controllers/cpu_system/cpu_controller.gd | 118 ++++++++++-------- .../controllers/cpu_system/strategy_stack.gd | 22 ++-- scripts/jet_controls/player.gd | 2 - skunk_works/test_world.gd | 85 ++++++++++--- skunk_works/test_world.tscn | 21 +++- 17 files changed, 225 insertions(+), 138 deletions(-) create mode 100644 scripts/controllers/cpu_system/actions/roll_left.gd create mode 100644 scripts/controllers/cpu_system/actions/roll_left.gd.uid create mode 100644 scripts/controllers/cpu_system/actions/roll_left_side_up.gd create mode 100644 scripts/controllers/cpu_system/actions/roll_left_side_up.gd.uid create mode 100644 scripts/controllers/cpu_system/actions/roll_right.gd create mode 100644 scripts/controllers/cpu_system/actions/roll_right.gd.uid create mode 100644 scripts/controllers/cpu_system/actions/roll_right_side_up.gd create mode 100644 scripts/controllers/cpu_system/actions/roll_right_side_up.gd.uid diff --git a/Notes/README.md b/Notes/README.md index 907e409..c5c74e7 100644 --- a/Notes/README.md +++ b/Notes/README.md @@ -2,6 +2,12 @@ Intuiting PI +# Tools + +-- https://www.desmos.com/calculator + +# Thoughts + var target_position = jet.to_local(jet.target.global_position) -- Gets us the position of a target jet relative to the jet itself. -- This treats the jet as the center of the world when calculating. @@ -73,6 +79,7 @@ If queue do we push "rotate towards using xyz pattern" as a command/state to che ### Thoughts on using dot product to check the normalized target position from 'to_local': +- https://www.youtube.com/watch?v=2PrSUK1VrKA - https://www.youtube.com/watch?v=-udnENzlV4U - From, Godot docu: @@ -118,55 +125,3 @@ Is there anything meaningfully gained from that? ##### Dot Product Formula - -- From, GPT: -The formula is: A⋅B=∣A∣∣B∣cos(θ) - -Where: - -- `A` = Your target direction vector. -- `B` = Your forward direction vector. -- `θ` = Angle between the two vectors. -- `|A|` and `|B|` = Magnitudes (lengths) of the vectors. - -Since both vectors are normalized (length = 1), the formula simplifies to: - -A⋅B=cos(θ) - -You have: -A=(0,0,1) -B=(46,33,9) - -1. Multiply corresponding components - -The dot product formula is: - A⋅B=(AxBx)+(AyBy)+(AzBz) - -Substitute your values: - =(0×46)+(0×33)+(1×9) - =9 - -2. Normalize by vector lengths - - Remember, the full formula also divides by the magnitudes when finding cosine: - cos⁡(θ)=A⋅B/(∣A∣∣B∣) - - Calculate the lengths/magnitudes: - ∣A∣=sqrt(0^2+0^2+1^2)=1 - ∣B∣=sqrt(46^2+33^2+9^2) - ∣B∣=sqrt(3266)≈57.15 - ∣B∣=3266​≈57.15 - -3. Calculate cosine - cos⁡(θ)=9/(1x57.15) - cos(θ)≈0.1575​ - --- Note: 0.1575 is not radians or degrees. --- It's a dimensionless number representing the cosine of the angle. --- Think of it as an intermediate result. - -4. Calculate the angle - θ=cosec(0.1575) = ≈1.412 radians - θ≈80.94degrees - - diff --git a/scenes/jet.gd b/scenes/jet.gd index a94e68f..3d115e3 100644 --- a/scenes/jet.gd +++ b/scenes/jet.gd @@ -15,6 +15,7 @@ class_name Jet extends CharacterBody3D var control_frame: BaseJet = null var target: Jet = null var targeted_by: Jet = null +var target_direction: Vector3 = Vector3.ZERO func _ready() -> void: @@ -24,6 +25,8 @@ func _process(delta: float) -> void: var action: Globals.CompoundCommand = controller.process(delta) if action: control_frame.do_action(action, delta, self) + controller.cpu.no_action() + controller.player.no_action() func _physics_process(_delta: float) -> void: velocity = -transform.basis.z * control_frame.speed diff --git a/scripts/controllers/cpu_system/actions/action_base.gd b/scripts/controllers/cpu_system/actions/action_base.gd index a8efc1b..0082310 100644 --- a/scripts/controllers/cpu_system/actions/action_base.gd +++ b/scripts/controllers/cpu_system/actions/action_base.gd @@ -1,5 +1,5 @@ class_name ActionBase extends Node -func do(_jet: Jet) -> void: - assert(false, "Must override 'do' method from child") +func process(_jet: Jet) -> void: + assert(false, "Must override 'process' method from child") diff --git a/scripts/controllers/cpu_system/actions/move_towards.gd b/scripts/controllers/cpu_system/actions/move_towards.gd index c6c35d5..078b737 100644 --- a/scripts/controllers/cpu_system/actions/move_towards.gd +++ b/scripts/controllers/cpu_system/actions/move_towards.gd @@ -1,18 +1,21 @@ class_name MoveTowards extends ActionBase -func do(jet: Jet) -> void: +func process(jet: Jet) -> void: if not is_instance_valid(jet.target): return var target_local_position: Vector3 = jet.to_local(jet.target.global_position) var target_direction: Vector3 = target_local_position.normalized() jet.target_ray.target_position = target_direction + jet.target_direction = target_direction #NOTE: When using unit (normalized) vectors, the result will always be # between -1.0 (180 degree angle) when the vectors are facing opposite # directions, and 1.0 (0 degree angle) when the vectors are aligned. + # Note also that, probably want to align order around node 'rotation_order' which is YXZ var forward_dot: float = target_direction.dot(Vector3.UP) - var ud_dot: float = target_direction.dot(Vector3.FORWARD) var lr_dot: float = target_direction.dot(Vector3.RIGHT) + var ud_dot: float = target_direction.dot(Vector3.FORWARD) + jet.controller.cpu.yaw_left() diff --git a/scripts/controllers/cpu_system/actions/roll_left.gd b/scripts/controllers/cpu_system/actions/roll_left.gd new file mode 100644 index 0000000..f474288 --- /dev/null +++ b/scripts/controllers/cpu_system/actions/roll_left.gd @@ -0,0 +1,7 @@ +class_name RollLeft extends ActionBase + + +func process(jet: Jet) -> void: + if not is_instance_valid(jet): return + + jet.controller.cpu.roll_left() diff --git a/scripts/controllers/cpu_system/actions/roll_left.gd.uid b/scripts/controllers/cpu_system/actions/roll_left.gd.uid new file mode 100644 index 0000000..d01491f --- /dev/null +++ b/scripts/controllers/cpu_system/actions/roll_left.gd.uid @@ -0,0 +1 @@ +uid://daep5cdrl6pwv diff --git a/scripts/controllers/cpu_system/actions/roll_left_side_up.gd b/scripts/controllers/cpu_system/actions/roll_left_side_up.gd new file mode 100644 index 0000000..c7119ec --- /dev/null +++ b/scripts/controllers/cpu_system/actions/roll_left_side_up.gd @@ -0,0 +1,12 @@ +class_name RollLeftSideUp extends ActionBase + + +func process(jet: Jet) -> void: + if not is_instance_valid(jet): return + check_orientation(jet) + jet.controller.cpu.roll_left() + + +func check_orientation(jet: Jet) -> void: + #var rotation_dot = clampf(jet.rotation_degrees.z / 360.0, -1, 1) + var rotation_norm = jet.rotation_degrees.normalized() diff --git a/scripts/controllers/cpu_system/actions/roll_left_side_up.gd.uid b/scripts/controllers/cpu_system/actions/roll_left_side_up.gd.uid new file mode 100644 index 0000000..c3cf2af --- /dev/null +++ b/scripts/controllers/cpu_system/actions/roll_left_side_up.gd.uid @@ -0,0 +1 @@ +uid://tqa0386hofab diff --git a/scripts/controllers/cpu_system/actions/roll_right.gd b/scripts/controllers/cpu_system/actions/roll_right.gd new file mode 100644 index 0000000..8e76bb3 --- /dev/null +++ b/scripts/controllers/cpu_system/actions/roll_right.gd @@ -0,0 +1,7 @@ +class_name RollRight extends ActionBase + + +func process(jet: Jet) -> void: + if not is_instance_valid(jet): return + + jet.controller.cpu.roll_right() diff --git a/scripts/controllers/cpu_system/actions/roll_right.gd.uid b/scripts/controllers/cpu_system/actions/roll_right.gd.uid new file mode 100644 index 0000000..598fe8c --- /dev/null +++ b/scripts/controllers/cpu_system/actions/roll_right.gd.uid @@ -0,0 +1 @@ +uid://jgirej8jaxa3 diff --git a/scripts/controllers/cpu_system/actions/roll_right_side_up.gd b/scripts/controllers/cpu_system/actions/roll_right_side_up.gd new file mode 100644 index 0000000..5928986 --- /dev/null +++ b/scripts/controllers/cpu_system/actions/roll_right_side_up.gd @@ -0,0 +1,12 @@ +class_name RollRightSideUp extends ActionBase + + +func process(jet: Jet) -> void: + if not is_instance_valid(jet): return + check_orientation(jet) + jet.controller.cpu.roll_right() + + +func check_orientation(jet: Jet) -> void: + #var rotation_dot = clampf(jet.rotation_degrees.z / 360.0, -1, 1) + var rotation_norm = jet.rotation_degrees.normalized() diff --git a/scripts/controllers/cpu_system/actions/roll_right_side_up.gd.uid b/scripts/controllers/cpu_system/actions/roll_right_side_up.gd.uid new file mode 100644 index 0000000..1414641 --- /dev/null +++ b/scripts/controllers/cpu_system/actions/roll_right_side_up.gd.uid @@ -0,0 +1 @@ +uid://gp6yl6ti2xvu diff --git a/scripts/controllers/cpu_system/cpu_controller.gd b/scripts/controllers/cpu_system/cpu_controller.gd index 8668984..ac05b7e 100644 --- a/scripts/controllers/cpu_system/cpu_controller.gd +++ b/scripts/controllers/cpu_system/cpu_controller.gd @@ -34,67 +34,77 @@ func assign_jet_target(jet: Jet) -> void: func assign_jet_action(jet: Jet) -> void: jet.strategy_stack.add_child( MoveTowards.new() ) + jet.strategy_stack.add_child( RollLeftSideUp.new() ) func process_jet_plan(jet: Jet) -> void: - jet.strategy_stack.process_action(jet) - - - - #if maxf(target_direction.z, 0.0) == 0.0: - #get_node("../../base_ui/target_position_fb").text = "infront" - #jet.controller.cpu.no_action() -# - #if target_direction.x > 0.2: - #jet.controller.cpu.yaw_right() - #elif target_direction.x < -0.2: - #jet.controller.cpu.yaw_left() -# - #elif maxf(target_direction.y, 0.5) == 0.5: - #jet.controller.cpu.no_action() -# - #if target_direction.y > 0.2: - #get_node("../../base_ui/target_position_ab").text = "above" - #jet.controller.cpu.pitch_up() - #elif target_direction.y < -0.2: - #get_node("../../base_ui/target_position_ab").text = "below" - #jet.controller.cpu.pitch_down() -# - #elif maxf(target_direction.y, -0.5) == -0.5: - #get_node("../../base_ui/target_position_ab").text = "below" - #jet.controller.cpu.no_action() -# - #if target_direction.y > 0.2: - #jet.controller.cpu.yaw_right() - #elif target_direction.y < -0.2: - #jet.controller.cpu.yaw_left() -# - #else: - #get_node("../../base_ui/target_position_fb").text = "behind" - #jet.controller.cpu.no_action() -# - #if target_direction.x > 0.2: - #jet.controller.cpu.yaw_right() - #elif target_direction.x < -0.2: - #jet.controller.cpu.yaw_left() -# -# - #get_node("../../base_ui/target_z").text = str(target_direction.z) - #get_node("../../base_ui/target_x").text = str(target_direction.x) + #process_jet_plan_old(jet) + #process_jet_plan_gpt(jet) + #jet.strategy_stack.process_action(jet) + + var target_local_position: Vector3 = jet.to_local(jet.target.global_position) + var target_direction: Vector3 = target_local_position.normalized() + jet.target_direction = target_direction +func process_jet_plan_old(jet: Jet) -> void: #var direction: Vector3 = ( #jet.target.global_position - jet.global_position #).normalized() + var target_local_position: Vector3 = jet.to_local(jet.target.global_position) + var target_direction: Vector3 = target_local_position.normalized() + jet.target_ray.target_position = target_direction + if maxf(target_direction.z, 0.0) == 0.0: + get_node("../../base_ui/target_position_fb").text = "infront" + jet.controller.cpu.no_action() + + if target_direction.x > 0.2: + jet.controller.cpu.yaw_right() + elif target_direction.x < -0.2: + jet.controller.cpu.yaw_left() + + elif maxf(target_direction.y, 0.5) == 0.5: + jet.controller.cpu.no_action() + + if target_direction.y > 0.2: + get_node("../../base_ui/target_position_ab").text = "above" + jet.controller.cpu.pitch_up() + elif target_direction.y < -0.2: + get_node("../../base_ui/target_position_ab").text = "below" + jet.controller.cpu.pitch_down() + + elif maxf(target_direction.y, -0.5) == -0.5: + get_node("../../base_ui/target_position_ab").text = "below" + jet.controller.cpu.no_action() + + if target_direction.y > 0.2: + jet.controller.cpu.yaw_right() + elif target_direction.y < -0.2: + jet.controller.cpu.yaw_left() + + else: + get_node("../../base_ui/target_position_fb").text = "behind" + jet.controller.cpu.no_action() + + if target_direction.x > 0.2: + jet.controller.cpu.yaw_right() + elif target_direction.x < -0.2: + jet.controller.cpu.yaw_left() + + get_node("../../base_ui/target_z").text = str(target_direction.z) + get_node("../../base_ui/target_x").text = str(target_direction.x) + +func process_jet_plan_gpt(jet: Jet) -> void: # NOTE: (From GPT) Mostly works but with precession nor do I really understand it... - #var forward_dot: float = target_direction.dot(Vector3.UP) - #if forward_dot >= cos(deg_to_rad(37.5)): - #get_node("../../base_ui/target_position_fb").text = "infront" - #jet.controller.cpu.no_action() - #else: - #get_node("../../base_ui/target_position_fb").text = "behind" - #if target_direction.x >= 0.2: - #jet.controller.cpu.yaw_right() - #elif target_direction.x <= -0.2: - #jet.controller.cpu.yaw_left() + var target_direction: Vector3 = jet.to_local(jet.target.global_position) + var forward_dot: float = target_direction.dot(Vector3.UP) + if forward_dot >= cos(deg_to_rad(37.5)): + get_node("../../base_ui/target_position_fb").text = "infront" + jet.controller.cpu.no_action() + else: + get_node("../../base_ui/target_position_fb").text = "behind" + if target_direction.x >= 0.2: + jet.controller.cpu.yaw_right() + elif target_direction.x <= -0.2: + jet.controller.cpu.yaw_left() diff --git a/scripts/controllers/cpu_system/strategy_stack.gd b/scripts/controllers/cpu_system/strategy_stack.gd index 50346e1..1e6ec99 100644 --- a/scripts/controllers/cpu_system/strategy_stack.gd +++ b/scripts/controllers/cpu_system/strategy_stack.gd @@ -1,21 +1,23 @@ class_name StrategyStack extends Node - +var active_action: ActionBase func _init() -> void: - tree_entered.connect(add_action) - tree_exited.connect(remove_action) + child_entered_tree.connect( add_action.bind() ) + child_exiting_tree.connect( remove_action.bind() ) -func add_action() -> void: - pass +func add_action(action: ActionBase) -> void: + if active_action: return + active_action = action -func remove_action() -> void: - pass +func remove_action(action: ActionBase) -> void: + if not active_action == action: return + # NOTE: 1st node hasn't actually been removed yet + active_action = null if not get_child_count() > 1 else get_child(1) func process_action(jet: Jet) -> void: - var action = get_child(0) - if not action: return - action.do(jet) + if not active_action: return + active_action.process(jet) diff --git a/scripts/jet_controls/player.gd b/scripts/jet_controls/player.gd index 4265e30..9aa8724 100644 --- a/scripts/jet_controls/player.gd +++ b/scripts/jet_controls/player.gd @@ -5,8 +5,6 @@ var commands: Globals.CompoundCommand = Globals.CompoundCommand.new() func process(_delta: float) -> Globals.CompoundCommand: - no_action() - if Input.is_action_pressed("pitch_up"): commands.PITCH = Globals.ControllerCommand.PITCH_UP elif Input.is_action_pressed("pitch_down"): diff --git a/skunk_works/test_world.gd b/skunk_works/test_world.gd index 12a12cf..f09bc14 100644 --- a/skunk_works/test_world.gd +++ b/skunk_works/test_world.gd @@ -1,41 +1,98 @@ class_name TestWorld extends Node3D -@onready var jet: Node3D = $jet -@onready var jet2: Node3D = $jet2 -var target_ray: RayCast3D +@onready var jet: Node3D = $jet +@onready var jet2: Node3D = $jet2 +@onready var marker: Marker3D = $marker +@onready var ray: RayCast3D = $ray +@onready var target_ray: RayCast3D = $jet/target_ray + func _ready() -> void: - target_ray = jet.get_node("target_ray") - -func _process(delta: float) -> void: - #test_dot_product(delta) pass +func _process(delta: float) -> void: + test_dot_product(delta) + pass func test_dot_product(_delta: float) -> void: #NOTE: When using unit (normalized) vectors, the result will always be # between -1.0 (180 degree angle) when the vectors are facing opposite # directions, and 1.0 (0 degree angle) when the vectors are aligned. - var target_local_position: Vector3 = jet.to_local(jet2.global_position) - var target_direction: Vector3 = target_local_position.normalized() - target_ray.target_position = target_direction + manual_direction_and_length() + var target_direction = tool_direction_and_length() + var forward_dot: float = target_direction.dot(Vector3.UP) - var ud_dot: float = target_direction.dot(Vector3.FORWARD) var lr_dot: float = target_direction.dot(Vector3.RIGHT) + var ud_dot: float = target_direction.dot(Vector3.FORWARD) + #var rotation_dot = jet.rotation.direction_to().normalized().dot(Vector3.FORWARD) + var rotation_dot = clampf(jet.rotation_degrees.z / 360.0, -1, 1) #NOTE: if neg 'below'; if pos 'above'. # Need window between +-0.2 or something for centered - print("Forward : ", forward_dot) + #print("Rotation : ", rotation_dot) + #print("Rotation : ", rad_to_deg(cosh(rotation_dot))) + + #NOTE: if neg 'below'; if pos 'above'. + # Need window between +-0.2 or something for centered + #print("Forward : ", forward_dot) #print("Forward : ", rad_to_deg(cosh(forward_dot))) #NOTE: if neg 'behind'; if pos 'ahead'. # Need window between +-0.2 or something for centered - print("Up | Down : ", ud_dot) + #print("Up | Down : ", ud_dot) #print("Up | Down : ", rad_to_deg(cosh(ud_dot))) #NOTE: if neg 'left'; if pos 'right'. # Need window between +-0.2 or something for centered - print("Left | Right : ", lr_dot) + #print("Left | Right : ", lr_dot) #print("Left | Right : ", rad_to_deg(cosh(lr_dot))) + + +func tool_direction_and_length() -> Vector3: + var target_local_position: Vector3 = jet.to_local(jet2.global_position) + var target_direction: Vector3 = target_local_position.normalized() + target_ray.target_position = target_direction + + return target_direction + +func manual_direction_and_length() -> void: + # NOTE: Length is treated as length of a vector. + # Distance is a length between two points aquired by the 'difference vector' which to get is (to_vec - from_vec) + # VERY important to be to/from rather than from/to as from/to would give direction from target position than self + # To do the manual equivilint of: + # var target_direction: Vector3 = jet.to_local(jet2.global_position).normalized() + # We do: + # var target_direction: Vector3 = ( + # (jet2.global_position - jet.global_position) + # / + # (jet2.global_position - jet.global_position).length() + # ) + jet.global_position + # Like so: + + var target_direction_difference: Vector3 = (jet2.global_position - jet.global_position) + # NOTE: Length is the square root of the sum of the squared components + # length = sqrt(x^2 + y^2 + z^2) // Single vector length; note, could just be x,y if in 2D + # combined vectors way: + # length = sqrt( (b.x - a.x)^2 + (b.y - a.y)^2 + (b.z - a.z)^2 ) + var target_direction_length: float = sqrt( + pow(target_direction_difference.x, 2.0) + + pow(target_direction_difference.y, 2.0) + + pow(target_direction_difference.z, 2.0) + ) + + # NOTE: Could divide by zero. Handle with exception or return 0,0,0 as we do here + var target_direction_normalized: Vector3 = \ + (target_direction_difference / target_direction_length) \ + if target_direction_length > 0.0 else Vector3.ZERO + + ray.global_position = jet.global_position + # ray is in local space context so giving direction just works + ray.target_position = target_direction_normalized + + # corrected position b/c target_global_direction starts at 0,0,0 globally. + # (normalized not a factor other than affecting length) + # thus add 'jet' position to move origin to it + resulting offset + var target_direction = target_direction_normalized + jet.global_position + marker.global_position = target_direction diff --git a/skunk_works/test_world.tscn b/skunk_works/test_world.tscn index c3f1c11..a875c1e 100644 --- a/skunk_works/test_world.tscn +++ b/skunk_works/test_world.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=15 format=3 uid="uid://boihqkqrbm0ti"] +[gd_scene load_steps=17 format=3 uid="uid://boihqkqrbm0ti"] [ext_resource type="Script" uid="uid://emw28v4vimpy" path="res://skunk_works/test_world.gd" id="1_nnwr0"] [ext_resource type="PackedScene" uid="uid://bhjfvc7gkrvah" path="res://base_environment.tscn" id="2_iba6n"] @@ -51,6 +51,14 @@ emission = Color(0, 0.18431373, 0.4745098, 1) [sub_resource type="BoxMesh" id="BoxMesh_530sk"] material = SubResource("StandardMaterial3D_ggpwi") +[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_530sk"] +albedo_color = Color(0.7921569, 0, 0, 1) +emission_enabled = true +emission = Color(0.7921569, 0, 0, 1) + +[sub_resource type="SphereMesh" id="SphereMesh_gwly4"] +material = SubResource("StandardMaterial3D_530sk") + [node name="test_world" type="Node3D"] script = ExtResource("1_nnwr0") @@ -113,6 +121,15 @@ mesh = SubResource("BoxMesh_ggpwi") transform = Transform3D(0.5, 0, 0, 0, 0.5, 0, 0, 0, 0.5, 0, 0, -2) mesh = SubResource("BoxMesh_530sk") +[node name="ray" type="RayCast3D" parent="."] + +[node name="marker" type="Marker3D" parent="."] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -15.739372) + +[node name="dot" type="MeshInstance3D" parent="marker"] +transform = Transform3D(0.2, 0, 0, 0, 0.2, 0, 0, 0, 0.2, 0.01133728, 0, 0) +mesh = SubResource("SphereMesh_gwly4") + [node name="camera" type="Camera3D" parent="."] -transform = Transform3D(0.45554495, -0.23939586, 0.8574196, 0, 0.96316254, 0.26891983, -0.8902128, -0.12250507, 0.43876383, 20.807, 12.386, 0.178) +transform = Transform3D(0.6978729, -0.025204023, 0.71577805, 0, 0.99938065, 0.03519026, -0.71622163, -0.024558326, 0.6974406, 8.063868, 1.6829107, 1.3785272) current = true