{ "info": { "author": "", "author_email": "", "bugtrack_url": null, "classifiers": [], "description": "# HABSIM\nThis package provides an objected oriented client interface and accession utilities to HABSIM, Stanford Student Space Initiative's high-altitude balloon prediction server, at http://predict.stanfordssi.org. (See https://github.com/SSI-MC/habsim.) Main features include:\n\n- Custom flight profiles built from an arbitrary number of profile segments\n- API calls abstracted away in a Prediction class\n- Wind and elevation data accession utilities\n- WebPlot class, which permits writing of trajectories on an OpenStreetMap layer for in-browser viewing\n- Trajectory optimization utilities\n\nTo install, run `pip3 install habsim` and include with `import habsim`. All classes and subpackages are imported in the package-level namespace. Unfortunately, Python 2 is not supported. For method-level documentation, use `help(...)` to view the docstrings.\n\nA note about timestamps: this package manipulates UNIX timestamps extracted from user-supplied datetime objects. When you create a datetime object, its `timestamp()` method returns as if the datetime is in the local time zone of your machine --- this package expects such behavior. You should not worry about converting your datetime object to UTC time --- doing so may cause unexpected behavior.\n\n### Classes\nFor usage examples, see section below.\n\n- `Segment` segment of a profile with a constant ascent or descent rate \n- `Profile` list of segments\n- `ControlledProfile` optimizable profile expressed as altitude waypoints rather than a list of segments\n- `Prediction` container class which holds a profile, calls the server for predictions, and holds the resulting trajectory\n- `Trajectory` single trajectory predicted for a profile or created by user from existing data\n- `StaticTarget` a nonmoving target for trajectory optimization\n- `MovingTarget` a moving target for trajectory optimization\n\n### Subpackage `util`\nProvides data accession and common calculation utilies for both client and internal use. All API calls are wrapped in methods contained herein, although the user should not need to call them directly. Relevant methods and fields for common client use are as follows:\n\n- `checkServer` should be called anytime before running a prediction.\n- `closestPoint` implements a heuristic to quickly find the closest point to a Target object in the path specified by a Trajectory. The closest point, great circle distance, and compass bearing from the path to the point are returned.\n- `optimize_step` takes in a `Prediction` object containing a `ControlledProfile` (and whose other parameters must all be specified) and a`Target` and modifies the `ControlledProfile` to decrease the distance to the target according to step size `alpha`. The closest point, distance, and bearing prior to the step are returned.\n- `gefs_layers` is a list of altitudes corresponding to GEFS wind layers which may be useful in initializing a `ControlledProfile`.\n- `average_wind` returns the expected wind for a certain time, location, and elevation based on the 20 ensemble models.\n- `wind` returns the wind data for a certain time, location, and elevation for a specific model.\n\n### Subpackage `ioutil`\nThis package primarily exports a `WebPlot` class which can plot an arbitrary number of multi-segment trajectories on an HTML OpenStreetMap interface for in-browser viewing. For sample usage, see below. For complete documentation, see the docstrings.\n\n### Usage\nConstructing a profile:\n```\n# Ascent 3 m/s.\nascent = Segment(3, stopalt=29000) \n\n# Segments may be specified by end altitude or duration.\nequilibrate = Segment(0, dur=3) \ndescent = Segment(-3, stopalt=0)\n\n# Segments with a non-unity drift coefficient are supported.\nfloating = Segment(0, dur=3, coeff=0.5) \nprofile = Profile(segments=[ascent, equilibrate, descent, floating])\n```\nSpecifying launch parameters and running the prediction:\n```\ntime = datetime(2019, 4, 17, 22, 30)\n\n# Default time is current time\npred = Prediction(profile=profile,\n launchsite=hollister,\n launchtime=time) \n\n# Parameters can also be passed in at runtime.\ntraj = prediction.run(model=1).trajectory \n```\nSaving predictions to file:\n```\nplt = WebPlot()\nplt.origin(*hollister.coords)\nplt.add(pred.split())\nplt.save('name.html')\n```\nRunning and optimizing a `ControlledProfile`:\n```\n# 50 hours with waypoints at 5 hour intervals\nprofile = hs.ControlledProfile(50, 5)\n\n# See docstring for argument details\nprofile.initialize(2000, 5000, 30000, seed=[79.0, 5000])\ntarget = StaticTarget(40.7, -92.7)\npred.profile = profile\nfor i in range(N):\n pred.run(model=1)\n optimize_step(pred, hs.StaticTarget(40.7, -92.7), 20)\n```\nThe package can also be used to analyze existing trajectories:\n```\ntraj = Trajectory(data=data)\ntraj.length() # Distance travelled in km\ntraj.duration() # Duration in hours\ntraj.endtime() # Endpoint in local time\n\n# Points in the trajectory can be accessed directly.\ntimestamp, lat, lon, alt, u_wind, v_wind, __, __ = traj[15]\n```\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/stanford-ssi/habsim_client", "keywords": "", "license": "GNU GPLv3", "maintainer": "", "maintainer_email": "", "name": "habsim", "package_url": "https://pypi.org/project/habsim/", "platform": "", "project_url": "https://pypi.org/project/habsim/", "project_urls": { "Homepage": "http://github.com/stanford-ssi/habsim_client" }, "release_url": "https://pypi.org/project/habsim/0.1/", "requires_dist": null, "requires_python": ">=3", "summary": "Client interface to Stanford Student Space Initiative HABSIM server", "version": "0.1" }, "last_serial": 5664603, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "ead549e5c725b4879fb0fa6db44e8bbd", "sha256": "1b26d997110372d663b9982dfdf6df5bd7099f22a8442c75385e83c0c81a409e" }, "downloads": -1, "filename": "habsim-0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "ead549e5c725b4879fb0fa6db44e8bbd", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3", "size": 25999, "upload_time": "2019-08-12T07:57:59", "url": "https://files.pythonhosted.org/packages/a9/28/54c3392a951b8eeac13b9685c06ac010cb96ea4f429ae2d51ef0d2519067/habsim-0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f589f3927678a50f607f9f757a2d5b56", "sha256": "deef9bed035c4f567a163518260346965673e0fede88f2d7e332fa17fc34610b" }, "downloads": -1, "filename": "habsim-0.1.tar.gz", "has_sig": false, "md5_digest": "f589f3927678a50f607f9f757a2d5b56", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3", "size": 12170, "upload_time": "2019-08-12T07:58:01", "url": "https://files.pythonhosted.org/packages/cc/df/5ed284ecf8644511c9b4add2ddc445b2bd8a0c62965e3b2c919d22872c9a/habsim-0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "ead549e5c725b4879fb0fa6db44e8bbd", "sha256": "1b26d997110372d663b9982dfdf6df5bd7099f22a8442c75385e83c0c81a409e" }, "downloads": -1, "filename": "habsim-0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "ead549e5c725b4879fb0fa6db44e8bbd", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3", "size": 25999, "upload_time": "2019-08-12T07:57:59", "url": "https://files.pythonhosted.org/packages/a9/28/54c3392a951b8eeac13b9685c06ac010cb96ea4f429ae2d51ef0d2519067/habsim-0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f589f3927678a50f607f9f757a2d5b56", "sha256": "deef9bed035c4f567a163518260346965673e0fede88f2d7e332fa17fc34610b" }, "downloads": -1, "filename": "habsim-0.1.tar.gz", "has_sig": false, "md5_digest": "f589f3927678a50f607f9f757a2d5b56", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3", "size": 12170, "upload_time": "2019-08-12T07:58:01", "url": "https://files.pythonhosted.org/packages/cc/df/5ed284ecf8644511c9b4add2ddc445b2bd8a0c62965e3b2c919d22872c9a/habsim-0.1.tar.gz" } ] }