Changes in / [8fd7454:c810990]


Ignore:
Files:
12 added
44 deleted
244 edited

Legend:

Unmodified
Added
Removed
  • debian/changelog

    r8fd7454 rc810990  
    1 gnuboat (0.5.2) jessie; urgency=low
    2 
    3   * Fixed NMEA0183 position format
    4   * Added checksum fix feature to gnuboat-log-converter
    5 
    6  -- EngSaS - Maintainer <info@engsas.de>  Mon, 30 Oct 2017 11:00:00 +0100
    7 gnuboat (0.5.1) jessie; urgency=low
    8 
    9   * Fixed python error in dpt and temp logging
    10   * Improved error handling in gpsdpoller.py
    11   * Cleanup leaflet css files in webclient
    12 
    13  -- EngSaS - Maintainer <info@engsas.de>  Sun, 24 Sep 2017 16:00:00 +0200
    14 gnuboat (0.5.0) jessie; urgency=low
    15 
    16   * Fixed python print() and string.format() errors
    17   * Switched to feature freezed branch 0.5 as upstream
    18     source
    19 
    20  -- EngSaS - Maintainer <info@engsas.de>  Fri, 22 Sep 2017 08:30:00 +0200
    21 gnuboat (0.4.15) jessie; urgency=low
    22 
    23   * Fixed wrong format of latitude and longitude in NMEA log
    24   * Improved gnuboat-log-converter (NMEA, CSV, GPX formats)
    25   * Removed timeout from gpsd poller (which caused falling behind in reading
    26     gpsd messages)
    27   * Fixed webservice to handle timestamps in front of the nmea sentence
    28 
    29  -- EngSaS - Maintainer <info@engsas.de>  Thu, 21 Sep 2017 14:00:00 +0200
    30 gnuboat (0.4.14) jessie; urgency=low
    31 
    32   * Several fixes applied for webservice and webclient
    33 
    34  -- EngSaS - Maintainer <info@engsas.de>  Thu, 24 Aug 2017 20:00:00 +0200
    35 gnuboat (0.4.13) jessie; urgency=low
    36 
    37   * Merged new features from master:
    38     * 3D rendering
    39     * Fixed gnuboat daemon
    40     * Added data generator to simulate rrd database input
    41     * Added OpenCPN hint
    42     * Added colored tracks to leaflet map
    43 
    44  -- EngSaS - Maintainer <info@engsas.de>  Thu, 24 Aug 2017 18:00:00 +0200
    451gnuboat (0.4.12) jessie; urgency=low
    462
  • debian/control

    r8fd7454 rc810990  
    33Priority: optional
    44Maintainer: EngSaS - Maintainer <info@engsas.de>
    5 # To get a hint how debconf could be used, have a look at revision ecee2e69fa25cf158e950f4d4359363198c313a6 from debian/jessie branch
     5# Removed po-debconf, as puppet could not be run from postinst script (see gnuboat-puppet.postinst for details)
    66Build-Depends: debhelper (>= 9), lsb-release, dh-python, dh-systemd (>= 1.5), python-all, python3-all, python-all-dbg, python3-all-dbg, python-setuptools, python3-setuptools, python-rrdtool, python-pynmea2, python3-pynmea2, phing, php-pear
    77Standards-Version: 3.9.6
    … …  
    2727Package: python-gnuboat
    2828Section: python
    29 Architecture: all
    30 Depends: ${misc:Depends}, ${python:Depends}, python-pil, python-dateutil, python-tz, python-rrdtool, python-pynmea2, gpsd, gpsbabel, n2kd-scripts, n2kd-bin, gnuboat-daemon-config
     29Architecture: any
     30Depends: ${misc:Depends}, ${python:Depends}, python-pil, python-dateutil, python-tz, python-rrdtool, python-pynmea2, gpsd, n2kd-scripts, n2kd-bin, gnuboat-daemon-config
    3131Recommends: python-epd
    3232Description: GNUBoat logging daemon
    … …  
    3636#Package: python3-gnuboat
    3737#Section: python
    38 #Architecture: all
    39 #Depends: ${misc:Depends}, ${python3:Depends}, python3-pil, python3-dateutil, python3-tz, python3-rrdtool, python3-pynmea2, gpsd, gpsbabel, n2kd-scripts, n2kd-bin, gnuboat-daemon-config
     38#Architecture: any
     39#Depends: ${misc:Depends}, ${python3:Depends}, python3-pil, python3-dateutil, python3-tz, python3-rrdtool, python3-pynmea2, gpsd, n2kd-scripts, n2kd-bin, gnuboat-daemon-config
    4040#Recommends: python-epd
    4141#Description: GNUBoat logging daemon
    … …  
    5555Package: gnuboat-puppet
    5656Architecture: all
    57 Depends: ${misc:Depends}, puppet (>= 3.8)
     57Depends: ${misc:Depends}, puppet (>= 3.8), debconf
    5858Description: GNUBoat puppet configuration environment
    5959 Contains a complete puppet environment to configure a device
  • debian/copyright

    r8fd7454 rc810990  
    2626 License version 3 can be found in the file
    2727 `/usr/share/common-licenses/GPL-3'.
    28 
    29 Files: src/puppetcode/environments/gnuboat/modules/apt
    30        src/puppetcode/environments/gnuboat/modules/stdlib
    31 Copyright: Puppet
    32 License: Apache-2.0
    33  Licensed under the Apache License, Version 2.0 (the "License");
    34  you may not use this file except in compliance with the License.
    35  You may obtain a copy of the License at
    36  http://www.apache.org/licenses/LICENSE-2.0
    37  .
    38  Unless required by applicable law or agreed to in writing, software
    39  distributed under the License is distributed on an "AS IS" BASIS,
    40  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    41  See the License for the specific language governing permissions
    42  and limitations under the License.
    43  .
    44  On Debian systems, the complete text of the Apache license 2.0 can be found in
    45  /usr/share/common-licenses/Apache-2.0 file.
    46 
    47 Files: src/puppetcode/environments/gnuboat/modules/chrony
    48 Copyright: Michael Hampton
    49 License: GPL-3
    50  This program is free software; you can redistribute it
    51  and/or modify it under the terms of the GNU General Public
    52  License version 3 as published by the Free Software Foundation.
    53  .
    54  This program is distributed in the hope that it will be
    55  useful, but WITHOUT ANY WARRANTY; without even the implied
    56  warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
    57  PURPOSE.  See the GNU General Public License for more
    58  details.
    59  .
    60  You should have received a copy of the GNU General Public
    61  License along with this package; if not, write to the Free
    62  Software Foundation, Inc., 51 Franklin St, Fifth Floor,
    63  Boston, MA  02110-1301 USA
    64  .
    65  On Debian systems, the full text of the GNU General Public
    66  License version 3 can be found in the file
    67  `/usr/share/common-licenses/GPL-3'.
    68 
  • debian/gnuboat-webserver.lintian-overrides

    r8fd7454 rc810990  
    1 # mbtiles files are SQLite databases and they must be executable by the webserver to be used by PHP SQLite
    2 gnuboat-webserver binary: executable-not-elf-or-script usr/share/gnuboat/webservice/maps/000-forggensee.mbtiles
     1gnuboat-webserver binary: executable-not-elf-or-script usr/share/gnuboat/webservice/map.mbtiles
  • setup.py

    r8fd7454 rc810990  
    2626setup(
    2727  name="gnuboat",
    28   version="0.4.8",
     28  version="0.4.6",
    2929  maintainer="EngSaS - Langenbach",
    3030  maintainer_email="info@engsas.de",
    … …  
    3232  license="GNU General Public License v3 or later (GPLv3+)",
    3333  keywords="",
    34   url="http://trac.engsas.de/gnuboat",
     34  url="http://trac.falaba.de/gnuboat",
    3535  package_dir={'': 'src/python'},
    3636  packages=find_packages("src/python"),
    37   scripts=["src/python/bin/gnuboat", "src/python/bin/gnuboat-splashscreen", "src/python/bin/gnuboat-log-converter", "src/python/bin/gnuboat-data-generator"],
     37  scripts=["src/python/bin/gnuboat", "src/python/bin/gnuboat-splashscreen"],
    3838  long_description=README_TEXT,
    3939  install_requires=[
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/abs_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/anchor_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/any2array_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/base64_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/bool2num_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/build_csv.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/capitalize_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/ceiling_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/chomp_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/chop_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/clamp_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/concat_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/count_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/deep_merge_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/defined_with_params_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/delete_at_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/delete_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/delete_undef_values_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/delete_values_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/difference_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/dirname_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/downcase_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/empty_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/ensure_resource_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/flatten_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/floor_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/fqdn_rotate_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/get_module_path_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/getparam_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/getvar_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/grep_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/has_interface_with_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/has_ip_address_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/has_ip_network_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/has_key_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/hash_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/intersection_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/is_array_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/is_bool_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/is_domain_name_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/is_float_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/is_function_available_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/is_hash_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/is_integer_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/is_ip_address_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/is_ipv4_address_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/is_ipv6_address_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/is_mac_address_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/is_numeric_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/is_string_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/join_keys_to_values_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/join_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/keys_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/lstrip_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/max_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/member_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/merge_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/min_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/num2bool_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/parsejson_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/parseyaml_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/pick_default_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/pick_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/prefix_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/range_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/reject_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/reverse_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/rstrip_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/shuffle_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/size_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/sort_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/squeeze_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/str2bool_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/str2saltedsha512_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/strftime_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/strip_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/suffix_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/swapcase_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/time_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/to_bytes_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/try_get_value_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/type_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/union_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/unique_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/upcase_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/uriescape_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/validate_absolute_path_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/validate_array_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/validate_augeas_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/validate_bool_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/validate_cmd_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/validate_hash_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/validate_ipv4_address_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/validate_ipv6_address_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/validate_re_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/validate_slength_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/validate_string_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/values_at_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/values_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/zip_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/abs_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/any2array_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/any2bool_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/assert_private_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/base64_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/basename_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/bool2num_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/bool2str_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/camelcase_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/capitalize_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/ceiling_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/chomp_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/chop_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/concat_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/count_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/deep_merge_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/defined_with_params_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/delete_at_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/delete_regex_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/delete_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/delete_undef_values_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/delete_values_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/difference_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/dirname_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/downcase_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/empty_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/ensure_packages_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/ensure_resource_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/flatten_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/floor_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/fqdn_rotate_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/get_module_path_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/getparam_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/getvar_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/glob_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/grep_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/has_interface_with_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/has_ip_address_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/has_ip_network_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/has_key_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/hash_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/intersection_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/is_array_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/is_bool_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/is_domain_name_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/is_email_address_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/is_float_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/is_function_available.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/is_hash_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/is_integer_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/is_ip_address_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/is_mac_address_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/is_numeric_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/is_string_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/join_keys_to_values_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/join_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/keys_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/length.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/load_module_metadata_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/loadyaml_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/lstrip_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/max_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/member_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/merge_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/min_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/num2bool_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/parsejson_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/parseyaml_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/pick_default_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/pick_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/prefix_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/range_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/reject_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/reverse_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/rstrip_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/shuffle_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/size_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/sort_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/squeeze_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/str2bool_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/str2saltedsha512_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/strftime_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/strip_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/suffix_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/swapcase_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/time_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/to_bytes_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/type_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/union_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/unique_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/upcase_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/uriescape_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/validate_absolute_path_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/validate_array_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/validate_augeas_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/validate_bool_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/validate_cmd_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/validate_hash_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/validate_integer_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/validate_ipv4_address_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/validate_ipv6_address_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/validate_numeric_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/validate_re_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/validate_slength_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/validate_string_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/validate_x509_rsa_key_pair_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/values_at_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/values_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/zip_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/monkey_patches/alias_should_to_must.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/monkey_patches/publicize_methods.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/spec_helper.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/spec_helper_acceptance.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/unit/facter/facter_dot_d_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/unit/facter/pe_version_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/unit/facter/root_home_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/unit/facter/util/puppet_settings_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/unit/puppet/provider/file_line/ruby_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/unit/puppet/type/anchor_spec.rb

    • Property mode changed from 100644 to 100755
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/unit/puppet/type/file_line_spec.rb

    • Property mode changed from 100644 to 100755
  • src/python/bin/gnuboat

    r8fd7454 rc810990  
    2727from pytz import timezone
    2828import pytz
    29 import argparse
     29import getopt
    3030import sys
    3131import pynmea2
    32 import traceback
    33 import math
    3432
    3533from gnuboat import daemon
    … …  
    4543logdir = "/var/log/gnuboat"
    4644logperiod = 2
    47 logverbose = False
    48 logsystemtime = False
    4945displayperiod = 5
    5046
    … …  
    5248nmeafile = None
    5349nmeaFileDate = None
     50
     51
     52def rraRows(duration, resolution, step):
     53    return int(round(float(duration) / rraSteps(resolution, float(step)) / float(step)))
     54
     55
     56def rraSteps(resolution, step):
     57    return int(round(float(resolution) / float(step)))
     58
     59
     60def createDatabase(databaseFile):
     61    rrdDataSources = ['DS:latitude:GAUGE:15:-90:90',
     62                      'DS:longitude:GAUGE:15:-180:180',
     63                      'DS:speedthroughwater:GAUGE:15:U:U',
     64                      'DS:speedoverground:GAUGE:15:U:U',
     65                      'DS:waterdepth:GAUGE:15:0:10000',
     66                      'DS:watertemperature:GAUGE:15:-10:50',
     67                      'DS:gpsfix:GAUGE:15:-999:3']
     68
     69    step = logperiod
     70    # durations: each archive should contain values for in seconds
     71    archives = [
     72        {"duration": 240, "resolution": 2},
     73        {"duration": 3600, "resolution": 10},
     74        {"duration": 86400, "resolution": 60},
     75    ]
     76    rrdArchives = []
     77    for i in range(0, len(archives)):
     78        rrdArchives += ['RRA:AVERAGE:0.5:%d:%d' % (rraSteps(archives[i]["resolution"], step), rraRows(
     79            archives[i]["duration"], archives[i]["resolution"], step))]
     80
     81    if not os.path.isfile(databaseFile):
     82        rrdtool.create(databaseFile,
     83                       "--start",
     84                       "N",
     85                       "--step",
     86                       str(step),
     87                       rrdDataSources,
     88                       rrdArchives)
    5489
    5590
    … …  
    69104            os.system("sudo shutdown -h now")
    70105
     106
     107def usage():
     108    print "Usage of gnuboat daemon:"
     109    print "  gnuboat -r PATH_TO_RRD_DATABAE_FILE -s PATH_TO_SHUTDOWN_REQUEST_FILE [-l [LOG_UPDATE_PERIOD] [-d DISPLAY_UPDATE_PERIOD] [-o PATH_TO_NMEA1983_LOG]"
     110    print ""
     111    print "  -h --help              Display this help"
     112    print "  -r --rrdfile           Path to the rrd database used by the webservice to serve the clients"
     113    print "  -s --shutdownfile      Path to the shutdown request file, used by the webservice to request a shutdown of the system running gnuboat"
     114    print "  -l --logperiod         Time in seconds to update the logs"
     115    print "  -d --displayperiod     Timein seconds to update the display"
     116    print "  -o --output            Directory where the log files are stored (e.g. the NMEA0183 log files)"
     117
    71118def log(gpsFix, gpsTime, gpsStatus, latitude, latitudeDirection, longitude,
    72         longitudeDirection, courseOverGround, speedOverGround, waterDepth, waterTemperature, transducerValid, logVerbose, logSystemTime):
     119        longitudeDirection, courseOverGround, speedOverGround, waterDepth, waterDepthValid):
    73120    global logdir
    74121    global nmeafile
    75122    global nmeaFileDate
    76 
     123   
    77124    # Only log, if we have a gps fix
    78125    if gpsFix < 2:
    79         if not logVerbose:
    80             return
    81         gpsStatus = 'V'
    82         mode = 'N'
    83         if gpsTime is None:
    84             gpsTime = datetime.datetime.utcnow()
     126        return
    85127   
    86128    nmeaFileDateShould = datetime.datetime.utcnow().strftime("%Y-%m-%d")
    … …  
    91133        try:
    92134            nmeaFileDate = nmeaFileDateShould
    93             nmeaLogFile = 'nmea0183-{}.log'.format(nmeaFileDate)
    94             nmeafile = open('{}/{}'.format(logdir, nmeaLogFile), 'a', 0)
     135            nmeaLogFile = "nmea0183-%s.log" % nmeaFileDate
     136            nmeafile = open("%s/%s" % (logdir, nmeaLogFile), 'a', 0)
    95137        except IOError as error:
    96             print('Could not open the logfile: {}'.format(error))
     138            print "Could not open the logfile: %s" % error
    97139            sys.exit(2)
    98 
    99     latitude = degreesDecimalToNmea(latitude)
    100     longitude = degreesDecimalToNmea(longitude)
    101 
    102     logsystemtime = ""
    103     if logsystemtime:
    104         logsystemtime = '{}: '.format(datetime.datetime.utcnow().strftime("%Y-%m-%d %H:%M:%S"))
    105        
    106     try:
    107         nmeafile.write('{}{}\r\n'.format(logsystemtime, str(pynmea2.RMC('GN', 'RMC',
    108                                                      (gpsTime.strftime("%H%M%S"), gpsStatus,
    109                                                      '{:02d}{:07.4f}'.format(latitude['degrees'], latitude['minutes']),
    110                                                      latitudeDirection,
    111                                                      '{:03d}{:07.4f}'.format(longitude['degrees'], longitude['minutes']),
    112                                                      longitudeDirection,
    113                                                      '{:04.1f}'.format(speedOverGround), '{:04.1f}'.format(courseOverGround),
    114                                                      gpsTime.strftime("%d%m%y"), '', '', mode)))))
    115         if transducerValid:
    116             nmeafile.write('{}{}\r\n'.format(logsystemtime, str(pynmea2.DPT('SD', 'DPT', ('{:05.2f}'.format(waterDepth), '00.00')))))
    117             nmeafile.write('{}{}\r\n'.format(logsystemtime, str(pynmea2.MTW('YX', 'MTW', ('{:04.1f}'.format(waterTemperature), 'C')))))
    118     except:
    119         print('Failed writing to logfile {}'.format(nmeaLogFile))
    120         print(traceback.format_exc())
    121 
    122 def degreesDecimalToNmea(decimalDegrees):
    123     degrees = int(math.floor(decimalDegrees))
    124     minutes = 60.0 * (decimalDegrees - degrees)
    125     return { 'degrees': degrees, 'minutes': minutes}
     140               
     141    nmeafile.write("%s\r\n" % str(pynmea2.RMC('GN', 'RMC',
     142                                              (gpsTime.strftime("%H%M%S"), gpsStatus, '$%04.3f' % latitude,
     143                                               latitudeDirection, '$%05.3f' % longitude, longitudeDirection,
     144                                               '$%02.1f' % speedOverGround, '$%02.1f' % courseOverGround,
     145                                               gpsTime.strftime("%d%m%y"), '', '', mode))))
     146    if waterDepthValid:
     147        nmeafile.write("%s\r\n" % str(pynmea2.DPT('SD', 'DPT', ('%02.2f' % waterDepth, '00.00'))))
    126148
    127149def main(argv):
    … …  
    129151    global shutdownfile
    130152    global logperiod
    131     global logverbose
    132     global logsystemtime
    133153    global displayperiod
    134154    global logdir
    135155    global nmeafile
    136156
    137     parser = argparse.ArgumentParser(description='Collects the data from canboat and gpsd and writes them to the rrd database and the nmea log file')
    138     parser.add_argument('-r', '--rrdfile', dest='rrd_file', metavar='rrd_file', type=str,
    139                         help='Path to the rrd database used by the webservice to serve the clients', default=rrdfile)
    140     parser.add_argument('-s', '--shutdownfile', dest='shutdown_file', metavar='shutdown_file', type=str,
    141                         help='Path to the shutdown request file, used by the webservice to request a shutdown of the system running gnuboat', default=shutdownfile)
    142     parser.add_argument('-lp', '--logperiod', dest='log_period', metavar='log_period', type=int,
    143                         help='Time in seconds to update the logs', default=logperiod)
    144     parser.add_argument('-lv', '--log-verbose', action='store_true', dest='log_verbose',
    145                         help='Log verbose information to nmea log file (Enables -ls and adds RMC sentences, with invalid GPS state, on non fixes (Default off)')
    146     parser.add_argument('-ls', '--log-system-time', action='store_true', dest='log_system_time',
    147                         help='Add to enable prefixing every logline with the system time (Default off)')
    148     parser.add_argument('-d', '--displayperiod', dest='display_period', metavar='display_period', type=int,
    149                         help='Time in seconds to update the display', default=displayperiod)
    150     parser.add_argument('-o', '--output', dest='output', metavar='output', type=str,
    151                         help='Directory where the log files are stored (e.g. the NMEA0183 log files)', default=logdir)
    152     arguments = parser.parse_args(argv)
    153    
    154     if arguments.rrd_file is not None:
    155         rrdfile = arguments.rrd_file
    156     if arguments.shutdown_file is not None:
    157         shutdownfile = arguments.shutdown_file
    158     if arguments.log_period is not None:
    159         logperiod = arguments.log_period   
    160     if arguments.log_verbose is not None:
    161         logverbose = arguments.log_verbose
    162         logsystemtime = True
    163     if arguments.log_system_time is not None and arguments.log_verbose is None:
    164         logsystemtime = arguments.log_system_time
    165     if arguments.display_period is not None:
    166         displayperiod = arguments.display_period
    167     if arguments.output is not None:
    168         logdir = arguments.output
     157    try:
     158        opts, args = getopt.getopt(argv, "hr:s:l:d:o:", [
     159                                   "help", "rrdfile=", "shutdownfile=", "logperiod=", "displayperiod=", "output="])
     160    except getopt.GetoptError:
     161        usage()
     162        sys.exit(2)
     163
     164    for option, argument in opts:
     165        if option == ("-h", "--help"):
     166            usage()
     167            sys.exit()
     168        elif option in ("-r", "--rrdfile"):
     169            rrdfile = argument
     170        elif option in ("-s", "--shutdownfile"):
     171            shutdownfile = argument
     172        elif option in ("-l", "--logperiod"):
     173            logperiod = argument
     174        elif option in ("-d", "--displayperiod"):
     175            displayperiod = argument
     176        elif option in ("-o", "--output"):
     177            logdir = argument
     178        else:
     179            assert False, "unhandled option"
    169180
    170181    if not os.path.exists(os.path.dirname(rrdfile)):
    171         print('rrd database directory not found {}'.format(os.path.dirname(rrdfile)))
    172         parser.print_help()
     182        print "rrd database directory not found %s" % os.path.dirname(rrdfile)
     183        print ""
     184        usage()
    173185        sys.exit(2)
    174186
    175187    if not os.path.exists(os.path.dirname(shutdownfile)):
    176         print('Shutdown request directory not found {}'.format(os.path.dirname(shutdownfile)))
    177         parser.print_help()
     188        print "Shutdown request directory not found %s" % os.path.dirname(shutdownfile)
     189        print ""
     190        usage()
    178191        sys.exit(2)
    179192
    180193    if logperiod < 1:
    181         print('Log period must be >= 1')
    182         parser.print_help()
     194        print "Log period must be >= 1"
     195        print ""
     196        usage()
    183197        sys.exit(2)
    184198
    185199    if displayperiod < 1 or displayperiod < logperiod:
    186         print('Display period must be >= 1 and could not be faster than log period')
    187         parser.print_help()
    188         sys.exit(2)
    189 
    190     daemon.rrd_create_database(rrdfile, logperiod)
    191 
    192     if os.path.isfile(shutdownfile):
    193         os.remove(shutdownfile)
     200        print "Display period must be >= 1 and could not be faster than log period"
     201        print ""
     202        usage()
     203        sys.exit(2)
     204
     205    createDatabase(rrdfile)
    194206
    195207    displayHandler = daemon.DisplayHandler(displayperiod)
    … …  
    208220            speedThroughWater = n2kd.speedThroughWater()
    209221            speedOverGround = gpsp.speedOverGround()
    210             courseOverGround = gpsp.courseOverGround()
    211222            waterDepth = n2kd.waterDepth()
    212223            waterTemperature = n2kd.waterTemperature()
    … …  
    214225
    215226            # update rrd database for the webservice
    216             daemon.rrd_update(rrdfile, 'N:{}:{}:{}:{}:{}:{}:{}:{}'.format(
    217                 latitude, longitude, speedThroughWater, speedOverGround, courseOverGround, waterDepth, waterTemperature, gpsFix))
     227            rrdtool.update(rrdfile, "N:%s:%s:%s:%s:%s:%s:%s" % (
     228                latitude, longitude, speedThroughWater, speedOverGround, waterDepth, waterTemperature, gpsFix))
    218229
    219230            # append to log
    220231            log(gpsFix, gpsp.timeUtc(), gpsp.status(), latitude, gpsp.latitudeDirection(),
    221                 longitude, gpsp.longitudeDirection(), courseOverGround, speedOverGround,
    222                 waterDepth, waterTemperature, n2kd.waterDepthValid(), logverbose, logsystemtime)
     232                longitude, gpsp.longitudeDirection(), gpsp.courseOverGround(), speedOverGround,
     233                waterDepth, n2kd.waterDepthValid())
    223234           
    224235            # display data
    225236            displayHandler.setValues(
    226                 speedThroughWater, speedOverGround, courseOverGround, waterDepth, waterTemperature, gpsFix)
     237                speedThroughWater, speedOverGround, waterDepth, waterTemperature, gpsFix)
    227238
    228239            # check for shutdown request
  • src/python/bin/gnuboat-splashscreen

    r8fd7454 rc810990  
    3939
    4040def usage():
    41     print("Usage of gnuboat-splashscreen:")
    42     print("  gnuboat-splashscreen [-h] -i PATH_TO_IMAGE_TO_DISPLAY")
    43     print("")
    44     print("  -h --help    Print this help")
    45     print("  -i --image   Path to the image, which should be displayed")
     41    print "Usage of gnuboat-splashscreen:"
     42    print "  gnuboat-splashscreen [-h] -i PATH_TO_IMAGE_TO_DISPLAY"
     43    print ""
     44    print "  -h --help    Print this help"
     45    print "  -i --image   Path to the image, which should be displayed"
    4646    sys.exit()
    4747
    … …  
    6565
    6666    if not os.path.exists(image):
    67         print("Image {} not found".format(image))
     67        print "Image %s not found" % image
     68        print ""
    6869        usage()
    6970        sys.exit(2)
    7071
    7172    if not epdEnabled:
    72         print("Could not initialize EPD or PIL python packages")
     73        print "Could not initialize EPD or PIL python packages"
    7374        sys.exit(2)
    7475
  • src/python/gnuboat/__init__.py

    r8fd7454 rc810990  
    1919from daemon.gpsdpoller import GpsdPoller
    2020from daemon.n2kdpoller import N2kdPoller
    21 from daemon.rrdhandler import rrd_create_database
    22 from daemon.rrdhandler import rrd_update
  • src/python/gnuboat/daemon/__init__.py

    r8fd7454 rc810990  
    2020from .gpsdpoller import GpsdPoller
    2121from .n2kdpoller import N2kdPoller
    22 from .rrdhandler import rrd_create_database
    23 from .rrdhandler import rrd_update
    2422
    25 __all__ = ["displayhandler", "gpsdpoller", "n2kdpoller", "rrd_create_database", "rrd_update"]
     23__all__ = ["displayhandler", "gpsdpoller", "n2kdpoller"]
  • src/python/gnuboat/daemon/displayhandler.py

    r8fd7454 rc810990  
    4747        self._speedThroughWater = None
    4848        self._speedOverGround = None
    49         self._courseOverGround = None
    5049        self._waterDepth = None
    5150        self._waterTemperature = None
    … …  
    5857        self._speedOverGround = speed
    5958
    60     def setCourseOverGround(self, course):
    61         self._courseOverGround = course
    62 
    6359    def setWaterDepth(self, depth):
    6460        self._waterDepth = depth
    … …  
    7066        self._gpsFix = fix
    7167
    72     def setValues(self, speedThroughWater, speedOverGround, courseOverGround, waterDepth, waterTemperature, gpsFix):
     68    def setValues(self, speedThroughWater, speedOverGround, waterDepth, waterTemperature, gpsFix):
    7369        self.setSpeedThroughWater(speedThroughWater)
    7470        self.setSpeedOverGround(speedOverGround)
    75         self.setCourseOverGround(courseOverGround)
    7671        self.setWaterDepth(waterDepth)
    7772        self.setWaterTemperature(waterTemperature)
    … …  
    8681        try:
    8782            while self._running:
    88                 self.displayValues(self._epd, self._speedThroughWater, self._speedOverGround, self._courseOverGround,
     83                self.displayValues(self._epd, self._speedThroughWater, self._speedOverGround,
    8984                                   self._waterDepth, self._waterTemperature, self._gpsFix)
    9085                time.sleep(self._updatePeriod)
    … …  
    9287            pass
    9388
    94     def displayValues(self, epd, speedThroughWater, speedOverGround, courseOverGround, waterDepth, waterTemperature, gpsFix):
     89    def displayValues(epd, speedThroughWater, speedOverGround, waterDepth, waterTemperature, gpsFix):
    9590        if not epdEnabled:
    9691            return
  • src/python/gnuboat/daemon/gpsdpoller.py

    r8fd7454 rc810990  
    2222import datetime
    2323import gps
    24 import traceback
    2524
    2625# Copied from https://gist.github.com/wolfg1969/4653340
    … …  
    3130    def __init__(self, logperiod):
    3231        threading.Thread.__init__(self)
    33         self._session = None
    34         self._session = None
     32        try:
     33            self._session = gps.gps(mode=gps.WATCH_ENABLE)
     34        except:
     35            self._session = None
     36            self._running = False
     37            return
    3538        self._currentValue = None
    3639        self._running = True
    … …  
    3841
    3942    def latitude(self):
    40         if self._currentValue is None or self.gpsFix() < 2 or 'lat' not in self._currentValue:
     43        if self._session == None or self.gpsFix() < 2:
    4144            return 0
    42         return self._currentValue.lat
     45        return self._session.fix.latitude
    4346
    4447    def latitudeDirection(self):
    45         return 'N'
     48        return "N"
    4649
    4750    def longitude(self):
    48         if self._currentValue is None or self.gpsFix() < 2 or 'lon' not in self._currentValue:
     51        if self._session == None or self.gpsFix() < 2:
    4952            return 0
    50         return self._currentValue.lon
     53        return self._session.fix.longitude
    5154
    5255    def longitudeDirection(self):
    53         return 'E'
     56        return "E"
    5457
    5558    def speedOverGround(self):
    56         if self._currentValue is None or self.gpsFix() < 2 or 'speed' not in self._currentValue:
     59        if self._session == None or self.gpsFix() < 2:
    5760            return 0
    58         return self._currentValue.speed
     61        return self._session.fix.speed
    5962
    6063    def courseOverGround(self):
    61         if self._currentValue is None or self.gpsFix() < 2 or 'track' not in self._currentValue:
     64        if self._session == None or self.gpsFix() < 2:
    6265            return 0
    63         return self._currentValue.track
     66        return self._session.fix.track
    6467
    6568    def gpsFix(self):
    66         if self._currentValue is None or 'mode' not in self._currentValue:
     69        if self._session == None:
    6770            return 0
    68         return self._currentValue.mode
     71        return self._session.fix.mode
    6972
    7073    def status(self):
    71         if self._currentValue is None or self.gpsFix() < 2:
    72             return 'V'
    73         return 'A'
     74        if self._session == None or self.gpsFix() < 2:
     75            return "V"
     76        return "A"
    7477
    7578    def timeUtc(self):
    76         if self._currentValue is None or self.gpsFix() < 2 or 'time' not in self._currentValue:
     79        if self._session == None or self.gpsFix() < 2:
    7780            return None
    78         currentTime = self._currentValue.time
     81        currentTime = self._session.fix.time
    7982        if isinstance(currentTime, float):
    8083            return datetime.datetime.fromtimestamp(currentTime)
    81         return dateutil.parser.parse(currentTime)
     84        return dateutil.parser.parse(self._session.fix.time)
    8285
    8386    def stop(self):
    … …  
    8790        try:
    8891            while self._running:
    89                 try:
    90                     if self._session is None:
    91                         self._session = gps.gps(mode=gps.WATCH_ENABLE)
    92                     current_value = self._session.next()
    93                     # only update current value, if we got an epX entry
    94                     # dop entries are ignored right now
    95                     if 'mode' in current_value:
    96                         self._currentValue = current_value
    97                 except StopIteration:
    98                     break
    99                 except:
    100                     print('Failed to read gpsd data')
    101                     print(traceback.format_exc())
    102                     self._currentValue = None
    103                     self._session = None
     92                self._currentValue = self._session.next()
     93                time.sleep(float(self._logperiod) / 2.0)
    10494        except StopIteration:
    10595            pass
  • src/python/gnuboat/daemon/n2kdpoller.py

    r8fd7454 rc810990  
    2121import socket
    2222import json
    23 import traceback
    2423
    2524"""@class N2kdPoller
    … …  
    6968        except socket.error as error:
    7069            if not self._connectErrorPrinted:
    71                 print('Failed to connect to n2kd server at {}:{}: {}'.format(self._serverHost, self._serverPort, error))
     70                print "Failed to connect to n2kd server at %s:%s: %s" % (self._serverHost, self._serverPort, error)
    7271                self._connectErrorPrinted = True
    7372            self._waterDepthValid = False
    7473            return
    7574        if self._connectErrorPrinted:
    76             print('Connected to n2kd server at {}:{}'.format(self._serverHost, self._serverPort))
     75            print "Connected to n2kd server at %s:%s" % (self._serverHost, self._serverPort)
    7776            self._connectErrorPrinted = False
    7877
    7978        response = ""
    8079        while 1:
    81             try:
    82                 data = n2kdSocket.recv(1024)
    83             except:
    84                 print('Failed to update n2kd data')
    85                 print(traceback.format_exc())
    86                 self._waterDepthValid = False
     80            data = n2kdSocket.recv(1024)
    8781            if not data:
    8882                break
    … …  
    9286            data = json.loads(response)
    9387        except ValueError as error:
    94             print('Failed to decode json: {}'.format(error))
     88            print "Failed to decode json: %s" % error
    9589
    9690        descriptions = [
    … …  
    10094            entryKeys = data[key].keys()
    10195            if len(entryKeys) != 2:
    102                 print('Malformed json n2kd response? {}'.format(response))
     96                print "Malformed json n2kd response? %s" % response
    10397            else:
    10498                if data[key]["description"] in descriptions:
    … …  
    106100                    lineKeys = data[key][entryKey].keys()
    107101                    if "fields" not in lineKeys:
    108                         print('No fields entry. Malformed json n2kd response in {}'.format(data[key][entryKey]))
     102                        print "No fields entry. Malformed json n2kd response in %s" % data[key][entryKey]
    109103                    else:
    110104                        fields = data[key][entryKey]["fields"]
    … …  
    116110                        # try speed
    117111                        if "Speed Water Referenced" in fields:
    118                             self._speedThroughWater = fields["Speed Water Referenced"]
     112                            self._speedThroughWater = fields[
     113                                "Speed Water Referenced"]
    119114                        # try sea temperature
    120115                        if "Temperature Source" in fields and "Temperature" in fields:
    … …  
    128123
    129124    def _serverUrl(self):
    130         return 'http://{}:{:d}/'.format(self._serverHost, self._serverPort)
     125        return "http://%s:%d/" % (self._serverHost, self._serverPort)
    131126
    132127    def stop(self):
  • src/webapp/build.xml

    r8fd7454 rc810990  
    2828                        <exclude name="mbtiles/**"/>
    2929                        <exclude name="tests/**"/>
    30                         <exclude name="config/**"/>
    3130                </fileset>
    3231                <fileset dir="./webservice/mbtiles" id="filesWebserviceMaps">
    … …  
    4544
    4645
    47         <target name="dist" depends="buildwebservice,buildwebclient,test">
     46        <target name="dist" depends="buildwebservice,buildwebclient">
    4847                <echo msg="Creating archive"/>
    49                 <tar destfile="${builddir}/..//gnuboat-webapp.tar.gz" compression="gzip">
     48        <!--    <tar destfile="${builddir}/..//gnuboat-webapp.tar.gz" compression="gzip">
    5049                        <fileset refid="filesWebApp"/>
    51                 </tar>
     50                </tar>-->
    5251                <echo msg="Files copied and compressed in build directory weblcient.tar.gz OK!" />
    5352        </target>
    54 
    55         <target name="testdist" depends="buildwebservice,buildwebclient,test">
     53        <target name="testdist" depends="buildwebservice,buildwebclient">
    5654                <echo msg="Install project into ${user.home}/public_html/gnuboat"/>
    57                 <fileset id="filesConfig" dir="./webservice/config">
    58                         <include name="config.php"/>
    59                 </fileset>
    60                 <fileset id="filesLogs" dir="./webservice/tests/logs">
    61                         <include name="*.log"/>
    62                 </fileset>
    63        
    6455                <copy todir="${user.home}/public_html/gnuboat">
    6556                        <fileset refid="filesWebApp"/>
    6657                </copy>
    67                 <copy todir="${user.home}/public_html/gnuboat/webservice/tests/logs">
    68                         <fileset refid="filesLogs"/>
    69                 </copy>
    70                 <copy todir="${user.home}/public_html/gnuboat/webservice/config">
    71                         <fileset refid="filesConfig"/>
    72                 </copy>
    7358        </target>
    7459
    75         <target name="test">
    76                 <exec command="php phpunit-4.8.9.phar" passthru="true" checkreturn="true"/>
    77                 <!--<phpunit pharlocation="phpunit-4.8.9.phar" configuration="phpunit.xml" haltonfailure="true" haltonerror="true" printsummary="true" codecoverage="false">
    78                         <formatter type="plain" usefile="false"/> -->
    79                         <!--<formatter type="JUnit" usefile="true"/>-->
    80 <!--                    <batchtest>
    81                                 <fileset dir="webservice">
    82                                         <include name="tests/*Test.php"/>
    83                                 </fileset>
    84                         </batchtest>
    85                 </phpunit>-->
    86         </target>
     60        <!-- <phpunit bootstrap="webservice/inc/autoloader.php" pharlocation="phpunit-4.8.9.phar" haltonfailure="true" haltonerror="true" printsummary="true">
     61                <formatter type="plain" usefile="false"/>
     62                <batchtest>
     63                        <fileset dir="webservice">
     64                                <include name="tests/ServiceTest.php"/>
     65                        </fileset>
     66                </batchtest>
     67        </phpunit> -->
    8768</project>
  • src/webapp/webclient/index.html

    r8fd7454 rc810990  
    3030                <link rel="stylesheet" content="text/css" href="lib/css/pure/grids-responsive-min.css">
    3131                <!--<![endif]-->
    32                 <link rel="stylesheet" content="text/css" href="lib/css/leaflet/leaflet.css"/>
     32                <link rel="stylesheet" content="text/css" href="lib/css/leaflet.css"/>
    3333               
    34                 <script src="lib/js/jquery-3.2.1.min.js" type="text/javascript"></script>
     34                <script language="javascript" src="lib/js/jquery-3.2.1.min.js" type="text/javascript"></script>
    3535                <script src="lib/js/jquery.validate.min.js" type="text/javascript"></script>
    3636                <script src="lib/js/additional-methods.min.js" type="text/javascript"></script>
    37                 <script src="lib/js/leaflet.js" type="text/javascript"></script>
    38                 <script src="lib/js/leaflet.hotline.min.js" type="text/javascript"></script>
    39                 <script src="lib/js/three.min.js"></script>
    40                 <script src="lib/js/three.OrbitControls.js"></script>
     37                <script language="javascript\" src="lib/js/leaflet.js" type="text/javascript"></script>
    4138               
    42                 <link rel="stylesheet" href="css/GnuBoat.css" type="text/css"/>
     39                <link rel="stylesheet" href="css/main.css" type="text/css"/>
    4340                <link rel="stylesheet" href="css/side-menu.css" type="text/css"/>
    44                 <script language="javascript" src="js/GnuBoat.js" type="text/javascript"></script>
    45                 <script language="javascript" type="text/javascript">
    46                         var active = 'active';
    47                         var layout = null;
    48                         var menu = null;
    49                         var menuLink = null;
    50                         var content = null;
    51 
    52                         function toggleAll() {
    53                                 layout.toggleClass(active);
    54                                 menu.toggleClass(active);
    55                                 menuLink.toggleClass(active);
    56                         }
    57 
    58                         $(document).ready(function () {
    59                                 layout   = $("#layout");
    60                                 menu     = $("#menu");
    61                                 menuLink = $("#menuLink");
    62                                 content  = $("#main");
    63 
    64                                 menuLink.click(function () {
    65                                         toggleAll();
    66                                 });
    67 
    68                                 content.click(function() {
    69                                         if (menu.hasClass(active)) {
    70                                                 toggleAll();
    71                                         }
    72                                 });
    73 
    74                                 GnuBoat.initialize();
    75                                 GnuBoat.setServer("../webservice");
    76                                 GnuBoat.start();
    77                         });
    78                 </script>
     41                <script language="javascript" src="js/side-menu.js" type="text/javascript"></script>
     42                <script language="javascript" src="js/main.js" type="text/javascript"></script>
    7943        </head>
    8044        <body>
    … …  
    8751                                                <li class="pure-menu-item"><a class="pure-menu-link" href="#display">Display</a></li>
    8852                                                <li class="pure-menu-item"><a class="pure-menu-link" href="#map">Map</a></li>
    89                                                 <li class="pure-menu-item"><a class="pure-menu-link" href="#rendering">3D Rendering</a></li>
    9053                                                <li class="pure-menu-item"><a class="pure-menu-link" href="#logfiles">Logfiles</a></li>
    91                                                 <li class="pure-menu-item"><a class="pure-menu-link" href="#opencpn">OpenCPN</a></li>
    9254                                                <li class="pure-menu-item"><button type="button" class="pure-button shutdown-button" id="shutdownButton">SHUTDOWN</button></li>
    9355                                        </ul>
    … …  
    12991                                                <div class="pure-u-1 pure-u-md-1-2 pure-u-lg-1-2">
    13092                                                        <div id="shutdown" class="l-box">
    131                                                                 <a name="messages"></a>
    132                                                                 <p id="message"/>
     93                                                                <a name="shutdown"></a>
     94                                                                <p id="shutdownMessage"/>
    13395<!--                                                            <button type="button" class="pure-button shutdown-button" id="shutdownButton">SHUTDOWN</button> -->
    13496                                                        </div>
    … …  
    139101                                        <div id="map">
    140102                                                <a name="map"></a>
    141                                                 <form id="mapSelectForm" class="pure-form pure-form-aligned">
    142                                                         <div class="pure-control-group">
    143                                                                 <label for="mapModusSelect">Map Modus:</label>
    144                                                                 <select id="mapModusSelect" size="1" class="pure-input-1-2"></select>
    145                                                         </div>
    146                                                         <div class="pure-control-group">
    147                                                                 <label for="mapSelect">Map Selection:</label>
    148                                                                 <select id="mapSelect" size="1" class="pure-input-1-2"></select>
    149                                                         </div>
    150                                                 </form>
    151                                                 <div class="pure-g">
    152                                                         <div class="pure-u-1 pure-u-md-4-5 pure-u-lg-4-5">
    153                                                                 <div id="mapViewport" class="viewportGeometry"></div>
    154                                                         </div>
    155                                                         <div class="pure-u-1 pure-u-md-1-5 pure-u-lg-1-5">
    156                                                                 <div id="mapLegend"></div>
    157                                                         </div>
    158                                                 </div>
     103                                                <form id="mapSelectForm" class="pure-form"><select id="mapSelect" class="pure-input-1" size="1"></select></form>
     104                                                <div id="mapViewport"></div>
    159105                                        </div>
    160106                                        <form id="mapTileUpload" class="pure-form pure-form-aligned" enctype="multipart/form-data">
    … …  
    172118                                                </fieldset>
    173119                                        </form>
    174 
    175                                         <h2 class="content-subhead">3D Rendering of Water Depth</h2>
    176                                         <div>
    177                                                 <a name="rendering"></a>
    178                                                 <form id="renderForm" class="pure-form">
    179                                                         <label>Scale Depth Axis:</label><input id="renderScaleZ" type="range" name="renderScaleZ" min="0.5" max="1000" step="1" value="10" class="pure-input-1">
    180                                                 </form>
    181                                                 <div id="rendering" class="viewportGeometry"></div>
    182                                         </div>
    183 
     120                                                                       
    184121                                        <h2 class="content-subhead">
    185122                                                Logfiles
    … …  
    190127                                                <form id="logfilesForm" class="pure-form" method="POST" action="../webservice/?request=logfiles"></form>
    191128                                        </div>
    192                                        
    193                                         <h2 class="content-subhead">OpenCPN</h2>
    194                                         <div>
    195                                                 <a name="opencpn"></a>
    196                                                 <div id="opencpnHint"></div>
    197                                         </div>
    198129                                </div>
    199130                        </div>
  • src/webapp/webservice/inc/GnuBoat/Config.php

    r8fd7454 rc810990  
    2626        public function __construct()
    2727        {
    28                 $configFile = __DIR__ ."/../../config/config.php";
     28                $configFile = __DIR__ ."/../config/config.php";
    2929                if(file_exists($configFile)){
    3030                        include($configFile);
    … …  
    5151        {
    5252                if(array_key_exists("datadirectory", $this->_config))
    53                         return $this->addTrailingSlash($this->_config["datadirectory"]);
     53                        return addTrailingSlash($this->_config["datadirectory"]);
    5454                return "/var/lib/gnuboat/";
    5555        }
    … …  
    5858        {
    5959                if(array_key_exists("logdirectory", $this->_config))
    60                         return $this->addTrailingSlash($this->_config["logdirectory"]);
     60                        return addTrailingSlash($this->_config["logdirectory"]);
    6161                return "/var/log/gnuboat/";
    6262        }
  • src/webapp/webservice/inc/GnuBoat/Service.php

    r8fd7454 rc810990  
    4444                $this->process();
    4545        }
    46        
    47         public static function errorStatic($message, $additionalContent = array(), $debug)
    48         {
    49                 error_log($message);
    50                 if($debug > 0)
    51                         print $message ."\n";
    52                 $result = ["error" => 1, "errormessage" => $message];
    53                 Service::outputStatic(array_merge($result, $additionalContent), $debug);
    54         }
    55        
    56         public static function outputStatic($content, $debug)
    57         {
    58                 header('Content-Type: application/json');
    59                 if($debug > 0){
    60                         echo json_encode($content,  JSON_PRETTY_PRINT) ."\n";
    61                 }
    62                 else{
    63                         echo json_encode($content) ."\n";
    64                 }
    65         }
    66        
    67         protected function error($message, $additionalContent = array())
    68         {
    69                 Service::errorStatic($message, $additionalContent, $this->debug());
    70         }
    71        
    72         protected function output($content)
    73         {
    74                 Service::outputStatic($content, $this->debug());
    75         }
    7646
    7747        /**
  • src/webapp/webservice/inc/GnuBoat/ServiceData.php

    r8fd7454 rc810990  
    2929                $this->_configRound = array
    3030                (
    31                         "latitude" => 4,
    32                         "longitude" => 4,
     31                        "latitude" => 5,
     32                        "longitude" => 5,
    3333                        "speedthroughwater" => 1,
    3434                        "speedoverground" => 1,
    35                         "courseoverground" => 1,
    3635                        "waterdepth" => 1,
    3736                        "watertemperature" => 1,
    … …  
    4948                $result["track"] = array();
    5049
    51                 if(!file_exists($dbFile))
    52                         return $this->error("Database file ". $dbFile ." does not exist");
    53 
     50                if(!file_exists($dbFile)){
     51                        echo json_encode("");
     52                        if($debug > 0)
     53                                echo "Database file ". $dbFile ." does not exist!";
     54                        error_log("Database file ". $dbFile ." does not exist");
     55                        exit;
     56                }
    5457                // Fetch entries of the last 30s with maximum (available) resolution of 2s
    5558                $this->addRrdData($dbFile, "2", "240", $result, $lastValid);
    56                 if($lastValid !== false){
    57                         $result["lastvalid"] = $lastValid->toArray();
     59                if($lastValid){
     60                        $result["lastvalid"] = $lastValid;
    5861                }
    5962                // Fetch entries of the last 1h with maximum (available) resolution of 10s
    … …  
    6265                $this->addRrdData($dbFile, "60", "86400", $result, $lastTime);
    6366
    64                 return $this->output($result);
     67                if($debug > 0){
     68                        echo json_encode($result,  JSON_PRETTY_PRINT) ."\n";
     69                }
     70                else{
     71                        header('Content-Type: application/json');
     72                        echo json_encode($result) ."\n";
     73                }
    6574        }
    6675
    … …  
    7382                $data = rrd_fetch($dbFile, array("AVERAGE", "--resolution", $interval, "--start", $startTime, "--end", $endTime));
    7483                // $data = rrd_fetch($dbFile, array("AVERAGE", "--resolution", $interval, "--start", "-". $period, "--end", "start+". $period, "--align-start"));
    75                 if($data === false)
    76                         return $this->error("Failure reading rrd database ". $dbFile .": ". rrd_error(), $result);
     84                if($data === false){
     85                        echo json_encode($result);
     86                        $message = "Failure reading rrd database ". $dbFile .": ". rrd_error();
     87                        if($debug > 0)
     88                                echo $message;
     89                        else
     90                                error_log($message);
     91                        return;
     92                }
    7793
    7894                if($debug > 2){
     95                        echo "<pre>";
    7996                        var_dump($data);
     97                        echo "</pre>";
    8098                }
    8199
    … …  
    84102                // transform them into json format
    85103                $i = 0;
    86                 $lastValid = false;
     104                $lastValid = -1;
    87105                $keys = array_keys($data);
    88106                $keyTimeframes = $keys[0];
    89107                $itemCount = count($keys);
    90                 if($itemCount < 0 )
    91                         return $this->error("No keys in fetched rrd data from ". $dbFile);
    92 
     108                if($itemCount < 0 ){
     109                        error_log("No keys in fetched rrd data from ". $dbFile);
     110                        echo json_encode("");
     111                        exit;
     112                }
    93113                $timeframesCount = count($data[$keyTimeframes]);
    94                 if($debug > 1){
    95                         error_log("Variables: ". $itemCount ."; Timeframes: ". $timeframesCount);
     114                if($debug > 0){
     115                        echo "<p>Variables: ". $itemCount ."; Timeframes: ". $timeframesCount ."</p>\n";
    96116                }
    97117                foreach($data[$keys[0]] as $timeframe => $value){
    98                         $tmp = new TrackItem($timeframe);
     118                        $allValid = true;
     119                        $gpsFix = false;
     120                        $tmp = array();
    99121                        foreach($keys as $key){
    100                                 $value = $data[$key][$timeframe];
    101                                 if(array_key_exists($key, $this->_configRound) && is_integer($this->_configRound[$key]))
    102                                         $value = round($value, $this->_configRound[$key]);
    103                                 if(!$tmp->setProperty($key, $value) && $debug > 1)
    104                                         error_log("Coult not set property ". $key ." to value ". $value ." at ". $timeframe);
     122                                if($key == "gpsfix"){
     123                                        switch($data[$key][$timeframe]){
     124                                                case 2:
     125                                                        $tmp[$key] = "2D";
     126                                                        $gpsFix = true;
     127                                                        break;
     128                                                case 3:
     129                                                        $tmp[$key] = "3D";
     130                                                        $gpsFix = true;
     131                                                        break;
     132                                                default:
     133                                                        $tmp[$key] = "-";
     134                                        }
     135                                }
     136                                else{
     137                                        $tmp[$key] = $data[$key][$timeframe];
     138                                        if(!is_numeric($tmp[$key]) || is_nan($tmp[$key])){
     139                                                $allValid = false;
     140                                                if($debug > 1){
     141                                                        echo "Invalid value ". $key ." (". $tmp[$key] .") at time ". $timeframe ."<br/>";
     142                                                }
     143                                        }
     144                                        elseif(array_key_exists($key, $this->_configRound) && is_integer($this->_configRound[$key]))
     145                                                $tmp[$key] = round($tmp[$key], $this->_configRound[$key]);
     146                                }
    105147                        }
    106148                        // only add the timeframe to the track, if the values are valid and we had a gps fix at that time
    107                         if($tmp->isValid()){
     149                        if($allValid){
    108150                                $lastValid = $tmp;
    109                                 if($tmp->gpsFixed()){
     151                                if($gpsFix){
    110152                                        if(!array_key_exists($timeframe, $result["track"])){
    111                                                 $result["track"][$timeframe] = $tmp->toArray();
     153                                                $result["track"][$timeframe] = $tmp;
    112154                                        }
    113155                                }
  • src/webapp/webservice/inc/GnuBoat/ServiceLogFiles.php

    r8fd7454 rc810990  
    3232                $debug = $this->debug();
    3333                $config = new Config();
    34                 if($debug > 1)
    35                         print "Log directory: ". $config->logDirectory() ."\n";
    3634
    3735                if(!array_key_exists("logfilesSelected", $_POST)){
    … …  
    3937                        $files = glob($config->logDirectory() ."*.log");
    4038                        array_walk($files, 'GnuBoat\ServiceLogFiles::stripLogDirectory');
    41                         return $this->output($files);
    42                 }
    4339
    44                 // prepare a download of available log files
    45                 $files = $_POST["logfilesSelected"];
    46                 if(count($files) < 1)
    47                         return $this->error("No logfile selected");
    48                 elseif(count($files) == 1){
    49                         $content = file_get_contents($config->logDirectory() . $files[0]);
    50                         if($content === false){
    51                                 echo "<html><head></head><body>Failed to read logfile ". $files[0] ."</body></html>";
     40                        header('Content-Type: application/json');
     41                        if($debug > 0){
     42                                echo json_encode($files,  JSON_PRETTY_PRINT) ."\n";
    5243                        }
    53                
    54                         header('Content-Type: text/plain');
    55                         header('Content-disposition: attachment; filename="'. $files[0] .'"');
    56                         header('Content-Length: ' . filesize($config->logDirectory() . $files[0]));
    57                         echo $content;
     44                        else{
     45                                echo json_encode($files) ."\n";
     46                        }
    5847                }
    5948                else{
    60                         $date = new \DateTime('NOW');
    61                         $archiveName = "gnuboat-logs-". $date->format("Y-m-d");
    62                
    63                         // provide files as zip file
    64                         $tmpArchive = tempnam(sys_get_temp_dir(), $archiveName);
    65                         $zip = new \ZipArchive();
    66                         if($zip->open($tmpArchive, \ZipArchive::CREATE) !== TRUE){
    67                                 echo "<html><head></head><body>Failed to create zip file</body></html>";
     49                        // prepare a download of available log files
     50                        $files = $_POST["logfilesSelected"];
     51                        if(count($files) < 1){
    6852                                return;
    6953                        }
    70                         foreach($files as $file){
    71                                 if($zip->addFile($config->logDirectory() . $file, $archiveName ."/". $file) !== true){
    72                                         $zip->close();
    73                                         echo "<html><head></head><body>Failed to add logfile ". $file ." to the zip file</body></html>";
     54                        elseif(count($files) == 1){
     55                                $content = file_get_contents($config->logDirectory() . $files[0]);
     56                                if($content === false){
     57                                        echo "<html><head></head><body>Failed to read logfile ". $files[0] ."</body></html>";
     58                                }
     59                       
     60                                header('Content-Type: text/plain');
     61                                header('Content-disposition: attachment; filename="'. $files[0] .'"');
     62                                header('Content-Length: ' . filesize($config->logDirectory() . $files[0]));
     63                                echo $content;
     64                        }
     65                        else{
     66                                $date = new \DateTime('NOW');
     67                                $archiveName = "gnuboat-logs-". $date->format("Y-m-d");
     68                       
     69                                // provide files as zip file
     70                                $tmpArchive = tempnam(sys_get_temp_dir(), $archiveName);
     71                                $zip = new \ZipArchive();
     72                                if($zip->open($tmpArchive, \ZipArchive::CREATE) !== TRUE){
     73                                        echo "<html><head></head><body>Failed to create zip file</body></html>";
    7474                                        return;
    7575                                }
     76                                foreach($files as $file){
     77                                        if($zip->addFile($config->logDirectory() . $file, $archiveName ."/". $file) !== true){
     78                                                $zip->close();
     79                                                echo "<html><head></head><body>Failed to add logfile ". $file ." to the zip file</body></html>";
     80                                                return;
     81                                        }
     82                                }
     83                                if($zip->close() !== true){
     84                                                echo "<html><head></head><body>Failed to save zip file</body></html>";
     85                                                return;
     86                                }
     87                               
     88                                echo "<html><head></head><body>Failed to add logfile ". $file ." to the zip file</body></html>";
     89                               
     90                                //Send zip folder
     91                                while (ob_get_level()) {
     92                                        ob_end_clean();
     93                                }
     94                                ob_start();
     95                                header('Content-Type: application/zip');
     96                                header('Content-Transfer-Encoding: Binary');
     97                                header('Content-disposition: attachment; filename=' . $archiveName . '.zip');
     98                                header('Content-Length: ' . filesize($tmpArchive));
     99                                ob_flush();
     100                                ob_clean();
     101                                readfile($tmpArchive);
     102                                unlink($tmpArchive);
     103                                return;
    76104                        }
    77                         if($zip->close() !== true){
    78                                         echo "<html><head></head><body>Failed to save zip file</body></html>";
    79                                         return;
    80                         }
    81                        
    82                         echo "<html><head></head><body>Failed to add logfile ". $file ." to the zip file</body></html>";
    83                        
    84                         //Send zip folder
    85                         while (ob_get_level()) {
    86                                 ob_end_clean();
    87                         }
    88                         ob_start();
    89                         header('Content-Type: application/zip');
    90                         header('Content-Transfer-Encoding: Binary');
    91                         header('Content-disposition: attachment; filename=' . $archiveName . '.zip');
    92                         header('Content-Length: ' . filesize($tmpArchive));
    93                         ob_flush();
    94                         ob_clean();
    95                         readfile($tmpArchive);
    96                         unlink($tmpArchive);
    97                         return;
    98105                }
    99106        }
  • src/webapp/webservice/inc/GnuBoat/ServiceMap.php

    r8fd7454 rc810990  
    3030        protected function process()
    3131        {
    32                 if(!array_key_exists("mapName", $_POST))
    33                         return $this->error("Please specify map name (no value)");
     32                header('Content-type: application/json');
    3433
     34                $result["error"] = 1;
     35                $result["errormessage"] = "Unknown Error";
     36
     37                if(!array_key_exists("mapName", $_POST)){
     38                        $result["error"] = 1;
     39                        $result["errormessage"] = "Please specify map name (no value)";
     40                        echo json_encode($result);
     41                        return;
     42                }
    3543                $mapName = $_POST["mapName"];
    36                 if(empty($mapName) || $mapName == "")
    37                         return $this->error("Please specifiy map name (empty value)");
     44                if(empty($mapName) || $mapName == ""){
     45                        $result["error"] = 1;
     46                        $result["errormessage"] = "Please specifiy map name (empty value)";
     47                        echo json_encode($result);
     48                        return;
     49                }
    3850
    3951                $mapDirectory = __DIR__ ."/../../maps";
    40                 if(!array_key_exists("mapFile", $_FILES))
    41                         return $this->error("No map file recieved");
    42 
    43                 if (!isset($_FILES['mapFile']['error']) || is_array($_FILES['mapFile']['error']))
    44                         return $this->error("Invalid parameters");
    45 
     52                if(!array_key_exists("mapFile", $_FILES)){
     53                        $result["error"] = 1;
     54                        $result["errormessage"] = "No map file recieved";
     55                        echo json_encode($result);
     56                        return;
     57                }
     58                if (!isset($_FILES['mapFile']['error']) || is_array($_FILES['mapFile']['error'])){
     59                        $result["error"] = 1;
     60                        $result["errormessage"] = "Invalid parameters";
     61                        echo json_encode($result);
     62                        return;
     63                }
    4664                switch ($_FILES['mapFile']['error']) {
    4765                        case UPLOAD_ERR_OK:
    4866                                break;
    4967                        case UPLOAD_ERR_NO_FILE:
    50                                 return $this->error("No file sent");
     68                                $result["error"] = 1;
     69                                $result["errormessage"] = "No file sent";
     70                                echo json_encode($result);
     71                                return;
    5172                        case UPLOAD_ERR_INI_SIZE:
    5273                        case UPLOAD_ERR_FORM_SIZE:
    53                                 return $this->error("Exceeded filesize limit.");
     74                                $result["error"] = 1;
     75                                $result["errormessage"] = "Exceeded filesize limit.";
     76                                echo json_encode($result);
     77                                return;
    5478                        default:
    55                                 return $this->error("Unknown PHP Error");
     79                                $result["error"] = 1;
     80                                $result["errormessage"] = "Unknown PHP Error";
     81                                echo json_encode($result);
     82                                return;
    5683                }
    5784                $mapFileName = $mapDirectory ."/". sha1_file($_FILES['mapFile']['tmp_name']) .".mbtiles";
    5885                if(move_uploaded_file($_FILES['mapFile']['tmp_name'], $mapFileName)){
    59                         if(!chmod($mapFileName, 0755))
    60                                 return $this->error("Could not change permissions of the map file");
    61                         // correct map metadata
    62                         $resultRename = $this->setMapName($mapFileName, $mapName);
    63                         if($resultRename[0] === true)
    64                                 return $this->output(["error" => 0, "errormessage" => ""]);
    65                        
    66                         return $this->error($resultRename[1]);
     86                        if(!chmod($mapFileName, 0755)){
     87                                $result["error"] = 1;
     88                                $result["errormessage"] = "Could not change permissions of the map file";
     89                        }
     90                        else{
     91                                // correct map metadata
     92                                $resultRename = $this->setMapName($mapFileName, $mapName);
     93                                if($resultRename[0] === true){
     94                                        $result["error"] = 0;
     95                                        $result["errormessage"] = "";
     96                                }
     97                                else{
     98                                        $result["error"] = 1;
     99                                        $result["errormessage"] = $resultRename[1];
     100                                }
     101                        }
    67102                }
    68                 else
    69                         return $this->error("Could not move map in place");
     103                else {
     104                        $result["error"] = 1;
     105                        $result["errormessage"] = "Could not move map in place";
     106                }
     107                echo json_encode($result);
    70108        }
    71109       
  • src/webapp/webservice/inc/GnuBoat/ServiceShutdown.php

    r8fd7454 rc810990  
    3636                if($handle === false){
    3737                        $message = "Could not create file (". $config->shutdownRequestFile() .") to indicate shutdown to the daemon.";
    38                         return $this->error($message, ["shutdownstart" => -1]);
     38                        if($debug > 0)
     39                                echo $message;
     40                        error_log($message);
     41                        $result["shutdownstart"] = -1;
     42                        $result["errormessage"] = $message;
     43                }
     44                else{
     45                        $shutdownTime = new \DateTime('NOW');
     46                        $shutdownTime->modify("+15 seconds");
     47                        fwrite($handle, $shutdownTime->format(\DateTime::ATOM));
     48                        $result["shutdownstart"] = $shutdownTime->format(\DateTime::ATOM);
    3949                }
    4050
    41                 $shutdownTime = new \DateTime('NOW');
    42                 $shutdownTime->modify("+15 seconds");
    43                 fwrite($handle, $shutdownTime->format(\DateTime::ATOM));
    44                 fclose($handle);
    45                 $result["shutdownstart"] = $shutdownTime->format(\DateTime::ATOM);
    46                 $this->output($result);
     51                header('Content-Type: application/json');
     52                if($debug > 0){
     53                        echo json_encode($result,  JSON_PRETTY_PRINT) ."\n";
     54                }
     55                else{
     56                        echo json_encode($result) ."\n";
     57                }
    4758        }
    4859}
  • src/webapp/webservice/inc/GnuBoat/Webservice.php

    r8fd7454 rc810990  
    2323class WebService
    2424{
    25         function __construct($debug)
     25        function __construct()
    2626        {
    2727                $this->_requests = array();
    … …  
    3030                $this->_requests["logfiles"] = "GnuBoat\ServiceLogFiles";
    3131                $this->_requests["map"] = "GnuBoat\ServiceMap";
    32                 $this->_requests["replay"] = "GnuBoat\ServiceReplay";
    33                
    34                 $this->_debug = $debug;
    3532        }
    3633
    3734        public function process()
    3835        {
     36                $debug = 0;
     37                if(is_array($_GET) && array_key_exists("debug", $_GET))
     38                        $debug = $_GET["debug"];
     39
    3940                $request = array_keys($this->_requests)[0];
    4041                if(is_array($_GET) && array_key_exists("request", $_GET)){
    … …  
    4344
    4445                if(!array_key_exists($request, $this->_requests)){
    45                         return Service::errorStatic("Request ". $request ." not implemented", $this->_debug);
     46                        $result["error"] = 1;
     47                        $result["errormessage"] = "Request ". $request ." not implemented";
     48                       
     49                        header('Content-Type: application/json');
     50                        echo json_encode($result) ."\n";
     51                        return;
    4652                }
    47                
    48                 call_user_func(array(new $this->_requests[$request], "processRequest"), $this->_debug);
     53
     54                call_user_func(array(new $this->_requests[$request], "processRequest"), $debug);
    4955        }
    5056
    5157        private $_requests;
    52         private $_debug;
    5358}
    5459
  • src/webapp/webservice/inc/autoloader.php

    r8fd7454 rc810990  
    2525}
    2626
    27 function canClassBeLoaded($class) {
    28         $parts = explode('\\', $class);
    29         $fileName = __DIR__ ."/". join("/", $parts) .".php";
    30         return file_exists($fileName);
    31 }
    32 
    3327spl_autoload_register("gnuboatAutoloader");
    3428
  • src/webapp/webservice/index.php

    r8fd7454 rc810990  
    1919require_once(__DIR__ ."/inc/autoloader.php");
    2020
    21 $debug = 0;
    22 if(array_key_exists("debug", $_GET))
    23         $debug = $_GET["debug"];
    24 
    25 $webservice = new GnuBoat\Webservice($debug);
     21$webservice = new GnuBoat\Webservice();
    2622$webservice->process();
    2723
  • src/webapp/webservice/tests/ServiceTest.php

    r8fd7454 rc810990  
    2020// declare(Strict_types=1);
    2121
    22 namespace GnuBoat;
    23 
    2422/**
    25   * @brief Covers Service.php tests
     23  * @brief Covers index.php tests
    2624  */
    27 final class ServiceTest extends \PHPUnit_Framework_TestCase
     25final class ServiceTest extends PHPUnit_Framework_TestCase
    2826{
     27        /**
     28          * @runInSeparateProcess
     29          */
    2930        public function testData()
    3031        {
    31                 $webservice = new Webservice(0);
    32                 $this->assertInstanceOf(Webservice::class, $webservice);
    33                 $_GET["request"] = "data";
     32                $webservice = new GnuBoat\Webservice();
     33                $this->assertInstanceOf(GnuBoat\Webservice::class, $webservice);
     34                $_POST["request"] = "data";
    3435                $webservice->process();
    3536        }
    3637
     38        /**
     39          * @runInSeparateProcess
     40          */
    3741        public function testLogFiles()
    3842        {
    39                 $webservice = new Webservice(0);
    40                 $this->assertInstanceOf(Webservice::class, $webservice);
    41                 $_GET["request"] = "logfiles";
     43                $webservice = new GnuBoat\Webservice();
     44                $this->assertInstanceOf(GnuBoat\Webservice::class, $webservice);
     45                $_POST["request"] = "logfiles";
    4246                $webservice->process();
    4347        }
    4448       
     49        /**
     50          * @runInSeparateProcess
     51          */
    4552        public function testShutdown()
    4653        {
    47                 $webservice = new Webservice(0);
    48                 $this->assertInstanceOf(Webservice::class, $webservice);
    49                 $_GET["request"] = "shutdown";
     54                $webservice = new GnuBoat\Webservice();
     55                $this->assertInstanceOf(GnuBoat\Webservice::class, $webservice);
     56                $_POST["request"] = "shutdown";
    5057                $webservice->process();
    5158        }
    52 
     59       
     60        /**
     61          * @runInSeparateProcess
     62          */
    5363        public function testMap()
    5464        {
    55                 $webservice = new Webservice(0);
    56                 $this->assertInstanceOf(Webservice::class, $webservice);
    57                 $_GET["request"] = "map";
     65                $webservice = new GnuBoat\Webservice();
     66                $this->assertInstanceOf(GnuBoat\Webservice::class, $webservice);
     67                $_POST["request"] = "map";
    5868                $webservice->process();
    59         }
    60 
    61         public function testReplay()
    62         {
    63                 $webservice = new Webservice(0);
    64                 $_GET["request"] = "replay";
    65                 $_POST["logfile"] = "replay-test.log";
    66                 $webservice->process();
    67                 $output = $this->getActualOutput();
    68                 $this->assertJsonStringEqualsJsonString('{"track":{"1503767412":{"latitude":1.001,"longitude":1.001,"speedthroughwater":"-","speedoverground":11,"courseoverground":21,"waterdepth":"-","watertemperature":"-","gpsfix":"-"},"1503767413":{"latitude":2.0186666666667001,"longitude":2.0186666666667001,"speedthroughwater":"-","speedoverground":12,"courseoverground":22,"waterdepth":"-","watertemperature":"-","gpsfix":"-"},"1503767414":{"latitude":3.1696666666666999,"longitude":3.1696666666666999,"speedthroughwater":"-","speedoverground":13,"courseoverground":23,"waterdepth":1,"watertemperature":21,"gpsfix":"-"},"1503767415":{"latitude":4.004,"longitude":4.004,"speedthroughwater":"-","speedoverground":14,"courseoverground":24,"waterdepth":2,"watertemperature":22,"gpsfix":"-"},"1503767416":{"latitude":5.005,"longitude":5.005,"speedthroughwater":"-","speedoverground":15,"courseoverground":25,"waterdepth":3,"watertemperature":23,"gpsfix":"-"}}}', $output);
    6969        }
    7070}
    7171
    72 function error_log($msg)
    73 {
    74         echo "ERR GnuBoat: ". $msg ."\n";
    75 }
    76 
    7772?>
Note: See TracChangeset for help on using the changeset viewer.