Skip to content

Instantly share code, notes, and snippets.

@Rinatamu
Last active September 2, 2018 08:44
Show Gist options
  • Save Rinatamu/6f770ca0aad08e2066c127bfe8f6b430 to your computer and use it in GitHub Desktop.
Save Rinatamu/6f770ca0aad08e2066c127bfe8f6b430 to your computer and use it in GitHub Desktop.
PowerAppsのLocation関数を使ってノンコーディングでスピードメーターっぽいものを作ってみた ref: https://qiita.com/rnakamuramartiny/items/efd8c5bf236834dead42
距離d=\sqrt{(d_y M)^2+(d_x N \cos \mu_y)^2}
緯度差d_y=y_1-y_2
(d_y M)^2+(d_x N \cos \mu_y)^2
経度差d_x=x_1-x_2
緯度平均値\mu_y=\frac{y_1+y_2}{2}
子午線曲率半径M=\frac{a(1-e^2)}{W^3}
卯酉線曲率半径N=\frac{a}{W}
W=\sqrt{1-e^2 \sin^2 \mu_y}
e=\sqrt{\frac{a^2-b^2}{a^2}}
M=\frac{6334834}{\sqrt{(1-0.006674 \times \sin \mu_y \times \sin \mu_y)^3}}
N=\frac{6377397}{\sqrt{(1-0.006674 \times \sin \mu_y \times \sin \mu_y)}}
Set(Var_Speed,(Var_Distance/1000)/3600)
Round(Var_Speed,3)&"km/h"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment