Skip to content

Commit 77f88a9

Browse files
author
ELY M
committed
55903-elys
1 parent 563e8b4 commit 77f88a9

8 files changed

Lines changed: 1343 additions & 1286 deletions

File tree

Lines changed: 81 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -1,81 +1,81 @@
1-
2-
#
3-
# setup a fresh build environment under Linux Mint 17.3 for wX
4-
# 2016 July
5-
#
6-
# Linux Mint 17.3 install is mostly defaults, choose LVM and use 50GB at least for disk
7-
#
8-
#Download latest wX tarball and android.jks from box.com
9-
10-
mkdir ~/StudioProjects && cd ~/StudioProjects
11-
mv ~/Downloads/wX*zip .
12-
mv ~/Downloads/android.jks .
13-
unzip wX*zip
14-
cd
15-
16-
# https://developer.android.com/studio/index.html#downloads
17-
wget https://dl.google.com/dl/android/studio/ide-zips/2.1.2.0/android-studio-ide-143.2915827-linux.zip
18-
unzip android-studio-ide-143.2915827-linux.zip
19-
20-
sudo apt-get install openjdk-8-jdk
21-
22-
# install scripts
23-
mkdir ~/bin
24-
vi ~/bin/run
25-
----
26-
#!/bin/bash
27-
export NDK_TOOLCHAIN_VERSION=clang
28-
$HOME/android-studio/bin/studio.sh
29-
30-
31-
chmod 755 ~/bin/run
32-
vi ~/.bashrc
33-
---
34-
export PATH=$PATH:$HOME/Android/Sdk/platform-tools/:$HOME/bin
35-
36-
mkdir ~/.gradle
37-
vi ~/.gradle/gradle.properties
38-
RELEASE_STORE_FILE=$HOME/StudioProjects/android.jks
39-
RELEASE_STORE_PASSWORD=f
40-
RELEASE_KEY_ALIAS=android key
41-
RELEASE_KEY_PASSWORD=f
42-
org.gradle.daemon=true
43-
org.gradle.jvmargs=-Xmx2048M
44-
45-
#
46-
# NDK
47-
#
48-
#https://developer.android.com/ndk/downloads/index.html#rel
49-
#
50-
cd
51-
wget http://dl.google.com/android/repository/android-ndk-r12b-linux-x86_64.zip
52-
unzip android-ndk*zip
53-
54-
#
55-
# open up a new terminal to pickup above changes, launch IDE
56-
# take default options will will download various SDK components
57-
# Choose to open existing project and choose ~/StudioProjects/wX
58-
# it will prompt to choose a JDK
59-
#
60-
61-
#
62-
# install KVM for emulator
63-
#
64-
sudo apt-get install qemu-kvm libvirt-bin bridge-utils
65-
sudo apt-get install cpu-checker
66-
67-
cp StudioProjects/wX/DOC/SCRIPTS/scr.wx .
68-
run
69-
70-
#
71-
# import project
72-
# setup emulator
73-
# disable instant run
74-
#
75-
76-
----------------------------
77-
emulator on vm
78-
-------------------------
79-
cd /home/josh/Android/Sdk/tools/lib64/libstdc++
80-
mv libstdc++.so.6 libstdc++.so.6.bak
81-
ln -s /usr/lib/x86_64-linux-gnu/libstdc++.so.6 .
1+
2+
#
3+
# setup a fresh build environment under Linux Mint 17.3 for wX
4+
# 2016 July
5+
#
6+
# Linux Mint 17.3 install is mostly defaults, choose LVM and use 50GB at least for disk
7+
#
8+
#Download latest wX tarball and android.jks from box.com
9+
10+
mkdir ~/StudioProjects && cd ~/StudioProjects
11+
mv ~/Downloads/wX*zip .
12+
mv ~/Downloads/android.jks .
13+
unzip wX*zip
14+
cd
15+
16+
# https://developer.android.com/studio/index.html#downloads
17+
wget https://dl.google.com/dl/android/studio/ide-zips/2.1.2.0/android-studio-ide-143.2915827-linux.zip
18+
unzip android-studio-ide-143.2915827-linux.zip
19+
20+
sudo apt-get install openjdk-8-jdk
21+
22+
# install scripts
23+
mkdir ~/bin
24+
vi ~/bin/run
25+
----
26+
#!/bin/bash
27+
export NDK_TOOLCHAIN_VERSION=clang
28+
$HOME/android-studio/bin/studio.sh
29+
30+
31+
chmod 755 ~/bin/run
32+
vi ~/.bashrc
33+
---
34+
export PATH=$PATH:$HOME/Android/Sdk/platform-tools/:$HOME/bin
35+
36+
mkdir ~/.gradle
37+
vi ~/.gradle/gradle.properties
38+
RELEASE_STORE_FILE=$HOME/StudioProjects/android.jks
39+
RELEASE_STORE_PASSWORD=f
40+
RELEASE_KEY_ALIAS=android key
41+
RELEASE_KEY_PASSWORD=f
42+
org.gradle.daemon=true
43+
org.gradle.jvmargs=-Xmx2048M
44+
45+
#
46+
# NDK
47+
#
48+
#https://developer.android.com/ndk/downloads/index.html#rel
49+
#
50+
cd
51+
wget http://dl.google.com/android/repository/android-ndk-r12b-linux-x86_64.zip
52+
unzip android-ndk*zip
53+
54+
#
55+
# open up a new terminal to pickup above changes, launch IDE
56+
# take default options will will download various SDK components
57+
# Choose to open existing project and choose ~/StudioProjects/wX
58+
# it will prompt to choose a JDK
59+
#
60+
61+
#
62+
# install KVM for emulator
63+
#
64+
sudo apt-get install qemu-kvm libvirt-bin bridge-utils
65+
sudo apt-get install cpu-checker
66+
67+
cp StudioProjects/wX/DOC/SCRIPTS/scr.wx .
68+
run
69+
70+
#
71+
# import project
72+
# setup emulator
73+
# disable instant run
74+
#
75+
76+
----------------------------
77+
emulator on vm
78+
-------------------------
79+
cd /home/josh/Android/Sdk/tools/lib64/libstdc++
80+
mv libstdc++.so.6 libstdc++.so.6.bak
81+
ln -s /usr/lib/x86_64-linux-gnu/libstdc++.so.6 .

