Tide(潮汐) DOS版C言語で実装→AppleWatchで動かす

はじめに

  • イカダでの釣行するとき、潮汐が重要みたいです。
  • 釣行に行く、三重県南伊勢町、愛知県知多市の2つで十分
  • 湾内では、気圧や風の影響がでるので大まかな値で十分。気にしません

 

参考にする潮位プログラム

 

C言語の準備

  • Mac上のWin11にMS-DOS Playerを使ってTurbo Cをインストールしてみました
  • ヤッターと思いましたが。。。  日本語が「化けとるみ」たいです
    • 入手したTurbo Cですが、PC-98というNECのパソコン用みたいです。グーグルで調べたところ、「DOSBox-X」上でTurbo Cを使うと良いとのことでした
    • 階層としては、Mac → Win11 → DOSBox-X → Turbo C となりますdosbox-x.com
    • インストールしたところ、デフォルトで日本語が正しく表示されましたが、枠線が文字化けしています。PC-98用に設定すれば良いかと思いますが、大きな問題ではありません。そのまま使います。

                   

 

  • コンパイルしましたらエラーだらけですーーー!
    • プログラムはマイクロソフト系のようです。テキスト画面とグラフィック画面の処理をTurbo C用に書き換えました。

 

  • 結果確認
    • HPデータ 

    • 今回作成したデータ

                                      

 

  • AppleWatchで動かす準備
    • 釣行先を決めました
      • Picker("場所を指定", selection: $selectionValue) {

            /// 選択項目の一覧

            Text("静岡/舞阪").tag(0)

            Text("愛知/師崎").tag(1)

            Text("愛知/武豊").tag(2)

            Text("三重/五ケ所").tag(3)

            Text("三重/鳥羽").tag(4)

            Text("三重/的矢").tag(5)

            Text("三重/尾鷲").tag(6)

        }

         

    • DTフォルダーからデータをマイクロソフト エクセルで取り出しました。
      • let na = [["静岡/舞阪", 34.41, 137.37,  70],

                  ["愛知/師崎", 34.42, 136.59, 125],

                  ["愛知/武豊", 34.51 ,136.56 ,132],

                  ["三重/五ケ所",34.19, 136.40, 103],

                  ["三重/鳥羽", 34.29, 136.51, 120],

                  ["三重/的矢", 34.22, 136.52, 110],

                  ["三重/尾鷲", 34.04, 136.13, 104]

        ]

        let hr  = [

            [12.60,1.80,1.10,2.10,0.90,2.30,0.40,11.40,0.20,0.40,0.40,5.00,0.30,15.70,0.60,0.20,0.70,0.50,0.40,0.70,0.30,5.10,0.90,0.20,29.70,0.40,1.00,1.00,13.10,0.40,3.70,0.30,0.40,0.30,0.60,0.30,0.70,0.70,0.20,0.30,"静岡/舞阪"],

            [16.50,0.90,1.10,1.30,1.10,3.80,0.80,17.70,0.40,0.80,0.40,7.70,0.50,23.70,0.30,0.40,1.30,0.40,0.80,1.50,1.90,10.30,1.60,0.50,57.40,0.50,2.00,1.80,26.70,0.10,7.60,0.30,0.40,1.20,0.50,0.40,0.20,0.20,0.20,0.20,"愛知/師崎"],

            [15.50,0.40,0.40,1.60,0.40,3.40,0.60,18.00,0.40,1.20,0.50,7.30,0.40,24.00,0.30,0.30,1.30,0.60,0.60,0.90,2.00,10.50,2.00,0.30,60.50,1.10,1.80,1.40,28.50,0.40,8.00,0.40,0.80,1.30,0.90,0.60,0.30,0.10,0.30,0.50,"愛知/武豊"],

            [13.00,0.00,0.00,0.00,0.00,0.00,0.00,17.00,0.00,0.00,0.00,6.70,0.00,20.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,45.00,0.00,0.00,0.00,21.00,0.00,5.70,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,"三重/五ケ所"],

            [13.10,1.80,1.40,1.20,0.70,3.50,0.70,17.40,0.40,1.00,0.50,7.50,0.60,23.30,0.20,0.30,1.40,0.30,0.80,1.20,1.70,9.30,1.90,0.20,55.50,0.60,1.80,1.70,25.50,0.30,7.20,0.20,0.70,0.90,0.60,0.50,0.20,0.20,0.10,0.10,"三重/鳥羽"],

            [13.00,0.00,0.00,0.00,0.00,0.00,0.00,17.00,0.00,0.00,0.00,7.30,0.00,22.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,44.00,0.00,0.00,0.00,20.00,0.00,5.40,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,"三重/的矢"],

            [12.20,1.70,0.70,0.40,0.50,3.50,0.70,17.00,0.20,0.50,0.40,7.10,0.50,22.20,0.30,0.30,1.20,0.20,0.70,1.10,1.10,7.80,1.50,0.10,44.10,0.40,1.40,1.30,19.80,0.10,5.50,0.10,0.00,0.50,0.10,0.20,0.10,0.10,0.00,0.00,"三重/尾鷲",]

        ]

        let pl =  [

            [161.20,1.80,33.80,20.2,177.90,164.1,157.60,173.5,330.70,195.1,164.40,186.8,339.50,194,228.40,144.8,214.80,31.8,226.20,175.7,218.60,176.2,178.30,159.6,179.60,177.4,187.80,176,204.50,68,196.00,43.5,264.30,178.5,268.10,343.1,264.00,289.6,274.90,302.1,"静岡/舞阪"],

            [136.50,0.90,68.70,16.9,2.70,155.7,163.00,165.5,231.70,182.8,199.80,183.6,335.10,187.1,249.40,151.3,204.80,263.7,218.10,167.6,194.30,170.7,171.90,195.1,176.50,179.7,188.70,195.2,203.30,65.3,199.10,19.5,251.60,201.1,296.10,54.2,136.50,125.3,180.20,195,"愛知/師崎"],

            [140.70,218.7,144.90,46.8,69.10,158.8,152.40,167.4,202.90,131.1,165.80,186.4,320.40,188,95.90,140.4,220.80,314,240.60,181.4,205.40,179.9,175.20,103.4,179.60,165.9,167.80,198.7,206.40,5.6,198.30,9.4,305.80,186.3,289.70,17.2,305.40,280.1,211.30,217.3,"愛知/武豊"],

            [166.00,0,0.00,0,0.00,0,0.00,165,0.00,0,0.00,186,0.00,186,0.00,0,0.00,0,0.00,0,000.00,0,00.00,0,166.00,0,000.00,0,190.00,0,190.00,0,0.00,0,0.00,0,000.00,0,0.00,0,"三重/五ケ所"],

            [159.60,342.4,65.80,30.5,158.80,156.4,155.10,167.4,182.10,229.9,165.60,185.6,22.00,188.2,137.70,160.8,213.60,284.4,223.30,180,191.80,176.2,178.90,328.9,179.50,166.7,179.50,205.7,205.90,21.6,202.20,352,300.00,197.6,292.80,42.3,19.40,52.9,285.50,319.2,"三重/鳥羽"],

            [160.00,0,0.00,0,0.00,0,0.00,164,0.00,0,0.00,188,0.00,188,0.00,0,0.00,0,0.00,0,000.00,0,00.00,0,171.00,0,000.00,0,199.00,0,199.00,0,0.00,0,0.00,0,000.00,0,0.00,0,"三重/的矢"],

            [161.80,345.3,54.20,22.3,167.60,153.8,155.50,165.2,187.00,202.3,175.80,182.5,40.60,185.5,211.30,165.1,204.60,263.5,227.30,162.4,167.20,165.7,165.20,78.1,170.30,176.4,179.10,192.3,194.50,179.5,189.70,78.5,346.10,170.6,254.20,45,54.30,40.8,181.80,229.8,"三重/尾鷲",]

        ]

         

    • 次回は、ソフトの移行となります

 

  •  完成予想図               アナログ時計に付けるのは如何?

        

 

ここまで読んでいただき、ありがとうございます。

次回は、AppleWatchに載せるためのデザインを報告します

 

 

 

 

 

プライバシーポリシー |ページトップへ

`