{"id":17217069,"url":"https://github.com/akhenakh/mocs","last_synced_at":"2026-03-14T09:40:28.330Z","repository":{"id":62973697,"uuid":"141930597","full_name":"akhenakh/mocs","owner":"akhenakh","description":"My Own Car System, a Go \u0026 Qt application for your car","archived":false,"fork":false,"pushed_at":"2018-08-08T10:28:40.000Z","size":2510,"stargazers_count":238,"open_issues_count":0,"forks_count":26,"subscribers_count":20,"default_branch":"master","last_synced_at":"2025-03-31T20:41:22.553Z","etag":null,"topics":["car","go","gps","map","qt","rpi"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/akhenakh.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-07-22T21:05:33.000Z","updated_at":"2025-01-06T21:38:45.000Z","dependencies_parsed_at":"2022-11-10T05:02:11.768Z","dependency_job_id":null,"html_url":"https://github.com/akhenakh/mocs","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akhenakh%2Fmocs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akhenakh%2Fmocs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akhenakh%2Fmocs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akhenakh%2Fmocs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/akhenakh","download_url":"https://codeload.github.com/akhenakh/mocs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253174694,"owners_count":21865899,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["car","go","gps","map","qt","rpi"],"created_at":"2024-10-15T03:43:12.012Z","updated_at":"2026-03-14T09:40:23.260Z","avatar_url":"https://github.com/akhenakh.png","language":"JavaScript","funding_links":[],"categories":["📦 Legacy \u0026 Inactive Projects"],"sub_categories":[],"readme":"M.O.C.S\n-------\n\nMy Own Car System see [this blogpost](https://blog.nobugware.com/post/2018/my_own_car_system_raspberry_pi_offline_mapping/)\n\nThis app is an experiment to replace the non existent management system in my car.\n\nIt shows a rear camera and a live 3D map.\n\nIt's a Go application using [Qt bindings](https://github.com/therecipe/qt)\n\n![Image of Mocs](https://raw.githubusercontent.com/akhenakh/mocs/master/images/mocs.png)\n\n## Build\n```\nexport CGO_CXXFLAGS_ALLOW=\".*\"\nexport CGO_LDFLAGS_ALLOW=\".*\" \nexport CGO_CFLAGS_ALLOW=\".*\"\nexport QT_PKG_CONFIG=true \nqtdeploy build # if you installed the bindings\nqtdeploy -docker build rpi3 # with docker cross compiler image for rpi3\n```\n\n## Capture Video\nQt via Gstreamer does not allow non interlaced videos :(  \nOne solution is to force a pipeline with an interlacer.\n\n```\nexport QT_GSTREAMER_CAMERABIN_VIDEOSRC=\"videotestsrc\"\n```\nNot that easy via Qt I had to patch camerabinsession.cpp to insert a filter on the preview:\nat the end of `GstElement *CameraBinSession::buildCameraSource()`\n```\n    const QByteArray envInterlace = qgetenv(\"QT_GSTREAMER_CAMERABIN_VIDEO_INTERLACE\");\n    if (envInterlace.length() \u003e 0) {\n        GstElement *interlace = gst_element_factory_make (\"interlace\", NULL);\n        if (interlace == NULL)\n            g_error (\"Could not create 'interlace' element\");\n\n\n        g_object_set(G_OBJECT(m_camerabin), \"viewfinder-filter\", interlace, NULL);\n\n        #if CAMERABIN_DEBUG\n            qDebug() \u003c\u003c \"set camera filter\" \u003c\u003c interlace;\n        #endif\n        gst_object_unref (interlace);\n    }\n```\n\n## GPS\nIt reads GPS data from [gpsd](https://github.com/akhenakh/gpsd)\n\n## Offline maps\n[OpenMapTiles project is great](https://openmaptiles.org) to generate vector data in MBTILES format, serve them with[mbmatch](https://github.com/akhenakh/mbmatch).  \nQt Map QML can display them using the `mapboxgl` driver.\n\n\n## Routing\n\nHopefully the provided Qt `osm` plugins knows how to route using the OSRM API.  \nSo you can have a local OSRM for routing and it will work.\n```\nosrm-extract -p /usr/share/osrm/profiles/car.lua quebec-latest.osm.pbf \nosrm-contract quebec-latest.osrm\nosrm-routed quebec-latest.osrm\n```\n\nTo set your home base use `DEFAULTLAT` \u0026 `DEFAULTLNG` environment variable.\n\n## Raspberry\nI'm using an Rpi3 (old model).\n\nWith [Arch for ARM](https://archlinuxarm.org) but any system will do.\n\nEnable mocs at startup.  \nEdit `/lib/systemd/system/mocs.service`\n\n\n```\n[Unit]\nDescription=Mocs\n\n[Service]\nExecStart=/home/youruser/mocs\nEnvironment=DEFAULTLAT=46.45323\nEnvironment=DEFAULTLNG=-71.93323\nEnvironment=QT_QPA_PLATFORM=eglfs:/dev/fb0\nEnvironment=QT_GSTREAMER_CAMERABIN_VIDEO_INTERLACE=yes\nEnvironment=QT_QPA_EGLFS_HIDECURSOR=yes\nRestart=always\nRestartSec=5\n\n[Install]\nWantedBy=multi-user.target\n```\n`systemctl --user enable mocs.service`\n\nEnable osrm  \n\n## Known bugs\nSecond route to home won't work because workaround for `routeModel.cancel()` crash.\n\n## License\nthis code is under MIT license\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\nBut due to Qt and !@# LGPL, licensing of this code is uncertain since Go is compiling static code [see therecipe FAQ](https://github.com/therecipe/qt/wiki/FAQ#what-is-the-implication-from-using-lgpl-library-in-my-go-app-)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fakhenakh%2Fmocs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fakhenakh%2Fmocs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fakhenakh%2Fmocs/lists"}