app/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ dependencies {
109109
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.8.1'
110110
// https://developer.android.com/jetpack/androidx/versions
111111
implementation 'com.google.android.material:material:1.12.0'
112-
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:2.8.3"
112+
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:2.8.4"
113113
implementation 'androidx.cardview:cardview:1.0.0'
114114
implementation 'androidx.core:core-ktx:1.13.1'
115115
implementation 'androidx.media:media:1.7.0'

app/src/main/AndroidManifest.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222

2323
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2424
xmlns:tools="http://schemas.android.com/tools"
25-
android:versionCode="55901"
26-
android:versionName="55901-elys">
25+
android:versionCode="55903"
26+
android:versionName="55903-elys">
2727

2828
<uses-permission android:name="android.permission.INTERNET" />
2929
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />

app/src/main/java/joshuatee/wx/misc/UtilityRtma.kt

Lines changed: 48 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -30,64 +30,69 @@ import joshuatee.wx.util.UtilityString
3030
object UtilityRtma {
3131

3232
val labels = listOf(
33-
"2-Meter Temperature (F)",
34-
"10-Meter Wind Speed (Knots) / Direction",
35-
"2-Meter Dew Point (F)",
33+
"2-Meter Temperature (F)",
34+
"10-Meter Wind Speed (Knots) / Direction",
35+
"2-Meter Dew Point (F)",
36+
"Cloud Ceiling (AGL FT X 100)",
37+
"Visibility (Miles)"
3638
)
3739

3840
val codes = listOf(
39-
"2m_temp",
40-
"10m_wnd",
41-
"2m_dwpt",
41+
"2m_temp",
42+
"10m_wnd",
43+
"2m_dwpt",
44+
"ceiling",
45+
"vis"
4246
)
4347

4448
val sectors = listOf(
45-
"alaska",
46-
"ca",
47-
"co",
48-
"fl",
49-
"guam",
50-
"gulf-coast",
51-
"mi",
52-
"mid-atl",
53-
"mid-west",
54-
"mt",
55-
"nc_sc",
56-
"nd_sd",
57-
"new-eng",
58-
"nw-pacific",
59-
"ohio-valley",
60-
"sw_us",
61-
"tx",
62-
"wi"
49+
"alaska",
50+
"ca",
51+
"co",
52+
"fl",
53+
"guam",
54+
"gulf-coast",
55+
"mi",
56+
"mid-atl",
57+
"mid-west",
58+
"mt",
59+
"nc_sc",
60+
"nd_sd",
61+
"new-eng",
62+
"nw-pacific",
63+
"ohio-valley",
64+
"sw_us",
65+
"tx",
66+
"wi"
6367
)
6468

6569
// approx based off inspection
6670
private val sectorToLatLon = mapOf(
67-
"alaska" to LatLon(63.25, -156.5),
68-
"ca" to LatLon(38.0, -118.5),
69-
"co" to LatLon(39.0, -105.25),
70-
"fl" to LatLon(27.5, -83.25),
71-
"guam" to LatLon(13.5, 144.75),
72-
"gulf-coast" to LatLon(32.75, -90.25),
73-
"mi" to LatLon(43.75, -84.75),
74-
"mid-atl" to LatLon(39.75, -75.75),
75-
"mid-west" to LatLon(39.5, -93.0),
76-
"mt" to LatLon(45.0, -109.25),
77-
"nc_sc" to LatLon(34.5, -79.75),
78-
"nd_sd" to LatLon(45.5, -98.25),
79-
"new-eng" to LatLon(43.0, -71.25),
80-
"nw-pacific" to LatLon(45.5, -122.75),
81-
"ohio-valley" to LatLon(39.0, -84.75),
82-
"sw_us" to LatLon(34.5, -104.25),
83-
"tx" to LatLon(32.0, -100.25),
84-
"wi" to LatLon(44.25, -89.75)
71+
"alaska" to LatLon(63.25, -156.5),
72+
"ca" to LatLon(38.0, -118.5),
73+
"co" to LatLon(39.0, -105.25),
74+
"fl" to LatLon(27.5, -83.25),
75+
"guam" to LatLon(13.5, 144.75),
76+
"gulf-coast" to LatLon(32.75, -90.25),
77+
"mi" to LatLon(43.75, -84.75),
78+
"mid-atl" to LatLon(39.75, -75.75),
79+
"mid-west" to LatLon(39.5, -93.0),
80+
"mt" to LatLon(45.0, -109.25),
81+
"nc_sc" to LatLon(34.5, -79.75),
82+
"nd_sd" to LatLon(45.5, -98.25),
83+
"new-eng" to LatLon(43.0, -71.25),
84+
"nw-pacific" to LatLon(45.5, -122.75),
85+
"ohio-valley" to LatLon(39.0, -84.75),
86+
"sw_us" to LatLon(34.5, -104.25),
87+
"tx" to LatLon(32.0, -100.25),
88+
"wi" to LatLon(44.25, -89.75)
8589
)
8690

8791
fun getNearest(latLon: LatLon): String = UtilityLocation.getNearest(latLon, sectorToLatLon)
8892

8993
fun getTimes(): List<String> {
90-
val html = "https://mag.ncep.noaa.gov/observation-parameter.php?group=Observations%20and%20Analyses&obstype=RTMA&area=MI&ps=area".getHtml()
94+
val html =
95+
"https://mag.ncep.noaa.gov/observation-parameter.php?group=Observations%20and%20Analyses&obstype=RTMA&area=MI&ps=area".getHtml()
9196
// title="20221116 00 UTC"
9297
return UtilityString.parseColumn(html, "([0-9]{8} [0-9]{2} UTC)").distinct()
9398
}

0 commit comments

Comments
 (0)