.class public Lcom/moji/base/WeatherWind;
.super Ljava/lang/Object;
.source "WeatherWind.java"


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/moji/base/WeatherWind$WIND_UNIT;
    }
.end annotation


# instance fields
.field private a:D

.field private b:Lcom/moji/base/WeatherWind$WIND_UNIT;


# direct methods
.method public constructor <init>(D)V
    .locals 1

    .line 15
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 16
    iput-wide p1, p0, Lcom/moji/base/WeatherWind;->a:D

    .line 17
    new-instance p1, Lcom/moji/preferences/ProcessPrefer;

    invoke-direct {p1}, Lcom/moji/preferences/ProcessPrefer;-><init>()V

    .line 18
    sget-object p2, Lcom/moji/preferences/ProcessPrefer$KeyConstant;->WIND_UNIT:Lcom/moji/preferences/ProcessPrefer$KeyConstant;

    const-string v0, ""

    invoke-virtual {p1, p2, v0}, Lcom/moji/preferences/ProcessPrefer;->a(Lcom/moji/tool/preferences/core/IPreferKey;Ljava/lang/String;)Ljava/lang/String;

    move-result-object p1

    .line 19
    invoke-static {p1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result p2

    if-nez p2, :cond_0

    .line 20
    invoke-static {p1}, Lcom/moji/base/WeatherWind$WIND_UNIT;->valueOf(Ljava/lang/String;)Lcom/moji/base/WeatherWind$WIND_UNIT;

    move-result-object p1

    iput-object p1, p0, Lcom/moji/base/WeatherWind;->b:Lcom/moji/base/WeatherWind$WIND_UNIT;

    .line 22
    :cond_0
    iget-object p1, p0, Lcom/moji/base/WeatherWind;->b:Lcom/moji/base/WeatherWind$WIND_UNIT;

    if-nez p1, :cond_1

    .line 23
    sget-object p1, Lcom/moji/base/WeatherWind$WIND_UNIT;->BEAUFORT_SCALE:Lcom/moji/base/WeatherWind$WIND_UNIT;

    iput-object p1, p0, Lcom/moji/base/WeatherWind;->b:Lcom/moji/base/WeatherWind$WIND_UNIT;

    :cond_1
    return-void
.end method


# virtual methods
.method public a(Landroid/content/Context;)Ljava/lang/String;
    .locals 12

    .line 29
    iget-object v0, p0, Lcom/moji/base/WeatherWind;->b:Lcom/moji/base/WeatherWind$WIND_UNIT;

    invoke-static {v0}, Lcom/moji/base/WeatherWind$WIND_UNIT;->access$000(Lcom/moji/base/WeatherWind$WIND_UNIT;)I

    move-result v0

    invoke-virtual {p1, v0}, Landroid/content/Context;->getString(I)Ljava/lang/String;

    move-result-object v0

    .line 31
    sget-object v1, Lcom/moji/base/WeatherWind$1;->a:[I

    iget-object v2, p0, Lcom/moji/base/WeatherWind;->b:Lcom/moji/base/WeatherWind$WIND_UNIT;

    invoke-virtual {v2}, Lcom/moji/base/WeatherWind$WIND_UNIT;->ordinal()I

    move-result v2

    aget v1, v1, v2

    const/4 v2, 0x2

    const/4 v3, 0x1

    const-wide v4, 0x40ac200000000000L    # 3600.0

    const-wide v6, 0x400cccccc0000000L    # 3.5999999046325684

    const/4 v8, 0x0

    const/high16 v9, 0x41200000    # 10.0f

    const-wide/high16 v10, 0x4024000000000000L    # 10.0

    packed-switch v1, :pswitch_data_0

    .line 117
    new-instance p1, Ljava/lang/StringBuilder;

    invoke-direct {p1}, Ljava/lang/StringBuilder;-><init>()V

    iget-wide v1, p0, Lcom/moji/base/WeatherWind;->a:D

    invoke-virtual {p1, v1, v2}, Ljava/lang/StringBuilder;->append(D)Ljava/lang/StringBuilder;

    invoke-virtual {p1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {p1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object p1

    goto/16 :goto_2

    .line 93
    :pswitch_0
    iget-wide v4, p0, Lcom/moji/base/WeatherWind;->a:D

    mul-double v4, v4, v6

    .line 94
    invoke-static {v4, v5}, Ljava/lang/Math;->round(D)J

    move-result-wide v4

    .line 95
    invoke-virtual {p1}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object p1

    sget v1, Lcom/moji/base/R$array;->wind_units_hk:I

    invoke-virtual {p1, v1}, Landroid/content/res/Resources;->getStringArray(I)[Ljava/lang/String;

    move-result-object p1

    const-wide/16 v6, 0x2

    cmp-long v1, v4, v6

    if-gez v1, :cond_0

    .line 98
    aget-object p1, p1, v8

    goto :goto_0

    :cond_0
    const-wide/16 v8, 0xd

    cmp-long v1, v4, v6

    if-ltz v1, :cond_1

    cmp-long v1, v4, v8

    if-gez v1, :cond_1

    .line 100
    aget-object p1, p1, v3

    goto :goto_0

    :cond_1
    const-wide/16 v6, 0x1f

    cmp-long v1, v4, v8

    if-ltz v1, :cond_2

    cmp-long v1, v4, v6

    if-gez v1, :cond_2

    .line 102
    aget-object p1, p1, v2

    goto :goto_0

    :cond_2
    const-wide/16 v1, 0x29

    cmp-long v3, v4, v6

    if-ltz v3, :cond_3

    cmp-long v3, v4, v1

    if-gez v3, :cond_3

    const/4 v1, 0x3

    .line 104
    aget-object p1, p1, v1

    goto :goto_0

    :cond_3
    cmp-long v3, v4, v1

    if-ltz v3, :cond_4

    const-wide/16 v1, 0x3f

    cmp-long v3, v4, v1

    if-gez v3, :cond_4

    const/4 v1, 0x4

    .line 106
    aget-object p1, p1, v1

    goto :goto_0

    :cond_4
    const-wide/16 v1, 0x3f

    cmp-long v3, v4, v1

    if-ltz v3, :cond_5

    const-wide/16 v1, 0x58

    cmp-long v3, v4, v1

    if-gez v3, :cond_5

    const/4 v1, 0x5

    .line 108
    aget-object p1, p1, v1

    goto :goto_0

    :cond_5
    const-wide/16 v1, 0x58

    cmp-long v3, v4, v1

    if-ltz v3, :cond_6

    const-wide/16 v1, 0x76

    cmp-long v3, v4, v1

    if-gez v3, :cond_6

    const/4 v1, 0x6

    .line 110
    aget-object p1, p1, v1

    goto :goto_0

    :cond_6
    const/4 v1, 0x7

    .line 112
    aget-object p1, p1, v1

    .line 114
    :goto_0
    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object p1

    goto/16 :goto_2

    .line 88
    :pswitch_1
    iget-wide v1, p0, Lcom/moji/base/WeatherWind;->a:D

    mul-double v1, v1, v4

    const-wide v3, 0x409cf00000000000L    # 1852.0

    div-double/2addr v1, v3

    mul-double v1, v1, v10

    .line 89
    invoke-static {v1, v2}, Ljava/lang/Math;->round(D)J

    move-result-wide v1

    long-to-float p1, v1

    .line 90
    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    div-float/2addr p1, v9

    invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(F)Ljava/lang/StringBuilder;

    invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object p1

    goto/16 :goto_2

    .line 84
    :pswitch_2
    iget-wide v1, p0, Lcom/moji/base/WeatherWind;->a:D

    mul-double v1, v1, v10

    invoke-static {v1, v2}, Ljava/lang/Math;->round(D)J

    move-result-wide v1

    long-to-float p1, v1

    .line 85
    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    div-float/2addr p1, v9

    invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(F)Ljava/lang/StringBuilder;

    invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object p1

    goto/16 :goto_2

    .line 79
    :pswitch_3
    iget-wide v1, p0, Lcom/moji/base/WeatherWind;->a:D

    mul-double v1, v1, v4

    const-wide v3, 0x4099256040000000L    # 1609.343994140625

    div-double/2addr v1, v3

    mul-double v1, v1, v10

    .line 80
    invoke-static {v1, v2}, Ljava/lang/Math;->round(D)J

    move-result-wide v1

    long-to-float p1, v1

    .line 81
    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    div-float/2addr p1, v9

    invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(F)Ljava/lang/StringBuilder;

    invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object p1

    goto/16 :goto_2

    .line 74
    :pswitch_4
    iget-wide v1, p0, Lcom/moji/base/WeatherWind;->a:D

    mul-double v1, v1, v6

    mul-double v1, v1, v10

    .line 75
    invoke-static {v1, v2}, Ljava/lang/Math;->round(D)J

    move-result-wide v1

    long-to-float p1, v1

    .line 76
    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    div-float/2addr p1, v9

    invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(F)Ljava/lang/StringBuilder;

    invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object p1

    goto/16 :goto_2

    .line 34
    :pswitch_5
    iget-wide v4, p0, Lcom/moji/base/WeatherWind;->a:D

    const-wide v6, 0x3fd3333340000000L    # 0.30000001192092896

    cmpg-double p1, v4, v6

    if-gez p1, :cond_8

    :cond_7
    const/4 v2, 0x0

    goto/16 :goto_1

    .line 36
    :cond_8
    iget-wide v4, p0, Lcom/moji/base/WeatherWind;->a:D

    const-wide v9, 0x3ff99999a0000000L    # 1.600000023841858

    cmpl-double p1, v4, v6

    if-ltz p1, :cond_9

    iget-wide v4, p0, Lcom/moji/base/WeatherWind;->a:D

    cmpg-double p1, v4, v9

    if-gez p1, :cond_9

    const/4 v2, 0x1

    goto/16 :goto_1

    .line 38
    :cond_9
    iget-wide v3, p0, Lcom/moji/base/WeatherWind;->a:D

    const-wide v5, 0x400b333340000000L    # 3.4000000953674316

    cmpl-double p1, v3, v9

    if-ltz p1, :cond_a

    iget-wide v3, p0, Lcom/moji/base/WeatherWind;->a:D

    cmpg-double p1, v3, v5

    if-gez p1, :cond_a

    goto/16 :goto_1

    .line 40
    :cond_a
    iget-wide v1, p0, Lcom/moji/base/WeatherWind;->a:D

    const-wide/high16 v3, 0x4016000000000000L    # 5.5

    cmpl-double p1, v1, v5

    if-ltz p1, :cond_b

    iget-wide v1, p0, Lcom/moji/base/WeatherWind;->a:D

    cmpg-double p1, v1, v3

    if-gez p1, :cond_b

    const/4 v2, 0x3

    goto/16 :goto_1

    .line 42
    :cond_b
    iget-wide v1, p0, Lcom/moji/base/WeatherWind;->a:D

    cmpl-double p1, v1, v3

    if-ltz p1, :cond_c

    iget-wide v1, p0, Lcom/moji/base/WeatherWind;->a:D

    const-wide/high16 v3, 0x4020000000000000L    # 8.0

    cmpg-double p1, v1, v3

    if-gez p1, :cond_c

    const/4 v2, 0x4

    goto/16 :goto_1

    .line 44
    :cond_c
    iget-wide v1, p0, Lcom/moji/base/WeatherWind;->a:D

    const-wide/high16 v3, 0x4020000000000000L    # 8.0

    cmpl-double p1, v1, v3

    if-ltz p1, :cond_d

    iget-wide v1, p0, Lcom/moji/base/WeatherWind;->a:D

    const-wide v3, 0x40259999a0000000L    # 10.800000190734863

    cmpg-double p1, v1, v3

    if-gez p1, :cond_d

    const/4 v2, 0x5

    goto/16 :goto_1

    .line 46
    :cond_d
    iget-wide v1, p0, Lcom/moji/base/WeatherWind;->a:D

    const-wide v3, 0x40259999a0000000L    # 10.800000190734863

    cmpl-double p1, v1, v3

    if-ltz p1, :cond_e

    iget-wide v1, p0, Lcom/moji/base/WeatherWind;->a:D

    const-wide v3, 0x402bccccc0000000L    # 13.899999618530273

    cmpg-double p1, v1, v3

    if-gez p1, :cond_e

    const/4 v2, 0x6

    goto/16 :goto_1

    .line 48
    :cond_e
    iget-wide v1, p0, Lcom/moji/base/WeatherWind;->a:D

    const-wide v3, 0x402bccccc0000000L    # 13.899999618530273

    cmpl-double p1, v1, v3

    if-ltz p1, :cond_f

    iget-wide v1, p0, Lcom/moji/base/WeatherWind;->a:D

    const-wide v3, 0x4031333340000000L    # 17.200000762939453

    cmpg-double p1, v1, v3

    if-gez p1, :cond_f

    const/4 v2, 0x7

    goto/16 :goto_1

    .line 50
    :cond_f
    iget-wide v1, p0, Lcom/moji/base/WeatherWind;->a:D

    const-wide v3, 0x4031333340000000L    # 17.200000762939453

    cmpl-double p1, v1, v3

    if-ltz p1, :cond_10

    iget-wide v1, p0, Lcom/moji/base/WeatherWind;->a:D

    const-wide v3, 0x4034ccccc0000000L    # 20.799999237060547

    cmpg-double p1, v1, v3

    if-gez p1, :cond_10

    const/16 v2, 0x8

    goto/16 :goto_1

    .line 52
    :cond_10
    iget-wide v1, p0, Lcom/moji/base/WeatherWind;->a:D

    const-wide v3, 0x4034ccccc0000000L    # 20.799999237060547

    cmpl-double p1, v1, v3

    if-ltz p1, :cond_11

    iget-wide v1, p0, Lcom/moji/base/WeatherWind;->a:D

    const-wide v3, 0x4038800000000000L    # 24.5

    cmpg-double p1, v1, v3

    if-gez p1, :cond_11

    const/16 v2, 0x9

    goto/16 :goto_1

    .line 54
    :cond_11
    iget-wide v1, p0, Lcom/moji/base/WeatherWind;->a:D

    const-wide v3, 0x4038800000000000L    # 24.5

    cmpl-double p1, v1, v3

    if-ltz p1, :cond_12

    iget-wide v1, p0, Lcom/moji/base/WeatherWind;->a:D

    const-wide v3, 0x403c800000000000L    # 28.5

    cmpg-double p1, v1, v3

    if-gez p1, :cond_12

    const/16 v2, 0xa

    goto/16 :goto_1

    .line 56
    :cond_12
    iget-wide v1, p0, Lcom/moji/base/WeatherWind;->a:D

    const-wide v3, 0x403c800000000000L    # 28.5

    cmpl-double p1, v1, v3

    if-ltz p1, :cond_13

    iget-wide v1, p0, Lcom/moji/base/WeatherWind;->a:D

    const-wide v3, 0x40405999a0000000L    # 32.70000076293945

    cmpg-double p1, v1, v3

    if-gez p1, :cond_13

    const/16 v2, 0xb

    goto/16 :goto_1

    .line 58
    :cond_13
    iget-wide v1, p0, Lcom/moji/base/WeatherWind;->a:D

    const-wide v3, 0x40405999a0000000L    # 32.70000076293945

    cmpl-double p1, v1, v3

    if-ltz p1, :cond_14

    iget-wide v1, p0, Lcom/moji/base/WeatherWind;->a:D

    const-wide v3, 0x4042800000000000L    # 37.0

    cmpg-double p1, v1, v3

    if-gez p1, :cond_14

    const/16 v2, 0xc

    goto/16 :goto_1

    .line 60
    :cond_14
    iget-wide v1, p0, Lcom/moji/base/WeatherWind;->a:D

    const-wide v3, 0x4042800000000000L    # 37.0

    cmpl-double p1, v1, v3

    if-ltz p1, :cond_15

    iget-wide v1, p0, Lcom/moji/base/WeatherWind;->a:D

    const-wide v3, 0x4044c00000000000L    # 41.5

    cmpg-double p1, v1, v3

    if-gez p1, :cond_15

    const/16 v2, 0xd

    goto :goto_1

    .line 62
    :cond_15
    iget-wide v1, p0, Lcom/moji/base/WeatherWind;->a:D

    const-wide v3, 0x4044c00000000000L    # 41.5

    cmpl-double p1, v1, v3

    if-ltz p1, :cond_16

    iget-wide v1, p0, Lcom/moji/base/WeatherWind;->a:D

    const-wide v3, 0x40471999a0000000L    # 46.20000076293945

    cmpg-double p1, v1, v3

    if-gez p1, :cond_16

    const/16 v2, 0xe

    goto :goto_1

    .line 64
    :cond_16
    iget-wide v1, p0, Lcom/moji/base/WeatherWind;->a:D

    const-wide v3, 0x40471999a0000000L    # 46.20000076293945

    cmpl-double p1, v1, v3

    if-ltz p1, :cond_17

    iget-wide v1, p0, Lcom/moji/base/WeatherWind;->a:D

    const-wide v3, 0x4049800000000000L    # 51.0

    cmpg-double p1, v1, v3

    if-gez p1, :cond_17

    const/16 v2, 0xf

    goto :goto_1

    .line 66
    :cond_17
    iget-wide v1, p0, Lcom/moji/base/WeatherWind;->a:D

    const-wide v3, 0x4049800000000000L    # 51.0

    cmpl-double p1, v1, v3

    if-ltz p1, :cond_18

    iget-wide v1, p0, Lcom/moji/base/WeatherWind;->a:D

    const-wide v3, 0x404c0cccc0000000L    # 56.099998474121094

    cmpg-double p1, v1, v3

    if-gez p1, :cond_18

    const/16 v2, 0x10

    goto :goto_1

    .line 68
    :cond_18
    iget-wide v1, p0, Lcom/moji/base/WeatherWind;->a:D

    const-wide v3, 0x404c0cccc0000000L    # 56.099998474121094

    cmpl-double p1, v1, v3

    if-ltz p1, :cond_7

    const/16 v2, 0x11

    .line 71
    :goto_1
    new-instance p1, Ljava/lang/StringBuilder;

    invoke-direct {p1}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {p1, v2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    invoke-virtual {p1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {p1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object p1

    :goto_2
    return-object p1

    :pswitch_data_0
    .packed-switch 0x1
        :pswitch_5
        :pswitch_4
        :pswitch_3
        :pswitch_2
        :pswitch_1
        :pswitch_0
    .end packed-switch
.end method
